:root {
    /* Paleta SaaS Premium */
    --bg-base: #09090b;
    --panel-bg: rgba(24, 24, 27, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --accent: #6366f1; /* Indigo suave */
    --accent-hover: #4f46e5;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

/* Fondos ambientales sutiles */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
}
.bg-glow-purple {
    width: 40vw; height: 40vw;
    background: #6366f1;
    top: -10vw; left: -10vw;
}
.bg-glow-blue {
    width: 35vw; height: 35vw;
    background: #0ea5e9;
    bottom: -10vw; right: -10vw;
}

/* Layout Principal Grid */
.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 1000px;
    z-index: 1;
}

@media (min-width: 800px) {
    .dashboard {
        grid-template-columns: 1.2fr 1fr;
        grid-template-areas: 
            "left right"
            "bottom bottom";
    }
    .panel-left { grid-area: left; }
    .panel-right { grid-area: right; }
    .panel-bottom { grid-area: bottom; }
}

/* Paneles Glassmorphism Premium */
.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.panel-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- PANEL IZQUIERDO: POMODORO --- */
#activity-name {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--panel-border);
    color: var(--text-main);
    font-size: 1.2rem;
    text-align: center;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}
#activity-name:focus { border-color: var(--accent); }

.timer-display {
    font-size: clamp(4rem, 8vw, 6.5rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: -2px;
    margin-bottom: 2rem;
    font-variant-numeric: tabular-nums;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--text-main); color: var(--bg-base); }
.btn-primary:hover { background: #d4d4d8; }

.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text-main); border: 1px solid var(--panel-border); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

.btn-icon { padding: 0.8rem; background: transparent; color: var(--text-muted); font-size: 1.2rem; }
.btn-icon:hover { color: var(--text-main); }

.timer-settings {
    display: flex; justify-content: center; align-items: center; gap: 0.8rem; color: var(--text-muted);
}
.timer-settings input {
    background: rgba(0,0,0,0.3); border: 1px solid var(--panel-border);
    color: white; padding: 0.4rem; border-radius: 8px; width: 60px; text-align: center;
}

/* --- PANEL DERECHO: REPRODUCTOR --- */
.upload-btn {
    display: block; width: 100%; text-align: center;
    padding: 1rem; border: 1px dashed var(--panel-border);
    border-radius: 12px; color: var(--text-muted);
    cursor: pointer; transition: 0.2s; margin-bottom: 1.5rem;
}
.upload-btn:hover { border-color: var(--accent); color: var(--text-main); background: rgba(255,255,255,0.02); }

.player-container {
    background: rgba(0,0,0,0.2);
    padding: 1.5rem; border-radius: 16px;
    border: 1px solid var(--panel-border);
}

.track-info { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.track-icon {
    width: 48px; height: 48px; background: rgba(255,255,255,0.05);
    border-radius: 10px; display: flex; justify-content: center; align-items: center; font-size: 1.5rem;
}
.track-details { display: flex; flex-direction: column; overflow: hidden; }
#current-track-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#current-track-time { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

.music-controls { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.btn-music { background: transparent; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; transition: 0.2s;}
.btn-music:hover { color: var(--text-main); }
.play-btn { background: var(--text-main); color: var(--bg-base); width: 40px; height: 40px; border-radius: 50%; font-size: 1rem; display: flex; justify-content: center; align-items: center;}
.play-btn:hover { background: #d4d4d8; color: var(--bg-base); }

/* Custom Progress Bar estilo Spotify */
.progress-bar {
    -webkit-appearance: none; width: 100%; height: 4px;
    background: rgba(255,255,255,0.1); border-radius: 2px;
    outline: none; cursor: pointer; margin-bottom: 1rem;
}
.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none; width: 12px; height: 12px;
    border-radius: 50%; background: var(--text-main); transition: 0.1s;
}
.progress-bar:hover::-webkit-slider-thumb { transform: scale(1.2); }

.volume-control { display: flex; align-items: center; gap: 0.8rem; }
.volume-control .progress-bar { margin-bottom: 0; }

/* --- PANEL INFERIOR: TAREAS --- */
.todo-input-group { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
#todo-input {
    flex-grow: 1; background: rgba(0,0,0,0.3); border: 1px solid var(--panel-border);
    padding: 0.8rem 1rem; border-radius: 12px; color: var(--text-main);
    font-family: inherit; outline: none; transition: 0.2s;
}
#todo-input:focus { border-color: var(--accent); }

.todo-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.todo-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem; background: rgba(255,255,255,0.02);
    border: 1px solid transparent; border-radius: 12px; transition: 0.2s;
}
.todo-item:hover { background: rgba(255,255,255,0.04); border-color: var(--panel-border); }
.todo-item.completed { opacity: 0.5; }
.todo-item.completed span { text-decoration: line-through; }

.todo-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: var(--text-main); }
.todo-text { flex-grow: 1; font-size: 0.95rem; }
.btn-delete { background: transparent; border: none; color: #ef4444; cursor: pointer; opacity: 0.5; }
.todo-item:hover .btn-delete { opacity: 1; }