.hidden {
    display: none !important;
}

/* overlays open via .active */
.lobby-overlay.active,
.game-confirmation-overlay.active,
.series-completion-overlay.active {
    display: flex;
}

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

.role-banner {
    display: none;
}

.team-panel {
    width: 280px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 6px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.team-panel.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 8px;
    pointer-events: none;
}

.team-panel.team-a.active::before {
    border: 2px solid var(--team-a);
}

.team-panel.team-b.active::before {
    border: 2px solid var(--team-b);
}

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

.team-logo {
    display: none;
}

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

.team-name:focus {
    background: var(--accent);
    outline: none;
}

.center-panel {
    flex: 1;
    background: var(--surface);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px; /* was 20px – too much */
    position: relative;
}

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

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

.draft-status::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -1px;
    height: 2px;
    background: var(--gradient);
    opacity: 0.6;
}

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

.timer {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

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

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

.current-action .timeout-note {
    color: rgba(255, 70, 85, 0.95);
}

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

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

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

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

.control-btn {
    padding: 12px 26px;
    min-width: 160px;
    height: 44px;
    border: none;
    border-radius: 4px;

    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;

    background: var(--accent);
    color: var(--text);

    letter-spacing: 0.10em;
    text-transform: uppercase;
}

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

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

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


/* Lobby + overlays */
.lobby-overlay,
.game-confirmation-overlay,
.series-completion-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 7, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Lobby card sizing (matches screenshot) */
.lobby-container {
    background: var(--surface);
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 420px;
    min-height: 520px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.confirmation-container,
.series-summary-container {
    background: var(--surface);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 1200px;
}

/* lobby tabs + inputs match agent-ban vibe */
.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;
    font-weight: 700;
}

.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;
    transition: all 0.2s ease;
}

.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;
    transition: all 0.2s ease;
    margin-top: 8px;
}

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

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

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

/* 16:9 behavior */
@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);
    }
}
