:root {
    --deep-red: #8c1d18;
    --crimson: #a32020;
    --dark-maroon: #5c1313;
    --gold: #d4a937;
    --soft-gold: #e7c766;
    --off-white: #f8f7f4;
    --light-gray: #ece9e4;
    --text-dark: #1f1f1f;
    --muted-text: #6b6b6b;
    --surface: #ffffff;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-soft: 0 10px 30px rgba(92, 19, 19, 0.08);
    --shadow-card: 0 12px 28px rgba(92, 19, 19, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #fbfaf8 0%, #f5f2ed 100%);
    color: var(--text-dark);
    font-family: "Inter", sans-serif;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: "Poppins", sans-serif;
    line-height: 1.15;
}

p {
    margin: 0;
}

.container {
    width: min(1160px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-shell {
    min-height: 100vh;
}

.hero-banner {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 10% 20%, rgba(231, 199, 102, 0.24) 0 18%, transparent 18% 100%),
        radial-gradient(circle at 88% 80%, rgba(231, 199, 102, 0.14) 0 20%, transparent 20% 100%),
        linear-gradient(125deg, var(--dark-maroon), var(--deep-red) 52%, var(--crimson));
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.16);
}

.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%);
    background-size: 26px 26px;
    opacity: 0.16;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 2.75rem 0 2.6rem;
}

.event-kicker {
    margin-bottom: 0.45rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f4db8e;
    font-size: 0.84rem;
}

.hero-copy h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero-logo {
    display: block;
    width: min(340px, 100%);
    height: auto;
    margin-bottom: 0.7rem;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.2));
}

.event-label {
    margin-top: 0.55rem;
    font-size: clamp(1rem, 2vw, 1.18rem);
    font-weight: 500;
    color: #f8f1de;
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
    justify-content: flex-start;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.live-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4646;
    box-shadow: 0 0 0 0 rgba(255, 70, 70, 0.75);
    animation: pulse 1.8s infinite;
}

.last-updated {
    text-align: right;
    display: grid;
    gap: 0.12rem;
    font-size: 0.86rem;
    color: #f8ecd0;
}

.live-caption {
    margin: -0.2rem 0 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: #f8ecd0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.last-updated strong {
    font-size: 0.92rem;
    color: #fff;
    font-weight: 600;
}

.dashboard-main {
    padding: 1.4rem 0 2.8rem;
}

.section-block {
    margin-top: 1.45rem;
}

.section-heading-wrap {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 0.8rem;
}

.section-heading-wrap h2 {
    font-size: clamp(1.15rem, 2vw, 1.46rem);
    font-weight: 700;
    color: var(--dark-maroon);
}

.section-heading-wrap p {
    color: var(--muted-text);
    font-size: 0.9rem;
}

.medal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.medal-card {
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    padding: 1.2rem;
    border: 1px solid rgba(92, 19, 19, 0.07);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.medal-card::after {
    content: "";
    position: absolute;
    inset: auto -14% -38px;
    height: 78px;
    border-radius: 40% 40% 0 0;
    opacity: 0.16;
    z-index: -1;
}

.medal-gold::after {
    background: linear-gradient(180deg, #ffe391, var(--gold));
}

.medal-silver::after {
    background: linear-gradient(180deg, #f5f7fb, #c2cad6);
}

.medal-bronze::after {
    background: linear-gradient(180deg, #f2c59a, #b06a44);
}

.medal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(92, 19, 19, 0.18);
}

.medal-label {
    font-size: 0.85rem;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.medal-count {
    margin-top: 0.5rem;
    font-family: "Poppins", sans-serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1;
    color: var(--text-dark);
}

.sport-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.sport-summary-card {
    background: var(--surface);
    border: 1px solid rgba(92, 19, 19, 0.09);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 0.95rem;
    transition: transform 0.2s ease;
}

.sport-summary-card:hover {
    transform: translateY(-2px);
}

.sport-summary-card h3 {
    font-size: 1.02rem;
    color: var(--dark-maroon);
    font-weight: 700;
}

.sport-summary-medals,
.sport-totals-inline {
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.26rem 0.54rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.chip-gold {
    background: #f8e7b2;
    color: #6d4e00;
}

.chip-silver {
    background: #e4e8ee;
    color: #404e61;
}

.chip-bronze {
    background: #eed4c5;
    color: #6f4227;
}

.sport-groups {
    display: grid;
    gap: 1rem;
}

.sport-group {
    background: var(--surface);
    border: 1px solid rgba(92, 19, 19, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.sport-group-header {
    appearance: none;
    border: 0;
    width: 100%;
    text-align: left;
    background: linear-gradient(90deg, rgba(140, 29, 24, 0.08), rgba(140, 29, 24, 0.02));
    color: inherit;
    padding: 0.95rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    cursor: pointer;
}

.sport-title-wrap {
    display: grid;
    gap: 0.26rem;
}

.sport-title-wrap h3 {
    font-size: 1.1rem;
    color: var(--dark-maroon);
}

.event-count {
    color: var(--muted-text);
    font-size: 0.82rem;
}

.accordion-icon {
    margin-left: auto;
    font-family: "Poppins", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--deep-red);
}

.sport-events-wrap {
    padding: 0.2rem 0.8rem 0.7rem;
}

.events-table {
    width: 100%;
}

.events-row {
    display: grid;
    grid-template-columns: minmax(190px, 2fr) 90px 90px 90px minmax(190px, 2fr);
    gap: 0.55rem;
    align-items: center;
    padding: 0.58rem 0.6rem;
    border-bottom: 1px solid var(--light-gray);
}

.events-row-head {
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(92, 19, 19, 0.12);
    background: #faf9f6;
}

.events-row:last-child {
    border-bottom: 0;
}

.event-name {
    font-weight: 600;
}

.text-center {
    text-align: center;
}

.value {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
}

.value-gold {
    color: #8b6400;
}

.value-silver {
    color: #44556d;
}

.value-bronze {
    color: #76452d;
}

.award-tags {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
}

.award-tags li {
    border: 1px solid #e6d6ad;
    background: #fff7df;
    color: #5f4510;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.muted {
    color: var(--muted-text);
    font-size: 0.84rem;
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.72rem;
}

.award-card {
    background: linear-gradient(175deg, #fff 0%, #fffdf5 100%);
    border: 1px solid #ecd9aa;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 0.82rem 0.9rem;
}

.award-card h3 {
    color: var(--dark-maroon);
    font-size: 0.95rem;
    margin-bottom: 0.32rem;
}

.award-card p {
    color: var(--muted-text);
    font-size: 0.85rem;
}

.empty-state {
    border: 1px dashed #d6c8b1;
    background: #fffaf1;
    color: #7b6241;
    border-radius: var(--radius-md);
    padding: 1rem;
}

.live-status-bar {
    margin-top: 0.7rem;
    border-top: 1px solid rgba(140, 29, 24, 0.16);
    background: #fff;
    position: sticky;
    bottom: 0;
    z-index: 40;
}

.live-status-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 52px;
    padding: 0.65rem 0;
    font-size: 0.88rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d92d20;
    display: inline-block;
    margin-right: 0.48rem;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 45, 32, 0.55);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(217, 45, 32, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(217, 45, 32, 0);
    }
}

@media (max-width: 1080px) {
    .sport-summary-grid,
    .awards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .events-row {
        grid-template-columns: minmax(150px, 2fr) 64px 64px 64px minmax(160px, 2fr);
        font-size: 0.91rem;
    }
}

@media (max-width: 760px) {
    .hero-inner {
        flex-direction: column;
        gap: 1rem;
        padding: 2rem 0 1.7rem;
        align-items: center;
    }

    .hero-copy {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-meta {
        width: 100%;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .last-updated {
        align-items: center;
        text-align: center;
    }

    .hero-logo {
        width: min(260px, 78vw);
        margin-bottom: 0.6rem;
    }

    .medal-grid,
    .sport-summary-grid,
    .awards-grid {
        grid-template-columns: 1fr;
    }

    .section-heading-wrap {
        display: grid;
        gap: 0.35rem;
        text-align: center;
    }

    .sport-group-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .sport-totals-inline {
        margin-top: 0;
    }

    .accordion-icon {
        position: absolute;
        right: 1rem;
        top: 0.95rem;
    }

    .events-head {
        display: none;
    }

    .sport-events-wrap {
        padding: 0.2rem 0.8rem 0.8rem;
    }

    .events-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        border-bottom: 1px solid var(--light-gray);
        padding: 0.7rem 0.55rem;
    }

    .events-row [role="cell"] {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.65rem;
        font-size: 0.9rem;
    }

    .events-row [role="cell"]::before {
        content: attr(data-label);
        color: var(--muted-text);
        font-size: 0.76rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: 700;
    }

    .live-status-inner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.72rem 0;
        text-align: center;
    }

    .sport-group.is-collapsed .sport-events-wrap {
        display: none;
    }

    .sport-group.is-collapsed .accordion-icon {
        transform: rotate(0deg);
    }

    .sport-group:not(.is-collapsed) .accordion-icon {
        transform: rotate(45deg);
    }
}
