:root {
    --bg: #101114;
    --panel: #191b20;
    --panel-2: #22252c;
    --text: #f4f5f7;
    --muted: #a9afbc;
    --line: #333844;
    --accent: #23c483;
    --danger: #e25b5b;
    --warning: #d9a441;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.admin-body {
    background: #0f1013;
}

a {
    color: inherit;
}

.link-button {
    width: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.viewer-shell,
.admin-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
}

.viewer-shell {
    min-height: 100vh;
    display: grid;
    align-content: start;
    gap: 20px;
}

.brand-panel,
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.eyebrow {
    display: block;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 6px 0 0;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(28px, 4vw, 52px);
}

h2 {
    font-size: 22px;
    margin-bottom: 18px;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 14px 0 0;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
}

.status.live {
    border-color: rgba(35, 196, 131, .5);
    color: var(--accent);
}

.ghost-link {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
}

.access-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

.access-card {
    max-width: 680px;
}

.landing-hero {
    position: relative;
    width: 100%;
    min-height: min(820px, 94vh);
    display: flex;
    align-items: flex-end;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: #04080f;
    box-shadow: none;
}

.landing-hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: none;
    pointer-events: none;
    background-image: url("../mundial.png");
    background-repeat: no-repeat;
    background-position: right bottom;
}

.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-bg {
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 68% bottom;
}

.hero-overlay {
    z-index: 1;
    background:
        radial-gradient(circle at 84% 78%, rgba(255, 255, 255, .2) 0, rgba(255, 255, 255, .06) 18%, rgba(4, 8, 15, 0) 34%),
        linear-gradient(90deg, rgba(4, 8, 15, .9) 0%, rgba(4, 8, 15, .64) 35%, rgba(4, 8, 15, .02) 78%),
        linear-gradient(0deg, rgba(16, 17, 20, 1) 0%, rgba(16, 17, 20, .2) 28%, rgba(16, 17, 20, .02) 62%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: clamp(56px, 8vw, 96px) 0;
    display: grid;
    grid-template-columns: minmax(0, 720px);
    align-items: start;
    gap: 22px;
}

.hero-copy,
.hero-match-card {
    position: static;
}

.hero-copy h1 {
    max-width: 680px;
    font-size: clamp(46px, 8vw, 92px);
    line-height: .92;
    text-transform: uppercase;
}

.hero-copy p {
    max-width: 620px;
    margin: 18px 0 28px;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.5;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 8px;
    background: var(--accent);
    color: #07100c;
    font-weight: 700;
    text-decoration: none;
}

.hero-match-card {
    width: min(520px, 100%);
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(8, 12, 20, .58);
    backdrop-filter: blur(14px);
}

.hero-match-card strong {
    display: block;
    margin-top: 8px;
    font-size: 20px;
    line-height: 1.1;
}

.hero-match-card p {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .72);
    line-height: 1.45;
}

.live-badge {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--muted);
}

.live-badge.live {
    border-color: rgba(35, 196, 131, .5);
    color: var(--accent);
}

.schedule-section {
    display: grid;
    gap: 16px;
}

.filter-panel {
    display: grid;
    gap: 12px;
}

.country-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.filter-chip {
    width: auto;
    min-height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--muted);
    font-weight: 700;
}

.filter-chip.active {
    border-color: rgba(35, 196, 131, .6);
    background: rgba(35, 196, 131, .12);
    color: var(--text);
}

.country-chip .flag {
    width: 24px;
    height: 17px;
    flex-basis: 24px;
}

.filter-more {
    display: none;
}

.calendar-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.calendar-head strong {
    font-size: 22px;
}

.calendar-head span {
    color: var(--muted);
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendar-weekdays span {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.calendar-empty,
.calendar-day {
    aspect-ratio: 1 / 1;
    min-height: 0;
    border-radius: 8px;
}

.calendar-empty {
    border: 1px dashed rgba(255, 255, 255, .08);
}

.calendar-day {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
}

.calendar-day span {
    font-size: 24px;
    font-weight: 800;
}

.calendar-day small {
    color: var(--accent);
    font-size: 12px;
}

.calendar-day.today {
    border-color: rgba(35, 196, 131, .7);
}

.calendar-day:disabled {
    opacity: .38;
    cursor: default;
}

.filter-label {
    margin-top: 8px;
}

.section-heading h2,
.landing-access h2 {
    margin: 5px 0 0;
}

.today-heading h3 {
    margin: 4px 0 0;
    font-size: 24px;
}

.match-list {
    max-height: 720px;
    overflow: auto;
    display: grid;
    gap: 10px;
    padding-right: 4px;
}

.match-row {
    display: grid;
    grid-template-columns: 150px 92px minmax(260px, 1fr) minmax(210px, .9fr);
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.match-row[hidden],
.empty-schedule[hidden] {
    display: none;
}

.match-meta {
    display: grid;
    gap: 5px;
}

.match-meta span {
    color: var(--muted);
    font-size: 13px;
}

.match-meta strong {
    color: var(--accent);
    font-size: 18px;
}

.group-pill,
.match-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border-radius: 8px;
    padding: 0 10px;
    border: 1px solid var(--line);
    color: var(--muted);
    white-space: nowrap;
}

.teams {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.team {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.flag {
    width: 28px;
    height: 20px;
    flex: 0 0 28px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}

.versus {
    color: var(--muted);
    font-size: 13px;
}

.match-state.final {
    border-color: rgba(35, 196, 131, .45);
    color: #a8f0ce;
}

.match-state.scheduled {
    border-color: rgba(217, 164, 65, .45);
    color: #ffd992;
}

.empty-schedule {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--muted);
}

.schedule-modal[hidden] {
    display: none;
}

.schedule-modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 18px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 7, .72);
}

.modal-card {
    position: relative;
    width: min(920px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
}

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

.modal-header h2 {
    margin-bottom: 0;
}

.modal-close {
    width: 40px;
    min-height: 40px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    font-size: 26px;
    line-height: 1;
}

.modal-match-list {
    display: grid;
    gap: 10px;
}

.modal-open {
    overflow: hidden;
}

.landing-access {
    max-width: none;
    scroll-margin-top: 24px;
    scroll-margin-bottom: 45vh;
}

.access-card.narrow {
    max-width: 420px;
}

label {
    display: block;
    margin: 14px 0 7px;
    color: var(--muted);
    font-size: 14px;
}

input,
select,
button {
    width: 100%;
    min-height: 44px;
    border-radius: 8px;
    font: inherit;
}

input,
select {
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    padding: 0 12px;
}

button {
    border: 0;
    background: var(--accent);
    color: #07100c;
    font-weight: 700;
    padding: 0 16px;
    cursor: pointer;
}

button.danger {
    background: var(--danger);
    color: #fff;
}

.small-button {
    width: auto;
    min-height: 36px;
    padding: 0 12px;
}

.code-row {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 10px;
}

.notice {
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.notice.error {
    border-color: rgba(226, 91, 91, .5);
    color: #ffb7b7;
}

.notice.success {
    border-color: rgba(35, 196, 131, .5);
    color: #a8f0ce;
}

.player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at 50% 42%, #151922 0, #050607 58%);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.player-wrap iframe,
.player-wrap video,
.youtube-frame,
.youtube-frame iframe,
.youtube-fallback-frame,
.empty-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-wrap iframe {
    border: 0;
}

.youtube-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.youtube-fallback-frame {
    z-index: 1;
    border: 0;
}

.youtube-fallback-frame[hidden] {
    display: none;
}

.player-wrap.is-tv-fallback .youtube-frame,
.player-wrap.is-tv-fallback .youtube-shield,
.player-wrap.is-tv-fallback .player-vignette,
.player-wrap.is-tv-fallback .stream-controls,
.player-wrap.is-tv-fallback .player-center-toggle {
    display: none;
}

.player-wrap.is-native-fallback .player-vignette,
.player-wrap.is-native-fallback .stream-controls,
.player-wrap.is-native-fallback .player-center-toggle {
    display: none;
}

.youtube-shield {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: transparent;
}

.player-wrap video {
    object-fit: contain;
    background: #000;
}

.player-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .44) 17%, rgba(0, 0, 0, 0) 42%);
    opacity: 0;
    transition: opacity .18s ease;
}

.player-wrap:hover .player-vignette,
.player-wrap:focus-within .player-vignette,
.player-wrap.controls-visible .player-vignette,
.player-wrap:not(.is-playing) .player-vignette {
    opacity: 1;
}

.player-status {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    transform: translate(-50%, -86px);
    width: min(360px, calc(100% - 32px));
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .92);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.player-status.is-visible {
    opacity: 1;
}

.player-center-toggle {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 6;
    width: 68px;
    height: 68px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(18, 18, 18, .72);
    color: #fff;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 42px rgba(0, 0, 0, .5);
    backdrop-filter: blur(8px);
}

.player-center-toggle svg {
    width: 34px;
    height: 34px;
    fill: currentColor;
    margin-left: 3px;
}

.player-wrap.is-playing .player-center-toggle {
    opacity: 0;
    pointer-events: none;
}

.player-wrap:hover .player-center-toggle,
.player-wrap:focus-within .player-center-toggle,
.player-wrap.controls-visible .player-center-toggle {
    opacity: 1;
    pointer-events: auto;
}

.stream-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 7;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 0 14px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease;
}

.player-wrap:hover .stream-controls,
.player-wrap:focus-within .stream-controls,
.player-wrap.controls-visible .stream-controls,
.player-wrap:not(.is-playing) .stream-controls {
    opacity: 1;
    transform: translateY(0);
}

@media (hover: none) {
    .player-wrap.is-playing:not(.controls-visible) .player-vignette,
    .player-wrap.is-playing:not(.controls-visible) .stream-controls,
    .player-wrap.is-playing:not(.controls-visible) .player-center-toggle {
        opacity: 0;
        pointer-events: none;
    }

    .player-wrap.is-playing:not(.controls-visible) .stream-controls {
        transform: translateY(8px);
    }
}

.player-timeline {
    position: relative;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .3);
    overflow: hidden;
}

.player-timeline span,
.player-timeline strong {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    display: block;
}

.player-timeline span {
    background: rgba(255, 255, 255, .48);
}

.player-timeline strong {
    background: #ff0033;
}

.stream-controls-bottom {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-control {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(20, 20, 20, .58);
    color: #fff;
    backdrop-filter: blur(8px);
}

.player-control:hover {
    background: rgba(255, 255, 255, .18);
}

.player-control svg {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

.player-control:disabled {
    opacity: .45;
    cursor: default;
}

.live-dot {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, .9);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.live-dot span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ff0033;
    box-shadow: 0 0 0 4px rgba(255, 0, 51, .22);
}

.time-readout {
    color: rgba(255, 255, 255, .9);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .7);
}

.player-status-inline {
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .7);
}

.control-spacer {
    flex: 1;
}

.volume-range {
    width: 94px;
    min-height: 24px;
    padding: 0;
    accent-color: #fff;
}

.quality-box {
    position: relative;
}

.quality-toggle {
    min-width: 38px;
}

.quality-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    z-index: 10;
    width: 220px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(28, 28, 28, .96);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
    backdrop-filter: blur(12px);
}

.quality-menu[hidden] {
    display: none;
}

.quality-menu button {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    text-align: left;
}

.quality-menu button:hover,
.quality-menu button.is-active {
    background: rgba(255, 255, 255, .12);
}

.quality-menu small {
    color: rgba(255, 255, 255, .58);
    font-size: 11px;
}

.player-shield {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: transparent;
}

.player-fullscreen {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: auto;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(9, 11, 14, .82);
    color: var(--text);
    font-size: 13px;
}

.empty-player {
    display: grid;
    place-items: center;
    color: var(--muted);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(420px, 100%);
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.login-card h1 {
    margin-bottom: 22px;
    font-size: 34px;
}

.admin-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 24px;
    padding: 24px 18px;
    border-right: 1px solid var(--line);
    background: #15171c;
}

.sidebar-brand strong {
    display: block;
    margin-top: 6px;
    font-size: 24px;
}

.admin-nav {
    display: grid;
    align-content: start;
    gap: 8px;
}

.admin-nav a,
.sidebar-footer a,
.secondary-action {
    text-decoration: none;
}

.admin-nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--muted);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--panel-2);
    color: var(--text);
}

.admin-nav a.active {
    border: 1px solid var(--line);
}

.sidebar-footer {
    display: grid;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.sidebar-footer span {
    color: var(--text);
    font-weight: 700;
}

.admin-main {
    width: min(1180px, 100%);
    display: grid;
    align-content: start;
    gap: 20px;
    padding: 28px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 34px;
}

.admin-topbar p,
.form-section-title p {
    margin: 6px 0 0;
    color: var(--muted);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-card {
    min-height: 126px;
    display: grid;
    align-content: space-between;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.metric-card span {
    color: var(--muted);
}

.metric-card strong {
    display: block;
    margin-top: 18px;
    font-size: 30px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
    gap: 18px;
    align-items: start;
}

.admin-form {
    display: grid;
    gap: 2px;
}

.form-section-title {
    margin-bottom: 8px;
}

.form-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.form-actions button {
    width: auto;
    min-width: 220px;
}

.detail-list {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

.detail-list div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-list.compact div {
    grid-template-columns: 1fr auto;
}

.detail-list dt {
    color: var(--muted);
}

.detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.secondary-action {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
}

.production-panel {
    background: #171d1b;
}

.security-box {
    display: grid;
    gap: 2px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #171d1b;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 12px;
    color: var(--text);
}

.check-row input {
    width: 18px;
    min-height: 18px;
    flex: 0 0 18px;
}

.check-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.8;
}

.muted-text {
    color: var(--muted);
    line-height: 1.5;
}

.code-copy {
    display: flex;
    align-items: center;
    gap: 10px;
}

.code-copy code {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--text);
    font-family: Consolas, Monaco, monospace;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 13px;
}

td form {
    margin: 0;
}

@media (max-width: 760px) {
    .viewer-shell {
        width: min(100% - 20px, 1120px);
        padding: 20px 0;
    }

    .brand-panel,
    .two-col,
    .code-row,
    .match-list,
    .admin-app,
    .metric-grid,
    .content-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .landing-hero {
        min-height: 720px;
        align-items: end;
    }

    .landing-hero::after {
        display: block;
        right: 0;
        bottom: -72px;
        width: 100%;
        height: 330px;
        background-size: 500px auto;
        opacity: .92;
        filter: saturate(1.12) contrast(1.08);
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 100%);
        mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 100%);
    }

    .hero-inner {
        width: min(100% - 28px, 1120px);
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 36px 0 34px;
    }

    .hero-bg {
        object-position: 70% bottom;
    }

    .hero-overlay {
        background:
            radial-gradient(circle at 78% 72%, rgba(255, 255, 255, .22) 0, rgba(255, 255, 255, .06) 24%, rgba(4, 8, 15, 0) 43%),
            linear-gradient(180deg, rgba(4, 8, 15, .38) 0%, rgba(4, 8, 15, .5) 34%, rgba(4, 8, 15, .94) 100%),
            linear-gradient(90deg, rgba(4, 8, 15, .88) 0%, rgba(4, 8, 15, .46) 58%, rgba(4, 8, 15, .08) 100%);
    }

    .hero-copy h1 {
        font-size: clamp(44px, 16vw, 68px);
    }

    .hero-copy p {
        max-width: 300px;
        font-size: 16px;
        margin-bottom: 16px;
    }

    .hero-match-card {
        display: none;
    }

    .hero-match-card strong {
        font-size: 18px;
    }

    .hero-match-card p {
        font-size: 14px;
    }

    .calendar-card {
        padding: 10px;
    }

    .calendar-weekdays,
    .calendar-grid {
        gap: 4px;
    }

    .calendar-day {
        min-height: 58px;
        padding: 3px;
    }

    .calendar-day span {
        font-size: 16px;
    }

    .calendar-day small {
        font-size: 9px;
        line-height: 1.05;
    }

    .filter-chip {
        min-height: 36px;
        font-size: 14px;
    }

    .match-list,
    .modal-match-list {
        gap: 8px;
    }

    .match-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "meta group"
            "teams teams"
            "state state";
        gap: 8px 10px;
        padding: 12px;
    }

    .match-meta {
        grid-area: meta;
        align-content: center;
    }

    .match-meta span {
        font-size: 12px;
    }

    .match-meta strong {
        font-size: 16px;
    }

    .teams {
        display: grid;
        grid-area: teams;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px;
        align-items: center;
        padding: 4px 0;
    }

    .team {
        min-width: 0;
        gap: 5px;
        font-size: 14px;
        line-height: 1.15;
    }

    .team:first-child {
        justify-content: flex-end;
        text-align: right;
    }

    .team:last-child {
        justify-content: flex-start;
        text-align: left;
    }

    .team .flag {
        width: 22px;
        height: 15px;
        flex-basis: 22px;
    }

    .versus {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        color: var(--muted);
        font-size: 11px;
    }

    .group-pill,
    .match-state {
        min-height: 30px;
        font-size: 12px;
    }

    .group-pill {
        grid-area: group;
        width: auto;
        justify-self: end;
    }

    .match-state {
        grid-area: state;
        width: 100%;
    }

    .modal-card {
        padding: 14px;
    }

    .stream-controls {
        left: 0;
        right: 0;
        bottom: 0;
        gap: 7px;
        padding: 0 10px 10px;
    }

    .stream-controls-bottom {
        gap: 6px;
    }

    .stream-controls-bottom {
        flex-wrap: nowrap;
    }

    .player-control {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    .player-center-toggle {
        width: 58px;
        height: 58px;
    }

    .player-center-toggle svg {
        width: 29px;
        height: 29px;
    }

    .live-dot {
        font-size: 0;
        gap: 0;
    }

    .time-readout {
        font-size: 11px;
    }

    .player-status-inline {
        display: none;
    }

    .volume-range {
        display: none;
    }

    .quality-toggle {
        min-width: 34px;
    }

    .quality-menu {
        right: 0;
        left: auto;
        width: min(190px, calc(100vw - 28px));
    }

    .country-filter {
        gap: 6px;
    }

    .country-chip {
        padding: 0 9px;
        min-height: 34px;
        font-size: 13px;
    }

    .country-chip .flag {
        width: 21px;
        height: 15px;
        flex-basis: 21px;
    }

    .filter-panel:not(.filters-expanded) .country-chip:nth-of-type(n+13) {
        display: none;
    }

    .filter-more {
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        border: 1px solid var(--line);
        background: var(--panel-2);
        color: var(--text);
    }

    .admin-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .admin-main {
        padding: 20px 10px;
    }

    .admin-topbar {
        display: grid;
    }

    .form-actions,
    .form-actions button {
        width: 100%;
    }

    .detail-list div {
        grid-template-columns: 1fr;
    }

    .ghost-link {
        width: max-content;
    }

    .code-input-focused {
        padding-bottom: 42vh;
    }

    .code-input-focused .landing-access {
        margin-bottom: 34vh;
    }
}
