/* NEW LOGIN MODAL STYLES */

/* ULTIMATE BACKGROUND SCROLL FIX */
body.login-modal-open, html.login-modal-open {
    overflow: hidden !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
}

#loginModal {
    font-family: Arial, Helvetica, sans-serif !important; 
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: flex-start !important; 
    justify-content: center !important;
    padding: 0px !important; 
    overscroll-behavior: none !important; 
    overflow-y: auto !important; 
    box-sizing: border-box !important;
    z-index: 99999 !important;
    touch-action: none !important; /* Block touch on overlay */
}

#loginModal .login-box.premium-auth-card {
    background: linear-gradient(145deg, rgba(37, 50, 71, 0.98) 0%, rgba(20, 31, 52, 0.99) 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 20px !important;
    border: none !important; 
    box-shadow: none !important; 
    position: relative;
    overflow: hidden;
    padding: 10px 20px 14px 20px !important; 
    max-width: 330px !important;
    width: 100% !important;
    
    /* MOVED SLIGHTLY HIGHER */
    margin-top: 35px !important; 
    margin-bottom: 40px !important; 
    margin-left: auto !important;
    margin-right: auto !important;
    
    transform: none !important;
    box-sizing: border-box !important;
    transition: height 0.3s ease, padding 0.3s ease;
    touch-action: auto !important; /* Allow touch inside modal */
}

/* Brand Area */
#loginModal .premium-auth-brand {
    text-align: center;
    margin-bottom: 0px !important; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}
#loginModal .brand-logo-text-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 6px;
    margin-bottom: 0px !important;
}

#loginModal .clean-auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 36px !important; 
    width: auto !important;
    position: relative;
    margin: 0 !important;
    background: none !important;
    box-shadow: none !important;
}
#loginModal .clean-auth-logo img {
    height: 100% !important;
    width: auto !important;
    object-fit: contain !important;
    display: block;
    position: relative;
    z-index: 2;
}
#loginModal .logo-gaming-text {
    font-size: 26px; 
    font-weight: 700; 
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%); 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none; 
    z-index: 2;
    line-height: 1;
    transform: translateY(2px);
}

#loginModal .auth-subtitle {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    margin: -5px 0 0 0 !important; 
    letter-spacing: 0.2px;
    text-align: center;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Google Button - Simple Font */
#loginModal .new-google-btn {
    width: 100%;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    color: #0f172a;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: Arial, Helvetica, sans-serif !important; 
    font-weight: 500 !important; 
    font-size: 14px !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 12px;
    margin-top: 5px; 
    box-shadow: inset 0 1px 0 rgba(255,255,255,1);
}
#loginModal .new-google-btn:active {
    transform: translateY(2px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,1);
}
#loginModal .new-google-btn .g-icon { width: 20px; height: 20px; }

/* OR Divider */
#loginModal .auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 12px;
}
#loginModal .auth-divider::before,
#loginModal .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
#loginModal .auth-divider span { padding: 0 10px; }

/* Tabs Container */
#loginModal .auth-tabs-container {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 3px;
    border: none !important; 
    margin-bottom: 12px;
    gap: 3px;
    box-shadow: none;
}

/* SMOOTH TAB BACKGROUND TRANSITION (Fix for harsh blue light change) */
#loginModal .auth-tab {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 4px;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    background: transparent !important;
    border: none !important;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.3s ease, box-shadow 0.3s ease;
    text-transform: capitalize;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

#loginModal .auth-tab::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s ease-in-out; /* Buttery smooth fade */
}

#loginModal .auth-tab img { width: 14px !important; height: 14px !important; transition: all 0.3s ease; opacity: 1; }
#loginModal .auth-tab img[src*="15874"] {
    filter: invert(1) brightness(100) !important; 
}

#loginModal .auth-tab.active {
    color: #ffffff;
    box-shadow: none !important; 
}
#loginModal .auth-tab.active::before {
    opacity: 1; /* Fade in the blue background smoothly */
}
#loginModal .auth-tab.active img { transform: scale(1.1); }

/* Panel Wrappers */
#loginModal .premium-auth-panel-wrap {
    position: relative;
    width: 100%;
    height: auto !important;
    min-height: unset !important; 
    max-height: unset !important;
    overflow: visible !important; 
}

@keyframes smoothPanelFade {
    0% { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: translateY(0); }
}

#loginModal .premium-login-panel {
    display: none !important;
}

#loginModal .premium-login-panel.active {
    display: block !important;
    animation: smoothPanelFade 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

#loginModal .premium-login-panel.hidden {
    display: none !important;
}

/* Form Fields */
#loginModal .auth-field {
    margin-bottom: 12px;
    text-align: left;
}
#loginModal .auth-field label {
    display: block;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px;
    color: #cbd5e1;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: capitalize;
}
#loginModal .auth-input-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05); 
    border: none !important; 
    border-radius: 10px;
    padding: 0 12px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: none;
}
#loginModal .auth-input-box:focus-within {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5) !important;
}
#loginModal .auth-input-box > svg:not(.eye-icon) {
    width: 16px; height: 16px; stroke: #94a3b8; flex-shrink: 0;
}
#loginModal .auth-input-box input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    padding: 12px 10px;
    font-size: 13.5px;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif !important;
}
#loginModal .auth-input-box input::placeholder { color: #64748b; font-weight: 500; text-transform: capitalize; }

#loginModal .auth-input-box .eye-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: #94a3b8;
    cursor: pointer;
    background: transparent;
    z-index: 10;
}
#loginModal .auth-input-box .eye-icon:hover { stroke: #ffffff; }
#loginModal .auth-input-box input[type="password"],
#loginModal .auth-input-box input#loginPass,
#loginModal .auth-input-box input#createPass,
#loginModal .auth-input-box input#createPassConfirm {
    padding-right: 36px !important;
}

#loginModal .auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif !important;
}
#loginModal .remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    cursor: pointer;
    font-weight: 500;
}
#loginModal .remember-me input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 16px; height: 16px;
    cursor: pointer;
    border: none;
}
#loginModal .forgot-pwd { color: #60a5fa; text-decoration: none; font-weight: 500; transition: opacity 0.2s; }
#loginModal .forgot-pwd:hover { opacity: 0.8; }

/* Main Login / Send OTP Button - Simple Font */
#loginModal .auth-login-btn,
#loginModal button[onclick*="sendOTP"],
#loginModal button[onclick*="verifyOTP"] {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none !important;
    border-radius: 10px;
    padding: 14px;
    font-family: Arial, Helvetica, sans-serif !important; 
    font-size: 15px !important;
    font-weight: 500 !important; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 16px;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: none !important; 
}
#loginModal .auth-login-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}
#loginModal .auth-login-btn svg { width: 18px; height: 18px; stroke: #ffffff; }

/* Create Account Link - Simple Font */
#loginModal .auth-signup-row {
    text-align: center;
    margin-bottom: 16px;
    font-family: Arial, Helvetica, sans-serif !important;
}
#loginModal .auth-signup-row > span {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}
#loginModal .auth-create-btn {
    background: transparent;
    border: none !important;
    color: #60a5fa;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 500 !important; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: underline !important; 
    text-transform: none !important;
}
#loginModal .auth-create-btn:hover { color: #3b82f6; }

/* Footer Features */
#loginModal .auth-footer-features {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    gap: 4px;
    margin-top: auto;
}
#loginModal .feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    flex: 1;
}
#loginModal .feature-item svg { width: 16px; height: 16px; stroke: #60a5fa; fill: none; margin: 0 auto; }
#loginModal .feature-item .fill-icon { fill: #60a5fa; stroke: none; }
#loginModal .feature-item b { font-family: Arial, Helvetica, sans-serif !important; font-size: 10.5px; color: #f1f5f9; font-weight: 600; white-space: nowrap; line-height: 1.2; text-transform: capitalize; }
#loginModal .feature-item span { font-family: Arial, Helvetica, sans-serif !important; font-size: 9.5px; color: #64748b; font-weight: 500; white-space: nowrap; line-height: 1.2; text-transform: capitalize; }

/* Close Button */
#loginModal .close-btn-new {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.08);
    border: none !important;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #cbd5e1;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
}
#loginModal .close-btn-new:hover { background: rgba(255,255,255,0.15); color: #fff; transform: rotate(90deg); }

#loginModal .hidden { display: none !important; }
