/* ===== MODERN AUTH PAGES ===== */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    overflow: hidden;
}

.auth-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(212, 168, 83, 0.14), transparent 50%),
        radial-gradient(ellipse 60% 50% at 85% 80%, rgba(59, 130, 246, 0.1), transparent 50%),
        linear-gradient(165deg, #060d18 0%, #0a1628 40%, #0f1f38 100%);
}

.auth-mesh::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.auth-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
    animation: authOrbFloat 12s ease-in-out infinite;
}

.auth-orb-1 {
    width: 280px;
    height: 280px;
    background: rgba(212, 168, 83, 0.25);
    top: -80px;
    left: -60px;
}

.auth-orb-2 {
    width: 220px;
    height: 220px;
    background: rgba(74, 222, 128, 0.15);
    bottom: 10%;
    right: -40px;
    animation-delay: -4s;
}

.auth-orb-3 {
    width: 180px;
    height: 180px;
    background: rgba(59, 130, 246, 0.18);
    top: 40%;
    left: 35%;
    animation-delay: -7s;
}

@keyframes authOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -25px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 960px;
    gap: 1.25rem;
    align-items: stretch;
}

@media (min-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr 1fr;
        gap: 0;
        max-width: 1000px;
        min-height: 580px;
        border-radius: 28px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 168, 83, 0.08);
    }
}

/* Brand panel */
.auth-brand {
    display: none;
    padding: 2rem 2rem 2rem 2.25rem;
    background: linear-gradient(145deg, rgba(212, 168, 83, 0.08), rgba(8, 14, 26, 0.6));
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 900px) {
    .auth-brand { display: flex; align-items: center; }
}

.auth-brand-inner { width: 100%; }

.auth-brand-logo-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin-bottom: 1.25rem;
}

.auth-logo-ring {
    position: absolute;
    inset: -6px;
    border-radius: 22px;
    border: 2px solid rgba(212, 168, 83, 0.35);
    animation: authRingSpin 8s linear infinite;
}

@keyframes authRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-brand-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 18px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 1;
}

.auth-logo-fallback {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, #d4a853, #f0d78c);
    color: #0a1628;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
}

.auth-brand-title {
    margin: 0 0 0.4rem;
    font-size: 1.55rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.2;
}

.auth-brand-tagline {
    margin: 0 0 1.5rem;
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.5;
    max-width: 280px;
}

.auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.auth-feat {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: #cbd5e1;
    opacity: 0;
    animation: authFeatIn 0.5s ease forwards;
}

.auth-feat-1 { animation-delay: 0.4s; }
.auth-feat-2 { animation-delay: 0.55s; }
.auth-feat-3 { animation-delay: 0.7s; }

@keyframes authFeatIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

.auth-feat-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 11px;
    background: rgba(212, 168, 83, 0.12);
    color: #d4a853;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.auth-feat-icon.si-green { background: rgba(74, 222, 128, 0.12); color: #4ade80; }
.auth-feat-icon.si-gold { background: rgba(212, 168, 83, 0.12); color: #d4a853; }
.auth-feat-icon.si-blue { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }

.auth-mini-chart {
    margin-top: 1.5rem;
    padding: 0.85rem;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 222, 128, 0.15);
}

.auth-chart-head {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: authPulse 1.2s infinite;
}

@keyframes authPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.auth-chart-svg {
    width: 100%;
    height: 56px;
    display: block;
}

.auth-chart-line {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: authChartDraw 2s ease forwards 0.6s;
}

@keyframes authChartDraw {
    to { stroke-dashoffset: 0; }
}

.auth-bonus-showcase {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.15), rgba(74, 222, 128, 0.06));
    border: 1px solid rgba(212, 168, 83, 0.28);
    animation: authBonusPulse 3s ease-in-out infinite;
}

@keyframes authBonusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 83, 0); }
    50% { box-shadow: 0 0 24px rgba(212, 168, 83, 0.15); }
}

.auth-bonus-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #d4a853, #f0d78c);
    color: #0a1628;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    animation: authIconBounce 2s ease-in-out infinite;
}

@keyframes authIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.auth-bonus-showcase small {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a3b8;
}

.auth-bonus-showcase strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #f0d78c;
    line-height: 1.2;
}

.auth-bonus-showcase span {
    font-size: 0.72rem;
    color: #4ade80;
}

/* Form panel */
.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
}

@media (min-width: 900px) {
    .auth-form-wrap {
        padding: 2rem 2rem 2rem 1.75rem;
        background: rgba(8, 14, 26, 0.85);
        backdrop-filter: blur(12px);
    }
}

.auth-card-modern {
    width: 100%;
    max-width: 420px;
    padding: 1.75rem 1.5rem;
    border-radius: 24px;
    background: linear-gradient(165deg, rgba(18, 32, 52, 0.95), rgba(8, 14, 26, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

@media (min-width: 900px) {
    .auth-card-modern {
        border: none;
        box-shadow: none;
        background: transparent;
        padding: 0.5rem 0;
        max-width: 100%;
    }
}

.auth-anim-left {
    animation: authSlideLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-anim-right {
    animation: authSlideRight 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authSlideLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes authSlideRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.auth-anim-pop {
    animation: authPopIn 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) both;
    animation-delay: 0.25s;
}

@keyframes authPopIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.auth-card-top {
    text-align: center;
    margin-bottom: 1.35rem;
}

.auth-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.85rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    animation: authCardIconIn 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.auth-card-icon-login {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.05));
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.auth-card-icon-register {
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.2), rgba(212, 168, 83, 0.05));
    color: #d4a853;
    border: 1px solid rgba(212, 168, 83, 0.25);
}

@keyframes authCardIconIn {
    from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

.auth-card-top h2 {
    margin: 0 0 0.3rem;
    font-size: 1.45rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.auth-card-top p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

.auth-ref-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-size: 0.78rem;
    color: #cbd5e1;
}

.auth-ref-badge i { color: #60a5fa; }
.auth-ref-badge strong { color: #93c5fd; }

.signup-bonus-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.55rem 1rem;
    margin-bottom: 1.15rem;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(212, 168, 83, 0.08));
    border: 1px solid rgba(74, 222, 128, 0.25);
    font-size: 0.82rem;
    color: #cbd5e1;
}

.signup-bonus-pill i { color: #4ade80; animation: authSparkle 1.5s ease infinite; }
.signup-bonus-pill strong { color: #f0d78c; }

@keyframes authSparkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

/* Form fields */
.auth-form { display: flex; flex-direction: column; gap: 0.15rem; }

.auth-field {
    margin-bottom: 0.85rem;
}

.auth-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.4rem;
}

.auth-field label i {
    width: 16px;
    color: #d4a853;
    margin-right: 4px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    z-index: 2;
    color: #64748b;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.25s;
}

.auth-input-wrap:focus-within .auth-input-icon { color: #d4a853; }
.auth-input-wa:focus-within .auth-input-icon { color: #25d366; }

.auth-input {
    width: 100%;
    padding: 0.8rem 0.85rem 0.8rem 2.65rem !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(0, 0, 0, 0.35) !important;
    color: #f1f5f9 !important;
    font-size: 0.9rem !important;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s !important;
}

.auth-input::placeholder { color: #475569 !important; }

.auth-input:focus {
    border-color: rgba(212, 168, 83, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.12) !important;
    background: rgba(0, 0, 0, 0.45) !important;
}

.auth-input-wrap .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    z-index: 5;
    padding: 6px;
    transition: color 0.2s;
}

.auth-input-wrap .password-toggle:hover { color: #d4a853; }

.auth-input-wrap:has(.password-toggle) .auth-input {
    padding-right: 2.75rem !important;
}

.auth-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.auth-check .form-check-input {
    background-color: rgba(10, 22, 40, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
}

.auth-check .form-check-input:checked {
    background-color: #d4a853;
    border-color: #d4a853;
}

.auth-check .form-check-label {
    color: #94a3b8;
    font-size: 0.82rem;
}

.auth-submit-btn {
    width: 100%;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #d4a853, #f0d78c);
    color: #0a1628;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 6px 24px rgba(212, 168, 83, 0.35);
    position: relative;
    overflow: hidden;
}

.auth-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(212, 168, 83, 0.45);
}

.auth-submit-btn:hover::after { transform: translateX(100%); }

.auth-submit-register {
    background: linear-gradient(135deg, #4ade80, #16a34a);
    box-shadow: 0 6px 24px rgba(74, 222, 128, 0.3);
    color: #052e16;
}

.auth-submit-register:hover {
    box-shadow: 0 10px 32px rgba(74, 222, 128, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.1rem 0;
    color: #64748b;
    font-size: 0.78rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.divider span { padding: 0 0.85rem; }

.auth-google-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.25s, transform 0.25s, border-color 0.25s;
}

.auth-google-btn i { color: #ea4335; font-size: 1.1rem; }

.auth-google-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.auth-switch {
    text-align: center;
    margin: 1.1rem 0 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

.auth-switch a {
    color: #d4a853;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-switch a:hover { color: #f0d78c; text-decoration: underline; }

/* Mobile brand mini */
@media (max-width: 899px) {
    .auth-card-modern {
        animation: authSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    @keyframes authSlideUp {
        from { opacity: 0; transform: translateY(24px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

.was-validated .auth-input:invalid {
    border-color: rgba(239, 68, 68, 0.5) !important;
}

.was-validated .auth-field:has(:invalid) .invalid-feedback {
    display: block;
    font-size: 0.72rem;
    margin-top: 0.35rem;
    color: #f87171;
}

.auth-input-anim {
    animation: authInputIn 0.45s ease both;
}

@keyframes authInputIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Legacy compat */
.auth-bg, .auth-particles, .auth-card.glass-card, .auth-logo, .logo-circle,
.auth-title, .auth-subtitle, .auth-link, .btn-google {
    /* unused in new layout */
}

@media (prefers-reduced-motion: reduce) {
    .auth-orb, .auth-logo-ring, .auth-feat, .auth-chart-line,
    .auth-bonus-showcase, .auth-bonus-icon, .signup-bonus-pill i {
        animation: none !important;
    }
    .auth-anim-left, .auth-anim-right, .auth-anim-pop { animation: none !important; }
}

/* Signup Bonus Welcome Modal */
.signup-welcome-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.signup-welcome-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.signup-welcome-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 12, 24, 0.82);
    backdrop-filter: blur(8px);
}

.signup-welcome-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 2rem 1.75rem 1.75rem;
    border-radius: 24px;
    background: linear-gradient(165deg, rgba(22, 42, 68, 0.98), rgba(10, 22, 40, 0.98));
    border: 1px solid rgba(212, 168, 83, 0.35);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.signup-welcome-modal.show .signup-welcome-card {
    transform: scale(1) translateY(0);
}

.signup-welcome-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.25), transparent 70%);
    pointer-events: none;
}

.signup-welcome-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a853, #f0d78c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #0a1628;
    box-shadow: 0 8px 28px rgba(212, 168, 83, 0.45);
}

.signup-welcome-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    color: #f8fafc;
}

.signup-welcome-sub {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.signup-bonus-amount {
    font-size: 2.75rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(135deg, #f0d78c, #d4a853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.signup-bonus-note {
    font-size: 0.82rem;
    color: #4ade80;
    margin: 0 0 1.25rem;
}

.signup-welcome-btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #d4a853, #b8923f);
    color: #0a1628;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

@media (max-width: 400px) {
    .auth-card-modern { padding: 1.35rem 1.15rem; }
    .auth-card-top h2 { font-size: 1.25rem; }
}
