:root {
    --ai-bg: #070a12;
    --ai-card-bg: rgba(15, 23, 42, 0.7);
    --ai-card-border: rgba(255, 255, 255, 0.1);
    --ai-accent-cyan: #00f2fe;
    --ai-accent-purple: #7928ca;
    --ai-accent-pink: #ff0080;
    --ai-text-main: #f8fafc;
    --ai-text-muted: #94a3b8;
}

body {
    background-color: var(--ai-bg);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(121, 40, 202, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(0, 242, 254, 0.15) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--ai-text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding-bottom: 80px;
}

/* 1. Header Branding */
.ai-header-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ai-card-border);
    padding: 16px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    padding: 3px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--ai-accent-cyan), var(--ai-accent-purple));
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.4);
}

.logo-wrapper img {
    max-height: 80px;
    border-radius: 17px;
    display: block;
}

/* 2. Top Action Buttons Navigation */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px; 
    margin-bottom: 30px;
}

.action-card {
    border-radius: 16px;
    padding: 12px 6px;
    color: #fff;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid var(--ai-card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 85px; 
}

.action-card:hover { 
    color: #fff; 
    transform: translateY(-4px); 
    box-shadow: 0 12px 25px rgba(0,0,0,0.5); 
}

.action-card i { font-size: 1.4rem; margin-bottom: 6px; }
.action-card .title { font-weight: 800; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
.action-card .sub-title { font-size: 0.62rem; opacity: 0.85; margin-top: 3px; }

.card-purple { 
    background: linear-gradient(135deg, rgba(121, 40, 202, 0.85), rgba(76, 29, 149, 0.7)); 
    box-shadow: 0 6px 20px rgba(121, 40, 202, 0.3); 
}
.card-green { 
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.85), rgba(6, 78, 59, 0.7)); 
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3); 
}
.card-orange { 
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.85), rgba(124, 45, 18, 0.7)); 
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3); 
}

/* 3. Top 4 Hero Boxes (Grid Layout) */
.hero-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile: 2x2 layout */
    gap: 12px;
}

@media (min-width: 768px) {
    .hero-grid-container {
        grid-template-columns: repeat(4, 1fr); /* Desktop: 4 in a row */
        gap: 16px;
    }
}

.hero-box {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 27, 75, 0.5), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 20px;
    padding: 18px 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-title-badge {
    background: linear-gradient(90deg, #00f2fe, #4facfe);
    color: #030712;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
    margin-bottom: 6px;
    text-align: center;
}

.hero-number-box {
    background: linear-gradient(135deg, rgba(121, 40, 202, 0.9), rgba(255, 0, 128, 0.8));
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 800;
    width: 100%;
    padding: 6px 10px;
    border-radius: 14px;
    margin: 6px 0;
    text-align: center;
    box-shadow: 0 6px 20px rgba(121, 40, 202, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-number-box.waiting-hero {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.3));
    border: 1px dashed rgba(239, 68, 68, 0.5);
    box-shadow: none;
}

.waiting-text-hero {
    font-size: 1rem;
    color: #fca5a5;
    font-weight: 700;
    letter-spacing: 1px;
    animation: blink-waiting 1.5s infinite;
}

@keyframes blink-waiting {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-time-badge {
    background: rgba(255, 255, 255, 0.07);
    color: var(--ai-accent-cyan);
    border: 1px solid rgba(0, 242, 254, 0.3);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

/* 4. WhatsApp Ad Banner */
.whatsapp-ad-banner {
    background: linear-gradient(145deg, #005c97, #363795);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

.ad-text-top {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffcc00;
    color: #000000 !important;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 10px 32px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4);
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.whatsapp-btn:hover {
    transform: scale(1.05);
    background: #ffd633;
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.6);
}

.ad-text-bottom {
    font-size: 0.85rem;
    color: #e2e8f0;
    margin: 0;
    line-height: 1.4;
}

/* 5. Section Header Bar */
.section-header-bar {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--ai-card-border);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: 0.3px;
}

.section-title i {
    color: var(--ai-accent-cyan) !important;
    filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.6));
}

.auto-update-badge {
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.25);
    color: var(--ai-accent-cyan) !important;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auto-update-badge i {
    font-size: 0.75rem;
    animation: spin-sync 3s linear infinite;
}

@keyframes spin-sync {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 6. Live Game Cards & Tables */
.game-group-card {
    background: var(--ai-card-bg);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    margin-bottom: 25px;
    border: 1px solid var(--ai-card-border);
}

.game-group-header {
    background: linear-gradient(90deg, rgba(30, 27, 75, 0.9), rgba(15, 23, 42, 0.95));
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--ai-card-border);
}

.game-group-header h4 { margin: 0; font-weight: 800; font-size: 1.15rem; color: #fff; }

.live-badge-tag {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    animation: pulse-red 1.8s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.custom-table {
    color: var(--ai-text-main);
    margin: 0;
    background: transparent !important;
}

.custom-table thead th {
    background: rgba(15, 23, 42, 0.7) !important;
    color: var(--ai-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--ai-card-border) !important;
    padding: 12px;
}

.custom-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    padding: 12px 10px;
    background: transparent !important;
}

.custom-table .col-sno { color: var(--ai-text-muted); font-weight: 600; }
.custom-table .col-time { color: #ffffff; font-weight: 700; }
.custom-table .col-old { color: var(--ai-text-muted) !important; font-weight: 600; }
.custom-table .col-new { font-weight: 800; color: var(--ai-accent-cyan); font-size: 1.1rem; }
.waiting-text { color: #f87171 !important; font-weight: 600; }

/* 7. Horizontal Monthly Sheet */
.monthly-card-header {
    background: linear-gradient(90deg, rgba(67, 56, 202, 0.8), rgba(15, 23, 42, 0.9));
    color: #fff;
    padding: 14px 20px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--ai-card-border);
}

.horizontal-monthly-table {
    margin: 0;
    text-align: center;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: var(--ai-text-main);
}

.horizontal-monthly-table th, 
.horizontal-monthly-table td {
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 12px;
    white-space: nowrap;
}

.horizontal-monthly-table thead th {
    background: rgba(15, 23, 42, 0.95);
    color: var(--ai-accent-cyan);
    font-weight: 800;
    font-size: 0.75rem;
}

.horizontal-monthly-table .time-col {
    background: #0b1120 !important;
    color: #ffffff !important;
    font-weight: 700;
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 100px;
    box-shadow: 4px 0 10px rgba(0,0,0,0.4);
}

.horizontal-monthly-table .res-num {
    font-weight: 700;
    color: var(--ai-accent-cyan);
}

/* 8. Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--ai-card-border);
    z-index: 9999;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.7);
}

.mobile-bottom-nav .nav-item-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--ai-text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    transition: color 0.2s;
}

.mobile-bottom-nav .nav-item-btn i {
    font-size: 1.3rem;
    margin-bottom: 3px;
}

.mobile-bottom-nav .nav-item-btn.active,
.mobile-bottom-nav .nav-item-btn:hover {
    color: var(--ai-accent-cyan);
}

@media (min-width: 576px) {
    .action-grid { gap: 16px; }
    .action-card { padding: 16px 12px; min-height: 100px; }
    .action-card i { font-size: 1.8rem; margin-bottom: 8px; }
    .action-card .title { font-size: 0.85rem; }
    .action-card .sub-title { font-size: 0.72rem; }
}

@media(max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
}