/* =========================================
   1. CORE VARIABLES (रंग और फोंट्स)
========================================= */
:root {
    /* ब्रांड कलर्स */
    --brand-primary: #d90429;
    --brand-glow: #ef233c;
    --brand-gradient: linear-gradient(135deg, #d90429 0%, #ff0f4b 100%);
    
    /* टेक्स्ट और बैकग्राउंड (Light Mode Defaults) */
    --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);
    --icon-bg: #f1f5f9;

    /* फोंट्स */
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-logo: "Segoe UI", Roboto, sans-serif;
}

/* डार्क मोड ओवरराइड्स (Dark Mode Settings) */
[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);
    --icon-bg: #1f1f1f;
}

/* बेसिक रीसेट */
* { 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: background-color 0.3s ease, color 0.3s ease;
}
a { text-decoration: none; color: inherit; transition: all 0.25s ease; }
ul { list-style: none; }

/* कंटेनर (Width Control) */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   2. 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%; 
    animation: pulse 2s infinite; 
}

/* सोशल आइकन्स */
.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); }

/* =========================================
   3. MAIN HEADER & SMART LOGO
========================================= */
.header-main { padding: 25px 0; background: transparent; }
.header-flex { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

/* --- स्मार्ट लोगो (Smart Logo) CSS --- */
.smart-logo-link {
    display: flex; align-items: center; gap: 14px; 
    text-decoration: none; group-hover: pointer; position: relative;
}

/* लोगो आइकन बॉक्स */
.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: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative; overflow: hidden;
}
/* लोगो होवर इफेक्ट */
.smart-logo-link:hover .logo-symbol {
    transform: rotate(0deg) scale(1.08) translateY(-2px);
    box-shadow: 0 10px 30px rgba(217, 4, 41, 0.4);
}

.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; }

/* --- LIVE बैज और 3 लाइन एनीमेशन (Equalizer) --- */
.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; letter-spacing: 0.5px; position: relative; top: -2px;
    box-shadow: 0 0 10px rgba(217, 4, 41, 0.4);
    display: inline-flex; align-items: center; gap: 3px;
    animation: blinkEffect 1.5s infinite; /* पूरा बैज ब्लिंक करेगा */
}

.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; }

.logo-sub-text {
    font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
    letter-spacing: 2.5px; text-transform: uppercase; margin-top: 5px;
    display: flex; align-items: center;
}
.logo-sub-text::before {
    content: ''; width: 6px; height: 6px; background: var(--brand-primary);
    border-radius: 50%; margin-right: 6px;
}

/* --- हेडर बटन और एक्शन --- */
.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); 
}

/* =========================================
   4. NAVIGATION BAR (Glassmorphism)
========================================= */
.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%; }

/* =========================================
   5. ANIMATIONS (KEYFRAMES)
========================================= */
@keyframes pulse { 
    0% { opacity: 1; transform: scale(1); } 
    50% { opacity: 0.5; transform: scale(1.2); } 
    100% { opacity: 1; transform: scale(1); } 
}
@keyframes equalizer {
    0%, 100% { height: 40%; }
    50% { height: 100%; }
}
@keyframes blinkEffect {
    0% { opacity: 1; filter: brightness(100%); }
    50% { opacity: 0.8; filter: brightness(120%); }
    100% { opacity: 1; filter: brightness(100%); }
}

/* मोबाइल रेस्पॉन्सिव */
@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; padding-bottom: 5px; }
    .nav-li a { font-size: 0.75rem; padding: 15px; white-space: nowrap; }
    .smart-logo-link { flex-direction: column; gap: 8px; }
    .logo-sub-text { justify-content: center; }
}
