/* ============================================
   ТЕМА И ЛОГОТИПЫ
   ============================================ */

/* Логотипы - переключение по теме */
.logo-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
  cursor: pointer;
  justify-items: center;
  width: 100%;
}

.logo-img {
  height: 60px;
  width: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
  justify-self: center;
  display: block;
}

.logo-section:hover .logo-img {
  transform: scale(1.05);
}

/* ТЁМНАЯ ТЕМА - показываем чёрный логотип */
[data-theme="dark"] .logo-black {
  display: block !important;
}

[data-theme="dark"] .logo-white {
  display: none !important;
}

/* СВЕТЛАЯ ТЕМА - показываем белый логотип */
[data-theme="light"] .logo-black {
  display: none !important;
}

[data-theme="light"] .logo-white {
  display: block !important;
}

/* Левая часть - название (прижато вправо к логотипу) */
.logo-title {
  justify-self: end;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding-right: 15px;
}

/* Правая часть - слоган (прижато влево к логотипу) */
.logo-tagline {
  justify-self: start;
  text-align: left;
  display: flex;
  justify-content: flex-start;
  width: 100%;
  padding-left: 15px;
}

/* ============================================
   ШАПКА
   ============================================ */
.main-header {
  background: var(--header-bg);
  border-bottom: 2px solid var(--border-color);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================
   ЛОГОТИПЫ
   ============================================ */
.logo-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
  cursor: pointer;
  justify-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.logo-img {
  height: 70px;
  width: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
  justify-self: center;
  display: block;
  margin: 0;
}

.logo-section:hover .logo-img {
  transform: scale(1.05);
}

/* Левая часть - название */
.logo-title {
  justify-self: end;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin: 0;
  padding: 0 20px 0 0;
  box-sizing: border-box;
}

/* Правая часть - слоган */
.logo-tagline {
  justify-self: start;
  text-align: left;
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin: 0;
  padding: 0 0 0 20px;
  box-sizing: border-box;
}

/* ============================================
   ГРАДИЕНТНЫЙ ЗАГОЛОВОК
   ============================================ */
.logo-title h1 {
  background: linear-gradient(
    90deg,
    var(--c-gold-3) 0%,
    #fff 25%,
    var(--c-gold-1) 50%,
    #fff 75%,
    var(--c-gold-3) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite, pulse 4s ease-in-out infinite;
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0;
  letter-spacing: 4px;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}

/* ============================================
   СЛОГАН
   ============================================ */
.logo-tagline p {
  display: flex;
  gap: 0;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  white-space: nowrap;
}

.logo-img {
  height: 50px;
  width: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
  justify-self: center;
  display: block;
}

.logo-section:hover .logo-img {
  transform: scale(1.05);
}

/* ТЁМНАЯ ТЕМА - показываем чёрный логотип */
[data-theme="dark"] .logo-black {
  display: block !important;
}

[data-theme="dark"] .logo-white {
  display: none !important;
}

/* СВЕТЛАЯ ТЕМА - показываем белый логотип */
[data-theme="light"] .logo-black {
  display: none !important;
}

[data-theme="light"] .logo-white {
  display: block !important;
}

/* Левая часть - название */
.logo-title {
  justify-self: end;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

/* Правая часть - слоган */
.logo-tagline {
  justify-self: start;
  text-align: left;
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

/* ============================================
   ШАПКА
   ============================================ */
.main-header {
  background: var(--header-bg);
  border-bottom: 2px solid var(--border-color);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================
   ГРАДИЕНТНЫЙ ЗАГОЛОВОК "ЛОДКИ ПРИЧАЛОВ"
   ============================================ */
.logo-title h1 {
  background: linear-gradient(
    90deg,
    var(--c-gold-3) 0%,
    #fff 25%,
    var(--c-gold-1) 50%,
    #fff 75%,
    var(--c-gold-3) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite, pulse 4s ease-in-out infinite;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 3px;
  line-height: 1.2;
  white-space: nowrap;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

/* ============================================
   ПОБУКВЕННОЕ СВЕЧЕНИЕ СЛОГАНА
   ============================================ */
.logo-tagline p {
  display: flex;
  gap: 0;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.logo-tagline p .letter {
  display: inline-block;
  color: var(--text-secondary);
  animation: letterGlow 4s ease-in-out infinite;
  transition: color 0.3s ease;
}

/* Задержки для каждой буквы слогана */
.logo-tagline p .letter:nth-child(1) { animation-delay: 0.0s; }
.logo-tagline p .letter:nth-child(2) { animation-delay: 0.1s; }
.logo-tagline p .letter:nth-child(3) { animation-delay: 0.2s; }
.logo-tagline p .letter:nth-child(4) { animation-delay: 0.3s; }
.logo-tagline p .letter:nth-child(5) { animation-delay: 0.4s; }
.logo-tagline p .letter:nth-child(6) { animation-delay: 0.5s; }
.logo-tagline p .letter:nth-child(7) { animation-delay: 0.6s; }
.logo-tagline p .letter:nth-child(8) { animation-delay: 0.7s; }
.logo-tagline p .letter:nth-child(9) { animation-delay: 0.8s; }
.logo-tagline p .letter:nth-child(10) { animation-delay: 0.9s; }
.logo-tagline p .letter:nth-child(11) { animation-delay: 1.0s; }
.logo-tagline p .letter:nth-child(12) { animation-delay: 1.1s; }
.logo-tagline p .letter:nth-child(13) { animation-delay: 1.2s; }
.logo-tagline p .letter:nth-child(14) { animation-delay: 1.3s; }
.logo-tagline p .letter:nth-child(15) { animation-delay: 1.4s; }
.logo-tagline p .letter:nth-child(16) { animation-delay: 1.5s; }
.logo-tagline p .letter:nth-child(17) { animation-delay: 1.6s; }
.logo-tagline p .letter:nth-child(18) { animation-delay: 1.7s; }
.logo-tagline p .letter:nth-child(19) { animation-delay: 1.8s; }
.logo-tagline p .letter:nth-child(20) { animation-delay: 1.9s; }
.logo-tagline p .letter:nth-child(21) { animation-delay: 2.0s; }
.logo-tagline p .letter:nth-child(22) { animation-delay: 2.1s; }
.logo-tagline p .letter:nth-child(23) { animation-delay: 2.2s; }
.logo-tagline p .letter:nth-child(24) { animation-delay: 2.3s; }
.logo-tagline p .letter:nth-child(25) { animation-delay: 2.4s; }
.logo-tagline p .letter:nth-child(26) { animation-delay: 2.5s; }
.logo-tagline p .letter:nth-child(27) { animation-delay: 2.6s; }
.logo-tagline p .letter:nth-child(28) { animation-delay: 2.7s; }
.logo-tagline p .letter:nth-child(29) { animation-delay: 2.8s; }

@keyframes letterGlow {
  0%, 100% {
    color: var(--text-secondary);
    text-shadow: none;
    transform: scale(1);
  }
  50% {
    color: var(--c-gold-1);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
    transform: scale(1.05);
  }
}
  
/* Пробелы в слогане */
.logo-tagline p .letter.space {
  width: 0.25em;
  animation: none;
  color: transparent;
  text-shadow: none;
}

[data-theme="light"] .logo-title h1 {
  background: linear-gradient(
    90deg,
    var(--c-brown-1) 0%,
    var(--c-brown-3) 25%,
    var(--c-gold-1) 50%,
    var(--c-brown-3) 75%,
    var(--c-brown-1) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  flex-direction: column;
  gap: 10px;
}

.logo-text {
  text-align: center;
}

.logo-text h1 {
  color: var(--c-gold-1);
  font-size: 2rem;
  margin: 0;
  text-align: center;
}

.logo-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 5px 0 0 0;
  text-align: center;
}

[data-theme="light"] .logo-text h1 {
  color: var(--c-brown-1);
}

/* ============================================
   ЦЕНТРОВКА КОНТЕНТА
   ============================================ */
.main-content {
  flex: 1;
  padding: 40px 20px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.auth-container {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 2px solid var(--border-color);
}

/* === ГЕНДЕР-СЕЛЕКТОР ДЛЯ РЕГИСТРАЦИИ === */
.gender-selector {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.gender-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 15px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.gender-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gender-option:hover {
  border-color: var(--c-gold-1);
  transform: translateY(-2px);
}

.gender-option input[type="radio"]:checked + .gender-icon,
.gender-option input[type="radio"]:checked ~ .gender-icon {
  transform: scale(1.2);
}

.gender-option input[type="radio"]:checked ~ .gender-label {
  color: var(--c-gold-1);
  font-weight: 600;
}

.gender-option.male input[type="radio"]:checked ~ .gender-icon,
.gender-option.male:has(input:checked) .gender-icon {
  color: #4A90E2;
}

.gender-option.female input[type="radio"]:checked ~ .gender-icon,
.gender-option.female:has(input:checked) .gender-icon {
  color: #E94B8A;
}

.gender-option:has(input:checked),
.gender-option:checked-within {
  border-color: var(--c-gold-1);
  background: rgba(255, 215, 0, 0.08);
}

.gender-icon {
  font-size: 48px;
  margin-bottom: 10px;
  transition: transform 0.2s ease;
}

.gender-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

@media (max-width: 480px) {
  .gender-selector {
    gap: 10px;
  }
  
  .gender-icon {
    font-size: 36px;
  }
  
  .gender-label {
    font-size: 13px;
  }
}
  
/* === Full HD (1920px) === */
@media (min-width: 1920px) {
  .auth-container {
    max-width: 1200px;
    padding: 40px;
  }
}

/* === 2K (2560px) === */
@media (min-width: 2560px) {
  .auth-container {
    max-width: 1600px;
    padding: 50px;
    border-radius: 20px;
  }
}

/* === 4K (3840px) === */
@media (min-width: 3840px) {
  .auth-container {
    max-width: 2400px;
    padding: 70px;
    border-radius: 24px;
    border-width: 3px;
  }
}

/* === 8K (7680px) === */
@media (min-width: 7680px) {
  .auth-container {
    max-width: 4800px;
    padding: 100px;
    border-radius: 32px;
    border-width: 4px;
  }
}
  
/* ============================================
   ФУТЕР
   ============================================ */
.main-footer {
  background: var(--footer-bg);
  border-top: 2px solid var(--border-color);
  padding: 20px 0;
  margin-top: auto;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

.footer-copyright {
  text-align: right;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-line {
  margin: 3px 0;
}

/* Версия приложения — золотой в тёмной, коричневый с волной в светлой */
.footer-version {
  color: var(--c-gold-1);
  font-weight: 600;
  letter-spacing: 0.5px;
}

[data-theme="light"] .footer-version {
  background: linear-gradient(
    90deg,
    var(--c-brown-1) 0%,
    var(--c-brown-3) 25%,
    var(--c-gold-1) 50%,
    var(--c-brown-3) 75%,
    var(--c-brown-1) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: footerVersionWave 3s linear infinite;
}

@keyframes footerVersionWave {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.footer-link-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--c-brown-1), var(--c-gold-1));
  color: var(--c-white-1);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* ============================================
   КНОПКА "НА ГЛАВНУЮ"
   ============================================ */
.back-home-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--c-brown-1), var(--c-gold-1));
  color: var(--c-white-1);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  text-align: center;
}

.back-home-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* ============================================
   ФИРМЕННЫЕ КНОПКИ (КАК ЮР.НОРМАТИВЫ)
   ============================================ */
.btn-register,
.btn-secondary {
  display: inline-block;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--c-brown-1), var(--c-gold-1));
  color: var(--c-white-1);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-register:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-register:active,
.btn-secondary:active {
  transform: translateY(0);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 768px) {
  .main-header {
    padding: 8px 0;
  }
  
  .logo-section {
    grid-template-columns: 1fr auto;
  }
  
  .logo-img {
    height: 40px;
  }
  
  .logo-title {
    justify-self: end;
    padding-right: 15px;
  }
  
  .logo-title h1 {
    font-size: 2.8rem;
    letter-spacing: 2px;
    line-height: 1;
  }
  
  /* Вторая строка со слоганом на мобильных */
  .logo-tagline {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding: 5px 15px 0 0;
    grid-column: 1 / -1;
  }
  
  .logo-tagline p {
    font-size: 0.7rem;
    letter-spacing: 1px;
    margin: 0;
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-copyright {
    text-align: center;
  }
  
  .auth-container {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 6px 0;
  }
  
  .logo-img {
    height: 32px;
  }
  
  .logo-title {
    padding-right: 10px;
  }
  
  .logo-title h1 {
    font-size: 2.2rem;
    letter-spacing: 1.5px;
    line-height: 1;
  }
  
  .logo-tagline {
    padding: 4px 10px 0 0;
  }
  
  .logo-tagline p {
    font-size: 0.6rem;
    letter-spacing: 0.8px;
  }
  
  .auth-container {
    width: 95%;
    padding: 15px;
  }
}

@media (max-width: 320px) {
  .auth-container {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
  }
}
