/* --- SAFFRON SURGE THEME (Viewer Edition) --- */
:root {
    --saffron-main: #FF9933;
    --saffron-deep: #D35400;
    --saffron-light: #FFF7ED;
    --navy-royal: #000080;
    --navy-dark: #0A192F;
    --bg-page: #FDFBF7;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body {
    height: 100vh; overflow: hidden;
    /* min-height: 100vh; */
    /* overflow-y: auto; */
    background: var(--bg-page);
    color: var(--text-primary);
}

/* --- MAIN LAYOUT --- */
.surge-layout { display: flex; width: 100%; height: 100%; } /*removed height: 100%*/

/* --- LEFT PANEL: THE SURGE --- */
.surge-brand {
    width: 50%;
    background: linear-gradient(135deg, #FF9933 0%, #E67E22 50%, #C0392B 100%);
    position: relative;
    color: white;
    display: flex; flex-direction: column; justify-content: center; padding: 80px;
    z-index: 10;
    overflow: hidden;
}

.copyright {
    font-weight: 700;
    color: white !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 10px !important;
    margin-top: 3px !important;
    opacity: 0.9 !important;
}

/* Background Waves */
.dispersive-waves { position: absolute; top: 0; right: 0; width: 25%; height: 100%; z-index: 5; pointer-events: none; }
.wave {
    position: absolute; top: 0; right: 0; width: 100%; height: 100%;
    background-repeat: repeat-y; background-size: 100% 1200px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 500 1500' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M350,0 C450,250 150,500 350,750 C550,1000 250,1250 350,1500 L500,1500 L500,0 Z' fill='%23FDFBF7'/%3E%3C/svg%3E");
}
.wave1 { opacity: 0.3; width: 140%; right: 30px; animation: flowUp 25s linear infinite; filter: blur(4px); }
.wave2 { opacity: 0.5; width: 120%; right: 15px; background-position: 0 500px; animation: flowDown 35s linear infinite; }
.wave3 { opacity: 1; width: 100%; right: 0; background-position: 0 200px; animation: flowUp 45s linear infinite; }

@keyframes flowUp { from { background-position: 0 0; } to { background-position: 0 -1200px; } }
@keyframes flowDown { from { background-position: 0 0; } to { background-position: 0 1200px; } }

/* Branding Content */
.texture-overlay { position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm1 1h38v38H1V1z' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/svg%3E"); opacity: 0.3; pointer-events: none; }
#circuit-canvas { position: absolute; inset: 0; opacity: 0.5; pointer-events: none; }
.brand-content { position: relative; z-index: 20; max-width: 520px; }

.logo-area { display: flex; align-items: center; gap: 15px; margin-bottom: 40px; }
.logo-box { background: white; color: var(--saffron-deep); width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
.logo-area span { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 22px; letter-spacing: 0.5px; }

.surge-brand h1 { font-family: 'Outfit', sans-serif; font-size: 56px; font-weight: 800; line-height: 1.1; margin-bottom: 30px; text-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.brand-desc { font-size: 15px; line-height: 1.6; margin-bottom: 50px; opacity: 0.9; font-weight: 480; max-width: 450px; text-shadow: 0 4px 15px rgba(0,0,0,0.15); font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;}

/* .compliance-badge { position: absolute; top: 40px; left: 25%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.3); padding: 8px 20px; border-radius: 50px; font-size: 12px; font-weight: 700; backdrop-filter: blur(8px); color: white; z-index: 50; }
.pulse-dot { width: 8px; height: 8px; background: #2ecc71; border-radius: 50%; box-shadow: 0 0 10px #2ecc71; animation: pulse 2s infinite; } */
.compliance-badge {
    position: absolute;
    top: 40px; /* Distance from top */
    left: 25%;
    transform: translateX(-50%); /* This perfectly centers it horizontally */
    
    display: inline-flex; 
    align-items: center; 
    gap: 10px;
    background: rgba(255, 255, 255, 0.15); 
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px; 
    border-radius: 50px; 
    font-size: 12px; 
    font-weight: 700;
    backdrop-filter: blur(8px); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 50;
    letter-spacing: 0.5px;
    color: white;
    white-space: nowrap; /* Prevents text wrapping */
}

/* The Green Dot Pulse */
.pulse-dot { 
    width: 8px; height: 8px; 
    background: #2ecc71; 
    border-radius: 50%; 
    box-shadow: 0 0 10px #2ecc71;
    animation: pulse 2s infinite; 
}
.brand-footer { position: absolute; bottom: 25px; left: 80px; background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.15); padding: 12px 20px; border-radius: 10px; overflow-y: auto; overflow-x: hidden;}
.brand-footer p { margin: 0; font-size: 11px; color: rgba(255, 255, 255, 0.85); }

/* --- RIGHT PANEL: FORM --- */
.surge-form-area { flex: 1; display: flex; justify-content: center; align-items: center; padding: 40px; background: var(--bg-page); position: relative; margin-left: -5%; padding-left: 5%; overflow: visible; }
.form-container { width: 100%; max-width: 450px; animation: slideIn 0.6s ease-out; padding-bottom: 50px;}

/* Tabs */
.glass-tabs { display: flex; position: relative; background: #F1F5F9; padding: 5px; border-radius: 14px; margin-bottom: 30px; border: 1px solid #E2E8F0; }
.tab-slider { position: absolute; top: 5px; left: 5px; width: calc(50% - 5px); height: calc(100% - 10px); background: white; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.tab-item { flex: 1; position: relative; z-index: 2; background: none; border: none; padding: 14px; font-size: 14px; font-weight: 700; color: var(--text-secondary); cursor: pointer; transition: color 0.3s; }
.tab-item.active { color: var(--saffron-deep); }

/* Forms */
.form-header h2 { font-family: 'Outfit', sans-serif; font-size: 30px; color: var(--navy-royal); margin-bottom: 10px; font-weight: 700; }
.form-header p { font-size: 15px; color: var(--text-secondary); margin-bottom: 25px; }

/* New Info Banner (Viewer Specific) */
.info-banner { background: #eff6ff; border-left: 4px solid #3b82f6; padding: 12px 15px; border-radius: 6px; margin-bottom: 25px; display: flex; gap: 12px; font-size: 13px; color: #1e3a8a; }
.info-banner .icon { font-size: 16px; }
.info-banner a { color: #2563eb; font-weight: 700; text-decoration: none; }
.info-banner a:hover { text-decoration: underline; }

/* Floating Inputs */
.input-group { position: relative; margin-bottom: 24px; }
.input-group input, .input-group select { width: 100%; padding: 14px 0; border: none; border-bottom: 2px solid #E2E8F0; background: transparent; font-size: 16px; color: var(--navy-royal); font-weight: 500; outline: none; transition: all 0.3s; border-radius: 0; appearance: none; z-index: 2; position: relative; }
.input-group label { position: absolute; left: 0; top: 14px; color: var(--text-secondary); font-size: 15px; font-weight: 400; pointer-events: none; transition: all 0.3s ease; z-index: 1; }
.border-line { position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--saffron-main); transition: width 0.3s ease; }

.input-group input:focus ~ .border-line, .input-group select:focus ~ .border-line { width: 100%; }
.input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label, .input-group select:focus ~ label, .input-group select:valid ~ label { top: -10px; font-size: 11px; font-weight: 700; color: var(--saffron-deep); text-transform: uppercase; letter-spacing: 0.5px; }

/* Select Arrow Fix */
.input-group select { cursor: pointer; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748B%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 0px top 50%; background-size: 10px auto; padding-right: 20px; }

.eye-toggle { position: absolute; right: 0; top: 12px; cursor: pointer; color: var(--text-secondary); z-index: 10; }
.eye-toggle:hover { color: var(--saffron-main); }

/* Captcha */
.captcha-row { display: flex; gap: 20px; margin-bottom: 30px; align-items: flex-end; }
.captcha-glass { background: #FFF7ED; border: 1px dashed var(--saffron-main); padding: 0 16px; border-radius: 10px; display: flex; align-items: center; gap: 15px; height: 52px; min-width: 140px; justify-content: space-between; }
.captcha-glass span { font-family: monospace; font-size: 22px; font-weight: 700; letter-spacing: 4px; color: var(--navy-royal); user-select: none; }
.refresh-btn { background: none; border: none; cursor: pointer; color: var(--saffron-deep); font-size: 20px; transition: transform 0.3s; }
.refresh-btn:hover { transform: rotate(180deg); }
.compact { flex: 1; margin-bottom: 0; }

/* Buttons */
.btn-royal { width: 100%; padding: 18px; background: linear-gradient(135deg, var(--navy-royal) 0%, var(--navy-dark) 100%); color: white; font-weight: 700; font-size: 16px; border: none; border-radius: 14px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 12px; box-shadow: 0 10px 25px rgba(0,0,128,0.2); transition: transform 0.2s, box-shadow 0.2s; }
.btn-royal:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0,0,128,0.3); }
.recover-link { display: block; text-align: center; margin-top: 25px; font-size: 14px; color: var(--navy-royal); font-weight: 600; cursor: pointer; text-decoration: none; opacity: 0.8; transition: opacity 0.2s; }
.recover-link:hover { opacity: 1; text-decoration: underline; }
/* Button Loading State */
.btn-royal:disabled, .btn-royal.loading {
    background: linear-gradient(135deg, var(--navy-royal) 0%, var(--navy-dark) 100%) !important;
    color: white !important;
    opacity: 0.75 !important; 
    cursor: default !important; 
    transform: none !important;
    box-shadow: none !important;
}

/* Modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(10, 25, 47, 0.6); backdrop-filter: blur(8px); display: none; justify-content: center; align-items: center; z-index: 1000; }
.glass-card { background: white; padding: 40px; width: 90%; max-width: 450px; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative;}
.glass-card p {margin-bottom: 35px; line-height: 1.5;}
.modal-header { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
#forgotPasswordModal p {margin-bottom: 35px;}
.icon-badge { width: 40px; height: 40px; background: #FFF7ED; color: #E67E22; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 4px 10px rgba(230, 126, 34, 0.2); }
.modal-header h3 { font-family: 'Outfit', sans-serif; color: var(--navy-royal); margin: 0; font-size: 22px; }
.close-icon { margin-left: auto; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--text-secondary); }

/* Developer Footer */
.dev-footer { position: absolute; bottom: 20px; left: 1.5%; width: 100%; text-align: center; font-size: 13px; font-weight: 500; color: var(--text-secondary); opacity: 0; transform: translate3d(-30px, 0, 0); animation: footerSlideUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 0.5s; pointer-events: none; }
.dev-footer strong { color: var(--navy-royal); font-weight: 700; }
.heart { color: #E67E22; display: inline-block; animation: heartbeat 1.5s ease-in-out infinite; }

/* Toast */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; }

@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } 100% { opacity: 1; transform: scale(1); } }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slideIn { from { transform: translateX(50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes footerSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 0.7; transform: translateY(0); } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }



/* --- MOBILE & TABLET RESPONSIVENESS FIX (Consolidated) --- */
/* We use 992px to ensure Tablets also get the clean layout */
@media (max-width: 992px) {
    
    /* 1. LAYOUT RESET */
    .surge-layout {
        flex-direction: column;
    }

    /* 2. HIDE THE ORANGE BRAND PANEL */
    /* We hide this so mobile/tablet users go straight to login */
    .surge-brand { 
        display: none !important; 
    }

    /* 3. FIX FORM CONTAINER */
    .surge-form-area {
        width: 100% !important;
        margin-left: 0 !important;      /* Remove diagonal cut hack */
        padding: 40px 20px !important;  /* Standard padding */
        display: block;                 /* Stop centering vertically */
        height: auto;
        min-height: 100vh;
        overflow-y: auto;               /* Allow scrolling */
    }

    .form-container { 
        margin: 0 auto; 
        width: 100%;
        padding-bottom: 80px; /* Extra space for footer */
    }

    /* 4. FIX DEVELOPER FOOTER OVERLAP */
    .dev-footer {
        position: relative; 
        margin-top: 40px;
        left: 0;
        bottom: 0;
        transform: none !important;
        opacity: 1 !important;
        animation: none;
        width: 100%;
        color: var(--text-secondary);
    }
    
    /* 5. ADJUST MODALS FOR MOBILE SCREEN */
    .glass-card {
        width: 95%;
        padding: 20px;
        margin: 10px auto;
    }
}

/* =========================================
   ENHANCED FOOTER NAVIGATION (SLIM VERSION)
   ========================================= */
.footer-legal-nav {
    display: flex;
    gap: 5px; /* Tighter gap */
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    background: var(--bg-body); 
    padding: 6px; /* Much smaller outer padding */
    border-radius: 99px;
    border: 1px solid var(--bg-accent);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.03); 
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.footer-legal-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-heading);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px; /* Slightly smaller text */
    padding: 8px 16px; /* Tighter button padding */
    border-radius: 99px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-legal-link:hover {
    background: var(--rep-bg);
    color: var(--brand-primary);
    transform: translateY(-2px);
}

.footer-legal-link svg {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.footer-legal-link:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

/* Enable smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Prevent the sticky navbar from hiding the section title when scrolling */
#about {
    scroll-margin-top: 100px; /* Adjusts the landing spot so it clears your 76px navbar */
}