:root {
    --bg: #0d0d0f;
    --panel: #17171a;
    --panel-2: #1f1f23;
    --accent: #e63946;
    --text: #f2f2f2;
    --text-dim: #9a9a9f;
    --border: #2a2a2f;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ---------- LOGIN ---------- */
.login-body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #1a1a1f, #050506);
}
.login-box {
    background: var(--panel);
    padding: 40px 36px;
    border-radius: 16px;
    width: 340px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.login-logo { max-width: 110px; margin-bottom: 18px; }
.login-box h1 { font-size: 20px; margin: 0 0 6px; }
.login-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    font-size: 14px;
}
.login-form button {
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
}
.login-form button:hover { filter: brightness(1.1); }
.login-error {
    background: rgba(230,57,70,.15);
    color: #ff9aa2;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}

/* ---------- WELCOME ---------- */
.welcome-body {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.welcome-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.welcome-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.85));
    z-index: 1;
}
.welcome-content {
    position: relative;
    z-index: 2;
    max-width: 560px;
    text-align: center;
    padding: 20px;
}
.welcome-logo { max-width: 130px; margin-bottom: 20px; }
.welcome-content h1 { font-size: 32px; margin-bottom: 16px; }
.welcome-content p { color: #ddd; line-height: 1.6; margin-bottom: 28px; font-size: 16px; }
.btn-start {
    padding: 14px 40px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.btn-start:hover { filter: brightness(1.1); }

/* ---------- APP LAYOUT ---------- */
.app-body { height: 100vh; overflow: hidden; }
.app-layout {
    display: flex;
    height: 100vh;
}

/* Listado - 1/4 pantalla */
.song-list {
    width: 25%;
    min-width: 280px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.song-list-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
.mini-logo { width: 30px; height: 30px; object-fit: contain; }

#songUl { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }

.song-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    cursor: default;
}
.song-item.active-song { background: var(--panel-2); }

.song-play-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 13px;
}
.song-title { flex: 1; font-size: 14px; min-width: 90px; }

.song-ratings { display: flex; gap: 4px; width: 100%; justify-content: flex-end; }
.rate-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 7px;
    cursor: pointer;
    font-size: 15px;
    opacity: .5;
    transition: all .15s;
}
.rate-btn:hover { opacity: 1; }
.rate-btn.active {
    opacity: 1;
    border-color: var(--accent);
    background: rgba(230,57,70,.15);
}

.progress-info {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-dim);
}
.logout-link { color: var(--text-dim); text-decoration: none; }
.logout-link:hover { color: var(--text); }

/* Zona principal */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.video-wrap {
    position: relative;
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#mainVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.video-placeholder {
    color: var(--text-dim);
    font-size: 15px;
}
.lyrics-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,.65), transparent 45%);
    text-align: center;
    font-size: 20px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.8);
    pointer-events: none;
    overflow-y: auto;
}

.player-bar {
    background: var(--panel);
    border-top: 1px solid var(--border);
    padding: 12px 24px;
}
.player-info { font-size: 14px; margin-bottom: 8px; color: var(--text-dim); }
.player-controls { display: flex; align-items: center; gap: 14px; }
#playPauseBtn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    flex-shrink: 0;
}
#seekBar { flex: 1; accent-color: var(--accent); }
#timeLabel { font-size: 12px; color: var(--text-dim); min-width: 90px; text-align: right; }

/* Responsive */
@media (max-width: 800px) {
    .app-layout { flex-direction: column; }
    .song-list { width: 100%; min-width: unset; max-height: 45vh; }
    .video-wrap { min-height: 260px; }
}
