/* Estilos exclusivos para la Vista del Partido de ArenaLive */

/* ==========================================
   CONFIGURACIONES ESPECÍFICAS DE LAYOUTS (MÓVIL POR DEFECTO)
   ========================================== */

/* Componentes ocultos por defecto en la vista del partido */
#match-multicam-selector,
#match-details-tabs,
#match-chat-panel,
#landscape-stats-panel,
#landscape-sidebar-btn {
    display: none;
}

/* Contenedor del Reproductor Táctil */
.match-player-container {
    width: 100%;
}
.player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-color);
}
.match-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-quick);
}

/* Marcador flotante overlay */
.match-live-score-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(12, 12, 16, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 4px 10px;
    z-index: 5;
    gap: 8px;
}
.team-score-mini {
    display: flex;
    align-items: center;
    gap: 6px;
}
.team-name-mini {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.score-mini-num {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
}
.time-divider-mini {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(0, 255, 136, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
}

/* Emojis flotantes animados */
.emoji-shower-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    overflow: hidden;
}
.floating-emoji {
    position: absolute;
    bottom: -20px;
    font-size: 1.5rem;
    animation: floatUp 2s ease-out forwards;
    opacity: 0;
}
@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-150px) translateX(var(--drift, 20px)) scale(1.2);
        opacity: 0;
    }
}

/* HUD Controles en Hover/Touch */
.player-hud-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: var(--transition-quick);
    z-index: 5;
}
.player-wrapper:hover .player-hud-controls,
.player-wrapper:active .player-hud-controls {
    opacity: 1;
}
.hud-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}
.hud-play-bar {
    flex-grow: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}
.hud-progress-bar {
    background: var(--accent-primary);
    height: 100%;
}
.hud-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-tertiary);
}

/* Multicámaras */
.multicam-selector-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.block-title-small {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}
.multicam-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.camera-thumb {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    position: relative;
    aspect-ratio: 16/10;
}
.camera-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: var(--transition-quick);
}
.camera-thumb span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    font-size: 0.6rem;
    padding: 3px 0;
    font-weight: 600;
}
.camera-thumb.active {
    border-color: var(--accent-primary);
}
.camera-thumb.active img {
    opacity: 0.95;
}

/* Detalles del partido (Pestañas) */
.match-details-tabs-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tabs-nav {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
}
.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
}
.tab-btn.active {
    background: var(--bg-surface-hover);
    color: #fff;
}
.tab-content-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
}

.stat-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.stat-row:last-child {
    margin-bottom: 0;
}
.stat-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
}
.stat-bar-container {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    display: flex;
    overflow: hidden;
}
.stat-bar-left { background: var(--accent-secondary); }
.stat-bar-right { background: var(--accent-primary); margin-left: auto; }

/* Chat en Vivo */
.match-chat-block {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    height: 280px; /* Altura acotada en móvil */
}
.chat-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.users-counter {
    font-size: 0.7rem;
    color: var(--accent-primary);
    background: rgba(0, 255, 136, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-msg {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
}
.chat-msg-user {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--accent-secondary);
}
.chat-msg-text {
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 2px;
    align-self: flex-start;
}
.chat-input-area {
    padding: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    background: var(--bg-base);
}
.chat-input-area input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    outline: none;
    font-size: 0.8rem;
}

/* Reacciones rápidas de emojis */
.quick-reactions-bar {
    display: flex;
    justify-content: space-around;
    padding: 6px 10px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}
.reaction-emoji-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-quick);
}
.reaction-emoji-btn:hover {
    transform: scale(1.2);
}

/* Sidebar en Modo Horizontal (Layout 5) */
.landscape-sidebar {
    display: none;
}
.landscape-trigger-btn {
    display: none;
}

/* Cabecera del partido (Mobile Header) */
.match-header-bar {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.header-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ext-source-selector-container {
    position: relative;
    display: inline-block;
}

.ext-source-selector-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    transition: var(--transition-quick);
}

.ext-source-selector-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.15);
}

.ext-sources-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(12, 12, 16, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    width: 230px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    padding: 6px;
    display: none; /* Dinámico */
    flex-direction: column;
    gap: 4px;
    z-index: 999;
    animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ext-sources-dropdown.active {
    display: flex;
}

.ext-sources-dropdown .dropdown-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.ext-sources-dropdown .dropdown-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-quick);
    font-family: var(--font-body);
}

.ext-sources-dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.ext-sources-dropdown .dropdown-item.active {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: var(--accent-primary);
}

.ext-sources-dropdown .dropdown-item .checkmark {
    display: none;
    color: var(--accent-primary);
    font-weight: 800;
}

.ext-sources-dropdown .dropdown-item.active .checkmark {
    display: inline;
}

/* ==========================================
   LAYOUTS MÓVILES
   ========================================== */

/* Match Layout 1: Social Live (Video + Chat abajo) */
#match-view-container {
    gap: 16px;
}
#app-container.match-layout-1 #match-chat-panel {
    display: flex;
    flex-grow: 1;
    height: auto;
}

/* Match Layout 2: Stats Dominant (Video + Tabs estadísticas) */
#app-container.match-layout-2 #match-details-tabs {
    display: flex;
}

/* Match Layout 3: Multicam Director (Video + Carruseles de cámaras) */
#app-container.match-layout-3 #match-multicam-selector {
    display: flex;
}

/* Match Layout 4: Vertical Screen (TikTok Mode) */
#app-container.match-layout-4 .match-header-bar {
    display: none;
}
#app-container.match-layout-4 .mobile-bottom-nav {
    display: none;
}
#app-container.match-layout-4 #match-view-container {
    padding: 0;
    height: 100vh;
    overflow: hidden;
}
#app-container.match-layout-4 .match-player-container,
#app-container.match-layout-4 .player-wrapper {
    aspect-ratio: auto;
    height: 100vh;
    width: 100vw;
    border-radius: 0;
    border: none;
}
#app-container.match-layout-4 .match-live-score-overlay {
    top: 24px;
    left: 16px;
}
#app-container.match-layout-4 #match-chat-panel {
    display: flex;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(6, 6, 8, 0.95) 80%, transparent);
    border: none;
    border-radius: 0;
    z-index: 10;
    height: 250px;
}
#app-container.match-layout-4 .chat-messages {
    background: transparent;
}
#app-container.match-layout-4 .chat-msg-text {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
}
#app-container.match-layout-4 .chat-input-area {
    background: transparent;
}
#app-container.match-layout-4 #quick-reactions {
    display: flex;
    background: transparent;
    border: none;
}

/* Match Layout 5: Landscape Cine Mode */
#app-container.match-layout-5 .match-header-bar,
#app-container.match-layout-5 .mobile-bottom-nav {
    display: none;
}
#app-container.match-layout-5 #match-view-container {
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}
#app-container.match-layout-5 .match-player-container,
#app-container.match-layout-5 .player-wrapper {
    aspect-ratio: auto;
    height: 100vh;
    width: 100vw;
    border-radius: 0;
    border: none;
}
#app-container.match-layout-5 #landscape-sidebar-btn {
    display: inline-flex;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
#app-container.match-layout-5 #landscape-stats-panel.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: rgba(12, 12, 16, 0.85);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    z-index: 25;
    animation: slideInRight 0.3s ease-out;
}

/* ==========================================
   ESTILOS DE SELECTOR DE FUENTES Y LOADERS
   ========================================== */

/* Cargador de Buffer */
.player-loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 6, 8, 0.85);
    display: none; /* dinámico */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 30;
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.95rem;
}
.player-loader-overlay .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(0, 255, 136, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Selector de Fuentes Overlay */
.player-sources-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 6, 8, 0.75);
    backdrop-filter: blur(12px);
    display: none; /* dinámico */
    align-items: center;
    justify-content: center;
    z-index: 28;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sources-panel {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    overflow: hidden;
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes scaleUp {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.sources-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 1.05rem;
}
.close-sources-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}
.close-sources-btn:hover {
    color: #fff;
}

.sources-list {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 8px;
}
.source-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-quick);
}
.source-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--border-color-hover);
    color: #fff;
}
.source-item.active {
    background: rgba(0, 255, 136, 0.08);
    border-color: var(--accent-primary);
    color: #fff;
}

.source-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.source-item.active .source-status-dot {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    animation: blink 1.5s infinite;
}
@keyframes blink {
    50% { opacity: 0.5; }
}

.source-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.source-name {
    font-size: 0.85rem;
    font-weight: 700;
}
.source-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.source-item:hover .source-meta {
    color: var(--text-secondary);
}

/* Botón de directo (Sync Live) */
.hud-live-badge {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-quick);
}
.hud-live-badge.active {
    background: rgba(255, 45, 85, 0.1);
    border-color: var(--accent-tertiary);
    color: var(--accent-tertiary);
    animation: pulse 1.8s infinite;
}
.hud-live-badge:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Menú de Configuración de Calidad */
.player-settings-menu {
    position: absolute;
    bottom: 40px;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    width: 160px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    padding: 8px;
    display: none; /* dinámico */
    flex-direction: column;
    gap: 4px;
    z-index: 35;
    animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.player-settings-menu.active {
    display: flex;
}
.settings-menu-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 4px 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}
.settings-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-quick);
    font-family: var(--font-body);
}
.settings-item:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
.settings-item .checkmark {
    display: none;
    color: var(--accent-primary);
    font-weight: 800;
}
.settings-item.active {
    color: #fff;
}
.settings-item.active .checkmark {
    display: inline;
}

/* Sección Externa de Canales/Fuentes */
.match-external-sources-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}
.external-sources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
    gap: 12px;
}
.external-source-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-quick);
}
.external-source-card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-color-hover);
}
.external-source-card.active {
    border-color: var(--accent-primary);
    background: rgba(0, 255, 136, 0.03);
}
.ext-source-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: var(--accent-primary);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
.ext-source-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}
.ext-source-lang {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.external-source-card:hover .ext-source-lang {
    color: var(--text-secondary);
}
.external-source-card.active .ext-source-title {
    color: var(--accent-primary);
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ==========================================
   DESKTOP RESPONSIVE (PÁGINA PARTIDO)
   ========================================== */

@media (min-width: 768px) {
    /* Match Layout 1: Social Live — pantallas medianas (video arriba, chat abajo) */
    #app-container.match-layout-1 #match-view-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 24px;
    }
    #app-container.match-layout-1 .match-player-container {
        width: 100%;
    }
    #app-container.match-layout-1 #match-chat-panel {
        display: flex;
        max-height: 300px;
    }

    /* Match Layout 2: Stats Dominant */
    #app-container.match-layout-2 #match-view-container {
        display: flex;
        flex-direction: column;
    }
    #app-container.match-layout-2 .match-player-container {
        max-width: 900px;
        align-self: center;
    }
    #app-container.match-layout-2 #match-details-tabs {
        display: flex;
        max-width: 900px;
        width: 100%;
        align-self: center;
    }

    /* Match Layout 3: Multicam Director (Video izq, Cámaras columna derecha) */
    #app-container.match-layout-3 #match-view-container {
        display: grid;
        grid-template-columns: 1fr 240px;
        gap: 24px;
        padding: 24px;
    }
    #app-container.match-layout-3 .match-player-container {
        grid-column: 1 / 2;
        align-self: center;
    }
    #app-container.match-layout-3 #match-multicam-selector {
        display: flex;
        grid-column: 2 / 3;
    }
    #app-container.match-layout-3 .multicam-grid {
        grid-template-columns: 1fr;
    }
    #app-container.match-layout-3 .camera-thumb {
        aspect-ratio: 16/9;
    }

    /* Match Layout 4: Vertical (TikTok Centrado en Desktop) */
    #app-container.match-layout-4 #match-view-container {
        display: flex;
        justify-content: center;
        align-items: center;
        background: #040406;
        position: relative;
    }
    #app-container.match-layout-4 .match-player-container {
        width: 400px;
        height: 82vh;
    }
    #app-container.match-layout-4 .player-wrapper {
        width: 100%;
        height: 100%;
        border-radius: 16px;
        border: 4px solid var(--bg-surface-hover);
        position: relative;
    }
    #app-container.match-layout-4 #match-chat-panel {
        width: 100%;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0 0 12px 12px;
        z-index: 10;
        height: 220px;
    }

    /* Match Layout 5: Landscape Cine Completo */
    #app-container.match-layout-5 {
        grid-template-rows: 1fr;
        grid-template-columns: 1fr;
        grid-template-areas: "main";
    }
    #app-container.match-layout-5 #match-view-container {
        grid-area: main;
        padding: 0;
        max-height: 100vh;
    }

    /* Ajuste de señales externas a 4 columnas en escritorio */
    .external-sources-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================
   PANTALLAS GRANDES (>= 1200px) — Chat lateral
   ========================================== */
@media (min-width: 1200px) {
    #app-container.match-layout-1 #match-view-container {
        display: grid;
        grid-template-columns: 1fr 320px;
        grid-template-rows: auto 1fr;
        grid-template-areas: 
            "header chat"
            "player chat";
        gap: 24px;
        padding: 24px;
        max-height: calc(100vh - var(--header-height));
        height: calc(100vh - var(--header-height));
    }
    .match-header-bar {
        grid-area: header;
    }
    #app-container.match-layout-1 .match-player-container {
        grid-area: player;
        align-self: start;
    }
    #app-container.match-layout-1 #match-chat-panel {
        grid-area: chat;
        display: flex;
        height: 100%;
        max-height: none;
    }
}
