/* ===================== Reset & Base ===================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-deep: #050714;
  --bg-purple: #1a0f3d;
  --bg-blue: #0d1b3e;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --gold-light: #fff3c2;
  --gold-mid: #f7d47a;
  --gold-dark: #c78b28;
  --gold-shadow: rgba(199, 139, 40, 0.4);
  --input-bg: rgba(0, 0, 0, 0.28);
  --error: #ff6b6b;
}

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(120, 50, 220, 0.35) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 85%, rgba(40, 90, 220, 0.3) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(36, 20, 73, 0.8) 0%, var(--bg-deep) 70%);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
  padding: 24px;
}

/* ===================== Ambient Glows ===================== */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  width: 520px;
  height: 520px;
  background: rgba(120, 50, 220, 0.38);
  top: -160px;
  left: -160px;
}

.glow-2 {
  width: 620px;
  height: 620px;
  background: rgba(40, 90, 220, 0.32);
  bottom: -220px;
  right: -220px;
}

.glow-3 {
  width: 320px;
  height: 320px;
  background: rgba(200, 140, 40, 0.18);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ===================== Floating Icons ===================== */
.floating-icons {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.floating-icon {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: float 7s ease-in-out infinite;
}

.floating-icon svg {
  width: 30px;
  height: 30px;
}

.icon-netflix { color: #e50914; box-shadow: 0 0 32px rgba(229, 9, 20, 0.28); }
.icon-spotify { color: #1db954; box-shadow: 0 0 32px rgba(29, 185, 84, 0.28); }
.icon-prime { color: #00a8e1; box-shadow: 0 0 32px rgba(0, 168, 225, 0.28); }
.icon-disney { color: #113ccf; box-shadow: 0 0 32px rgba(17, 60, 207, 0.28); }
.icon-youtube { color: #ff0000; box-shadow: 0 0 32px rgba(255, 0, 0, 0.28); }
.icon-hbo { color: #9b59b6; box-shadow: 0 0 32px rgba(155, 89, 182, 0.28); }
.icon-apple { color: #ffffff; box-shadow: 0 0 32px rgba(255, 255, 255, 0.18); }
.icon-crunchy { color: #f47521; box-shadow: 0 0 32px rgba(244, 117, 33, 0.28); }
.icon-steam { color: #66c0f4; box-shadow: 0 0 32px rgba(102, 192, 244, 0.28); }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-24px) rotate(3deg); }
}

/* ===================== Auth Card ===================== */
.auth-card {
  position: relative;
  z-index: 2;
  width: min(460px, 100%);
  border-radius: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px var(--glass-highlight);
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.04) 100%);
  pointer-events: none;
  z-index: 0;
}

.panel {
  position: relative;
  z-index: 1;
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-content {
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
}

/* ===================== Brand ===================== */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  color: var(--gold-mid);
}

.brand-logo svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-mid) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===================== Typography ===================== */
.panel-title {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 0.8px;
}

.panel-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
}

.form-info {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 8px;
}

/* ===================== Form ===================== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.input-icon svg {
  width: 100%;
  height: 100%;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="password"] {
  width: 100%;
  padding: 14px 44px 14px 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.input-group input:focus {
  border-color: rgba(247, 212, 122, 0.45);
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 0 0 4px rgba(247, 212, 122, 0.08);
}

.input-group input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

.toggle-password {
  position: absolute;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: var(--text-primary);
}

.toggle-password svg {
  width: 18px;
  height: 18px;
  position: absolute;
}

.toggle-password .eye-closed {
  display: none;
}

.toggle-password.active .eye-open {
  display: none;
}

.toggle-password.active .eye-closed {
  display: block;
}

.form-options {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.forgot-link,
.terms-label a,
.switch-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.forgot-link:hover,
.terms-label a:hover,
.switch-link:hover {
  color: var(--gold-mid);
}

/* ===================== Terms ===================== */
.terms-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.4;
}

.terms-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 1px;
  accent-color: var(--gold-dark);
  cursor: pointer;
}

.terms-label a {
  font-size: 0.8rem;
}

.terms-label.error {
  color: var(--error);
}

/* ===================== Buttons ===================== */
.btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-mid) 40%, var(--gold-dark) 100%);
  color: #1a1200;
  box-shadow: 0 8px 26px var(--gold-shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px var(--gold-shadow);
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ===================== Switch Text ===================== */
.switch-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.switch-link {
  font-weight: 600;
}

/* ===================== Validation Message ===================== */
.validation-msg {
  font-size: 0.78rem;
  color: var(--error);
  margin-top: -10px;
  margin-bottom: 2px;
  min-height: 1em;
}

/* ===================== Responsive ===================== */
@media (max-width: 520px) {
  body {
    padding: 16px;
    align-items: flex-start;
  }

  .panel {
    padding: 32px 22px;
  }

  .panel-title {
    font-size: 1.4rem;
  }

  .floating-icon {
    width: 42px;
    height: 42px;
  }

  .floating-icon svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 380px) {
  .floating-icon {
    display: none;
  }
}
