/* variables.css */
:root {
    --primary: #0095FF;
    --primary-dark: #0066CC;
    --primary-darker: #0f4780;
    --background: #050607;
    --surface: #0A0C0E;
    --surface-dark: #070809;
    --text: #FFFFFF;
    --text-secondary: #7788AA;
    --text-secondary-alt: #a7b4cf;
    --accent: #111518;
    --danger: #b41b22;
    --team-a: #017cd1;
    --team-b: #07a263;
    --team-both: #cdb011;
    --third-phase: #19b8c4;
    --fourth-phase: #b084ff;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
    --card-hover: 0 6px 18px rgba(0, 0, 0, 0.65);
}

/* base.css */
button,
input,
select,
textarea {
    font-family: inherit;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.02em;
    line-height: 1.5;
}

/* layout.css */
.main-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    gap: 20px;
    padding: 20px 20px 8px 20px;
    background: var(--surface-dark);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
    max-height: 100vh;
    max-width: calc(100vh * 16 / 9);
    margin: auto;
}

/* team-panels.css */
.team-panel {
    width: 280px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 6px;
    padding: 20px;
    position: relative;
    border: 1px solid transparent;
}

.team-panel.team-a.active {
    border-color: var(--team-a);
}

.team-panel.team-b.active {
    border-color: var(--team-b);
}

.team-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.team-name {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    width: 100%;
    padding: 6px;
    border-radius: 4px;
}

.team-name:focus {
    outline: none;
}

.team-budget {
    padding: 5px 10px;
    border-radius: 4px;
    background: var(--surface-dark);
    border: 1px solid var(--accent);
    color: var(--primary);
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.draft-sequence {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action {
    height: 85px;
    background-color: var(--accent);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    color: var(--text-secondary);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid transparent;
    overflow: hidden;
}

.action.filled {
    color: transparent;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.action.filled::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    z-index: 1;
    pointer-events: none;
}

.action.pick.filled::before {
    background: rgba(0, 0, 0, 0.12);
}

.action.ban.filled {
    border-color: rgba(255, 70, 85, 0.75);
}

.action.ban.filled::before {
    background:
            linear-gradient(
                    to bottom,
                    rgba(255, 70, 85, 0.42) 0%,
                    rgba(255, 70, 85, 0.58) 45%,
                    rgba(255, 70, 85, 0.84) 100%
            );
}

.action.pick.filled::before {
    background: rgba(0, 0, 0, 0.12);
}

.action.skipped {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.current-phase {
    border-color: var(--primary);
}

.team-b .current-phase {
    border-color: var(--team-b);
}

.current-phase::after,
.next-phase::after,
.third-phase::after,
.fourth-phase::after {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 3;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    color: #000;
}

.current-phase::after {
    content: "CURRENT";
    background: var(--primary);
}

.team-b .current-phase::after {
    background: var(--team-b);
}

.next-phase {
    border-color: var(--team-both);
    opacity: 0.78;
}

.next-phase::after {
    content: "NEXT";
    background: var(--team-both);
}

.third-phase {
    border-color: var(--third-phase);
    opacity: 0.74;
}

.third-phase::after {
    content: "THIRD";
    background: var(--third-phase);
}

.fourth-phase {
    border-color: var(--fourth-phase);
    opacity: 0.7;
}

.fourth-phase::after {
    content: "FOURTH";
    background: var(--fourth-phase);
}

/* draft-status.css */
.center-panel {
    flex: 1;
    background: var(--surface);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.draft-status {
    text-align: center;
    padding: 6px 10px;
    border-radius: 4px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.draft-status::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.56);
    z-index: 0;
}

.draft-status > * {
    position: relative;
    z-index: 1;
}

.phase-counter {
    font-size: 13px;
    color: var(--text-secondary-alt);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timer {
    font-size: 48px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
    min-width: 110px;
    margin-left: auto;
    margin-right: auto;
}

.timer.warning {
    color: var(--danger);
}

.current-action {
    font-size: 17px;
    color: var(--text-secondary-alt);
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.current-action .status {
    color: var(--primary);
    font-weight: 800;
}

.turnover-status {
    color: var(--danger) !important;
}

/* agent-grid.css */
.role-banner {
    display: none;
    text-align: center;
    margin: 0;
    padding: 4px 8px;
    font-size: 15px;
    font-weight: 900;
    border-radius: 2px;
    color: var(--text);
    background: var(--primary-darker);
}

.agents-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: var(--surface-dark);
    border: 1px solid var(--accent);
    overflow: hidden;
    border-radius: 4px;
}

.tier-row {
    display: grid;
    grid-template-columns: 82px 1fr;
    min-height: 108px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tier-row:last-child {
    border-bottom: none;
}

.tier-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #101010;
    font-weight: 900;
    border-right: 1px solid rgba(0, 0, 0, 0.55);
}

.tier-name {
    font-size: 1.55rem;
    line-height: 1;
}

.tier-cost {
    margin-top: 6px;
    font-size: 0.95rem;
    opacity: 0.85;
}

.tier-s .tier-label {
    background: #ff747a;
}

.tier-a .tier-label {
    background: #ffc17d;
}

.tier-b .tier-label {
    background: #ffe185;
}

.tier-c .tier-label {
    background: #ffff78;
}

.tier-d .tier-label {
    background: #b6ff72;
}

.tier-agents {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 5px;
    padding: 5px;
    min-width: 0;
}

.agent-card {
    width: 86px;
    height: 98px;
    border-radius: 4px;
    border: 2px solid transparent;
    position: relative;
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
    background: var(--accent);
    overflow: hidden;
    flex: 0 0 auto;
}

.agent-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.agent-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover);
}

.agent-card:hover img {
    opacity: 1;
}

.agent-card.disabled {
    opacity: 0.28;
    cursor: not-allowed !important;
    pointer-events: none;
}

.agent-card.selected {
    border-color: var(--primary);
}

.agent-card.selected-b {
    border-color: var(--team-b);
}

.agent-card.picked-a {
    border-color: var(--team-a);
}

.agent-card.picked-b {
    border-color: var(--team-b);
}

.agent-card.picked-a::after,
.agent-card.picked-b::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.agent-card.picked-a::after {
    background: linear-gradient(transparent, rgba(0, 149, 255, 0.35));
}

.agent-card.picked-b::after {
    background: linear-gradient(transparent, rgba(0, 255, 149, 0.28));
}

.agent-card.banned {
    opacity: 1;
    pointer-events: none;
}

.agent-card.banned img {
    filter: grayscale(1) brightness(0.5);
}

.agent-card.banned::after {
    content: 'BANNED BY\A TEAM ' attr(data-banned-by);
    white-space: pre-line;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 170%;
    transform: translate(-50%, -50%) rotate(42deg);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-shadow: 0 1px 2px #000, 0 0 4px #000;
    background: rgba(255, 70, 85, 0.82);
    padding: 4px 0;
}

.agent-card.unaffordable {
    opacity: 1;
    pointer-events: none;
    cursor: not-allowed !important;
}

.agent-card.unaffordable img {
    filter: grayscale(1) brightness(0.38);
}

.agent-card.unaffordable::before {
    content: 'UNAFFORDABLE';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 170%;
    transform: translate(-50%, -50%) rotate(-32deg);
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
    background: rgba(255, 70, 85, 0.88);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 2px #000;
    pointer-events: none;
}

.agent-card.unaffordable::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 11;
    background: rgba(0, 0, 0, 0.32);
    pointer-events: none;
}

.banished-neon-card {
    position: relative;
    width: 175px;
    height: 112px;
    margin: 4px auto 0 auto;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--danger);
    background: #050607;
    cursor: pointer;
    box-shadow: none;
}

.banished-neon-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
    filter: grayscale(1) brightness(0.68) contrast(1.02);
}

.banished-neon-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.50);
    z-index: 1;
}

.banished-text {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%) rotate(-27deg);
    color: var(--danger);
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 1px #000, 0 0 2px #000;
    pointer-events: none;
}

/* controls.css */
.controls {
    display: flex;
    gap: 12px;
    padding: 0 2px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2px;
}

.control-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    background: var(--accent);
    color: var(--text);
    letter-spacing: 0.02em;
}

.control-btn:hover {
    transform: translateY(-1px);
    background: var(--surface-dark);
}

.control-btn.primary {
    background: var(--primary);
    color: var(--background);
}

.control-btn.primary:hover {
    background: var(--primary-dark);
}

/* lobby.css */
.lobby-overlay,
.waiting-screen,
.final-draft-screen,
.game-confirmation-overlay,
.series-completion-overlay,
.ready-up-overlay,
.warning-overlay {
    position: fixed;
    inset: 0;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lobby-container,
.waiting-container,
.confirmation-container,
.series-summary-container,
.ready-up-container,
.warning-container {
    background: var(--surface);
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    border: 1px solid var(--accent);
}

.lobby-container {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.lobby-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 24px;
    background: var(--accent);
    padding: 4px;
    border-radius: 6px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--text);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.lobby-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lobby-input {
    padding: 14px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: var(--text);
    font-size: 15px;
}

.lobby-input:focus {
    outline: none;
    background: var(--surface-dark);
    box-shadow: 0 0 0 2px var(--primary);
}

.lobby-btn {
    padding: 14px;
    background: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 8px;
}

.lobby-btn:hover {
    background: var(--primary-dark);
}

.map-picker-container {
    margin-top: 16px;
}

.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.map-item {
    background: var(--accent);
    position: relative;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 700;
}

.map-item:hover {
    background: var(--surface-dark);
}

.map-item.selected {
    background: var(--primary);
    color: var(--text);
}

.map-order-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary);
    color: var(--background);
    font-size: 0.75rem;
    font-weight: 900;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.spectator-option {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.spectator-option input,
.spectator-option label {
    cursor: pointer;
}

.waiting-screen {
    z-index: 1001;
}

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

.lobby-info {
    margin: 24px 0;
    padding: 20px;
    background: var(--accent);
    border-radius: 6px;
}

.lobby-code {
    margin-top: 20px;
}

.code-display,
.url-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    background: var(--surface-dark);
    padding: 8px;
    border-radius: 4px;
}

#lobbyCodeDisplay {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 2px;
}

#lobbyUrlDisplay {
    font-size: 14px;
    color: var(--text-secondary);
    word-break: break-all;
    max-width: 250px;
}

.copy-btn {
    padding: 8px 16px;
    background: var(--accent);
    border: none;
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
}

.copy-btn:hover {
    background: var(--surface-dark);
}

.loader,
.image-loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--accent);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 24px auto 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* overlays.css */
.econ-lost-overlay,
.computer-picking-overlay {
    position: fixed;
    inset: 0;
    z-index: 3500;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(5, 6, 7, 0.72);
    backdrop-filter: blur(3px);
}

.econ-lost-container,
.computer-picking-box {
    width: 90%;
    max-width: 440px;
    padding: 30px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--danger);
    box-shadow: var(--shadow);
    text-align: center;
}

.econ-lost-container h2,
.computer-picking-box h2 {
    color: var(--danger);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.econ-lost-container p,
.computer-picking-box p {
    color: var(--text-secondary-alt);
    font-weight: 700;
    margin-bottom: 8px;
}

.econ-lost-subtext {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.econ-takeover-grid {
    outline: 2px solid var(--danger);
    outline-offset: 4px;
}

.computer-picking-grid {
    outline: 2px solid var(--team-both);
    outline-offset: 4px;
    animation: computerPulse 0.9s infinite alternate;
}

.computer-picking-overlay.emergency-cpu-picking-overlay .computer-picking-box {
    border-color: var(--danger);
}

.computer-picking-overlay.emergency-cpu-picking-overlay .computer-picking-box h2 {
    color: var(--danger);
}

.computer-picking-overlay.emergency-cpu-picking-overlay .computer-spinner {
    border-color: rgba(255, 70, 85, 0.18);
    border-top-color: var(--danger);
}

.computer-picking-overlay.emergency-cpu-picking-overlay .computer-picking-timer {
    color: var(--danger);
}

.cpu-pick-summary {
    border: 2px solid var(--team-both) !important;
    position: relative;
    overflow: hidden;
}

.cpu-pick-summary::after {
    content: 'CPU';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 145%;
    transform: translate(-50%, -50%) rotate(-42deg);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    background: rgba(255, 215, 0, 0.56);
    color: #050607;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-shadow: none;
    pointer-events: none;
}

.computer-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255, 215, 0, 0.18);
    border-top-color: var(--team-both);
    border-radius: 50%;
    margin: 0 auto 14px auto;
    animation: spin 0.8s linear infinite;
}

.computer-picking-timer {
    margin-top: 12px;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--team-both);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.agent-card.cpu-picked {
    border-color: var(--team-both) !important;
    overflow: hidden;
}

.agent-card.cpu-picked::before {
    content: 'CPU';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 145%;
    transform: translate(-50%, -50%) rotate(-42deg);
    z-index: 13;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    background: rgba(255, 215, 0, 0.56);
    color: #050607;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    pointer-events: none;
}

.cpu-pick-action {
    border-color: var(--team-both) !important;
    overflow: hidden;
}

.cpu-pick-action::after {
    content: 'CPU';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 145%;
    transform: translate(-50%, -50%) rotate(-42deg);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    background: rgba(255, 215, 0, 0.56);
    color: #050607;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    pointer-events: none;
}

.econ-takeover-banner {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 70, 85, 0.15);
    border: 2px solid var(--danger);
    border-radius: 4px;
    padding: 8px 16px;
    text-align: center;
    gap: 2px;
}

.econ-banner-title {
    color: var(--danger);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.econ-banner-subtitle {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

@keyframes computerPulse {
    from {
        filter: brightness(0.85);
    }
    to {
        filter: brightness(1.08);
    }
}

/* summaries.css */
.game-confirmation-overlay,
.series-completion-overlay {
    display: none;
    background: rgba(5, 6, 7, 0.95);
}

.series-completion-overlay .summary-agent-card {
    width: 68px;
    height: 102px;
    flex-basis: 68px;
}

.series-completion-overlay .agents-row {
    min-height: 120px;
}

#gameConfirmationOverlay .team-summary h3 {
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 20px;
}

.confirmation-container,
.series-summary-container {
    width: 90%;
    max-width: 1200px;
}

.game-summary {
    margin-bottom: 20px;
    display: flex;
    gap: 40px;
    justify-content: center;
}

.game-summary h3,
.series-summary-container h2,
.confirmation-container h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 20px;
}

.team-summary {
    flex: 1;
}

.selection-group h5 {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agents-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    background: var(--surface-dark);
    padding: 10px;
    border-radius: 4px;
    overflow: hidden;
    min-height: 126px;
}

.summary-agent-card {
    width: 72px;
    height: 108px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    position: relative;
    flex: 0 0 72px;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.pick-a {
    border: 2px solid var(--team-a);
}

.pick-b {
    border: 2px solid var(--team-b);
}

.ban-a,
.ban-b {
    border: 2px solid var(--danger);
}

.ban-a::after,
.ban-b::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    background: linear-gradient(to bottom, transparent, rgba(255, 70, 85, 0.5));
}

.confirm-btn,
.return-btn {
    background: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 4px;
    padding: 12px 30px;
    font-weight: 800;
    cursor: pointer;
    margin: 20px auto 0 auto;
    display: block;
}

.confirm-btn:hover,
.return-btn:hover {
    background: var(--primary-dark);
}

.series-games-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.series-game-summary {
    display: grid;
    grid-template-columns: 170px 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.series-map-title {
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 900;
    margin-top: 8px;
    text-align: left;
}

.series-game-summary .team-summary h4 {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 4px;
}

/* notifications.css */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: var(--surface);
    color: var(--text);
    padding: 12px 24px;
    border-radius: 6px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease;
    max-width: 320px;
    opacity: 1;
}

.notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification.info {
    border-left: 4px solid var(--primary);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* how-to-modal.css */
.how-to-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 4px;
    font-weight: 800;
    cursor: pointer;
    z-index: 9999;
}

.how-to-btn:hover {
    background: var(--primary-dark);
}

#muteBtn {
    position: fixed;
    bottom: 12px;
    left: 12px;
    top: auto;
    right: auto;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    display: flex;
    flex-direction: column;
    width: 95vw;
    height: 90vh;
    max-width: 1600px;
    margin: 5vh auto;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    background: var(--surface);
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: relative;
}

.modal-header {
    flex-shrink: 0;
    text-align: center;
    margin-bottom: 15px;
}

.modal-tabs {
    justify-content: center;
    margin: 10px auto;
    max-width: 520px;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    color: var(--text);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    background: var(--surface-dark);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background: var(--accent);
}

.image-container {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--surface-dark);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.image-container.loaded .image-loader {
    display: none;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ready-up.css */
.ready-up-overlay {
    z-index: 3000;
    display: none;
    background: rgba(5, 6, 7, 0.92);
    backdrop-filter: blur(4px);
}

.ready-up-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ready-up-container h2 {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 16px;
}

.ready-up-timer {
    font-size: 4rem;
    font-weight: 900;
    color: var(--danger);
    line-height: 1;
    margin-bottom: 20px;
}

.ready-up-teams {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--text-secondary-alt);
    font-weight: 800;
}

#readyUpBtn {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
}

/* scrollbar.css */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* responsive.css */
@media (max-aspect-ratio: 16 / 9) {
    .main-container {
        width: 100vw;
        height: calc(100vw * 9 / 16);
    }
}

@media (min-aspect-ratio: 16 / 9) {
    .main-container {
        height: 100vh;
        width: calc(100vh * 16 / 9);
    }
}

@media (max-width: 768px) {
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

