@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800;900&display=swap');

/* DEFAULT LIGHT THEME VARIABLES */
:root {
    --bg-page: #f1f5f9;
    --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    --header-bg: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
    --card-bg: #ffffff;
    --card-border: #cbd5e1;
    --sub-box-bg: #f8fafc;
    --sub-box-border: #e2e8f0;
    --gold: #d97706;
    --gold-bright: #ffd000;
    --gold-orange: #f59e0b;
    --crimson: #e11d48;
    --crimson-dark: #be123c;
    --emerald: #059669;
    --purple: #6d28d9;
    --text-main: #0f172a;
    --text-muted: #475569;
    --nav-bg: #ffffff;
    --nav-text: #0f172a;
    --nav-border: #d97706;
    --faq-bg: #f8fafc;
    --result-bg: #f8fafc;
    --footer-bg: #0f172a;
}

/* DARK THEME OVERRIDES */
body.dark-theme {
    --bg-page: #060918;
    --bg-gradient: radial-gradient(circle at top center, #172047 0%, #060918 75%);
    --header-bg: linear-gradient(135deg, #090d24 0%, #1e1b4b 50%, #090d24 100%);
    --card-bg: linear-gradient(160deg, #151e3d 0%, #0c1226 100%);
    --card-border: #283663;
    --sub-box-bg: rgba(0, 0, 0, 0.35);
    --sub-box-border: rgba(255, 255, 255, 0.08);
    --gold: #ffd000;
    --gold-bright: #ffd000;
    --gold-orange: #ff9900;
    --emerald: #34d399;
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --nav-bg: #131c3a;
    --nav-text: #ffd000;
    --nav-border: #ffd000;
    --faq-bg: rgba(0, 0, 0, 0.35);
    --result-bg: rgba(0, 0, 0, 0.5);
    --footer-bg: #040610;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

body {
    background: var(--bg-gradient);
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Header Banner */
.top-bar {
    background: var(--header-bg);
    border-bottom: 3px solid var(--gold-bright);
    padding: 18px 15px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    position: relative;
}

.top-bar h1 {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0.6px;
    background: linear-gradient(to right, #ffffff, var(--gold-bright), var(--gold-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-bar p {
    font-size: 0.88rem;
    color: #e2e8f0;
    margin-top: 4px;
}

/* Theme Toggle Button */
.theme-toggle-bar {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1.5px solid var(--gold-bright);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.theme-btn:hover {
    background: var(--gold-bright);
    color: #000000;
}

/* Live News Ticker */
.news-ticker {
    background: linear-gradient(90deg, #b91c1c, #dc2626, #b91c1c);
    color: #ffffff;
    padding: 8px 0;
    font-size: 0.88rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 208, 0, 0.4);
}

/* Top Navigation Bar */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px auto;
    padding: 0 14px;
}

.nav-btn {
    background: var(--nav-bg);
    color: var(--nav-text);
    border: 1.5px solid var(--nav-border);
    padding: 9px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.nav-btn:hover, .nav-btn.active {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold-orange));
    color: #000000;
    border-color: var(--gold-orange);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}

/* Main Container */
.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 14px;
    flex: 1;
}

/* Gateway Grid */
.gateway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Cards */
.glass-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 22px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.glass-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
}

.gateway-card {
    text-align: center;
    margin-bottom: 0;
    border-top: 4px solid var(--crimson);
}

/* Status Badges */
.status-pill {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.status-open {
    background: rgba(16, 185, 129, 0.14);
    color: var(--emerald);
    border: 1px solid var(--emerald);
    animation: pulseLive 1.8s infinite;
}

.status-closed {
    background: rgba(225, 29, 72, 0.14);
    color: var(--crimson);
    border: 1px solid var(--crimson);
}

@keyframes pulseLive {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.gateway-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1.3;
    margin-bottom: 10px;
}

.gateway-title span {
    display: block;
    font-size: 1.05rem;
    color: var(--text-main);
    font-weight: 700;
}

.gateway-sub {
    background: var(--sub-box-bg);
    border: 1px solid var(--sub-box-border);
    border-radius: 10px;
    padding: 10px;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* Action Button */
.btn-enter {
    display: block;
    width: 100%;
    padding: 13px 18px;
    background: linear-gradient(90deg, var(--crimson), var(--crimson-dark));
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.94rem;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.3);
    transition: all 0.25s ease;
}

.btn-enter:hover {
    background: linear-gradient(90deg, var(--gold-bright), var(--gold-orange));
    color: #000000 !important;
}

/* Sub-Page Result Box */
.result-box {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 3px;
    background: var(--result-bg);
    display: inline-block;
    padding: 12px 26px;
    border-radius: 14px;
    border: 2px solid var(--gold);
    margin: 14px 0;
    color: var(--text-main);
}

.result-box span.jodi {
    color: var(--crimson);
}

body.dark-theme .result-box span.jodi {
    color: #34d399;
}

.closed-banner {
    background: linear-gradient(90deg, #991b1b, #dc2626);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.05rem;
    margin: 14px 0;
}

/* Jump Buttons */
.jump-bar {
    background: linear-gradient(90deg, #1e1b4b, #312e81);
    text-align: center;
    padding: 11px;
    margin: 16px 0;
    border-radius: 10px;
    border: 1px solid var(--gold-bright);
}

.jump-bar a {
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
}

/* =========================================================
   WEEKLY PANEL CHART WITH FROZEN (STICKY) WEEKDAY HEADERS
   ========================================================= */
.chart-wrapper {
    background: #ffffff;
    color: #000000;
    border: 3px solid var(--purple);
    border-radius: 10px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* Do NOT put overflow:hidden here so position:sticky works on thead */
}

.panel-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

/* FREEZE WEEKDAY ROW ON SCROLL */
.panel-table thead th {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fef08a; /* High-visibility soft gold bar when frozen */
    color: #000000;
    font-style: italic;
    font-weight: 900;
    font-size: 1rem;
    padding: 11px 2px;
    border-bottom: 3px solid #6d28d9;
    border-right: 1px solid #eab308;
    text-shadow: 1px 1px 0px #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.panel-table thead th:first-child {
    width: 16%;
    border-top-left-radius: 6px;
}

.panel-table thead th:last-child {
    border-right: none;
    border-top-right-radius: 6px;
}

.panel-table td {
    background: #ffffff;
    border-bottom: 1px solid #cbd5e1;
    border-right: 1px solid #e2e8f0;
    padding: 8px 1px;
    text-align: center;
    vertical-align: middle;
}

.panel-table tr:nth-child(even) td {
    background: #f8fafc;
}

.date-cell {
    font-weight: 900;
    font-style: italic;
    font-size: 0.82rem;
    line-height: 1.15;
    color: #000000;
    text-shadow: 1px 1px 0px #fde047;
    word-break: break-word;
}

.day-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.panna-col {
    display: flex;
    flex-direction: column;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.02;
    color: #000000;
    text-shadow: 0.6px 0.6px 0px #facc15;
}

.jodi-col {
    font-size: 1.45rem;
    font-weight: 900;
    font-style: italic;
    color: #000000;
    text-shadow: 1.2px 1.2px 0px #facc15;
}

.is-red .panna-col,
.is-red .jodi-col {
    color: #ff0000 !important;
    text-shadow: 0.8px 0.8px 0px #fde047 !important;
}

@media (max-width: 768px) {
    .top-bar h1 { font-size: 1.3rem; }
    .panel-table thead th { font-size: 0.68rem; padding: 8px 1px; }
    .panel-table thead th:first-child { width: 17%; }
    .panel-table td { padding: 6px 0px; }
    .date-cell { font-size: 0.54rem; line-height: 1.1; }
    .day-flex { gap: 1.5px; }
    .panna-col { font-size: 0.48rem; line-height: 1; }
    .jodi-col { font-size: 0.88rem; }
    .result-box { font-size: 1.65rem; padding: 10px 16px; }
}

/* Info, FAQ & Disclaimer Sections */
.section-heading {
    color: var(--gold);
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 14px;
    border-left: 4px solid var(--crimson);
    padding-left: 12px;
}

.updates-list {
    list-style: none;
    padding: 0;
}

.updates-list li {
    background: var(--faq-bg);
    border-left: 3px solid var(--emerald);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.6;
}

.faq-item {
    background: var(--faq-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 13px 16px;
}

.faq-item summary {
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.94rem;
}

.faq-item p {
    margin-top: 10px;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.disclaimer-text {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Footer */
.site-footer {
    background: var(--footer-bg);
    border-top: 2px solid var(--gold-bright);
    padding: 24px 15px;
    text-align: center;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--gold-bright);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 0.8rem;
    color: #94a3b8;
}