
/* ─── TOKENS ─── */
:root {
    --p:      #8B5CF6;
    --pd:     #6D28D9;
    --pl:     #A78BFA;
    --pg:     rgba(139,92,246,0.22);
    --ps:     rgba(139,92,246,0.15);
    --warn:   #FFB020;
    --danger: #FF5A5F;
    --t:      0.25s ease;
}

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

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    min-height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    background: #060E1C;
}

/* ─── FULL-PAGE SCENE ─── */
.gl-scene {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: radial-gradient(ellipse 120% 100% at 50% -10%, #0A1A30 0%, #060E1C 60%);
}

/* ─── FLOATING ORBS ─── */
.gl-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(0px);
    will-change: transform;
}

/* Teal orb — top center */
.gl-orb--teal {
    width: 320px;
    height: 320px;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle at 40% 35%, #A78BFA 0%, #8B5CF6 45%, #4C1D95 100%);
    box-shadow: 0 0 80px rgba(139,92,246,0.35), 0 0 160px rgba(139,92,246,0.12);
    animation: floatTeal 7s ease-in-out infinite;
}

/* Purple orb — right */
.gl-orb--purple {
    width: 260px;
    height: 260px;
    right: 8%;
    top: 20%;
    background: radial-gradient(circle at 40% 35%, #c084fc 0%, #a855f7 45%, #6d28d9 100%);
    box-shadow: 0 0 60px rgba(168,85,247,0.3), 0 0 120px rgba(168,85,247,0.1);
    animation: floatPurple 9s ease-in-out infinite;
}

/* Blue orb — bottom left */
.gl-orb--blue {
    width: 280px;
    height: 280px;
    left: 6%;
    bottom: -60px;
    background: radial-gradient(circle at 40% 35%, #60a5fa 0%, #3b82f6 45%, #1d4ed8 100%);
    box-shadow: 0 0 70px rgba(59,130,246,0.3), 0 0 140px rgba(59,130,246,0.1);
    animation: floatBlue 8s ease-in-out infinite;
}

/* Pink-violet orb — left mid */
.gl-orb--pink {
    width: 200px;
    height: 200px;
    left: 12%;
    top: 18%;
    background: radial-gradient(circle at 40% 35%, #f0abfc 0%, #e879f9 45%, #a21caf 100%);
    box-shadow: 0 0 50px rgba(232,121,249,0.25), 0 0 100px rgba(232,121,249,0.08);
    animation: floatPink 11s ease-in-out infinite;
}

/* Small teal accent — bottom right */
.gl-orb--teal2 {
    width: 160px;
    height: 160px;
    right: 14%;
    bottom: 8%;
    background: radial-gradient(circle at 40% 35%, #67E8F9 0%, #22D3EE 45%, #0E7490 100%);
    box-shadow: 0 0 40px rgba(34,211,238,0.25), 0 0 80px rgba(34,211,238,0.08);
    animation: floatTeal2 6s ease-in-out infinite;
}

@keyframes floatTeal {
    0%,100% { transform: translateX(-50%) translateY(0) scale(1); }
    33%      { transform: translateX(-48%) translateY(18px) scale(1.03); }
    66%      { transform: translateX(-52%) translateY(-12px) scale(0.97); }
}
@keyframes floatPurple {
    0%,100% { transform: translateY(0) scale(1); }
    40%      { transform: translateY(-22px) scale(1.05) rotate(5deg); }
    70%      { transform: translateY(14px) scale(0.96) rotate(-3deg); }
}
@keyframes floatBlue {
    0%,100% { transform: translateY(0) scale(1); }
    35%      { transform: translateY(-18px) scale(1.04) rotate(-4deg); }
    65%      { transform: translateY(20px) scale(0.97) rotate(3deg); }
}
@keyframes floatPink {
    0%,100% { transform: translateY(0) scale(1); }
    45%      { transform: translateY(16px) scale(1.06) rotate(6deg); }
    80%      { transform: translateY(-20px) scale(0.95) rotate(-4deg); }
}
@keyframes floatTeal2 {
    0%,100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-14px) scale(1.08); }
}

/* ─── GLASS CARD ─── */
.gl-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 24px;
    padding: 2.5rem 2.25rem 2rem;
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    box-shadow:
        0 32px 80px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255,255,255,0.06) inset,
        0 1px 0 rgba(255,255,255,0.18) inset;
    animation: cardIn 0.55s cubic-bezier(0.22,0.68,0,1.1) both;
}
.gl-card.login-shake {
    animation: cardIn 0.55s cubic-bezier(0.22,0.68,0,1.1) both,
               shake 0.45s cubic-bezier(0.36,0.07,0.19,0.97) 0.1s both;
}

/* Subtle inner glow on top edge */
.gl-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    border-radius: 50%;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(28px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-8px); }
    40%     { transform: translateX(7px); }
    60%     { transform: translateX(-5px); }
    80%     { transform: translateX(4px); }
}

/* ─── CARD HEADER ─── */
.gl-card__header {
    text-align: center;
    margin-bottom: 1.75rem;
}
.gl-card__icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(145deg, rgba(139,92,246,0.25), rgba(139,92,246,0.08));
    border: 1px solid rgba(139,92,246,0.35);
    color: var(--pl);
    box-shadow: 0 0 28px rgba(139,92,246,0.2), 0 0 60px rgba(139,92,246,0.08);
    animation: iconPulse 3s ease-in-out infinite;
}
@keyframes iconPulse {
    0%,100% { box-shadow: 0 0 20px rgba(139,92,246,0.2), 0 0 50px rgba(139,92,246,0.07); }
    50%      { box-shadow: 0 0 35px rgba(139,92,246,0.32), 0 0 80px rgba(139,92,246,0.12); }
}
.gl-card__title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    margin-bottom: 0.3rem;
}
.gl-card__sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.48);
    font-weight: 500;
}

/* ─── FORM LABELS ─── */
.gl-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.45rem;
}
.gl-label i { font-size: 0.72rem; color: var(--p); }

/* ─── INPUTS ─── */
.gl-field { margin-bottom: 1rem; }

.gl-input-wrap { position: relative; }
.gl-input-wrap .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.3);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color var(--t);
    z-index: 2;
}

.gl-input {
    width: 100%;
    padding: 0.78rem 0.95rem 0.78rem 2.65rem;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    font-family: inherit;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.gl-input::placeholder { color: rgba(255,255,255,0.3); font-weight: 400; }
.gl-input:focus {
    border-color: var(--p);
    background: rgba(139,92,246,0.08);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.18), 0 2px 10px rgba(139,92,246,0.08);
}
.gl-input-wrap:focus-within .field-icon { color: var(--p); }

/* Password toggle */
.gl-input-wrap.has-toggle .gl-input { padding-right: 3rem; }
.pass-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: color var(--t);
    display: flex;
    align-items: center;
    z-index: 2;
}
.pass-toggle:hover { color: var(--p); }

/* ─── EXTRAS ROW ─── */
.gl-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.2rem 0 1.5rem;
}
.gl-check {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}
.gl-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
    accent-color: var(--p);
    cursor: pointer;
    flex-shrink: 0;
}
.gl-check span {
    font-size: 0.83rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}
.gl-forgot {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color var(--t);
}
.gl-forgot:hover { color: var(--pl); }

/* ─── SUBMIT BUTTON ─── */
.gl-btn {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pl) 0%, var(--p) 50%, var(--pd) 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    cursor: pointer;
    transition: background-position 0.4s ease, transform 0.2s ease, box-shadow 0.25s ease;
    box-shadow: 0 6px 24px rgba(139,92,246,0.38), 0 2px 8px rgba(139,92,246,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.gl-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
    border-radius: inherit;
    pointer-events: none;
}
.gl-btn:hover {
    background-position: 0% 0;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139,92,246,0.45), 0 4px 12px rgba(139,92,246,0.25);
}
.gl-btn:active { transform: translateY(0) scale(0.98); }
.gl-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.gl-btn .btn-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}
.gl-btn.loading .btn-spinner { display: block; }
.gl-btn.loading .btn-label   { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── ALERTS ─── */
.gl-alert {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.855rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.1rem;
    border-left: 3px solid transparent;
    backdrop-filter: blur(8px);
}
.gl-alert.error {
    background: rgba(255,90,95,0.15);
    color: #FCA5A5;
    border-left-color: var(--danger);
}
.gl-alert.success {
    background: rgba(139,92,246,0.14);
    color: var(--pl);
    border-left-color: var(--p);
}

/* ─── FOOTER ─── */
.gl-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.22);
}

/* ─── THEME TOGGLE ─── */
.gl-theme-btn {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 100;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--t);
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.gl-theme-btn:hover {
    color: var(--p);
    border-color: rgba(139,92,246,0.4);
    box-shadow: 0 4px 18px rgba(139,92,246,0.2);
}

/* ─── APP BADGE ─── */
.gl-app-badge {
    text-align: center;
    margin-bottom: 0.5rem;
}
.gl-app-name {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--p);
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.35rem;
}

@media (max-width: 480px) {
    .gl-card { padding: 2rem 1.5rem 1.75rem; border-radius: 20px; }
    .gl-orb--teal   { width: 220px; height: 220px; }
    .gl-orb--purple { width: 180px; height: 180px; }
    .gl-orb--blue   { width: 180px; height: 180px; }
    .gl-orb--pink   { width: 130px; height: 130px; }
    .gl-orb--teal2  { display: none; }
}
    