:root {
    --bg-color: #0b0e14;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --accent: #ef4444; 
    --glass: rgba(255, 255, 255, 0.1);
    --nav-height: 60px; 
    --footer-height: 70px; 
}

.light-theme {
    --bg-color: #ffffff;
    /* Semi-transparent white for the player card */
    --card-bg: rgba(255, 255, 255, 0.4); 
    --text-main: #0f172a;
    --text-dim: #64748b;
    --accent: #ef4444;
    /* More transparent glass for nav and about section */
    --glass: rgba(0, 0, 0, 0.04); 
}

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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

/* --- FULL SCREEN BACKGROUND SPECTRUM --- */
.spectrum-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    display: flex;
    align-items: flex-end; 
    justify-content: space-evenly;
    opacity: 0.35;
    pointer-events: none;
    padding: 0;
    margin: 0;
}

.bar {
    flex: 1;
    margin: 0 2px;
    height: 8%;
    background: linear-gradient(to top, var(--accent) 0%, #6a11cb 50%, #2575fc 100%);
    border-radius: 50px 50px 0 0;
    transform-origin: bottom;
    filter: blur(1px);
    box-shadow: 0 0 15px var(--accent);
    will-change: transform, height;
    transition: height 0.1s ease-out;
}

/* --- Theme Image Inversion --- */
.light-theme .logo-img { filter: invert(1)  brightness(0.93); }

/* --- Marquee Logic --- */
.marquee-container { width: 100%; overflow: hidden; white-space: nowrap; position: relative; margin: 10px 0; }
.current-track-display { display: inline-block; font-weight: bold; color: var(--accent); }
.animate-marquee { animation: marquee 10s linear infinite; padding-left: 100%; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* --- Layout --- */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-height); 
    z-index: 1000; display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%; background: var(--glass); backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-icon { height: 40px; width: auto; object-fit: contain; }
.theme-btn { padding: 8px 14px; border-radius: 8px; background: var(--accent); color: white; border: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem;}

.page-wrapper { margin-top: var(--nav-height); flex-grow: 1; display: flex; flex-direction: column; width: 100%; }
.main-wrapper { flex-grow: 1; display: flex; padding-top: 20px; width: 100%; max-width: 1200px; margin: 0 auto; }
.player-side, .details-side { flex: 1; display: flex; justify-content: center; padding: 1rem 2rem; width: 100%; }

.player-card {
    background: var(--card-bg); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 100%; max-width: 360px; padding: 2.5rem 2rem; border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.1); text-align: center; height: fit-content;
    position: relative;
}

#station-art { width: 100%; max-width: 240px; border-radius: 25px; transition: 0.3s; }
.image-container { position: relative; display: inline-block; width: 100%; }
.live-badge { position: absolute; top: 100px; right: 5px; background: #ef4444; color: white; padding: 4px 12px; border-radius: 6px; font-size: 0.7rem; font-weight: bold; animation: pulse 2s infinite; z-index: 5;}

@keyframes pulse { 50% { opacity: 0.5; } }
.timer { margin: 1.5rem 0; font-family: 'Courier New', monospace; font-size: 2.4rem; color: var(--accent); }

.controls { display: flex; align-items: center; justify-content: center; gap: 20px; }
.main-play-btn { width: 70px; height: 70px; border-radius: 50%; background: var(--accent); color: white; border: none; cursor: pointer; font-size: 1.5rem; }

.record-wrapper { display: flex; flex-direction: column; align-items: center; }
.record-btn { width: 45px; height: 45px; border-radius: 50%; background: #334155; color: #ef4444; border: none; cursor: pointer; font-size: 1.1rem; }
.record-btn.recording { background: #ef4444; color: white; animation: rec-pulse 1.5s infinite; }
@keyframes rec-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } }
.record-timer-display { display: none; font-size: 0.75rem; font-family: monospace; color: var(--accent); margin-top: 5px; font-weight: bold; }
.record-btn.recording + .record-timer-display { display: block; }

.volume-box { display: flex; align-items: center; gap: 10px; margin-top: 2rem; width: 100%; }
#volume { flex-grow: 1; accent-color: var(--accent); cursor: pointer; }

/* --- About Section --- */
.about-card-container { width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 1rem; }
.about-card { 
    background: var(--glass); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem; 
    border-radius: 20px; 
    text-align: left; 
    width: 100%; 
    border: 1px solid rgba(255,255,255,0.05);
}
.about-text { 
    line-height: 1.6; 
    color: var(--text-dim); 
    overflow-wrap: break-word; 
    word-wrap: break-word; 
    hyphens: auto; 
}

.footer { height: var(--footer-height); display: flex; justify-content: space-between; align-items: center; padding: 0 5%; background: var(--glass); border-top: 1px solid rgba(255,255,255,0.05); }
.footer .logo-img { height: 30px; width: auto; }
.copyright { font-size: 0.75rem; color: var(--text-dim); text-align: right; }

/* --- Mobile Fix Media Queries --- */
@media (max-width: 900px) { 
    .main-wrapper { flex-direction: column; align-items: center; } 
    .player-side, .details-side { width: 100%; padding: 1rem; }
    .about-card-container { max-width: 100%; }
    .timer { font-size: 2rem; }
    .navbar { padding: 0 15px; }
    .bar { margin: 0 1px; }
}