/* ===== Страница входа ===== */
.page-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  --login-card-max: 440px;
  font-family: var(--font-home, 'Nunito', sans-serif);
  color: var(--home-text);
  background: #1a1520;
}

.page-login .home-petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* Фон: баннер + градиент + свечение */
.login-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(26, 21, 32, 0.92) 0%, rgba(40, 28, 48, 0.88) 45%, rgba(22, 18, 28, 0.95) 100%),
    url('/images/hero-banner.png') center top / cover no-repeat;
}

.login-scene-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 200, 112, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 200, 112, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
}

.login-scene-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: login-glow-drift 14s ease-in-out infinite alternate;
}

.login-scene-glow--1 {
  width: 420px;
  height: 420px;
  top: -8%;
  left: 50%;
  transform: translateX(-60%);
  background: rgba(232, 135, 42, 0.35);
}

.login-scene-glow--2 {
  width: 360px;
  height: 360px;
  bottom: 5%;
  right: -5%;
  background: rgba(155, 107, 184, 0.28);
  animation-delay: -6s;
}

@keyframes login-glow-drift {
  from { transform: translateX(-60%) translateY(0); opacity: 0.7; }
  to { transform: translateX(-40%) translateY(24px); opacity: 1; }
}

.login-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 2rem;
  position: relative;
  z-index: 1;
}

/* Бренд */
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: transform 0.25s ease;
}

.login-brand:hover {
  transform: translateY(-3px);
}

.login-brand-logo {
  padding: 6px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 200, 112, 0.25), rgba(155, 107, 184, 0.2));
  box-shadow:
    0 0 0 1px rgba(255, 200, 112, 0.35),
    0 12px 40px rgba(232, 120, 40, 0.25);
}

.login-brand-logo img {
  display: block;
  border-radius: 16px;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.login-brand-text .brand-line {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 230, 200, 0.65);
  font-weight: 700;
}

.login-brand-text .brand-accent {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #ffe59a 0%, #ffc870 40%, #e8872a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(232, 135, 42, 0.35));
}

/* Карточка */
.login-card {
  position: relative;
  width: 100%;
  max-width: var(--login-card-max);
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 200, 112, 0.55), rgba(155, 107, 184, 0.45), rgba(255, 200, 112, 0.25));
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(232, 135, 42, 0.08);
}

.login-card-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  pointer-events: none;
}

.login-card-inner {
  position: relative;
  padding: 2rem 1.85rem 1.65rem;
  border-radius: 23px;
  background: linear-gradient(168deg, rgba(32, 28, 40, 0.97) 0%, rgba(24, 20, 30, 0.98) 100%);
  backdrop-filter: blur(20px);
}

.login-card-head {
  text-align: center;
  margin-bottom: 1.25rem;
}

.login-card-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c49de0;
  background: rgba(155, 107, 184, 0.2);
  border: 1px solid rgba(155, 107, 184, 0.35);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.login-title {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 800;
  color: #f5f0ea;
  letter-spacing: -0.02em;
}

.login-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(245, 240, 234, 0.55);
  line-height: 1.5;
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
}

/* Фичи */
.login-features {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
}

.login-features li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(245, 240, 234, 0.7);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

.login-feature-icon {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Форма */
.login-form .form-group {
  margin-bottom: 1rem;
}

.login-form .form-group label {
  display: block;
  color: rgba(245, 240, 234, 0.75);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.login-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(12, 10, 16, 0.75);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-input-wrap:focus-within {
  border-color: rgba(255, 200, 112, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 200, 112, 0.12);
  background: rgba(16, 14, 22, 0.9);
}

.login-input-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgba(255, 200, 112, 0.65);
}

.login-form .form-group input {
  flex: 1;
  width: 100%;
  padding: 0.75rem 0;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.95rem;
  background: transparent;
  color: #f5f0ea;
  min-width: 0;
}

.login-form .form-group input::placeholder {
  color: rgba(245, 240, 234, 0.28);
}

.login-form .form-group input:focus {
  outline: none;
}

.login-submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #1a1208;
  background: linear-gradient(135deg, #ffe59a 0%, #ffc870 35%, #e8872a 100%);
  box-shadow:
    0 4px 20px rgba(232, 135, 42, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 135, 42, 0.55);
  filter: brightness(1.05);
}

.login-submit:active {
  transform: translateY(0);
}

.login-submit-arrow {
  width: 20px;
  height: 20px;
}

/* Discord */
.login-discord-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.35rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.22);
}

.login-discord-icon-wrap {
  flex-shrink: 0;
  color: #7289da;
  margin-top: 2px;
}

.login-discord-note p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(245, 240, 234, 0.55);
  line-height: 1.5;
}

.login-discord-note strong {
  color: #a5b4fc;
  font-weight: 800;
}

.login-back {
  margin-top: 1.75rem;
  font-size: 0.88rem;
  color: rgba(196, 157, 224, 0.9);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s;
}

.login-back:hover {
  color: #e8c4ff;
  text-decoration: underline;
}

.page-login .alert {
  margin-bottom: 1rem;
  border-radius: 12px;
}

/* Светлая тема (если включена) */
html[data-theme='light'] .page-login,
html:not([data-theme]) .page-login {
  /* login page stays cinematic dark by default */
}

html[data-theme='light'] .login-scene {
  background:
    linear-gradient(165deg, rgba(236, 234, 230, 0.88) 0%, rgba(255, 248, 240, 0.85) 100%),
    url('/images/hero-banner.png') center top / cover no-repeat;
}

html[data-theme='light'] .login-card-inner {
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 248, 240, 0.94) 100%);
}

html[data-theme='light'] .login-title {
  color: var(--home-text, #3a3530);
}

html[data-theme='light'] .login-subtitle,
html[data-theme='light'] .login-form .form-group label {
  color: var(--home-text-muted, #6b6560);
}

html[data-theme='light'] .login-input-wrap {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(60, 55, 50, 0.15);
}

html[data-theme='light'] .login-form .form-group input {
  color: var(--home-text, #3a3530);
}

html[data-theme='light'] .login-features li {
  color: var(--home-text-muted);
  background: rgba(155, 107, 184, 0.08);
}

@media (max-width: 480px) {
  .login-card-inner {
    padding: 1.65rem 1.25rem 1.35rem;
  }

  .login-brand-text .brand-accent {
    font-size: 1.65rem;
  }
}
