/* =========================================
   1. CSS VARIABLES & THEME SETUP
========================================= */
:root {
    /* Colors */
    --brand-primary: #d90429;
    --brand-glow: #ef233c;
    --brand-gradient: linear-gradient(135deg, #d90429 0%, #ff0f4b 100%);
    
    /* Fonts & Base */
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Light Mode Colors */
    --bg-body: #f4f7fa;
    --bg-card: #ffffff;
    --text-main: #111111;
    --text-muted: #666666;
    --border-color: #e2e8f0;
    --top-bar-bg: #e2e8f0;
    --top-bar-border: #cbd5e1;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: 1px solid rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(217, 4, 41, 0.15);
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-body: #050505;
    --bg-card: #121212;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #2a2a2a;
    --top-bar-bg: #000;
    --top-bar-border: #1a1a1a;
    --glass-bg: rgba(18, 18, 18, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(217, 4, 41, 0.3);
}

/* Resets */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body { font-family: var(--font-main); background-color: var(--bg-body); color: var(--text-main); transition: 0.3s; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   2. ANIMATIONS
========================================= */
@keyframes blinkEffect {
    0%, 100% { opacity: 1; filter: brightness(100%); }
    50% { opacity: 0.8; filter: brightness(130%); }
}
@keyframes equalizer {
    0%, 100% { height: 40%; }
    50% { height: 100%; }
}
.date-dot, .badge-live { animation: blinkEffect 1.5s infinite ease-in-out; }

/* =========================================
   3. TOP BAR STYLES
========================================= */
.top-bar {
    background: var(--top-bar-bg); border-bottom: 1px solid var(--top-bar-border);
    padding: 8px 0; font-size: 0.8rem; letter-spacing: 0.5px; transition: 0.3s;
}
.tb-inner { display: flex; justify-content: space-between; align-items: center; }

.date-badge { 
    background: rgba(239, 35, 60, 0.15); color: var(--brand-glow); 
    padding: 2px 12px; border-radius: 12px; font-weight: 700; display: flex; align-items: center; gap: 8px;
}
.date-dot { width: 6px; height: 6px; background: var(--brand-primary); border-radius: 50%; }

.social-icons { display: flex; gap: 15px; }
.si-icon { width: 16px; height: 16px; fill: var(--text-muted); cursor: pointer; transition: 0.3s; }
.si-icon:hover { fill: var(--brand-primary); transform: translateY(-2px); }

/* =========================================
   4. MAIN HEADER STYLES
========================================= */
.header-main { padding: 25px 0; }
.header-flex { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

/* Logo */
.smart-logo-link { display: flex; align-items: center; gap: 14px; text-decoration: none; group-hover: pointer; }
.logo-symbol {
    width: 54px; height: 54px; background: var(--brand-gradient); border-radius: 14px;
    display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-glow);
    transform: rotate(-5deg); transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.smart-logo-link:hover .logo-symbol { transform: rotate(0deg) scale(1.08) translateY(-2px); }

.logo-text-group { display: flex; flex-direction: column; justify-content: center; line-height: 1; }
.logo-main-text { font-family: "Arial Black", sans-serif; font-size: 1.8rem; letter-spacing: -1px; color: var(--text-main); display: flex; align-items: center; }
.text-exam { background: var(--brand-gradient); -webkit-background-clip: text; color: transparent; }
.logo-sub-text { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); letter-spacing: 2.5px; text-transform: uppercase; margin-top: 5px; }

/* Live Badge */
.badge-live {
    font-size: 0.4em; background: var(--brand-primary); color: #fff; padding: 3px 6px; 
    border-radius: 4px; margin-left: 6px; vertical-align: middle; font-weight: 800; 
    position: relative; top: -2px; display: inline-flex; align-items: center; gap: 3px;
}
.live-bars { display: flex; align-items: flex-end; height: 10px; gap: 1.5px; }
.live-bar { width: 2px; background: #fff; border-radius: 2px; animation: equalizer 1s infinite ease-in-out; }
.live-bar:nth-child(1) { height: 60%; animation-delay: 0s; }
.live-bar:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.live-bar:nth-child(3) { height: 50%; animation-delay: 0.3s; }

/* Header Actions */
.header-actions { display: flex; gap: 15px; align-items: center; }

.theme-toggle {
    background: var(--bg-card); border: 1px solid var(--border-color); width: 44px; height: 44px; 
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; 
    color: var(--text-main); transition: 0.3s; box-shadow: var(--shadow-sm);
}
.theme-toggle:hover { border-color: var(--brand-primary); color: var(--brand-primary); transform: rotate(15deg); }

.time-box { 
    background: var(--bg-card); padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border-color);
    color: var(--text-muted); font-family: monospace; font-size: 0.95rem; display: flex; align-items: center; gap: 10px;
    box-shadow: var(--shadow-sm);
}

.app-btn-head {
    background: linear-gradient(135deg, #1f1f1f, #2a2a2a); color: #fff; border: 1px solid #333;
    padding: 12px 24px; border-radius: 30px; font-weight: 700; font-size: 0.85rem; cursor: pointer;
    display: flex; align-items: center; gap: 8px; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.app-btn-head:hover { background: var(--brand-primary); border-color: var(--brand-primary); box-shadow: var(--shadow-glow); transform: translateY(-2px); }

/* =========================================
   5. NAVBAR STYLES
========================================= */
.glass-nav {
    position: sticky; top: 0; z-index: 1000; background: var(--glass-bg); 
    backdrop-filter: blur(20px); border-bottom: var(--glass-border); box-shadow: var(--shadow-sm);
    transition: background 0.3s;
}
.nav-ul { display: flex; justify-content: center; flex-wrap: wrap; }
.nav-li a {
    display: block; padding: 16px 22px; color: var(--text-muted); font-weight: 800; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 0.5px; position: relative;
}
.nav-li a:hover, .nav-li.active a { color: var(--text-main); }
.nav-li a::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 3px;
    background: var(--brand-primary); transition: 0.3s; box-shadow: 0 0 10px var(--brand-primary);
}
.nav-li a:hover::after, .nav-li.active a::after { width: 70%; }

/* Responsive */
@media (max-width: 768px) {
    .header-flex { flex-direction: column; text-align: center; }
    .header-actions { flex-direction: column; width: 100%; gap: 15px; }
    .time-box, .app-btn-head { width: 100%; justify-content: center; }
    .nav-ul { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
    .smart-logo-link { flex-direction: column; }
}
