/* ============================================================
   ROOT VARIABLES — Dark Sport Theme
   ============================================================ */
:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --primary-light: #66e5ff;
    --primary-gradient: linear-gradient(135deg, #00d4ff 0%, #0066cc 100%);
    --secondary: #0a0e17;
    --accent: #ff6b35;
    --accent-glow: #ff6b3550;
    --bg-dark: #080c14;
    --bg-card: #0f1a2e;
    --bg-card-hover: #162544;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-light: #64748b;
    --border-color: #1e2d45;
    --border-glow: #00d4ff30;
    --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.1);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* ============================================================
   BRAND PANEL (LEFT) — Dark Sport Theme
   ============================================================ */
.brand-panel {
    flex: 1.2;
    background: linear-gradient(145deg, #0a0e17 0%, #0f1a2e 50%, #0a0e17 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
}

/* Animated gradient background */
.brand-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    animation: pulseGlow 8s ease-in-out infinite alternate;
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.04) 0%, transparent 70%);
    pointer-events: none;
    animation: pulseGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.3) translate(20px, -20px);
        opacity: 1;
    }
}

/* Grid pattern overlay */
.brand-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 440px;
}

/* Glowing orb */
.brand-orb {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 28px;
}

.brand-orb-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #fff;
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.3), inset 0 0 40px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    animation: orbFloat 6s ease-in-out infinite alternate;
}

.brand-orb::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(0, 212, 255, 0.15);
    animation: orbRing 4s ease-in-out infinite alternate;
}

.brand-orb::after {
    content: '';
    position: absolute;
    top: -18px;
    left: -18px;
    right: -18px;
    bottom: -18px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.08);
    animation: orbRing 6s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloat {
    0% {
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(-12px) scale(1.03);
    }
}

@keyframes orbRing {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.brand-title {
    font-family: 'Orbitron', monospace;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
}

.brand-title .highlight {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

.brand-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Stats display */
.brand-stats {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
    padding: 20px;
    background: rgba(15, 26, 46, 0.6);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.brand-stat-item .stat-number {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    display: block;
    letter-spacing: 1px;
}

.brand-stat-item .stat-label {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: 2px;
}

/* ============================================================
   AUTH PANEL (RIGHT) — Dark Theme
   ============================================================ */
.auth-panel {
    flex: 1;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 50px;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

/* Auth Header */
.auth-header {
    margin-bottom: 32px;
    text-align: center;
}

.auth-header .greeting {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
    font-family: 'Orbitron', monospace;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    outline: none;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.08), inset 0 0 20px rgba(0, 212, 255, 0.03);
}

.form-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.form-input.password-input {
    padding-right: 46px;
}

.password-toggle-icon {
    position: absolute;
    right: 16px;
    top: 42px;
    color: var(--text-light);
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
    z-index: 10;
}

.password-toggle-icon:hover {
    color: var(--primary);
}

.forgot-link {
    display: block;
    text-align: right;
    margin-top: -8px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary);
}

/* Login Button — Neon style */
.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Orbitron', monospace;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.3), 0 0 60px rgba(0, 212, 255, 0.1);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login .btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-login.loading .btn-text {
    display: none;
}

.btn-login.loading .btn-loader {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider::before {
    margin-right: 16px;
}

.divider::after {
    margin-left: 16px;
}

/* Google Button — Dark theme */
.btn-google {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-google:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.05), inset 0 0 20px rgba(0, 212, 255, 0.03);
    transform: translateY(-2px);
}

.btn-google:active {
    transform: translateY(0);
}

.btn-google img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Auth Footer */
.auth-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-light);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

/* ============================================================
   POPUP MODAL — Dark Theme
   ============================================================ */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-modal.active {
    display: flex;
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.custom-modal-box {
    background: var(--bg-card);
    width: 100%;
    max-width: 400px;
    padding: 36px 32px 32px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-glow);
    animation: popupSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.popup-error .popup-icon-circle {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.popup-success .popup-icon-circle {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.popup-icon-circle i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal-box h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.custom-modal-box p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.popup-btn {
    background: var(--primary-gradient);
    color: #fff;
    padding: 12px 36px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .brand-panel {
        flex: 1;
        padding: 40px 30px;
    }
    .auth-panel {
        padding: 30px 40px;
    }
    .brand-title {
        font-size: 32px;
    }
    .brand-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 16px;
    }
    .brand-stat-item .stat-number {
        font-size: 20px;
    }
}

@media (max-width: 820px) {
    .brand-panel {
        display: none;
    }
    .auth-panel {
        flex: 1;
        padding: 30px 20px;
        justify-content: center;
    }
    .auth-form-container {
        max-width: 100%;
        padding: 0 10px;
    }
    .auth-header h2 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .auth-panel {
        padding: 20px 16px;
    }
    .auth-header h2 {
        font-size: 22px;
    }
    .auth-header p {
        font-size: 13px;
    }
    .form-input {
        padding: 12px 14px;
        font-size: 13px;
    }
    .btn-login,
    .btn-google {
        padding: 14px;
        font-size: 13px;
    }
    .custom-modal-box {
        padding: 28px 20px 24px;
    }
    .brand-stats {
        display: none;
    }
}