:root {
    --bg-color: #121212;
    --sidebar-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --accent-color: #2e7d32; /* Verde Destaque */
    --hover-color: #2d2d2d;
    --border-color: #333;
}

* { box-sizing: border-box; }

body { 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    margin: 0; 
    padding: 0;
    height: 100dvh; /* Altura dinâmica para mobile */
    overflow: hidden; 
}

/* LAYOUT PRINCIPAL (Desktop First) */
.app-layout {
    display: grid;
    grid-template-columns: 300px 1fr; /* 300px Sidebar | Resto Player */
    height: 100%;
    width: 100%;
}

/* --- BARRA LATERAL --- */
.sidebar {
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 15px;
}

.sidebar h2 {
    font-size: 1.1rem;
    margin: 10px 0 20px 0;
    color: #fff;
    font-weight: 600;
}

.sidebar-btn {
    background: transparent;
    color: #bbb;
    border: none;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 8px;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    width: 100%;
}

.sidebar-btn:hover { background-color: var(--hover-color); color: #fff; }
.sidebar-btn.active { 
    background-color: var(--accent-color); 
    color: #fff; 
    font-weight: 600; 
}

/* --- ÁREA DO PLAYER --- */
.content-area {
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
    position: relative;
}

#player-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* SPINNER DE CARREGAMENTO (Overlay) */
.spinner-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.spinner {
    width: 50px; height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Títulos e Botões */
#player-title { margin-top: 20px; font-size: 1.4rem; }
.controls-bar { display: flex; justify-content: flex-end; margin-top: 15px; }

.btn-control {
    padding: 8px 16px; border-radius: 20px;
    font-size: 13px; border: none; cursor: pointer;
    font-weight: 600; transition: background 0.3s;
}
.btn-cc-off { background: #333; color: #aaa; }
.btn-cc-on { background: var(--accent-color); color: #fff; }

#placeholder-message { text-align: center; color: #555; font-size: 1.2rem; }
.hidden { display: none !important; }

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr; /* Player Auto | Lista Resto */
    }
    .content-area {
        order: -1; /* Joga o player para o TOPO visualmente */
        padding: 0;
        border-bottom: 1px solid var(--border-color);
        background: #000;
        justify-content: flex-start;
        min-height: auto;
    }
    .video-wrapper { border-radius: 0; }
    #player-title { font-size: 1.1rem; padding: 0 15px; margin-bottom: 15px; }
    .controls-bar { padding-right: 15px; margin-top: 10px; }
    .sidebar { border-right: none; height: 100%; }
}