/* ═══════════════════════════════════════════════════════
   LIQUID GLASS DESIGN SYSTEM
   Shared across index, login, settings
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500&family=DM+Serif+Display:ital@0;1&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blur: 28px;
  --blur-heavy: 48px;
  --radius: 20px;
  --radius-sm: 12px;
  --header-height: 56px;

  /* Glass layers */
  --glass-bg:          rgba(255, 255, 255, 0.13);
  --glass-bg-hover:    rgba(255, 255, 255, 0.2);
  --glass-bg-heavy:    rgba(255, 255, 255, 0.18);
  --glass-border:      rgba(255, 255, 255, 0.32);
  --glass-border-soft: rgba(255, 255, 255, 0.18);
  --glass-shine:       rgba(255, 255, 255, 0.55);
  --glass-shadow:      rgba(0, 0, 0, 0.22);
  --glass-shadow-deep: rgba(0, 0, 0, 0.38);

  /* Text */
  --text:    rgba(255, 255, 255, 0.93);
  --subtext: rgba(255, 255, 255, 0.52);
  --dimtext: rgba(255, 255, 255, 0.3);

  /* Inputs */
  --input-bg:     rgba(255, 255, 255, 0.1);
  --input-border: rgba(255, 255, 255, 0.22);
  --input-focus:  rgba(255, 255, 255, 0.48);

  /* Accent */
  --accent: rgba(255, 255, 255, 0.85);
  --danger: rgba(255, 75, 75, 0.85);
}

@media (prefers-color-scheme: light) {
  :root {
    --glass-bg:          rgba(255, 255, 255, 0.42);
    --glass-bg-hover:    rgba(255, 255, 255, 0.58);
    --glass-bg-heavy:    rgba(255, 255, 255, 0.55);
    --glass-border:      rgba(255, 255, 255, 0.72);
    --glass-border-soft: rgba(0, 0, 0, 0.08);
    --glass-shine:       rgba(255, 255, 255, 0.9);
    --glass-shadow:      rgba(0, 0, 0, 0.1);
    --glass-shadow-deep: rgba(0, 0, 0, 0.18);
    --text:    rgba(18, 18, 28, 0.92);
    --subtext: rgba(18, 18, 28, 0.48);
    --dimtext: rgba(18, 18, 28, 0.28);
    --input-bg:     rgba(255, 255, 255, 0.52);
    --input-border: rgba(0, 0, 0, 0.12);
    --input-focus:  rgba(0, 0, 0, 0.3);
  }
}

html, body {
  height: 100%;
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  color: var(--text);
}

/* ── Background ─────────────────────────────────────── */
body {
  background: #10101e;
  background-image:
    radial-gradient(ellipse at 18% 22%, rgba(110, 70, 210, 0.38) 0%, transparent 52%),
    radial-gradient(ellipse at 82% 78%, rgba(20, 110, 210, 0.32) 0%, transparent 52%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.15) 0%, transparent 100%);
}

#bg-a, #bg-b {
  position: fixed; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#bg-b { opacity: 0; }

/* Subtle noise grain over background */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.35;
}

/* ── Glass mixin classes ─────────────────────────────── */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--blur)) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(200%) brightness(1.05);
  box-shadow:
    0 2px 0 0 var(--glass-shine) inset,
    0 -1px 0 0 rgba(255,255,255,0.08) inset,
    0 8px 32px var(--glass-shadow);
}

.glass-heavy {
  background: var(--glass-bg-heavy);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--blur-heavy)) saturate(220%) brightness(1.08);
  -webkit-backdrop-filter: blur(var(--blur-heavy)) saturate(220%) brightness(1.08);
  box-shadow:
    0 1.5px 0 0 var(--glass-shine) inset,
    0 -1px 0 0 rgba(255,255,255,0.06) inset,
    0 16px 48px var(--glass-shadow-deep);
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem; font-weight: 400; letter-spacing: 0.03em;
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 0 0 var(--glass-shine) inset, 0 4px 12px var(--glass-shadow);
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
  white-space: nowrap;
}
.btn:hover {
  background: var(--glass-bg-hover);
  box-shadow: 0 1px 0 0 var(--glass-shine) inset, 0 6px 20px var(--glass-shadow);
}
.btn:active { transform: scale(0.97); }

.btn-danger {
  border-color: rgba(255, 75, 75, 0.4);
  color: rgba(255, 130, 130, 0.95);
}
.btn-danger:hover { background: rgba(255, 75, 75, 0.18); }

/* ── Inputs ──────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 11px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 0.93rem; font-weight: 300;
  outline: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--dimtext); }
.input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.07);
}

/* ── Label ───────────────────────────────────────────── */
.label {
  display: block;
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--subtext);
  margin-bottom: 7px;
}

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 10px; }