/* SauceRadio Karaoke Jeopardy - Main Stylesheet */

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

:root {
    --sauce-red: #FF0000;
    --sauce-black: #000000;
    --sauce-grey: #121212;
    --sauce-white: #FFFFFF;
    --jeopardy-gold: #FFD700;
    --success: #00E676;
    --danger: #FF1744;
    --warning: #FFEA00;
    --tile-available: #000000;
    --tile-used: #1A1A1A;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--sauce-black);
    color: var(--sauce-white);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 30px;
    padding: 30px;
    flex: 1;
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 1400px) {
    .app-container {
        grid-template-columns: 1fr;
    }
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: var(--sauce-grey);
    border-bottom: 4px solid var(--sauce-red);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand h1 {
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--sauce-white);
}

.brand span {
    color: var(--sauce-red);
}

.board-title-display {
    display: inline-block;
    margin-left: 20px;
    padding: 8px 16px;
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid var(--sauce-red);
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--jeopardy-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeIn 0.3s ease;
}

.board-title-display:empty {
    display: none;
}

.top-controls {
    display: flex;
    gap: 15px;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--sauce-red);
    color: var(--sauce-white);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--sauce-white);
    color: var(--sauce-white);
}

.btn-outline:hover {
    background: var(--sauce-white);
    color: var(--sauce-black);
}

/* Jeopardy Board */
.board-wrapper {
    background: var(--sauce-grey);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.jeopardy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.cat-header {
    background: var(--sauce-red);
    color: var(--sauce-white);
    padding: 25px 10px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.tile {
    aspect-ratio: 1.2;
    background: var(--sauce-black);
    border: 2px solid var(--sauce-grey);
    color: var(--jeopardy-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 900;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tile.available {
    box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.1);
}

.tile.available:hover {
    border-color: var(--jeopardy-gold);
    transform: scale(1.02);
    z-index: 10;
}

.tile.selected {
    border: 4px solid var(--sauce-red) !important;
    animation: tilePulse 1.5s infinite;
}

.tile.used {
    background: #0a0a0a;
    color: #333;
    border-color: #111;
    cursor: not-allowed;
    opacity: 0.6;
    text-decoration: line-through;
}

@keyframes tilePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

/* Now Playing Panel */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.card {
    background: var(--sauce-grey);
    border-radius: 8px;
    padding: 25px;
    border-left: 6px solid var(--sauce-red);
}

.card-title {
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--sauce-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.song-details {
    margin-bottom: 20px;
}

.song-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 5px;
    color: var(--sauce-red);
}

.song-artist {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--sauce-white);
    opacity: 0.8;
    margin-bottom: 15px;
}

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.meta-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 4px;
}

.meta-label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 3px;
}

.meta-val {
    font-size: 1.1rem;
    font-weight: 900;
}

.db-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #00E676;
    color: #000;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 900;
}

.db-card:hover {
    box-shadow: 0 10px 30px rgba(0, 230, 118, 0.3);
}

/* Action Buttons */
.action-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.play-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-pass {
    background: var(--success);
    color: #000;
    font-size: 1.3rem;
    height: 70px;
}

.btn-fail {
    background: var(--danger);
    color: #fff;
    font-size: 1.3rem;
    height: 70px;
}

.btn-steal {
    background: var(--jeopardy-gold);
    color: #000;
    font-size: 1.3rem;
    height: 60px;
    width: 100%;
}

/* Scoreboard */
.scoreboard {
    flex: 1;
}

.team-list {
    display: grid;
    gap: 15px;
}

.team-row {
    background: var(--sauce-black);
    padding: 20px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #222;
}

.team-info {
    display: flex;
    flex-direction: column;
}

.team-name {
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
}

.team-pts {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--jeopardy-gold);
}

.score-btns {
    display: flex;
    gap: 10px;
}

.score-adj {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    background: var(--sauce-grey);
    color: var(--sauce-white);
    border: 2px solid #333;
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-adj:active {
    transform: scale(0.9);
}

/* Modals */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.overlay.active {
    display: flex;
}

.modal {
    background: var(--sauce-grey);
    padding: 40px;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    border: 4px solid var(--sauce-red);
}

.modal h2 {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #888;
}

.field input,
.field textarea {
    width: 100%;
    background: var(--sauce-black);
    border: 2px solid #333;
    padding: 15px;
    color: #fff;
    font-family: inherit;
    font-size: 1.1rem;
    border-radius: 4px;
}

.field input:focus {
    border-color: var(--sauce-red);
    outline: none;
}

/* Team Selection */
.team-selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.select-team-btn {
    background: #222;
    color: #fff;
    padding: 20px;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.select-team-btn:hover {
    background: var(--sauce-red);
}

.hidden {
    display: none !important;
}

/* Theater Mode (Global Overlay) */
#theaterMode {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--sauce-black);
    z-index: 2000;
    flex-direction: column;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

#theaterMode.active {
    display: flex;
}

.theater-layout {
    display: grid;
    grid-template-rows: 1fr auto;
    height: 100%;
    gap: 20px;
}

.theater-video-box {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

#theaterPlayerContainer,
#player {
    width: 100%;
    height: 100%;
}

.theater-controls {
    background: var(--sauce-grey);
    padding: 30px;
    border-radius: 12px;
    border-top: 4px solid var(--sauce-red);
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 40px;
    align-items: center;
}

.theater-song-info h3 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--sauce-red);
    text-transform: uppercase;
    line-height: 1;
}

.theater-song-info p {
    font-size: 1.8rem;
    font-weight: 600;
    opacity: 0.8;
    margin-top: 10px;
}

.theater-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.theater-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-theater {
    height: 80px;
    font-size: 1.5rem !important;
}

.btn-minimize {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2100;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-minimize:hover {
    background: var(--sauce-red);
    border-color: var(--sauce-red);
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Preset Selector Landing Page */
.preset-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #000000 0%, #1a0000 100%);
    z-index: 5000;
    overflow-y: auto;
    padding: 40px 20px;
}

.preset-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.preset-container {
    max-width: 1200px;
    width: 100%;
}

.preset-header {
    text-align: center;
    margin-bottom: 50px;
}

.preset-header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--sauce-white);
    margin-bottom: 10px;
}

.preset-header .highlight {
    color: var(--sauce-red);
}

.preset-subtitle {
    font-size: 1.4rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.preset-card {
    background: var(--sauce-grey);
    border: 3px solid #222;
    border-radius: 12px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.preset-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--sauce-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.preset-card:hover {
    border-color: var(--sauce-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

.preset-card:hover::before {
    transform: scaleX(1);
}

.preset-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    text-align: center;
}

.preset-card h3 {
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--sauce-white);
    margin-bottom: 10px;
}

.preset-artist {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--jeopardy-gold);
    margin-bottom: 8px;
}

.preset-desc {
    font-size: 1rem;
    color: #999;
    margin-bottom: 15px;
}

.preset-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-categories span {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ccc;
}

.combo-card {
    border-color: var(--jeopardy-gold);
}

.combo-card:hover {
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.combo-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--jeopardy-gold);
    color: #000;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.custom-card {
    border-style: dashed;
}

.custom-card:hover {
    border-color: #666;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.preset-footer {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.preset-footer p {
    font-size: 1rem;
    color: #888;
    margin: 0;
}

@media (min-width: 1900px) {
    html {
        font-size: 20px;
    }

    .app-container {
        padding: 50px;
        gap: 50px;
    }

    .tile {
        font-size: 5rem;
    }
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Tablets (Portrait) */
@media (max-width: 768px) {

    /* Top Bar */
    .top-bar {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 15px;
    }

    .brand h1 {
        font-size: 1.8rem;
    }

    .top-controls {
        width: 100%;
        justify-content: stretch;
    }

    .top-controls .btn {
        flex: 1;
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    /* App Container */
    .app-container {
        padding: 15px;
        gap: 20px;
    }

    /* Jeopardy Board */
    /* Jeopardy Board */
    .board-wrapper {
        padding: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100vw;
    }

    .jeopardy-grid {
        gap: 10px;
        min-width: 600px;
        /* Ensure board has enough space, triggering scroll */
    }

    .cat-header {
        padding: 15px 5px;
        font-size: 0.9rem;
        min-height: 70px;
        word-break: break-word;
        /* Prevent long words overflowing */
    }

    .tile {
        font-size: 2.5rem;
    }

    /* Now Playing Card */
    .card {
        padding: 20px;
    }

    .card-title {
        font-size: 1.4rem;
    }

    .song-title {
        font-size: 1.5rem;
    }

    .song-artist {
        font-size: 1.1rem;
    }

    /* Action Buttons */
    .btn-pass,
    .btn-fail {
        height: 60px;
        font-size: 1.1rem;
    }

    .btn-steal {
        height: 55px;
        font-size: 1.1rem;
    }

    /* Scoreboard */
    .team-row {
        padding: 15px;
    }

    .team-name {
        font-size: 1.1rem;
    }

    .team-pts {
        font-size: 1.8rem;
    }

    .score-adj {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    /* Theater Mode */
    .theater-controls {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }

    .theater-song-info h3 {
        font-size: 2rem;
    }

    .theater-song-info p {
        font-size: 1.3rem;
    }

    .btn-theater {
        height: 60px;
        font-size: 1.2rem !important;
    }

    /* Modals */
    .modal {
        padding: 25px;
    }

    .modal h2 {
        font-size: 1.5rem;
    }

    /* Preset Selector */
    .preset-header h1 {
        font-size: 2.5rem;
    }

    .preset-subtitle {
        font-size: 1.1rem;
    }

    .preset-grid {
        grid-template-columns: 1fr;
    }

    .preset-card {
        padding: 25px;
    }

    /* Preset Overlay Mobile Fixes */
    .preset-overlay {
        -webkit-overflow-scrolling: touch;
        padding: 20px 15px;
    }

    .preset-overlay.active {
        align-items: flex-start;
    }

    .preset-container {
        margin-top: 0;
    }
}

/* Mobile Phones (Portrait) */
@media (max-width: 480px) {

    /* Top Bar */
    .brand h1 {
        font-size: 1.4rem;
        letter-spacing: 0;
    }

    .top-controls .btn {
        padding: 10px 12px;
        font-size: 0.8rem;
        gap: 5px;
    }

    /* App Container */
    .app-container {
        padding: 10px;
        gap: 15px;
    }

    /* Jeopardy Board */
    .board-wrapper {
        padding: 5px;
        overflow-x: hidden;
        /* Force fit */
        width: 100%;
    }

    .jeopardy-grid {
        gap: 3px;
        min-width: 0;
        /* Override the 768px min-width */
        width: 100%;
    }

    .cat-header {
        padding: 5px 2px;
        font-size: 0.6rem;
        /* Much smaller text */
        min-height: 45px;
        line-height: 1.1;
        word-break: break-word;
    }

    .tile {
        font-size: 1.3rem;
        border-width: 1px;
        aspect-ratio: 1.3;
    }

    .tile.selected {
        border-width: 2px;
    }

    /* Now Playing Card */
    .card {
        padding: 15px;
    }

    .card-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .song-title {
        font-size: 1.3rem;
    }

    .song-artist {
        font-size: 1rem;
    }

    .meta-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .meta-label {
        font-size: 0.7rem;
    }

    .meta-val {
        font-size: 1rem;
    }

    /* Action Buttons */
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .btn-pass,
    .btn-fail {
        height: 55px;
        font-size: 1rem;
    }

    .btn-steal {
        height: 50px;
        font-size: 1rem;
    }

    /* Scoreboard */
    .team-row {
        padding: 12px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .team-name {
        font-size: 1rem;
    }

    .team-pts {
        font-size: 1.5rem;
    }

    .score-btns {
        gap: 8px;
        width: 100%;
        justify-content: flex-end;
    }

    .score-adj {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    /* Theater Mode */
    #theaterMode {
        padding: 10px;
    }

    .theater-layout {
        gap: 15px;
    }

    .theater-controls {
        padding: 15px;
        gap: 15px;
    }

    .theater-song-info h3 {
        font-size: 1.5rem;
    }

    .theater-song-info p {
        font-size: 1.1rem;
    }

    .theater-btn-row {
        gap: 10px;
    }

    .btn-theater {
        height: 50px;
        font-size: 1rem !important;
    }

    .btn-minimize {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    /* Modals */
    .overlay {
        padding: 15px;
    }

    .modal {
        padding: 20px;
        border-width: 3px;
    }

    .modal h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .field label {
        font-size: 0.8rem;
    }

    .field input,
    .field textarea {
        padding: 12px;
        font-size: 1rem;
    }

    .team-selection-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .select-team-btn {
        padding: 15px;
        font-size: 1rem;
    }

    /* Preset Selector */
    .preset-overlay {
        padding: 20px 15px;
    }

    .preset-header {
        margin-bottom: 30px;
    }

    .preset-header h1 {
        font-size: 2rem;
        line-height: 1.1;
    }

    .preset-subtitle {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .preset-grid {
        gap: 15px;
        margin-bottom: 20px;
    }

    .preset-card {
        padding: 20px;
    }

    .preset-icon {
        font-size: 3rem;
        margin-bottom: 12px;
    }

    .preset-card h3 {
        font-size: 1.4rem;
    }

    .preset-artist {
        font-size: 0.95rem;
    }

    .preset-desc {
        font-size: 0.9rem;
    }

    .preset-categories span {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .combo-badge {
        top: 12px;
        right: 12px;
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    .preset-footer {
        padding: 15px;
    }

    .preset-footer p {
        font-size: 0.9rem;
    }

    /* Additional Mobile Scrolling Fixes */
    .preset-overlay {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .preset-header {
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, #000000 0%, #1a0000 100%);
        z-index: 10;
        padding-bottom: 20px;
    }
}

/* Touch-Friendly Improvements */
@media (hover: none) and (pointer: coarse) {

    /* Larger tap targets for mobile */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .tile {
        min-height: 44px;
    }

    .score-adj {
        min-width: 44px;
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .tile.available:hover {
        transform: none;
    }

    .btn-outline:hover {
        background: transparent;
        color: var(--sauce-white);
    }

    .preset-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* Add active states instead */
    .tile.available:active {
        transform: scale(0.95);
        border-color: var(--jeopardy-gold);
    }

    .btn:active {
        transform: scale(0.95);
    }

    .preset-card:active {
        transform: scale(0.98);
    }
}

/* Landscape Mode Adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .theater-layout {
        grid-template-rows: 1fr;
        grid-template-columns: 1fr 300px;
    }

    .theater-controls {
        grid-template-columns: 1fr;
        max-height: 100vh;
        overflow-y: auto;
    }

    #theaterMode {
        padding: 10px;
    }
}

/* ==================== LOBBY SCREEN ==================== */
.lobby-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: var(--sauce-grey);
    border-radius: 16px;
    border: 4px solid var(--sauce-red);
}

.lobby-container h1 {
    text-align: center;
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.lobby-subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 40px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lobby-content {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.lobby-section h2 {
    color: var(--sauce-red);
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
}

.lobby-teams-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 100px;
}

.lobby-team-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--sauce-black);
    border-radius: 8px;
    border: 2px solid #222;
    transition: var(--transition);
}

.lobby-team-item:hover {
    border-color: var(--sauce-red);
}

.lobby-team-item .team-name {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
}

.btn-remove {
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid var(--danger);
    color: var(--danger);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 800;
    text-transform: uppercase;
}

.btn-remove:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.1);
}

.lobby-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    font-size: 1.4rem;
    padding: 20px 50px;
}

.btn-large:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.empty-state {
    color: #666;
    text-align: center;
    padding: 30px;
    font-style: italic;
    font-size: 1.1rem;
}

/* ==================== SPINNER SCREEN ==================== */
.spinner-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    text-align: center;
}

.spinner-container h1 {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: var(--sauce-white);
}

.spinner-wheel {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 40px auto;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid var(--sauce-red);
    background: var(--sauce-grey);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.5);
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 0, 0, 0.3);
    text-transform: uppercase;
}

.wheel-segment:nth-child(odd) {
    background: rgba(255, 0, 0, 0.3);
}

.wheel-segment:nth-child(even) {
    background: rgba(0, 0, 0, 0.5);
}

.spinner-arrow {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    color: var(--sauce-red);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    z-index: 10;
}

.spinner-result {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 12px;
    border: 2px solid var(--sauce-red);
}

.spinner-result h2 {
    color: var(--sauce-white);
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
}

.spinner-result span {
    color: var(--sauce-red);
}

#spinnerContinueBtn {
    margin-top: 20px;
    font-size: 1.3rem;
    padding: 15px 40px;
}

/* ==================== QUICK START CARD ==================== */
.quick-start-card {
    background: linear-gradient(135deg, var(--sauce-red) 0%, #cc0000 100%) !important;
    border-color: var(--sauce-red) !important;
    animation: quickStartPulse 2s infinite;
}

@keyframes quickStartPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px 10px rgba(255, 0, 0, 0);
    }
}

.quick-start-card:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 10px 40px rgba(255, 0, 0, 0.5) !important;
    animation: none;
}

.quick-start-card .preset-icon {
    animation: quickStartIconSpin 3s linear infinite;
}

@keyframes quickStartIconSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Responsiveness for New Components */
@media (max-width: 768px) {
    .lobby-container {
        padding: 20px;
    }

    .lobby-container h1 {
        font-size: 2rem;
    }

    .lobby-subtitle {
        font-size: 1rem;
    }

    .lobby-actions {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }

    .spinner-wheel {
        width: 300px;
        height: 300px;
    }

    .wheel-segment {
        font-size: 1rem;
    }

    .spinner-container h1 {
        font-size: 2rem;
    }

    .spinner-result h2 {
        font-size: 1.5rem;
    }
}

/* Auth Status Section */
.auth-status {
    text-align: center;
    margin: 20px 0 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.auth-status p {
    font-size: 1.1rem;
    color: #ccc;
    margin: 0;
}

.auth-status strong {
    color: var(--jeopardy-gold);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-left: 10px;
}

/* Quick Start Card Styling */
.quick-start-card {
    background: linear-gradient(135deg, #1a0000 0%, #330000 100%);
    border-color: var(--sauce-red) !important;
}

.quick-start-card:hover {
    box-shadow: 0 10px 40px rgba(255, 0, 0, 0.5) !important;
}

/* ==================== CATALOG SELECTION MODAL ==================== */
.catalog-selection-modal {
    max-width: 900px;
    width: 95%;
}

.catalog-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
    margin: 0 -10px;
}

.catalog-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.catalog-item:hover {
    border-color: var(--jeopardy-gold);
    background: rgba(255, 215, 0, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.catalog-item-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.catalog-item-icon {
    font-size: 2.5rem;
}

.catalog-item-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: var(--sauce-white);
}

.catalog-item-info p {
    font-size: 0.9rem;
    color: var(--jeopardy-gold);
    margin: 4px 0 0;
    font-weight: 600;
}

.catalog-item-stats {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #888;
}

.catalog-item-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}

.spinner-small {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 215, 0, 0.1);
    border-top-color: var(--jeopardy-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .catalog-modal-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== PHASE 3B: PLACEHOLDER TILES ==================== */

/* Placeholder tile state - shown while board is generating */
.tile.placeholder {
    position: relative;
    overflow: hidden;
    cursor: wait;
    opacity: 0.6;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-color: #222;
}

/* Shimmer animation overlay */
.tile-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 215, 0, 0.15),
            transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Points text in placeholder */
.tile.placeholder .tile-points {
    position: relative;
    z-index: 1;
    color: #444;
    font-size: 3.5rem;
}

/* Fade-in animation when real board loads */
.tile.fade-in {
    animation: tileReveal 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes tileReveal {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stagger the fade-in for each tile */
.tile.fade-in:nth-child(1) {
    animation-delay: 0ms;
}

.tile.fade-in:nth-child(2) {
    animation-delay: 30ms;
}

.tile.fade-in:nth-child(3) {
    animation-delay: 60ms;
}

.tile.fade-in:nth-child(4) {
    animation-delay: 90ms;
}

.tile.fade-in:nth-child(5) {
    animation-delay: 120ms;
}

.tile.fade-in:nth-child(6) {
    animation-delay: 150ms;
}

.tile.fade-in:nth-child(7) {
    animation-delay: 180ms;
}

.tile.fade-in:nth-child(8) {
    animation-delay: 210ms;
}

.tile.fade-in:nth-child(9) {
    animation-delay: 240ms;
}

.tile.fade-in:nth-child(10) {
    animation-delay: 270ms;
}

.tile.fade-in:nth-child(11) {
    animation-delay: 300ms;
}

.tile.fade-in:nth-child(12) {
    animation-delay: 330ms;
}

.tile.fade-in:nth-child(13) {
    animation-delay: 360ms;
}

.tile.fade-in:nth-child(14) {
    animation-delay: 390ms;
}

.tile.fade-in:nth-child(15) {
    animation-delay: 420ms;
}

.tile.fade-in:nth-child(16) {
    animation-delay: 450ms;
}

.tile.fade-in:nth-child(17) {
    animation-delay: 480ms;
}

.tile.fade-in:nth-child(18) {
    animation-delay: 510ms;
}

.tile.fade-in:nth-child(19) {
    animation-delay: 540ms;
}

.tile.fade-in:nth-child(20) {
    animation-delay: 570ms;
}

.tile.fade-in:nth-child(21) {
    animation-delay: 600ms;
}

.tile.fade-in:nth-child(22) {
    animation-delay: 630ms;
}

.tile.fade-in:nth-child(23) {
    animation-delay: 660ms;
}

.tile.fade-in:nth-child(24) {
    animation-delay: 690ms;
}

.tile.fade-in:nth-child(25) {
    animation-delay: 720ms;
}

/* Loading indicator for board generation */
.board-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px 40px;
    border-radius: 8px;
    border: 2px solid var(--jeopardy-gold);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--jeopardy-gold);
    animation: fadeIn 0.3s ease;
}

.board-loading-indicator.hidden {
    display: none;
}

/* Sidebar Video Placeholder */
.sidebar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.sidebar-placeholder:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-placeholder .playing-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.sidebar-placeholder p {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0 20px;
}

.track-header-badge {
    margin-bottom: 10px;
}

.category-badge {
    background: var(--jeopardy-gold);
    color: var(--sauce-black);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}