:root {
    /* 2015 Material Design / Flat UI Tokens */
    --bg-color: #F5F5F5;
    --card-bg: #FFFFFF;
    
    --primary-blue: #2196F3;
    --primary-blue-hover: #1E88E5;
    
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-hint: #BDBDBD;
    
    --divider: #E0E0E0;
    
    --shadow-soft: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    
    --font-stack: 'Roboto', 'Open Sans', 'Helvetica Neue', sans-serif;
    
    /* Animation Tokens */
    --curve-swift: cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    font-family: var(--font-stack);
    font-size: 14px;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Background - No Textures */
#desktop-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--bg-color);
    transition: background 0.4s var(--curve-swift);
}

#desktop {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#desktop.learn-mode-active ~ #desktop-bg,
body.learn-mode-active #desktop-bg {
    background: #EFEFEF; /* Slightly darker flat grey */
}

/* Era Label */
.era-label {
    position: absolute;
    top: 40px;
    left: 40px;
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Mode Toggle */
.mode-toggle {
    position: absolute;
    top: 40px;
    right: 40px;
    display: flex;
    z-index: 100;
    background: transparent;
    border-radius: 4px;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 10px 24px;
    font-family: var(--font-stack);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.3s var(--curve-swift);
    outline: none;
}

.toggle-btn:hover {
    color: var(--text-primary);
}

/* Material Underline Animation */
.toggle-btn::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 10%;
    width: 80%;
    height: 2px;
    background-color: var(--primary-blue);
    transform: scaleX(0);
    transition: transform 0.3s var(--curve-swift);
}

.toggle-btn.active {
    color: var(--primary-blue);
}

.toggle-btn.active::after {
    transform: scaleX(1);
}

/* Layout Wrapper */
#layout-wrapper {
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: center;
    align-items: center; /* Ensures player vertically centers exactly in the middle */
}

/* Base Window / Card Style */
.window {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* To handle flat borders cleanly */
}

/* Title Bar - Stripped entirely of heavy decoration */
.title-bar {
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 0 32px;
    user-select: none;
}

.title-icon {
    display: none; /* Removed for flat minimalism */
}

.title-left {
    display: flex;
    align-items: center;
}

.title-text {
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-hint);
}

.window-btn.close, .window-btn.maximize, .window-btn.minimize {
    display: none; /* Abstracted away, interfaces rarely needed manual windowing in simple player contexts by 2015 */
}

/* --- MUSIC PLAYER --- */
#player-window {
    width: 600px;
    padding-bottom: 24px;
    transition: transform 0.5s var(--curve-swift), opacity 0.5s var(--curve-swift);
    transform-origin: center right;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.window-content {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
}

/* Display Panel */
.display-panel {
    background: transparent; /* No container */
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    padding: 0;
}

.display-main {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
}

.time-display {
    font-size: 4.5rem;
    line-height: 1;
    font-weight: 300;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 16px;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.song-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metadata {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Equalizer - Removed from 2015 era for simplicity, but if the DOM dictates it, make it minimalist flat bars */
.equalizer {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    width: 20%;
    margin-bottom: 8px;
}

.bar {
    width: 6px;
    background-color: var(--divider);
    border-radius: 4px 4px 0 0;
}

.playing .bar {
    background-color: var(--primary-blue);
}

@keyframes eqFlat {
    0% { height: 10%; }
    50% { height: 100%; }
    100% { height: 10%; }
}

.playing .bar-1 { animation: eqFlat 0.8s ease-in-out infinite; }
.playing .bar-2 { animation: eqFlat 0.6s ease-in-out infinite 0.1s; }
.playing .bar-3 { animation: eqFlat 0.7s ease-in-out infinite 0.2s; }
.playing .bar-4 { animation: eqFlat 0.5s ease-in-out infinite 0.3s; }
.playing .bar-5 { animation: eqFlat 0.9s ease-in-out infinite 0.4s; }
.playing .bar-6 { animation: eqFlat 0.6s ease-in-out infinite 0.5s; }

/* Progress Bar */
.progress-container {
    margin-bottom: 32px;
}

.progress-track {
    background-color: var(--divider);
    height: 4px; /* Thin line */
    width: 100%;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    background-color: var(--primary-blue);
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.1s linear;
    position: relative;
}

/* Controls */
.controls-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-bottom: 16px;
}

.control-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.2s ease, transform 0.2s ease;
    outline: none;
}

.control-btn:hover {
    color: var(--text-primary);
}

.control-btn:active {
    transform: scale(0.95); /* Smooth feedback */
}

/* Material Floating Action Button (FAB) aesthetic for Play */
#ctrl-play {
    width: 64px;
    height: 64px;
    background-color: var(--primary-blue);
    color: #FFF;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
    font-size: 2rem;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#ctrl-play:hover {
    background-color: var(--primary-blue-hover);
    color: #FFF;
    box-shadow: 0 6px 14px rgba(33, 150, 243, 0.4);
    transform: translateY(-2px);
}

#ctrl-play:active, #ctrl-play.active.pressed {
    background-color: #1976D2;
    box-shadow: 0 2px 5px rgba(33, 150, 243, 0.4);
    transform: translateY(0);
}

.icon-play {
    pointer-events: none;
}

/* Status Bar */
.status-bar {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-hint);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- LEARN PANEL --- */
#learn-panel {
    position: absolute;
    left: 0;
    top: 50%; /* Center relative to wrapper */
    width: 500px; /* Thinner and cleaner */
    height: auto;
    max-height: 75vh;
    overflow-y: auto; /* Subdued Scroll */
    transform: translate(-40px, -50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--curve-swift);
    z-index: 10;
}

/* Subtle flat scrollbar */
#learn-panel::-webkit-scrollbar { width: 6px; }
#learn-panel::-webkit-scrollbar-track { background: transparent; }
#learn-panel::-webkit-scrollbar-thumb { background: #E0E0E0; border-radius: 4px; }

#layout-wrapper.learn-mode #learn-panel {
    transform: translate(0, -50%);
    opacity: 1;
    visibility: visible;
}

#layout-wrapper.learn-mode #player-window {
    transform: scale(0.85) translateX(260px); /* Smooth reduction and precise balance shift */
}

.learn-content {
    background: transparent;
    flex-grow: 1;
    padding: 0 32px 32px 32px;
}

.learn-header {
    margin-top: 40px;
    margin-bottom: 16px;
}

.learn-header h3 {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.principles-list {
    list-style: none;
    margin-bottom: 24px;
}

.principles-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.bullet {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-right: 12px;
    line-height: 1.2;
}

.context-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0px;
    color: var(--text-secondary);
}

.highlight-box {
    background-color: rgba(33, 150, 243, 0.05); /* Very subtle primary tint */
    padding: 24px;
    border-radius: 8px;
    margin-top: 24px;
    margin-bottom: 32px;
    border-left: 4px solid var(--primary-blue);
}

.highlight-label {
    font-size: 0.85rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.highlight-text {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 400;
    line-height: 1.4;
}

.learn-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    margin-bottom: 16px;
}

.nav-lesson-link {
    text-decoration: none;
}

.prev-btn, .next-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-stack);
    color: var(--primary-blue);
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, text-decoration 0.2s ease;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(33, 150, 243, 0.08); /* Flat Material hover standard */
    color: var(--primary-blue-hover);
    text-decoration: underline;
}

.prev-btn:active, .next-btn:active {
    background-color: rgba(33, 150, 243, 0.16);
}

/* External Navigation */
.navigation-panel {
    position: absolute;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.nav-buttons {
    display: flex;
    gap: 8px;
}

.nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: none;
    box-shadow: var(--shadow-soft);
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s var(--curve-swift), color 0.2s var(--curve-swift), box-shadow 0.2s var(--curve-swift);
}

.nav-btn:hover {
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.nav-text {
    color: var(--text-hint);
    font-size: 0.9rem;
    font-weight: 400;
}
