/* ============================================
   TEER PORTAL — MODERN PREMIUM CSS
   Glassmorphism + Gradients + Micro-animations
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    /* Modern Brand Palette */
    --primary: #6C3CE1;
    --primary-dark: #5228CC;
    --primary-light: #8B5CF6;
    --secondary: #F43F5E;
    --accent: #0EA5E9;
    --accent-glow: rgba(14, 165, 233, 0.3);

    /* Gradient Definitions */
    --grad-header: linear-gradient(135deg, #1a0533 0%, #2d1054 40%, #6C3CE1 100%);
    --grad-nav: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    --grad-card-title: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --grad-result-glow: linear-gradient(135deg, #6C3CE1, #F43F5E);
    --grad-body: linear-gradient(180deg, #0f0c29 0%, #1a1a2e 50%, #16213e 100%);

    /* Surface Colors */
    --bg-primary: #0f0c29;
    --bg-card: rgba(30, 27, 75, 0.6);
    --bg-card-solid: #1e1b4b;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-input: rgba(255, 255, 255, 0.08);

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    /* Borders */
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(108, 60, 225, 0.4);

    /* Result Colors */
    --result-number: #facc15;
    --result-pending: #64748b;
    --result-off: #475569;

    /* Spacing */
    --container-width: 900px;
    --section-gap: 20px;
    --card-padding: 28px;
    --card-radius: 16px;

    /* Animation */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.35s var(--ease-out-expo);
    --transition-slow: 0.5s var(--ease-out-expo);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(108, 60, 225, 0.2);
    --shadow-result: 0 0 40px rgba(250, 204, 21, 0.15);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    background-image: var(--grad-body);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ============================================
   Responsive Ad Containers
   ============================================ */
.ad-banner-728 {
    width: 100%;
    max-width: 728px;
    margin: 15px auto;
    text-align: center;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.ad-banner-728 iframe {
    max-width: none !important;
    display: block !important;
}

.ad-label {
    display: block;
    width: 100%;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 6px;
    letter-spacing: 1px;
    font-weight: 700;
    text-align: center;
}

.ad-banner-300 {
    width: 100%;
    max-width: 300px;
    margin: 12px auto;
    text-align: center;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-banner-300 iframe {
    max-width: 100% !important;
}

.ad-native-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin: 15px auto;
}

/* Subtle animated background grid */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(108, 60, 225, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(244, 63, 94, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
}

h1 { font-size: 28px; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 18px; }

p {
    margin-bottom: 1.1em;
    color: var(--text-secondary);
}

ul, ol {
    margin-bottom: 1.1em;
    padding-left: 24px;
    color: var(--text-secondary);
}

li {
    margin-bottom: 6px;
}

strong {
    color: var(--text-primary);
}

/* ============================================
   Container
   ============================================ */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Sidebar Layout — 2 Column
   ============================================ */
.site-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    max-width: 1200px;
}

.main-column {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
    display: block;
}

.sidebar-sticky {
    position: sticky;
    top: 20px;
}

.sidebar-ad-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    backdrop-filter: blur(12px);
}

.ad-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    backdrop-filter: blur(12px);
}

.sidebar-widget-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    background: var(--grad-result-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li {
    margin-bottom: 4px;
}

.sidebar-links a {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-links a:hover {
    background: rgba(108, 60, 225, 0.15);
    color: var(--primary-light);
    padding-left: 16px;
}

.sidebar-ad-block {
    margin-bottom: 16px;
}

.sidebar-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 12px;
}

/* Timing List */
.timing-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.timing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(15, 12, 41, 0.5);
    border-radius: 8px;
    font-size: 12px;
}

.timing-game {
    color: var(--text-secondary);
    font-weight: 500;
}

.timing-time {
    color: var(--primary-light);
    font-weight: 600;
    font-size: 11px;
}

/* Stats */
.sidebar-stats {
    display: flex;
    gap: 12px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: rgba(108, 60, 225, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(108, 60, 225, 0.2);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--gold);
}

.stat-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
    .site-layout {
        display: block;
    }
}

/* ============================================
   Header — Premium Gradient
   ============================================ */
.site-header {
    background: var(--grad-header);
    padding: 32px 0 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(108, 60, 225, 0.3);
}

.site-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(108, 60, 225, 0.15) 0%, transparent 60%);
    animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 3%); }
}

.site-header .main-title {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.site-header .main-title a {
    color: #ffffff;
    text-decoration: none;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 12px rgba(108, 60, 225, 0.5);
    vertical-align: middle;
}

.site-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin: 6px 0 0;
    font-weight: 400;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

/* ============================================
   Navigation — Glassmorphic
   ============================================ */
.main-navigation {
    background: var(--grad-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.main-navigation .nav-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    padding: 0 10px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 4px 0;
    gap: 4px;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 11.5px;
    line-height: 34px;
    transition: all var(--transition-normal);
    position: relative;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    border-radius: 6px;
    margin: 1px 0;
    white-space: nowrap;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--grad-result-glow);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
    border-radius: 2px;
}

.main-navigation a:hover, .main-navigation a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.main-navigation a.nav-blog-btn {
    background: rgba(108, 60, 225, 0.35) !important;
    border: 1px solid rgba(139, 92, 246, 0.6) !important;
    color: #facc15 !important;
    font-weight: 800 !important;
}

.main-navigation a:hover::after {
    width: 60%;
}

.main-navigation a.active {
    color: #ffffff;
    background: rgba(108, 60, 225, 0.2);
}

.main-navigation a.active::after {
    width: 60%;
    background: var(--primary-light);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 700;
    width: 100%;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
}

.menu-toggle:hover {
    color: #fff;
}

.menu-toggle .hamburger {
    display: inline-block;
    width: 20px;
    height: 2px;
    background: currentColor;
    position: relative;
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 2px;
}

.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: currentColor;
    left: 0;
    border-radius: 2px;
}

.menu-toggle .hamburger::before { top: -6px; }
.menu-toggle .hamburger::after { top: 6px; }

/* ============================================
   Main Content Area
   ============================================ */
.site-content {
    padding: var(--section-gap) 0 40px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Glassmorphic Section Cards
   ============================================ */
.section-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--section-gap);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.section-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.section-card .card-body {
    padding: var(--card-padding);
}

/* ============================================
   Page Title (H1)
   ============================================ */
.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    padding: 20px var(--card-padding);
    margin-bottom: 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-glass);
    background: rgba(108, 60, 225, 0.08);
}

/* ============================================
   Refresh Button
   ============================================ */
.refresh-btn-wrap {
    text-align: center;
    margin: 24px 0;
}

.refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(108, 60, 225, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.refresh-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(108, 60, 225, 0.5);
    color: #fff;
}

.refresh-btn:active {
    transform: translateY(-1px);
}

/* ============================================
   Result Card — The core component (PREMIUM)
   ============================================ */
.result-section {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--section-gap);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.result-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-result-glow);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.result-section:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.result-section:hover::before {
    opacity: 1;
}

.result-section-title {
    background: var(--grad-card-title);
    color: #ffffff;
    padding: 16px 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
}

.result-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.result-round {
    padding: 28px 20px;
    text-align: center;
    position: relative;
    transition: background var(--transition-fast);
}

.result-round:first-child {
    border-right: 1px solid var(--border-glass);
}

.result-round:hover {
    background: rgba(108, 60, 225, 0.05);
}

.round-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.round-label span {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 1px;
}

.round-time {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.round-number {
    font-size: 52px;
    font-weight: 900;
    color: var(--result-number);
    line-height: 1;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 0 30px rgba(250, 204, 21, 0.3);
    animation: numberGlow 3s ease-in-out infinite;
    letter-spacing: 2px;
}

.round-number.pending {
    color: var(--result-pending);
    text-shadow: none;
    animation: pendingBlink 1.5s ease-in-out infinite;
}

@keyframes numberGlow {
    0%, 100% { 
        text-shadow: 0 0 20px rgba(250, 204, 21, 0.2);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 40px rgba(250, 204, 21, 0.4), 0 0 80px rgba(250, 204, 21, 0.1);
        transform: scale(1.02);
    }
}

@keyframes pendingBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Live indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.4);
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: liveDotPulse 1s ease-in-out infinite;
}

@keyframes liveDotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }
    50% { opacity: 0.5; box-shadow: 0 0 0 4px rgba(255,255,255,0); }
}

/* ============================================
   Previous Results Table — Premium
   ============================================ */
.results-table-wrap {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.results-table thead {
    background: var(--grad-card-title);
}

.results-table thead td,
.results-table thead th {
    padding: 14px 20px;
    font-weight: 700;
    text-align: center;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.results-table tbody td {
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-glass);
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.results-table tbody tr {
    transition: all var(--transition-fast);
}

.results-table tbody tr:hover td {
    background: rgba(108, 60, 225, 0.08);
}

.results-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

.results-table tbody tr:nth-child(even):hover td {
    background: rgba(108, 60, 225, 0.08);
}

.results-table .date-col {
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    font-size: 13px;
}

.results-table .result-col {
    font-weight: 800;
    font-size: 18px;
    color: var(--result-number);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

.results-table .off-day td {
    color: var(--text-dim);
    font-style: italic;
}

.results-table .off-day .result-col {
    color: var(--text-dim);
}

/* ============================================
   Info Table (Game Details)
   ============================================ */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 20px;
}

.info-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-glass);
    font-size: 14px;
    color: var(--text-secondary);
}

.info-table tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.03);
}

.info-table td:first-child {
    font-weight: 700;
    width: 35%;
    color: var(--text-primary);
}

/* ============================================
   Content Sections (SEO)
   ============================================ */
.content-section {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--section-gap);
    padding: var(--card-padding);
}

.content-section h2 {
    color: var(--text-primary);
    margin-top: 28px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.content-section h2:first-child {
    margin-top: 0;
}

.content-section h3 {
    color: var(--accent);
    margin-top: 20px;
}

.content-section img.aligncenter {
    display: block;
    margin: 20px auto;
    border-radius: 12px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: rgba(15, 12, 41, 0.9);
    border-top: 1px solid var(--border-glass);
    color: var(--text-dim);
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: 0 4px 16px rgba(108, 60, 225, 0.4);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(108, 60, 225, 0.5);
}

.back-to-top.visible {
    display: flex;
}

/* ============================================
   Admin Panel Styles
   ============================================ */
.admin-header {
    background: var(--grad-card-title);
    color: #fff;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-glass);
}

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

.admin-header h1 {
    font-size: 20px;
    color: #fff;
    margin: 0;
}

.admin-nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: color var(--transition-fast);
    font-size: 13px;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: #fff;
}

/* Admin Forms */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    overflow: hidden;
}

.admin-card-title {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-glass);
    margin: 0;
    color: var(--text-primary);
}

.admin-card-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--bg-input);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(108, 60, 225, 0.1);
    box-shadow: 0 0 0 3px rgba(108, 60, 225, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-normal);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 60, 225, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 60, 225, 0.4);
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
    color: #fff;
}

.btn-success {
    background: #059669;
    color: #fff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-success:hover {
    background: #047857;
    color: #fff;
}

/* Alert Messages */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid;
}

.alert-success {
    background: rgba(5, 150, 105, 0.15);
    color: #34d399;
    border-color: rgba(5, 150, 105, 0.3);
}

.alert-error {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.3);
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grad-body);
    position: relative;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(108, 60, 225, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    background: var(--grad-result-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Blog Styles
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(108, 60, 225, 0.2);
}
.blog-card a { display: block; padding: 20px; text-decoration: none; color: inherit; }
.blog-card-badge {
    display: inline-block;
    background: rgba(108, 60, 225, 0.2);
    color: var(--primary-light);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.blog-card-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.pagination { display: flex; justify-content: center; gap: 8px; margin: 30px 0; flex-wrap: wrap; }
.page-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}
.page-btn:hover, .page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.blog-post .post-content h2 { font-size: 22px; margin: 25px 0 12px; color: var(--text-primary); }
.blog-post .post-content h3 { font-size: 18px; margin: 20px 0 10px; color: var(--primary-light); }
.blog-post .post-content p { margin: 0 0 14px; line-height: 1.7; color: var(--text-secondary); }
.blog-post .post-content li { margin-bottom: 6px; line-height: 1.6; }
.article-html-body h2 { font-size: 20px; font-weight: 800; color: #facc15; margin: 24px 0 10px; line-height: 1.35; }
.article-html-body h3 { font-size: 17px; font-weight: 700; color: #38bdf8; margin: 18px 0 8px; line-height: 1.35; }
.article-html-body p { margin-bottom: 16px; line-height: 1.75; color: var(--text-secondary); }
.article-html-body ul, .article-html-body ol { margin: 12px 0 18px 24px; color: var(--text-secondary); }
.article-html-body li { margin-bottom: 8px; line-height: 1.6; }
.related-posts-list { list-style: none; padding: 0; margin: 15px 0 0; }
.related-posts-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.related-posts-list a { color: var(--text-secondary); text-decoration: none; font-size: 14px; flex: 1; transition: color 0.2s; }
.related-posts-list a:hover { color: var(--primary-light); }
.related-date { font-size: 12px; color: var(--text-muted); margin-left: 10px; }

/* ============================================
   Animations — Page Load
   ============================================ */
.section-card, .result-section, .content-section {
    animation: fadeInUp 0.5s var(--ease-out-expo) both;
}

.result-section:nth-child(2) { animation-delay: 0.05s; }
.result-section:nth-child(3) { animation-delay: 0.1s; }
.result-section:nth-child(4) { animation-delay: 0.15s; }
.result-section:nth-child(5) { animation-delay: 0.2s; }
.result-section:nth-child(6) { animation-delay: 0.25s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1002;
        padding: 10px 14px;
        background: rgba(15, 12, 41, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        text-align: left;
    }

    .site-header::before {
        display: none;
    }

    .header-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .header-brand-wrap {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .site-header .main-title {
        font-size: 18px !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .site-header .main-title a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .header-logo-icon {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50%;
        border: 2px solid rgba(108, 60, 225, 0.6);
        box-shadow: 0 0 10px rgba(108, 60, 225, 0.5);
        flex-shrink: 0;
    }

    .brand-text {
        font-size: 17px !important;
        font-weight: 800 !important;
        letter-spacing: -0.3px;
        white-space: nowrap;
        background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .site-description {
        display: none !important;
    }

    /* Mobile Menu Toggle Button (Right Aligned Pill) */
    .menu-toggle {
        display: inline-flex !important;
        align-items: center;
        gap: 8px;
        background: rgba(108, 60, 225, 0.25) !important;
        border: 1px solid rgba(139, 92, 246, 0.5) !important;
        color: #f1f5f9 !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        padding: 8px 14px !important;
        border-radius: 20px !important;
        cursor: pointer;
        width: auto !important;
        margin: 0 !important;
        line-height: 1 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        transition: all 0.2s ease;
    }

    .menu-toggle:active {
        transform: scale(0.94);
        background: var(--primary) !important;
    }

    .menu-toggle .hamburger {
        display: inline-block;
        width: 16px;
        height: 2px;
        background: #fff;
        position: relative;
        vertical-align: middle;
        border-radius: 2px;
    }

    .menu-toggle .hamburger::before,
    .menu-toggle .hamburger::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 2px;
        background: #fff;
        left: 0;
        border-radius: 2px;
    }

    .menu-toggle .hamburger::before { top: -5px; }
    .menu-toggle .hamburger::after { top: 5px; }

    /* Dropdown Navigation */
    .main-navigation {
        position: sticky;
        top: 52px;
        z-index: 1001;
        background: transparent;
        border-bottom: none;
        box-shadow: none;
    }

    .main-navigation .nav-inner {
        padding: 0 10px;
        display: block;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(15, 12, 41, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid rgba(108, 60, 225, 0.35);
        border-top: none;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
        padding: 10px 12px 14px;
        gap: 6px;
        animation: menuSlideDown 0.25s var(--ease-out-expo);
    }

    .main-navigation ul.active {
        display: flex !important;
    }

    .main-navigation a {
        text-align: left;
        padding: 10px 14px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        line-height: 1.4;
        font-size: 13px;
        font-weight: 700;
        color: var(--text-primary);
        background: rgba(255, 255, 255, 0.04);
    }

    .main-navigation a:hover, .main-navigation a.active {
        background: rgba(108, 60, 225, 0.3);
        border-color: var(--primary-light);
        color: #fff;
    }

    h1 { font-size: 20px; }
    h2 { font-size: 18px; }

    .section-card .card-body,
    .content-section {
        padding: 20px;
    }

    .round-number {
        font-size: 38px;
    }

    .result-round {
        padding: 20px 14px;
    }

    .page-title {
        font-size: 18px;
        padding: 16px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .results-table thead td,
    .results-table thead th {
        padding: 10px 12px;
        font-size: 10px;
    }

    .results-table tbody td {
        padding: 10px 12px;
    }

    .results-table .result-col {
        font-size: 16px;
    }

    .admin-header .container {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .site-header .main-title { font-size: 20px; }
    .site-description { font-size: 13px; }
    .round-number { font-size: 32px; }
    .result-section-title { font-size: 12px; padding: 12px 16px; letter-spacing: 1.5px; }
    .container { padding: 0 12px; }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: rgba(108, 60, 225, 0.4);
    color: #fff;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .main-navigation, .refresh-btn-wrap, .back-to-top, .site-footer { display: none; }
    body { background: #fff; color: #000; }
    body::before { display: none; }
    .section-card, .result-section, .content-section {
        background: #fff;
        border: 1px solid #ccc;
        box-shadow: none;
        color: #000;
    }
    .site-header { background: #fff; border-bottom: 2px solid #000; }
    .site-header .main-title a { -webkit-text-fill-color: #000; color: #000; }
    .round-number { color: #000; text-shadow: none; animation: none; }
    p, li, td { color: #333; }
}

/* ============================================
   Confetti & VIP Floating Action Styles
   ============================================ */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 999999;
    pointer-events: none;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(105vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes floatPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}
