* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --bg-color: #0f1117;
    --panel-bg: #181b22;
    --panel-bg-soft: #20242d;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #aeb4c2;
    --live-red: #ff3b30;
    --court-green: #28d17c;
    --court-green-soft: rgba(40, 209, 124, 0.18);
    --ticker-blue: #73d9ff;
    --ticker-blue-deep: #22b7ed;
    --support-gold: #ffd166;
    --hover-bg: #252a34;
}
body {
    background:
        linear-gradient(180deg, #0b0d12 0%, var(--bg-color) 44%, #11141a 100%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    padding-bottom: 58px;
    display: flex;
    flex-direction: column;
}
/* Top Navigation Bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(15, 17, 23, 0.92);
    backdrop-filter: blur(14px);
}
.logo {
    flex: 0 0 auto;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}
.event-title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-align: right;
}
.live-indicator {
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 999px;
    background-color: rgba(255, 59, 48, 0.1);
    color: #ff867f;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--live-red);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--live-red);
}
/* Main Content Layout */
.main-container {
    display: flex;
    flex: 1;
    padding: 28px;
    gap: 24px;
    max-width: 1480px;
    margin: 0 auto;
    width: 100%;
}
/* Left Column: Video Player */
.player-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
}
video {
    width: 100%;
    height: 100%;
    display: block;
}
#status {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 0;
    pointer-events: none;
}
#status:empty {
    display: none;
}
/* Support Panel */
.support-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}
.support-qr {
    width: 150px;
    padding: 7px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 0 0 1px rgba(115, 217, 255, 0.32), 0 12px 24px rgba(0, 0, 0, 0.3);
}
.support-qr img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.support-copy {
    min-width: 0;
}
.support-copy h2 {
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 22px;
    font-weight: 850;
    line-height: 1.15;
}
.support-copy p {
    max-width: 460px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.55;
}
.support-marquee {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    min-width: 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(90deg, var(--ticker-blue), var(--ticker-blue-deep));
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.34);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: supportMarquee 28s linear infinite;
}
.support-marquee:hover .marquee-track {
    animation-play-state: paused;
}
.marquee-text {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    padding: 0 22px;
    min-height: 54px;
    color: #042033;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}
.marquee-text span {
    color: #042033;
}
.support-cta {
    min-width: 210px;
    min-height: 58px;
    border: 1px solid rgba(115, 217, 255, 0.48);
    border-radius: 8px;
    background: linear-gradient(135deg, #79e1ff, #b6efff);
    color: #052033;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(34, 183, 237, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.support-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 16px 34px rgba(34, 183, 237, 0.24);
}
.support-cta:active {
    transform: translateY(0);
}
.support-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tutorial-cta {
    min-width: 210px;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.tutorial-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}
.tutorial-cta:active {
    transform: translateY(0);
}
.saweria-tutorial {
    grid-column: 1 / -1;
    display: none;
    overflow: hidden;
    border: 1px solid rgba(115, 217, 255, 0.28);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.04);
}
.saweria-tutorial.show {
    display: block;
}
.saweria-tutorial img {
    display: block;
    width: 100%;
    height: auto;
}
@keyframes supportMarquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}
/* Right Column: Sidebar */
.sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}
.panel-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0;
}
/* Court Selection */
.court-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.court-btn {
    position: relative;
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 62px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.court-btn[hidden] {
    display: none !important;
}
.court-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(115, 217, 255, 0.14), rgba(40, 209, 124, 0.08));
    opacity: 0;
    transition: opacity 0.2s ease;
}
.court-number,
.court-info,
.court-status {
    position: relative;
    z-index: 1;
}
.court-number {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-size: 15px;
    font-weight: 800;
}
.court-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}
.court-name {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: 15px;
    line-height: 1.2;
}
.quality-badge {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 6px;
    background-color: rgba(115, 217, 255, 0.16);
    border: 1px solid rgba(115, 217, 255, 0.36);
    color: var(--ticker-blue);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
}
.alt-badge {
    background-color: rgba(255, 191, 105, 0.16);
    border-color: rgba(255, 191, 105, 0.4);
    color: #ffbf69;
}
.court-meta {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}
.court-btn-hd {
    border-color: rgba(115, 217, 255, 0.22);
}
.court-btn-hd::before {
    background: linear-gradient(135deg, rgba(115, 217, 255, 0.18), rgba(40, 209, 124, 0.07));
}
.court-btn-alt {
    border-color: rgba(255, 191, 105, 0.22);
}
.court-btn-alt::before {
    background: linear-gradient(135deg, rgba(255, 191, 105, 0.17), rgba(40, 209, 124, 0.07));
}
.court-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #5d5d5d;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}
.court-btn:hover {
    transform: translateY(-1px);
    background-color: var(--hover-bg);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.court-btn:hover::before,
.court-btn.active::before {
    opacity: 1;
}
.court-btn.active {
    background: linear-gradient(135deg, rgba(40, 209, 124, 0.24), rgba(255, 255, 255, 0.055));
    border-color: rgba(40, 209, 124, 0.72);
    box-shadow: 0 0 0 1px rgba(40, 209, 124, 0.12), 0 14px 28px rgba(40, 209, 124, 0.1);
}
.court-btn.active .court-number {
    background-color: var(--court-green);
    border-color: var(--court-green);
    color: #06180f;
}
.court-btn.active .court-meta {
    color: #baf8d7;
}
.court-btn.active .court-status {
    background-color: var(--court-green);
    box-shadow: 0 0 0 4px var(--court-green-soft), 0 0 14px rgba(40, 209, 124, 0.75);
}
/* Matches Schedule */
.match-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 430px;
    overflow-y: auto;
    padding-right: 6px;
}
.match-list::-webkit-scrollbar {
    width: 6px;
}
.match-list::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
}
.match-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}
.match-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.34);
}
.match-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
}
.match-item:last-child {
    margin-bottom: 0;
}
.match-empty {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}
.match-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.match-category {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.match-code {
    color: var(--support-gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}
.match-discipline {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}
.match-court {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background-color: rgba(40, 209, 124, 0.14);
    color: #baf8d7;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.match-time {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.time-main {
    color: var(--text-main);
    font-weight: 800;
}
.time-local {
    color: var(--text-muted);
    font-size: 11px;
}
.match-teams {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}
.team-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
}
.vs-text {
    color: var(--ticker-blue-deep);
    font-size: 12px;
    font-weight: 800;
    margin-top: 1px;
    min-width: 18px;
    text-transform: uppercase;
}
.seed {
    color: var(--support-gold);
    font-size: 11px;
    font-weight: 800;
}
/* Responsive Design */
@media (max-width: 960px) {
    .main-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .court-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .support-panel {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .support-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        width: 100%;
    }
    .support-cta,
    .tutorial-cta {
        width: 100%;
    }
}
@media (max-width: 520px) {
    body {
        padding-bottom: 52px;
    }
    .topbar {
        align-items: flex-start;
        padding: 14px 24px;
        flex-wrap: wrap;
    }
    .logo {
        font-size: 20px;
        line-height: 1.1;
    }
    .event-title {
        max-width: 145px;
        flex-wrap: wrap;
        gap: 4px 8px;
        font-size: 13px;
    }
    .live-indicator {
        margin-left: auto;
    }
    .court-list {
        grid-template-columns: 1fr;
    }
    .support-panel {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 14px;
    }
    .support-copy {
        text-align: center;
    }
    .support-copy h2 {
        font-size: 20px;
    }
    .support-qr {
        width: min(100%, 320px);
        justify-self: center;
        padding: 8px;
    }
    .support-actions {
        flex-direction: column;
    }
    .marquee-text {
        min-height: 48px;
        font-size: 13px;
    }
}
