@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html, body { 
  height: 100%; 
}

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at 20% 20%, #181820 0%, #0b0b10 100%);
  color: #f3f3ff;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* ========== NAVBAR (ЕДИНЫЙ СТИЛЬ ДЛЯ ВСЕХ СТРАНИЦ) ========== */
.navbar {
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 20px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px;
}

.nav-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(155, 131, 255, 0.6);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.nav-logo-img:hover {
  transform: scale(1.1);
}

.nav-logo-text {
  font-weight: 700;
  font-size: 20px;
  color: #dcdcff;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links li a {
  text-decoration: none;
  color: #c9c9ff;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 14px;
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
}

.nav-links li a:hover {
  color: #a78bfa;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
  transition: width 0.3s ease;
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.nav-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  padding: 6px 12px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  text-decoration: none;
  max-width: 200px;
  overflow: hidden;
}

.nav-profile:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(155, 131, 255, 0.2);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(155, 131, 255, 0.5);
  flex-shrink: 0;
}

.nav-username {
  font-size: 14px;
  color: #e2e2ff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.nav-auth {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

/* ========== КНОПКИ ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
  color: #fff;
  box-shadow: 0 0 20px rgba(155, 131, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(90deg, #9a73ff, #6a2fd4);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(155, 131, 255, 0.4);
}

.btn-outline {
  border: 1px solid #9b83ff;
  color: #9b83ff;
  background: transparent;
}

.btn-outline:hover {
  background: #9b83ff;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(155, 131, 255, 0.3);
}

/* ========== HERO SECTION ========== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 40px 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45) saturate(0.95);
  z-index: 0;
  opacity: 0;
  animation: fadeIn 0.9s ease 0.35s forwards;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,14,0.55) 0%, rgba(10,10,14,0.8) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.hero-left {
  width: 100%;
  max-width: 900px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 16px;
  padding: 36px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 40px rgba(6,5,10,0.6);
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-text {
  flex: 1;
  text-align: left;
}

.hero-image-wrapper {
  flex: 0 0 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 50px;
}

.hero-image {
  width: 120%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid rgba(155, 131, 255, 0.3);
}

.hero-image:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(155, 131, 255, 0.3);
}

.hero-title {
  font-size: 48px;
  line-height: 1.02;
  margin-bottom: 10px;
  color: #eaeaff;
  text-shadow: 0 6px 30px rgba(155, 131, 255, 0.12);
  text-align: center;
  animation: fadeInUp 0.9s ease 0.2s both;
}

.hero-subtitle {
  color: #d9d9e6;
  margin-bottom: 18px;
  font-size: 18px;
  text-align: center;
  opacity: 0.95;
}

.features {
  list-style: none;
  display:flex;
  flex-direction: column;
  gap:12px;
  margin-bottom: 22px;
  align-items: center;
}

.feature {
  display:flex;
  align-items:center;
  gap:12px;
  color:#e9e9f2;
  font-size:16px;
}

.feature-icon {
  font-size:20px;
  display:inline-block;
  width:28px;
  text-align:center;
}

.hero-actions {
  display:flex;
  gap:12px;
  margin-top: 8px;
  justify-content: center;
}

.hero-cta {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
}

/* ========== FOOTER ========== */
.footer {
  background: rgba(10, 10, 15, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 50px 0 20px;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  gap: 40px;
}

.footer-left {
  flex: 1;
  max-width: 400px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 15px;
}

.footer-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(155, 131, 255, 0.5);
}

.footer-brand {
  font-weight: 700;
  font-size: 18px;
  color: #dcdcff;
}

.footer-desc {
  color: #a0a0cc;
  line-height: 1.6;
  font-size: 14px;
  margin: 0;
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-right a {
  color: #b8b8e6;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
  padding: 4px 0;
}

.footer-right a:hover {
  color: #a78bfa;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #8888aa;
  font-size: 13px;
}

/* ========== АНИМАЦИИ ========== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1024px) {
  .hero-left {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-image-wrapper {
    flex: 0 0 auto;
    margin-right: 0;
  }

  .hero-image {
    max-width: 400px;
    width: 100%;
  }

  .navbar .container {
    padding: 12px 20px;
  }
}

@media (max-width: 768px) {
  .navbar .container {
    padding: 10px 15px;
    gap: 15px;
  }

  .nav-links {
    display: none;
  }

  .nav-left {
    gap: 20px;
  }

  .nav-logo-text {
    font-size: 18px;
  }

  .nav-auth {
    gap: 8px;
  }

  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .nav-profile {
    padding: 5px 10px 5px 5px;
    max-width: 150px;
  }

  .nav-username {
    font-size: 13px;
    max-width: 80px;
  }

  .hero {
    padding: 20px 0;
    min-height: 80vh;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-left {
    padding: 24px;
  }

  .hero-image {
    max-width: 280px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
    gap: 30px;
  }

  .footer-left {
    max-width: 100%;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-right {
    align-items: center;
  }
}

@media (max-width: 480px) {
  .nav-username {
    display: none;
  }

  .nav-profile {
    padding: 5px;
    max-width: auto;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .hero-image {
    max-width: 250px;
  }

  .features {
    align-items: flex-start;
  }

  .feature {
    font-size: 14px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .footer-content {
    padding: 0 15px;
  }

  .footer-logo-img {
    width: 35px;
    height: 35px;
  }

  .footer-brand {
    font-size: 16px;
  }

  .footer-desc {
    font-size: 13px;
  }
}

/* ========== УТИЛИТЫ ========== */
.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

/* ========== ФОРМЫ ========== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 14px;
  color: #ccc;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  outline: none;
  transition: all 0.25s ease;
  font-family: inherit;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 2px rgba(155, 131, 255, 0.2);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
/* ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ ДЛЯ NAVBAR */
.nav-profile {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 50px !important;
  padding: 6px 12px 6px 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  max-width: 200px !important;
  min-width: fit-content !important;
}

.nav-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid rgba(155, 131, 255, 0.5) !important;
  flex-shrink: 0 !important;
}

.nav-username {
  font-size: 14px !important;
  color: #e2e2ff !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Гарантируем правильное выравнивание */
.navbar .container {
  align-items: center !important;
}

.nav-profile:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-2px) !important;
}

.spam-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(25, 25, 35, 0.95);
  border: 2px solid #ff4d6d;
  border-radius: 16px;
  padding: 30px 40px;
  text-align: center;
  z-index: 9999;
  color: #fff;
  animation: popupFade 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 77, 109, 0.5);
}

.spam-popup img {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
}

.spam-popup .timer {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  color: #ff8080;
  font-size: 16px;
}

@keyframes popupFade {
  from { opacity: 0; transform: translate(-50%, -55%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

:root {
  /* Темная тема (по умолчанию) */
  --bg-primary: radial-gradient(circle at 20% 20%, #181820 0%, #0b0b10 100%);
  --bg-card: rgba(15, 15, 25, 0.95);
  --bg-secondary: rgba(255, 255, 255, 0.05);
  --text-primary: #f3f3ff;
  --text-secondary: #c9c9ff;
  --accent-color: #a78bfa;
  --accent-hover: #7c3aed;
  --border-color: rgba(255, 255, 255, 0.08);
}

body.theme-light {
  --bg-primary: radial-gradient(circle at 20% 20%, #f8fafc 0%, #e2e8f0 100%);
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-secondary: rgba(0, 0, 0, 0.05);
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --accent-color: #7c3aed;
  --accent-hover: #6a2fd4;
  --border-color: rgba(0, 0, 0, 0.1);
}

/* Стили для страницы кодов доступа */
.admin-section {
    padding: 80px 20px 120px !important;
    min-height: calc(100vh - 200px) !important;
}

.admin-card {
    margin-bottom: 40px !important;
}

.codes-counter {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}
.codes-list h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 18px;
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.code-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.code-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--text-primary);
    font-size: 16px;
}

.btn-copy {
    background: transparent;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: var(--accent-color);
    color: white;
}

.admin-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}