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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0c0a26 0%, #1a1548 30%, #1e1b4b 60%, #0f0a2e 100%);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    color: #f1f5f9;
    padding: 1rem 0;
}

/* Animated background grid */
body::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 100%);
    pointer-events: none;
}

/* Ambient glow orbs */
body::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 40% 50% at 20% 30%, rgba(6, 182, 212, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 80% 70%, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Split Card ───────────────────────────────────── */
.login-card {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 780px;
    min-height: 480px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 40px 80px rgba(9, 7, 40, 0.65),
        0 0 0 1px rgba(99, 102, 241, 0.15);
}

/* ── Left Panel ───────────────────────────────────── */
.panel-left {
    width: 270px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #1e1b4b 0%, #312e81 45%, #4338ca 80%, #3730a3 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.75rem;
    overflow: hidden;
}

/* Geometric diamond shapes */
.geo-shape {
    position: absolute;
    border-radius: 18px;
    transform: rotate(45deg);
}

.geo-1 {
    width: 230px;
    height: 230px;
    top: -70px;
    left: -85px;
    background: rgba(129, 140, 248, 0.1);
    border: 1px solid rgba(165, 180, 252, 0.1);
}

.geo-2 {
    width: 180px;
    height: 180px;
    top: -30px;
    left: -45px;
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(165, 180, 252, 0.07);
}

.geo-3 {
    width: 210px;
    height: 210px;
    bottom: -75px;
    left: -65px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.1);
}

.geo-4 {
    width: 160px;
    height: 160px;
    bottom: -40px;
    left: -25px;
    background: rgba(99, 102, 241, 0.06);
}

.panel-left-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.panel-left-content h2 {
    font-size: 2.1rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
    line-height: 1.1;
}

.panel-left-content p {
    font-size: 0.78rem;
    color: rgba(200, 210, 255, 0.7);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.panel-left-player-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(165, 180, 252, 0.25);
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(224, 231, 255, 0.95);
    letter-spacing: 0.02em;
    text-transform: none;
}

.panel-left-player-count i {
    font-size: 0.95rem;
    opacity: 0.95;
}

.panel-left-player-count strong {
    font-weight: 800;
    color: #fff;
}

/* Toggle buttons */
.left-toggle {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 135px;
}

.left-toggle a {
    display: block;
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: all 0.22s ease;
    white-space: nowrap;
}

.left-toggle a.active {
    background: #fff;
    color: #312e81;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.left-toggle a:not(.active) {
    background: transparent;
    color: rgba(200, 210, 255, 0.75);
    border: 1.5px solid rgba(165, 180, 252, 0.3);
}

.left-toggle a:not(.active):hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(165, 180, 252, 0.5);
    color: rgba(200, 210, 255, 0.95);
}

/* ── Right Panel ──────────────────────────────────── */
.panel-right {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.75rem 2.75rem 2.25rem;
}

/* Brand icon */
.brand-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #312e81, #4f46e5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
    transition: transform 0.2s ease;
}

.brand-icon:hover {
    transform: scale(1.05) rotate(-3deg);
}

.brand-icon i {
    font-size: 1.6rem;
    color: #fff;
}

.login-title {
    font-size: 1.65rem;
    font-weight: 900;
    color: #1e1b4b;
    letter-spacing: -0.03em;
    margin-bottom: 1.75rem;
}

/* ── Alert ────────────────────────────────────────── */
.alert {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
}

.alert-error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-left: 4px solid #ef4444;
    color: #be123c;
}

/* ── Form ─────────────────────────────────────────── */
.login-form { width: 100%; }

.input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1.5px solid #e0e7ff;
    margin-bottom: 1.1rem;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    background: #faf9ff;
    transition: all 0.22s ease;
}

.input-row:focus-within {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.input-row i {
    font-size: 1rem;
    color: #a5b4fc;
    flex-shrink: 0;
    transition: color 0.2s;
}

.input-row:focus-within i {
    color: #6366f1;
}

.input-row input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1e1b4b;
    background: transparent;
    padding: 0;
}

.input-row input::placeholder {
    color: #c4b5fd;
}

.toggle-password {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #a5b4fc;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s;
}

.toggle-password:hover { color: #6366f1; }

/* ── Form Actions ─────────────────────────────────── */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.forgot-link {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* ── Forgot password page ─────────────────────────── */
.forgot-password-page .panel-right {
    align-items: stretch;
    justify-content: flex-start;
    padding: 2.25rem 2.5rem;
}

.forgot-password-page .panel-right-inner {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
}

.forgot-password-page .login-card--forgot {
    min-height: 520px;
}

.forgot-password-page .panel-left {
    padding-bottom: 2.5rem;
}

.forgot-header {
    text-align: center;
    margin-bottom: 1.35rem;
}

.forgot-password-page .login-title {
    margin-bottom: 0.35rem;
    font-size: 1.55rem;
}

.forgot-tagline {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.45;
}

.forgot-steps {
    list-style: none;
    margin: 0 0 1.35rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    counter-reset: forgot-step;
}

.forgot-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.84rem;
    line-height: 1.45;
    color: #475569;
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.forgot-steps li::before {
    content: counter(forgot-step);
    counter-increment: forgot-step;
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #312e81, #6366f1);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.05rem;
}

.forgot-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.forgot-password-page .field-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.45rem;
}

.forgot-password-page .input-row {
    margin-bottom: 1.25rem;
}

.forgot-password-page .btn-submit--block {
    width: 100%;
    padding: 0.85rem 1.25rem;
    text-align: center;
    margin-bottom: 1rem;
}

.forgot-password-page .back-to-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.86rem;
}

.forgot-success-cta {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    margin-top: 0.5rem;
}

.forgot-password-page .alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    line-height: 1.45;
}

.forgot-password-page .alert i {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #86efac;
    border-left: 4px solid #16a34a;
    color: #166534;
}

.btn-submit {
    padding: 0.65rem 1.85rem;
    background: linear-gradient(135deg, #1e1b4b, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
    font-family: inherit;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #312e81, #6366f1);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.5);
}

/* ── Social Strip ─────────────────────────────────── */
.social-strip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-label {
    font-size: 0.78rem;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    text-decoration: none;
    border: 1.5px solid #e0e7ff;
    border-radius: 30px;
    padding: 0.4rem 1rem;
    transition: all 0.22s ease;
    background: #faf9ff;
}

.social-btn:hover {
    border-color: #6366f1;
    color: #4f46e5;
    background: #f5f3ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.google-icon {
    width: 15px;
    height: 15px;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 580px) {
    .login-card {
        flex-direction: column;
        max-width: 100%;
        min-height: unset;
        border-radius: 24px;
        margin: 0 0.75rem;
    }

    .panel-left {
        width: 100%;
        min-height: 150px;
        padding: 1.35rem 1rem 3.5rem;
        flex-shrink: 0;
    }

    .panel-left-content h2 { font-size: 1.5rem; }

    .left-toggle {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        flex-direction: row;
        width: auto;
        margin-top: 1rem;
        justify-content: center;
    }

    .panel-right {
        border-radius: 0 0 24px 24px;
        padding: 2rem 1.5rem 2.25rem;
    }

    .login-title {
        font-size: 1.4rem;
        margin-bottom: 1.35rem;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btn-submit {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1rem;
    }

    .forgot-password-page .panel-right {
        padding: 1.75rem 1.35rem 2rem;
    }

    .forgot-password-page .panel-right-inner {
        max-width: none;
    }

    .forgot-steps li {
        font-size: 0.82rem;
    }

    .forgot-password-page .panel-left {
        min-height: 120px;
        padding: 1.35rem 1rem 1.5rem;
    }
}
