/*
 * EchoLearn360 - sign-in / sign-up pages.
 * Same look as the public landing page: deep navy canvas, floating colour orbs + grid,
 * glass card, Sora/Inter type and the blue->violet gradient button.
 */
:root {
    --navy-950: #0a1120;
    --navy-900: #0d1830;
    --navy-800: #122145;
    --blue-500: #3498db;
    --blue-400: #5dade2;
    --cyan-400: #22d3ee;
    --violet-500: #7c6cf0;
    --text-light: #e8edf6;
    --text-muted: #93a3c0;
    --card-border: rgba(255, 255, 255, 0.10);
    --card-bg: rgba(255, 255, 255, 0.045);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--navy-950);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ---------- animated background (as on the landing page) ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35; animation: float 18s ease-in-out infinite; }
.orb-1 { width: 480px; height: 480px; background: var(--blue-500); top: -120px; left: -100px; }
.orb-2 { width: 420px; height: 420px; background: var(--violet-500); top: 220px; right: -140px; animation-delay: -6s; }
.orb-3 { width: 380px; height: 380px; background: var(--cyan-400); bottom: -160px; left: 30%; animation-delay: -11s; opacity: 0.22; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -40px) scale(1.08); }
}
.bg-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- top bar ---------- */
.auth-nav, .auth-main, .auth-footer { position: relative; z-index: 1; }
.auth-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 32px;
}
.brand-word {
    font-family: 'Sora', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: #fff;
}
.back-home {
    font-size: 0.92rem; font-weight: 500; color: var(--text-muted);
    transition: color 0.2s ease;
}
.back-home:hover { color: var(--text-light); }
.back-home i { margin-right: 6px; }

/* ---------- card ---------- */
.auth-main {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 20px 16px 40px;
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 38px 36px 32px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    animation: rise 0.6s ease both;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-head { text-align: center; margin-bottom: 26px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(124, 108, 240, 0.12);
    border: 1px solid rgba(124, 108, 240, 0.35);
    color: #c7bffb; font-size: 0.78rem; font-weight: 600;
    margin-bottom: 16px;
}
.auth-head h1 {
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.auth-head p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- alerts ---------- */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: 12px;
    font-size: 0.9rem; margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert i { margin-top: 2px; }
.alert-danger { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); color: #fecaca; }
.alert-info { background: rgba(34, 211, 238, 0.10); border-color: rgba(34, 211, 238, 0.35); color: #a5f3fc; }

/* ---------- form ---------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; color: var(--text-light); }
.input-group { position: relative; }
.input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 1rem; pointer-events: none;
    transition: color 0.2s ease;
}
.form-control {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font: inherit; font-size: 0.95rem;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-control::placeholder { color: #6b7c9c; }
.form-control:focus {
    border-color: var(--violet-500);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(124, 108, 240, 0.25);
}
.input-group:focus-within .input-icon { color: #c7bffb; }
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-light);
    caret-color: var(--text-light);
    -webkit-box-shadow: 0 0 0 40px #17264a inset;
    transition: background-color 9999s ease-out 0s;
}
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

/* ---------- buttons ---------- */
.btn-login, .btn-signup {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px 22px;
    font: inherit; font-size: 0.98rem; font-weight: 600;
    border-radius: 10px; cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-login {
    color: #fff; border: 1px solid transparent;
    background: linear-gradient(135deg, var(--blue-500), var(--violet-500));
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.28);
    margin-top: 6px;
}
.btn-login:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(52, 152, 219, 0.4); }
.btn-login:disabled { opacity: 0.85; cursor: default; }
.btn-login .spinner { display: none; }
.btn-login.loading .btn-text { display: none; }
.btn-login.loading .spinner {
    display: inline-block; width: 20px; height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-signup {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.16);
}
.btn-signup:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.07); }

.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0 16px; color: var(--text-muted); font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1); }

.auth-switch { text-align: center; margin-top: 22px; font-size: 0.9rem; color: var(--text-muted); }
.auth-switch a { color: #c7bffb; font-weight: 600; }
.auth-switch a:hover { color: #fff; text-decoration: underline; }

/* ---------- footer ---------- */
.auth-footer { text-align: center; padding: 18px 16px 26px; color: var(--text-muted); font-size: 0.85rem; }

@media (max-width: 520px) {
    .auth-nav { padding: 16px 18px; }
    .auth-card { padding: 30px 22px 26px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .orb, .auth-card { animation: none; }
}

/* ---- e-mail verification page ---- */
.otp-input { text-align: center; font-family: 'Sora', 'Inter', sans-serif; font-size: 1.9rem; font-weight: 700; letter-spacing: 0.35em; padding: 14px 10px; }
.otp-input::placeholder { letter-spacing: 0.35em; opacity: 0.35; }
.resend-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; font-size: 0.9rem; color: var(--text-muted, #8fa0c2); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--cyan-400, #22d3ee); cursor: pointer; }
.link-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.forgot-link { color: var(--cyan-400, #22d3ee); font-weight: 600; font-size: 0.85rem; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }

/* ---- legal / contact pages ---- */
.legal-main { flex: 1; display: flex; justify-content: center; padding: 20px 16px 50px; position: relative; z-index: 1; }
.legal-card { width: 100%; max-width: 820px; background: rgba(13, 24, 48, 0.82); border: 1px solid rgba(255,255,255,0.1); border-radius: 22px; padding: 38px 42px; backdrop-filter: blur(10px); color: #dbe5f7; line-height: 1.65; box-shadow: 0 30px 70px rgba(2,6,18,0.5); }
.legal-card h1 { font-family: 'Sora', 'Inter', sans-serif; font-size: 2rem; margin: 0 0 4px; color: #fff; }
.legal-card h2 { font-family: 'Sora', 'Inter', sans-serif; font-size: 1.1rem; margin: 26px 0 8px; color: #fff; }
.legal-card ul { padding-left: 1.2rem; } .legal-card li { margin-bottom: 6px; }
.legal-card a { color: var(--cyan-400, #22d3ee); }
.legal-updated { color: #8fa0c2; font-size: 0.85rem; margin-bottom: 20px; }
.auth-footer a { color: inherit; opacity: 0.85; text-decoration: none; } .auth-footer a:hover { text-decoration: underline; opacity: 1; }
@media (max-width: 640px) { .legal-card { padding: 26px 20px; } }
