:root {
  --primary: #8a2be2;
  --primary-dark: #5a189a;
  --secondary: #121212;
  --accent: #e2b4ff;
  --text: #f8f8f8;
  --text-secondary: #cccccc;
  --card-bg: rgba(30, 30, 30, 0.8);
  --border-color: rgba(138, 43, 226, 0.3);
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--secondary);
  color: var(--text);
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(138, 43, 226, 0.15) 0%, transparent 50%);
  min-height: 100vh;
  line-height: 1.6;
}

/* Общие стили */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
   transition: all 0.3s ease;
    position: relative;
    overflow: hidden
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.pulse {
    animation: pulse 2s infinite;
}


@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(33, 150, 243, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0);
    }
}



.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.btn-secondary {
  background: var(--secondary);
  border: 1px solid var(--border-color);
}

.btn-danger {
  background: var(--danger);
}

.btn-success {
  background: var(--success);
}

/* Формы */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  background: rgba(20, 20, 20, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
}

/* Страница входа и регистрации */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-box h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.auth-box p {
  text-align: center;
  margin-top: 20px;
  color: var(--text-secondary);
}

.auth-box a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.auth-box a:hover {
  text-decoration: underline;
}

/* Шапка */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.logo h1 {
  font-size: 2rem;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.nav-links a i {
  font-size: 1.1rem;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

/* Страница профиля */
.profile-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.profile-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.profile-section h2 {
  margin-bottom: 25px;
  color: var(--accent);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 25px 0;
}

.info-grid div {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-color);
}

.info-grid span:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Стили для продуктов */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.product-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: var(--primary);
}

.product-image {
  width: 100%;
  height: 180px;
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
  transform: scale(1.05);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.product-header h3 {
  font-size: 1.2rem;
  color: var(--text);
}

.product-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.product-status.active {
  background-color: rgba(40, 167, 69, 0.2);
  color: var(--success);
}

.product-status.expiring {
  background-color: rgba(255, 193, 7, 0.2);
  color: var(--warning);
}

.product-status.expired {
  background-color: rgba(220, 53, 69, 0.2);
  color: var(--danger);
}

.product-status.error {
  background-color: rgba(108, 117, 125, 0.2);
  color: var(--text-secondary);
}

.product-expires {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-btn {
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.no-products {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.no-products i {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--accent);
}

/* Админ панель */
.admin-container {
  max-width: 1400px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.admin-main {
  margin-top: 30px;
}

.admin-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
}

.admin-section h2 {
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.stat-card {
  background: rgba(26, 26, 26, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
  font-size: 1rem;
  margin-bottom: 15px;
  color: var(--accent);
}

.stat-card span {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
}

.table-container {
  margin-top: 20px;
  overflow-x: auto;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.users-table th {
  background: rgba(138, 43, 226, 0.1);
  color: var(--accent);
  font-weight: 600;
}

.users-table tr:hover {
  background: rgba(138, 43, 226, 0.05);
}

.key-generator {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.generated-keys {
  margin-top: 20px;
}

.key-item {
  background: rgba(26, 26, 26, 0.7);
  border-left: 4px solid var(--primary);
  padding: 12px 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  color: var(--primary);
}

/* Уведомления */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  color: white;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  transform: translateX(200%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification.show {
  transform: translateX(0);
}

.notification i {
  font-size: 1.2rem;
}

.notification.success {
  background: var(--success);
}

.notification.error {
  background: var(--danger);
}

.notification.warning {
  background: var(--warning);
  color: #000;
}

.notification.info {
  background: var(--info);
}

/* Индикатор загрузки */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text);
}

.loading-spinner i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: var(--accent);
}

/* Адаптивность */
@media (max-width: 992px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .auth-box {
    padding: 30px 20px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    gap: 15px;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .nav-links {
    flex-direction: column;
    gap: 10px;
  }
  
  .logo h1 {
    font-size: 1.8rem;
  }
  
  .auth-box h2 {
    font-size: 1.5rem;
  }
  
  .product-image {
    height: 150px;
  }
}

/* Стили для страницы продуктов */
.products-main {
  padding: 20px 0;
}

.products-main h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--accent);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: var(--primary);
}

.product-header {
  padding: 20px;
  background-size: cover;
  background-position: center;
  color: white;
  position: relative;
}

.product-header h3 {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
}

.product-body {
  padding: 20px;
}

.features-list {
  list-style: none;
  margin-bottom: 20px;
}

.features-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.features-list i {
  color: var(--primary);
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.price {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--accent);
}

.buy-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* Адаптивные стили */
@media (max-width: 992px) {
  .products-main h1 {
    font-size: 1.8rem;
  }
  
  .product-header h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .products-main {
    padding: 15px 0;
  }
  
  .products-main h1 {
    font-size: 1.6rem;
    justify-content: center;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .product-card {
    max-width: 100%;
  }
  
  .nav-links {
    gap: 15px;
  }
}

@media (max-width: 576px) {
  .products-main h1 {
    font-size: 1.4rem;
    gap: 10px;
  }
  
  .product-header {
    padding: 15px;
  }
  
  .product-body {
    padding: 15px;
  }
  
  .product-footer {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .price {
    text-align: center;
  }
  
  .buy-btn {
    width: 100%;
  }
  
  .container {
    padding: 15px;
  }
}

@media (max-width: 400px) {
  .logo h1 {
    font-size: 1.5rem;
  }
  
  .nav-links a {
    font-size: 0.85rem;
  }
  
  .products-main h1 {
    font-size: 1.3rem;
  }
  
  .product-header h3 {
    font-size: 1.1rem;
  }
}

/* Стили для генерации ключей */
.key-generator {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.generated-keys {
  margin-top: 20px;
  background: var(--card-bg);
  padding: 15px;
  border-radius: 8px;
}

.keys-info {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.keys-info p {
  margin: 5px 0;
}

.keys-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.key-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: rgba(138, 43, 226, 0.1);
  border-radius: 6px;
}

.key-value {
  font-family: monospace;
  word-break: break-all;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 5px;
  margin-left: 10px;
}

.copy-btn:hover {
  color: var(--primary);
}


