/* =========================================================
   IFA OFFICIAL DASHBOARD - PERFECTED LIGHT THEME (NAV FIXED)
   ========================================================= */
:root {
    --ifa-navy: #800000;
    --ifa-maroon: #800000;
    --ifa-gold: #D4AF37;
    --ifa-gold-light: #F9F1D5;
    --surface-dark: #4a0000;
    --surface-white: #FFFFFF;
    --bg-canvas: #F8FAFC; 
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border-light: #E2E8F0;
    --border-dark: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 1440px; 
    margin: 0 auto;
    padding: 0 20px;
}

/* --- GLOBAL ENTERPRISE HEADER --- */
header {
    background: var(--surface-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header-top {
    background: var(--ifa-maroon);
    color: var(--ifa-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ifa-gold);
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-main {
    display: flex;
    justify-content: space-between; /* Automatically balances space between logo and links */
    align-items: center;
    height: 85px;
    width: 100%;
}

/* BRAND / LOGO AREA */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 1;
    min-width: 0;
}

.brand img {
    height: 48px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.brand div {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand h1 {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--ifa-maroon);
    letter-spacing: -0.5px;
    margin: 0 0 2px 0;
    line-height: 1;
    white-space: nowrap;
}

.brand span {
    font-size: 0.62rem;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

/* NAVIGATION LINKS - FITS PERFECTLY ON ALL LAPTOPS */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem; /* Optimized gap so all 9 items fit comfortably without overlapping */
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap; 
}

.nav-links li {
    display: inline-block;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.7rem; /* Scaled cleanly to prevent text collision */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding-bottom: 4px;
    position: relative;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--ifa-maroon);
    border-bottom: 2px solid var(--ifa-maroon);
}

/* RESTORED: THE FLAT, CLEAN MUSTARD ADMIN BUTTON */
.nav-links a.btn-primary {
    background: #d4b539 !important; 
    color: #000000 !important;
    padding: 7px 14px !important;
    border-radius: 6px !important; 
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    border: 1px solid #c2a329 !important;
    border-bottom: none !important; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    margin-left: 6px; 
    transform: none !important;
    text-shadow: none !important;
    transition: background 0.2s ease !important;
}

.nav-links a.btn-primary:hover {
    background: #c2a329 !important; 
}

/* --- POLISHED BENTO CARDS & SECTIONS --- */
.dashboard-section {
    padding: 40px 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.bento-card {
    background: var(--surface-white);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid var(--border-light);
    border-top: 4px solid var(--ifa-maroon);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--ifa-maroon);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-primary-card {
    background: var(--ifa-maroon);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 12px rgba(128, 0, 0, 0.15);
}

.btn-primary-card:hover {
    background: #600000;
    transform: translateY(-2px);
}

.btn-view-all {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ifa-maroon);
    text-decoration: none;
}
.btn-view-all:hover { text-decoration: underline; }

/* --- SOPHISTICATED 3D HOLOGRAPHIC PRISM HUD --- */
.sophisticated-stage { perspective: 1400px; width: 100%; display: flex; justify-content: center; }

.sophisticated-3d-card {
    position: relative; width: 100%;
    background: linear-gradient(145deg, rgba(80, 0, 0, 0.92) 0%, rgba(30, 0, 0, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4); border-radius: 24px; padding: 32px;
    color: #ffffff; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 0 30px rgba(212, 175, 55, 0.08);
    backdrop-filter: blur(24px); transform-style: preserve-3d; overflow: hidden;
}

.sophisticated-3d-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--ifa-gold), transparent);
}

.prism-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(212, 175, 55, 0.2); padding-bottom: 14px; margin-bottom: 24px; }
.prism-league-title { font-family: 'Orbitron', monospace; font-size: 0.75rem; font-weight: 800; letter-spacing: 2px; color: var(--ifa-gold); text-shadow: 0 0 12px rgba(212, 175, 55, 0.4); }
.prism-live-badge { display: flex; align-items: center; gap: 8px; background: rgba(128, 0, 0, 0.6); border: 1px solid var(--ifa-gold); padding: 4px 14px; border-radius: 30px; box-shadow: 0 0 15px rgba(128, 0, 0, 0.5); }
.prism-arena { display: flex; justify-content: space-between; align-items: center; text-align: center; margin: 15px 0; }
.prism-team-block { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.prism-team-code { font-family: 'Orbitron', monospace; font-size: 0.72rem; font-weight: 800; color: var(--ifa-gold); background: rgba(212, 175, 55, 0.12); padding: 3px 10px; border-radius: 6px; border: 1px solid rgba(212, 175, 55, 0.25); letter-spacing: 1px; }
.prism-team-name { font-size: 1rem; font-weight: 700; color: #f8fafc; letter-spacing: -0.2px; }
.prism-scoreboard-vessel { background: rgba(10, 0, 0, 0.5); border: 1px solid rgba(212, 175, 55, 0.3); padding: 12px 24px; border-radius: 16px; box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.1); }
.prism-digits { font-family: 'Orbitron', monospace; display: flex; align-items: center; gap: 14px; font-size: 3rem; font-weight: 900; color: #ffffff; text-shadow: 0 0 25px rgba(212, 175, 55, 0.6); }
.prism-separator { color: var(--ifa-gold); font-weight: 400; opacity: 0.8; }
.prism-timer { font-family: 'Orbitron', monospace; font-size: 0.78rem; color: var(--ifa-gold); background: rgba(212, 175, 55, 0.1); border: 1px solid rgba(212, 175, 55, 0.3); padding: 4px 12px; border-radius: 6px; margin-top: 6px; letter-spacing: 1px; }
.prism-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 14px; margin-top: 20px; font-size: 0.78rem; color: #cbd5e1; }

/* --- 3D HOLOGRAPHIC VISUALIZER HERO CARD --- */
.visualizer-hero-card {
    position: relative; background: radial-gradient(circle at center, #140404 0%, #050101 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.4); border-radius: 24px; padding: 36px;
    color: #ffffff; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(128, 0, 0, 0.3), inset 0 0 35px rgba(212, 175, 55, 0.1);
    overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 380px;
}
.visualizer-hero-card canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.75; pointer-events: none; }
.hero-content-layer { position: relative; z-index: 10; }

/* --- COMPACT 3D HOLO-PROJECTOR FOOTER --- */
.holo-footer-bar {
    background: linear-gradient(to right, transparent, rgba(30, 0, 0, 0.8), transparent);
    border-top: 1px solid rgba(212, 175, 55, 0.2); padding: 30px 0 40px 0; margin-top: 20px; text-align: center; overflow: hidden;
}
.holo-footer-title { font-family: 'Orbitron', monospace; font-size: 0.8rem; font-weight: 800; color: var(--ifa-gold); letter-spacing: 3px; margin-bottom: 40px; text-transform: uppercase; text-shadow: 0 0 10px rgba(212, 175, 55, 0.5); }
.holo-projector-container { display: flex; justify-content: center; align-items: center; gap: 80px; perspective: 1000px; }
.holo-projector { position: relative; width: 140px; height: 100px; transform-style: preserve-3d; }
.holo-projector-base { position: absolute; bottom: -20px; left: 0; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, transparent 60%); border: 2px dashed rgba(212, 175, 55, 0.6); transform: rotateX(75deg); box-shadow: 0 0 20px rgba(212, 175, 55, 0.5), inset 0 0 15px rgba(212, 175, 55, 0.4); animation: spinBase 8s linear infinite; }
.holo-projector-beam { position: absolute; bottom: 0px; left: 15%; width: 70%; height: 90px; background: linear-gradient(to top, rgba(212,175,55,0.3) 0%, transparent 100%); clip-path: polygon(25% 100%, 75% 100%, 100% 0, 0 0); opacity: 0.7; animation: pulseBeam 2s ease-in-out infinite alternate; pointer-events: none; }
.holo-projector-logo { 
    position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); 
    height: 55px; width: auto; max-width: 180px; object-fit: contain; 
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.9)); animation: floatLogo 4s ease-in-out infinite; z-index: 10; 
}

@keyframes spinBase { 0% { transform: rotateX(75deg) rotateZ(0deg); } 100% { transform: rotateX(75deg) rotateZ(360deg); } }
@keyframes floatLogo { 0%, 100% { transform: translate(-50%, 0); filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.9)); } 50% { transform: translate(-50%, -10px); filter: drop-shadow(0 0 15px rgba(212, 175, 55, 1)); } }
@keyframes pulseBeam { 0% { opacity: 0.4; height: 85px; } 100% { opacity: 0.8; height: 100px; } }

/* =========================================================
   CLEAN RESPONSIVE OVERRIDES (TABLETS & MOBILES)
   ========================================================= */

html, body { overflow-x: hidden; width: 100%; }

/* TABLET FIX (Max 1024px) */
@media screen and (max-width: 1024px) {
    .bento-grid { display: flex !important; flex-direction: column !important; gap: 20px; }
    .bento-card, .sophisticated-stage, .visualizer-hero-card { width: 100% !important; grid-column: 1 / -1 !important; }
    .holo-projector-container { gap: 30px; flex-wrap: wrap; }
    .visualizer-hero-card .hero-content-layer[style*="display: flex"] { flex-direction: column !important; gap: 15px !important; text-align: center; }
    
    .nav-links { gap: 8px; }
    .nav-links a { font-size: 0.65rem; }
}

/* MOBILE FIX (Max 768px) */
@media screen and (max-width: 768px) {
    .header-top { display: none !important; }
    
    .nav-main { 
        height: auto !important; 
        flex-direction: column; 
        gap: 12px; 
        padding: 15px 0 0 0; 
    }
    
    .brand h1 { font-size: 1rem; }
    .brand { margin-right: 0; }
    
    .nav-links { 
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; 
        justify-content: flex-start !important; 
        width: 100%;
        overflow-x: auto !important; 
        padding: 0 20px 15px 20px !important;
        margin: 0 !important;
        gap: 16px !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-links::-webkit-scrollbar { display: none; }
    
    .nav-links a.btn-primary { 
        padding: 7px 14px !important; 
        font-size: 0.65rem !important; 
        margin-left: 0;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    }
    
    .prism-arena { flex-direction: column; gap: 15px; }
    .prism-digits { font-size: 2.2rem !important; }
    .prism-team-name { font-size: 0.9rem !important; white-space: normal !important; text-align: center !important; word-wrap: break-word; }
}

/* SMALL PHONE FIX (Max 480px) */
@media screen and (max-width: 480px) {
    .bento-card, .sophisticated-3d-card { padding: 15px 10px !important; }
    .prism-digits { font-size: 1.6rem !important; }
    .prism-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}