﻿/* ─── Reset ─────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:      #07071a;
  --accent:  #8b5cf6;
  --accent2: #6366f1;
  --accent3: #a78bfa;
  --text:    #e5e7eb;
  --text-muted: #6b7280;
  --border:  rgba(255,255,255,0.09);
  --glow:    rgba(139,92,246,0.4);
}

/* ─── Light Mode ──────────────────────────── */
body.light {
  --bg:         #f0f4f8;
  --text:       #1e293b;
  --text-muted: #64748b;
  --border:     rgba(0,0,0,0.1);
  --glow:       rgba(139,92,246,0.2);
}
body.light .card {
  background: rgba(255,255,255,0.82);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.12);
}
body.light input {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: #1e293b;
}
body.light input::placeholder { color: #94a3b8; }
body.light label              { color: #374151; }
body.light .logo h1           { color: #1e293b; }
body.light .logo p            { color: #64748b; }
body.light #themeToggle       { background: rgba(0,0,0,0.07); }

/* ─── Theme Toggle ──────────────────────── */
#themeToggle {
  position: fixed;
  top: 16px; left: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  width: 40px; height: 40px;
  display: flex;
  align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  z-index: 10;
}
#themeToggle:hover { background: rgba(139,92,246,0.2); transform: scale(1.08); box-shadow: 0 0 16px var(--glow); }

/* ─── Body & Background ─────────────────── */
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: var(--text);
}

/* Aurora blobs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
  z-index: 0;
}
body::before {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(139,92,246,0.22) 0%, transparent 70%);
  top: -200px; right: -150px;
  animation: auroraA 14s ease-in-out infinite alternate;
}
body::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.16) 0%, transparent 70%);
  bottom: -150px; left: -100px;
  animation: auroraB 10s ease-in-out infinite alternate;
}
@keyframes auroraA {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(50px, -50px) scale(1.1); }
}
@keyframes auroraB {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-40px, 40px) scale(1.08); }
}

/* ─── Card ───────────────────────────────── */
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 26px;
  padding: 48px 40px;
  width: min(420px, calc(100vw - 32px));
  position: relative;
  z-index: 1;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.45),
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 0 60px rgba(139,92,246,0.06);
  animation: cardIn 0.55s cubic-bezier(.2,0,.3,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* top gradient line */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.5), transparent);
  border-radius: 1px;
}

/* ─── Logo ───────────────────────────────── */
.logo {
  text-align: center;
  margin-bottom: 36px;
}
.logo .icon {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 18px;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 30px;
  margin-bottom: 18px;
  box-shadow: 0 8px 32px var(--glow);
  animation: iconFloat 4s ease-in-out infinite;
}
@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); box-shadow: 0 8px 32px var(--glow); }
  50%       { transform: translateY(-6px) rotate(2deg); box-shadow: 0 14px 44px rgba(139,92,246,0.6); }
}
.logo h1 {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent3), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}

/* ─── Form ───────────────────────────────── */
.form-group { margin-bottom: 22px; }

label {
  display: block;
  color: #d1d5db;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}

input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 13px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.2s;
  font-family: inherit;
}
input:focus {
  border-color: var(--accent);
  background: rgba(139,92,246,0.06);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.18), 0 4px 20px rgba(139,92,246,0.12);
}
input::placeholder { color: #4b5563; }

/* ─── Submit Button ──────────────────────── */
.btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  border: none;
  border-radius: 13px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  font-family: inherit;
  box-shadow: 0 6px 24px rgba(139,92,246,0.4);
}
/* shimmer effect */
.btn::after {
  content: '';
  position: absolute;
  top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.2) 50%, transparent 80%);
  animation: btnShimmer 3s ease-in-out infinite;
}
@keyframes btnShimmer {
  0%   { left: -75%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}
.btn:hover:not(:disabled)  { opacity: 0.92; box-shadow: 0 8px 32px rgba(139,92,246,0.55); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled              { opacity: 0.45; cursor: not-allowed; }

/* ─── Error Box ──────────────────────────── */
.error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  padding: 12px 16px;
  border-radius: 11px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
  animation: errorIn 0.3s ease both;
}
@keyframes errorIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Responsive ─────────────────────────── */
@media (max-width: 480px) {
  .card { padding: 36px 24px; border-radius: 20px; }
  .logo .icon { width: 56px; height: 56px; font-size: 24px; }
  .logo h1    { font-size: 20px; }
}

