:root {
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --secondary-gradient: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
    --bg-main: #f8fafc;
    --bg-mesh:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0, transparent 50%),
        radial-gradient(at 50% 0%, rgba(168, 85, 247, 0.1) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.15) 0, transparent 50%);
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-vibrant: 0 20px 25px -5px rgba(99, 102, 241, 0.1), 0 10px 10px -5px rgba(99, 102, 241, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes meshGradient {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

body {
    background-color: var(--bg-main);
    background-image: var(--bg-mesh);
    background-size: 200% 200%;
    animation: meshGradient 20s ease-in-out infinite;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-vibrant);
}

.site-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 48px;
    /* Slightly larger as it contains the text */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.hero {
    padding: 2.5rem 1rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 1000;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.latest-result-card {
    background: white;
    padding: 2rem;
    margin-top: 1rem;
    border-radius: 2rem;
    display: inline-block;
    min-width: 320px;
    box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
}

.latest-result-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.game-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: block;
}

.game-title {
    font-size: 2rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.result-number {
    font-size: 5.5rem;
    font-weight: 1000;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin: 0.5rem 0;
}

.card-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    padding: 1rem;
    max-width: 1300px;
    margin: 0 auto;
}

.game-card {
    display: flex;
    background: #1e293b;
    /* Dark Slate */
    border-radius: 16px;
    overflow: hidden;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-height: 100px;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-info {
    flex: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
    letter-spacing: 0.01em;
    color: #f8fafc;
    text-transform: uppercase;
}

.card-time {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.card-yesterday {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.4rem;
    font-weight: 600;
    text-transform: uppercase;
}

.card-result-pill {
    width: 110px;
    background: #ff4d00;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: inherit;
    border-left: 2px solid rgba(0, 0, 0, 0.1);
}

.result-val-main {
    font-size: 2.25rem;
    font-weight: 1000;
    line-height: 1;
    letter-spacing: -0.05em;
    text-align: center;
}

.result-val-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
    opacity: 0.9;
}

@media (max-width: 640px) {
    .site-header {
        padding: 0.5rem 0;
    }

    .hero {
        padding: 1.5rem 0.75rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .latest-result-card {
        min-width: 100%;
        padding: 1.25rem;
        margin-top: 1rem;
    }

    .result-number {
        font-size: 2.75rem;
    }

    .game-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.75rem;
    }

    .game-card {
        min-height: 90px;
        border-radius: 10px;
        padding: 0;
    }

    .card-info {
        padding: 0.8rem;
    }

    .card-title {
        font-size: 0.95rem;
    }

    .card-time {
        font-size: 0.7rem;
    }

    .card-yesterday {
        font-size: 0.65rem;
        margin-top: 0.2rem;
    }

    .card-result-pill {
        width: 85px;
    }

    .result-val-main {
        font-size: 1.8rem;
    }

    .result-val-label {
        font-size: 0.55rem;
    }

    .table-section {
        margin: 1.5rem auto;
    }

    th,
    td {
        padding: 0.6rem 0.4rem;
        font-size: 0.7rem;
    }

    .nav-links {
        display: none;
    }

    .nav-container {
        padding: 0 0.5rem;
    }

    .game-title {
        font-size: 1.25rem;
    }

    .result-val {
        font-size: 1.25rem;
    }

    .satta-chart-heading {
        font-size: 0.75rem;
        margin: 0.5rem auto 0.75rem;
        text-transform: uppercase;
        font-weight: 1000;
        letter-spacing: 0.05em;
        text-align: center;
        background: var(--primary-gradient);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        width: 95%;
        line-height: 1.2;
    }

    .table-wrapper {
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        width: 100%;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .satta-table {
        min-width: 450px;
        /* Reduced to pull more into view */
        width: 100%;
    }

    th,
    td {
        padding: 0.4rem 0.2rem !important;
        font-size: 0.6rem !important;
    }

    .date-cell {
        min-width: 60px !important;
    }
}

th {
    background: var(--primary-gradient);
    color: white;
    padding: 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.date-cell {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
    font-weight: 800;
}

.today td {
    background: rgba(34, 197, 94, 0.05);
    font-weight: 900;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.latest-result-card {
    animation: floating 4s ease-in-out infinite, fadeIn 0.8s ease-out;
}

td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 500;
    color: #334155;
    font-size: 0.95rem;
}

/* Sections */
.info-section,
.record-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-block,
.record-block {
    padding: 2rem;
    background: #ffffff;
}

.info-block h2,
.record-block h2 {
    color: #0f172a;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.record-list {
    list-style: none;
}

.record-list li {
    margin-bottom: 0.75rem;
}

.record-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.record-list a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.site-footer {
    background: #ffffff;
    padding: 3rem 1rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.date-cell {
    font-weight: 800;
    color: var(--primary);
    background: #f5f3ff;
    border-right: 1px solid #e2e8f0;
}

.today {
    background-color: #f0fdf4 !important;
    color: #166534 !important;
    font-weight: 900;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#refresh-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#refresh-btn:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.6);
}

#refresh-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@media (max-width: 640px) {
    #refresh-btn {
        bottom: 1rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
    }
}

.badge-live-mini {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 950;
    text-transform: uppercase;
    margin-bottom: 6px;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.6;
    }
}