/* ========================================
   Zen — Midnight Theme
   Ambient music player for night listening
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #121212;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #f59e0b;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fbbf24;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

/* --- Layout --- */
main {
    flex: 1;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #e0e0e0;
}

.logo:hover {
    color: #f59e0b;
}

.nav-desktop {
    display: flex;
    gap: 1.5rem;
}

.nav-desktop a {
    color: #888;
    font-size: 0.9rem;
}

.nav-desktop a:hover {
    color: #e0e0e0;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #666;
    font-size: 0.85rem;
}

footer .subtle {
    margin-top: 0.5rem;
}

footer a {
    color: #888;
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 1.5rem 0 2rem;
}

.hero h1 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.tagline {
    color: #888;
}

/* --- Tabs --- */
.tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: #1a1a1a;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.tab:hover {
    color: #e0e0e0;
}

.tab.active {
    background: #f59e0b;
    color: #121212;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- Player Container --- */
.player-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- Now Playing --- */
.now-playing {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: #1a1a1a;
    border-radius: 16px;
}

.track-art {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    border-radius: 12px;
}

.track-info h2 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.track-mood {
    color: #888;
    font-size: 0.9rem;
}

/* --- Progress Bar --- */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 0.5rem;
}

.progress-container span {
    font-size: 0.8rem;
    color: #888;
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

/* --- Controls --- */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: #e0e0e0;
    background: #2a2a2a;
}

.control-btn.active {
    color: #f59e0b;
}

.play-btn {
    background: #f59e0b;
    color: #121212;
    width: 64px;
    height: 64px;
}

.play-btn:hover {
    background: #fbbf24;
    color: #121212;
    transform: scale(1.05);
}

/* --- Volume --- */
.volume-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    color: #888;
}

.volume-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #2a2a2a;
    border-radius: 3px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #f59e0b;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #f59e0b;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* --- Track List --- */
.track-list {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1.5rem;
}

.track-list h3 {
    color: #888;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.track-list ul {
    list-style: none;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.track-item:hover {
    background: #2a2a2a;
}

.track-item.active {
    background: rgba(245, 158, 11, 0.15);
}

.track-item.active .track-name {
    color: #f59e0b;
}

.track-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.track-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.track-name {
    color: #e0e0e0;
    font-weight: 500;
}

.track-duration {
    color: #666;
    font-size: 0.85rem;
}

.empty {
    color: #666;
    text-align: center;
    padding: 2rem 0;
}

/* --- Shortcuts Hint --- */
.shortcuts-hint {
    text-align: center;
    padding: 1rem;
    color: #555;
    font-size: 0.75rem;
}

.shortcuts-hint span {
    display: inline-block;
    background: #2a2a2a;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin: 0 0.25rem;
}

/* --- Loop Status --- */
.loop-status {
    text-align: center;
    padding: 0.75rem;
    font-size: 0.8rem;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    html {
        font-size: 16px;
    }
    
    main {
        padding: 1rem;
    }
    
    .now-playing {
        padding: 1rem;
    }
    
    .track-art {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .controls {
        gap: 0.5rem;
    }
    
    .play-btn {
        width: 56px;
        height: 56px;
    }
    
    .shortcuts-hint {
        display: none;
    }
}
