:root {
    --primary-color: #e30022; 
    --bg-overlay: rgba(20, 20, 20, 0.75);
    --text-main: #ffffff;
    --text-sub: #adb5bd;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    margin: 0; padding: 0;
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background-color: #111;
    background-image: url('/static/img/background.jpg'); 
    background-size: cover; background-position: center; background-attachment: fixed;
    overflow-x: hidden;
}

body.login-page {
    /* Vervang 'login-bg.jpg' door de naam van jouw bestand */
    background-image: url('/static/img/login-bg.png');
    
    /* Optioneel: als je wilt dat de login bg niet meescrolt of anders uitlijnt */
    background-position: center bottom; /* Bijvoorbeeld focussen op de weg/fietsen */
}

.background-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); z-index: 0;
}

/* --- LIGHTNING EFFECT --- */
.lightning-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(to bottom, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 80%);
    opacity: 0; pointer-events: none; z-index: 1;
    mix-blend-mode: overlay; transition: opacity 0.1s ease-out;
}
.lightning-active { opacity: 0.8; }

/* --- HEADER & LOGO --- */
.station-header {
    text-align: center; margin-bottom: 20px; margin-top: 15px; 
    display: flex; flex-direction: column; align-items: center;
}
.logo-img {
    width: 320px; max-width: 100%; height: auto; display: block;
    
    /* AANGEPAST: margin-left en margin-right op 'auto' zetten centreert een block element */
    margin: -50px auto -45px auto; 
    
    position: relative; z-index: 2;
    filter: drop-shadow(0 0 15px rgba(227, 0, 34, 0.5));
}
.sub-font {
    font-family: var(--font-main); font-weight: 700; font-size: 0.7rem; 
    letter-spacing: 4px; color: #fff; text-transform: uppercase;
    opacity: 0.6; margin-top: 5px;
}

/* --- PLAYER CARD --- */
.player-card {
    position: relative; /* Nodig voor de logout knop positionering */
    z-index: 10;
    background-color: var(--bg-overlay);
    width: 90%; max-width: 450px;
    padding: 30px; border-radius: 16px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main); margin: 20px 0;
}

/* --- LOGOUT KNOP --- */
.logout-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    cursor: pointer;
    z-index: 100;
    color: white;
}
.logout-btn:hover { opacity: 1; }
.logout-btn svg {
    width: 100%; height: 100%;
    fill: currentColor;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
}

/* --- ALBUM ART & INFO --- */
.album-art {
    width: 100%;
    padding-bottom: 100%; /* Forceert vierkant aspect-ratio */
    height: 0;
    background-size: cover; background-position: center;
    border-radius: 12px; margin-bottom: 25px;
    background-color: #222;
}

.track-info { margin-bottom: 20px; text-align: center; }
.track-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 5px; line-height: 1.2; }
.track-artist { font-size: 1rem; color: var(--text-sub); font-weight: 500;}

/* --- PROGRESS & CONTROLS --- */
.progress-container {
    display: flex; align-items: center; gap: 12px; margin-bottom: 5px; 
    font-size: 0.8rem; color: var(--text-sub); font-variant-numeric: tabular-nums;
}
.progress-bar-bg {
    flex-grow: 1; height: 4px; background: rgba(255,255,255,0.15); border-radius: 10px; overflow: hidden;
}
.progress-bar-fill {
    height: 100%; background: var(--primary-color); width: 0%; transition: width 1s linear;
}
.time-detail { text-align: center; font-size: 0.75rem; color: var(--text-sub); margin-bottom: 25px; }

.controls { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px;}
.play-btn {
    background: var(--primary-color); border: none; color: white; width: 60px; height: 60px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.play-btn svg { width: 24px; height: 24px; fill: white; }
.volume-container { display: flex; align-items: center; gap: 10px; color: var(--text-sub); }
.volume-container svg { width: 18px; height: 18px; fill: var(--text-sub); }
input[type="range"] { accent-color: var(--primary-color); cursor: pointer; }

/* --- DASHBOARD & LISTS --- */
.dashboard-grid {
    display: grid; grid-template-columns: 1fr; gap: 10px;
    margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;
}
.song-grid-container {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%;
}
@media (max-width: 350px) {
    .song-grid-container { grid-template-columns: 1fr; } 
}

.section-header { 
    margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; 
    font-size: 0.95rem; font-weight: 700; color: var(--primary-color);
    letter-spacing: 1px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding-bottom: 4px;
}
.section-label {
    font-size: 0.95rem; text-transform: uppercase; color: var(--primary-color); font-weight: 700; letter-spacing: 1px;
}

.track-item-small {
    display: flex; align-items: center; background: rgba(255,255,255,0.05); 
    padding: 8px; border-radius: 6px; width: 100%; box-sizing: border-box; overflow: hidden;
}
.art-mini {
    width: 38px; height: 38px; border-radius: 3px; background-size: cover; background-position: center;
    background-color: #333; margin-right: 10px; flex-shrink: 0;
}
.info-mini { display: flex; flex-direction: column; justify-content: center; width: 100%; min-width: 0; }
.title-mini { 
    font-size: 0.85rem; font-weight: 600; color: #fff;
    white-space: normal; overflow: visible; text-overflow: clip; word-break: break-word; line-height: 1.3;
}
.artist-mini { 
    font-size: 0.75rem; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
}
.empty-state { font-size: 0.7rem; color: rgba(255,255,255,0.2); font-style: italic; text-align: center; padding: 10px; }

/* --- HISTORY EXPAND --- */
.expand-btn {
    background: rgba(255, 255, 255, 0.1); border: none; color: white; cursor: pointer;
    width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
}
.expand-btn svg { width: 14px; height: 14px; fill: currentColor; }
.expanded-list { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.05); }
.expanded-list.show { display: block; }

/* --- FOOTER & LINKS --- */
.footer-info {
    text-align: center; padding-bottom: 20px; max-width: 800px; margin: 0 auto; position: relative; z-index: 100;
}
.footer-info p {
    color: rgba(255, 255, 255, 0.6); font-size: 12px; margin: 0 0 5px 0; text-shadow: 0px 1px 3px rgba(0, 0, 0, 1);
}
.stream-link {
    background: none; border: none; padding: 0; font-size: 13px; font-weight: bold;
    color: #ffffff; text-decoration: underline; text-shadow: 0px 1px 3px rgba(0, 0, 0, 1);
    transition: color 0.2s ease;
}
.stream-link:hover { color: #E50914; text-decoration: none; cursor: pointer; }

/* --- LOGIN SPECIFICS --- */
.login-card {
    background: rgba(10, 10, 10, 0.85); /* Donkerder voor login */
    backdrop-filter: blur(10px);
    padding: 40px; border-radius: 12px;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
    text-align: center; max-width: 400px; width: 90%;
    position: relative; z-index: 2; margin-top: 20px;
}

.status-text {
    color: #ff4444; font-size: 0.8rem; letter-spacing: 2px;
    margin-bottom: 20px; text-transform: uppercase; font-weight: bold;
    animation: pulse 2s infinite;
}

.login-form { display: flex; flex-direction: column; gap: 15px; width: 100%; margin-top: 20px; }

.login-input {
    width: 100%; box-sizing: border-box; /* Belangrijk voor padding */
    padding: 12px; margin: 5px 0;
    background: rgba(0, 0, 0, 0.5); border: 1px solid #444;
    color: white; border-radius: 4px; font-family: inherit;
    transition: all 0.3s ease;
}
.login-input:focus {
    outline: none; border-color: #ff0000; box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.login-btn {
    width: 100%; padding: 12px; margin-top: 10px;
    background: #cc0000; color: white; border: none; border-radius: 4px;
    font-weight: bold; cursor: pointer; text-transform: uppercase;
    letter-spacing: 1px; transition: all 0.3s ease;
}
.login-btn:hover { background: #ff0000; box-shadow: 0 0 15px #ff0000; }

.err-msg {
    color: #ff4444; background: rgba(50, 0, 0, 0.5); padding: 10px;
    border-radius: 6px; font-size: 0.9rem; margin-bottom: 10px; border: 1px solid #ff4444;
}

.legal-footer {
    margin-top: 40px; font-size: 10px; color: rgba(255, 255, 255, 0.4);
    text-align: center; max-width: 600px; line-height: 1.4; z-index: 2;
    text-shadow: 1px 1px 2px black;
}

@keyframes pulse {
    0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; }
}