/* ==========================================
   Lottery Sambad Results Stat - Design System
   ========================================== */

:root {
    --primary-bg: #0f172a;
    --card-bg: #1e293b;
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-gold: #f59e0b;
    --accent-gold-glow: rgba(245, 158, 11, 0.25);
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --success-green: #10b981;
    --danger-red: #ef4444;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --primary-bg: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);
    --shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a:hover {
    color: var(--accent-cyan);
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header & Navbar */
.site-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.brand-logo i {
    color: var(--accent-gold);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px var(--accent-gold-glow));
}

.brand-logo span {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.05);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    padding: 40px 0 60px 0;
    text-align: center;
    border-bottom: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .hero-banner {
    background: linear-gradient(135deg, #e0f2fe 0%, #f1f5f9 100%);
}

.hero-banner h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-banner h1 {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-banner p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto 30px auto;
}

/* Search Bar Box */
.search-box-wrapper {
    max-width: 680px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 8px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-main);
    display: flex;
    gap: 10px;
}

.search-box-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    padding: 12px 20px;
    font-size: 1rem;
}

.search-box-wrapper button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box-wrapper button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Grid & Layouts */
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title span i {
    color: var(--accent-gold);
    margin-right: 8px;
}

.draws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* Card Styles */
.draw-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-main);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.draw-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
}

.draw-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.time-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.draw-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 4px;
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-declared {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-upcoming {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-live {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--danger-red);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.winning-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px dashed var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    margin: 16px 0;
}

.winning-box .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.winning-box .number {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-gold);
    letter-spacing: 2px;
    margin-top: 4px;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-gold:hover {
    opacity: 0.9;
}

/* Result Detail Breakdown */
.result-detail-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 40px;
}

.prize-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.prize-table th, .prize-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}

.prize-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-weight: 600;
}

.numbers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.num-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 700;
}

/* Blog Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-category {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.blog-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex: 1;
}

/* Footer */
.site-footer {
    background: #090d16;
    border-top: 1px solid var(--card-border);
    padding: 60px 0 30px 0;
    margin-top: auto;
}

[data-theme="light"] .site-footer {
    background: #e2e8f0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--text-main);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--card-border);
    padding-top: 25px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--card-border);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-banner h1 {
        font-size: 1.8rem;
    }
}
