/* =========================================================================
   AGRA SIR - PREMIUM UNIFIED THEME SYSTEM
========================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* --------------------------------------
       LIGHT THEME (Default)
    -------------------------------------- */
    --bg: #f1f5f9;
    --bg-gradient: radial-gradient(circle at 10% 20%, #e2e8f0 0%, #f1f5f9 90%);
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-hover: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent-magenta: #d946ef;
    --accent-gold: #fbbf24;
    --success: #10b981;
    --success-hover: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --wa-green: #25D366;
    --wa-green-hover: #128C7E;
    --border: rgba(226, 232, 240, 0.8);
    --border-light: rgba(241, 245, 249, 0.5);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.2);
    --glass-blur: blur(12px);
    
    /* --------------------------------------
       TAB BUTTON SPECIFICS (Light)
    -------------------------------------- */
    --tab-bg: rgba(255, 255, 255, 0.7);
    --tab-text: #64748b;
    --tab-active-bg: linear-gradient(135deg, #4f46e5, #4338ca);
    --tab-active-text: #ffffff;
    --tab-hover-bg: rgba(226, 232, 240, 0.8);
}

html.theme-dark {
    /* --------------------------------------
       DARK THEME (Premium Dark Mode)
    -------------------------------------- */
      --bg: #0B0F19; 
      --bg-gradient: radial-gradient(circle at top left, #111827 0%, #0B0F19 100%);
      --surface: #131A2A; 
      --surface-soft: #1A233A;
      --surface-hover: #222D4B;
      --text: #ffffff;
      --text-muted: #94a3b8;
      --muted: #94a3b8;
      --primary: #818cf8; 
      --primary-hover: #6366f1;
      --accent-magenta: #e879f9;
      --accent-gold: #fbbf24;
      --success: #34d399;
      --success-hover: #10b981;
      --warning: #fbbf24;
      --danger: #f87171;
      --wa-green: #25D366;
      --wa-green-hover: #128C7E;
      --border: rgba(255, 255, 255, 0.08);
      --border-light: rgba(255, 255, 255, 0.03);
      --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
      --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
      --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
      --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);
    
    /* --------------------------------------
       TAB BUTTON SPECIFICS (Dark)
    -------------------------------------- */
    --tab-bg: rgba(44, 44, 54, 0.8);
    --tab-text: #9ca3af;
    --tab-active-bg: linear-gradient(135deg, #c084fc, #a855f7);
    --tab-active-text: #ffffff;
    --tab-hover-bg: rgba(69, 69, 85, 0.8);
}

/* Backward compatibility for landing page & profile */
:root {
    --text-main: var(--text);
    --bg-light: var(--bg);
    --bg-base: var(--bg);
    --bg-panel: var(--surface);
    --danger-bg: rgba(239, 68, 68, 0.1);
}

/* =========================================================================
   GLOBAL BASE STYLES
========================================================================= */

body {
    background: var(--bg);
    background-image: var(--bg-gradient);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-hover);
}

/* =========================================================================
   UNIVERSAL THEME OVERRIDES (Applies globally to all buttons/cards)
========================================================================= */

/* Premium Tab Buttons */
.exam-tab {
    padding: 12px 24px;
    background: var(--tab-bg);
    color: var(--tab-text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: var(--glass-blur);
}

.exam-tab:hover {
    background: var(--tab-hover-bg);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.exam-tab.active {
    color: var(--tab-active-text);
    border-color: transparent;
}

.exam-tab.tab-topics.active {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

.exam-tab.tab-monthly.active {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.exam-tab.tab-preterm.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.exam-tab.tab-arcade.active {
    background: linear-gradient(135deg, #d946ef, #c026d3);
    box-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
}

/* Common Interactive Buttons */
button {
    font-family: inherit;
}

/* Premium Card Surfaces */
.premium-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    backdrop-filter: var(--glass-blur);
    color: var(--text);
    transition: all 0.3s ease;
}

.premium-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Common Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
}

/* GLOBAL LOGO STYLES */
.logo-main, .agra-main { padding-bottom: 8px !important; display: inline-block; }
