:root {
    /* --- FARBPALETTE (NEON & GLASS) --- */
    --color-bg-dark: #020c1b;
    --color-panel: rgba(23, 42, 69, 0.85); /* Glass Effekt Hintergrund */
    --color-primary: #64ffda;              /* Neon Cyan */
    --color-secondary: #8892b0;            /* Grau-Blau */
    --color-text: #e6f1ff;                 /* Weiß */
    --color-danger: #ff5f5f;               /* Rot für Fehler/Löschen */
    
    /* --- GRÖSSEN --- */
    --radius: 16px;
    --player-width: 700px;
    --player-height: 250px;
    
    --blur-val: 12px;
}

body {
    background: radial-gradient(circle at 50% 50%, #112240 0%, #020c1b 100%);
    color: var(--color-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

/* =========================================
   1. PLAYER STYLES
   ========================================= */

.rp-compact {
    width: var(--player-width);
    height: var(--player-height);
    background: var(--color-panel);
    backdrop-filter: blur(var(--blur-val));
    -webkit-backdrop-filter: blur(var(--blur-val));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8);
    display: flex;
    position: relative;
}

/* --- COVER (LINKS) --- */
.rp-side-cover {
    width: 250px;
    height: 250px;
    position: relative;
    flex-shrink: 0;
    z-index: 2;
}

/* Glow Effekt */
.cover-glow {
    position: absolute;
    top: 15%; left: 15%; right: 15%; bottom: 15%;
    border-radius: 50%;
    background: var(--color-primary);
    filter: blur(40px);
    opacity: 0;
    transition: opacity 0.5s;
    z-index: -1;
}
.rp-compact.playing .cover-glow {
    opacity: 0.4;
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(0.9); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

.rp-cover-img {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: var(--radius) 0 0 var(--radius);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

/* --- CONTROLS (RECHTS) --- */
.rp-side-controls {
    flex: 1;
    padding: 25px 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 5;
}

.info-top { 
    display: flex; 
    align-items: flex-start; 
    justify-content: space-between;
}

.song-title { 
    font-weight: 800; font-size: 1.4rem; color: white;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    max-width: 340px; text-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.artist-name { 
    color: var(--color-primary); font-size: 1rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 1px; margin-top: 5px;
}

/* Info Button */
.info-btn-large {
    font-size: 1.4rem; color: var(--color-secondary); cursor: pointer;
    margin-left: 15px; transition: all 0.2s;
}
.info-btn-large:hover {
    color: var(--color-primary); transform: scale(1.1);
    text-shadow: 0 0 10px var(--color-primary);
}

/* Controls Buttons */
.controls-row {
    display: flex; align-items: center; gap: 25px;
}

.btn-main {
    width: 64px; height: 64px;
    background: transparent; border: 2px solid var(--color-primary);
    border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; box-shadow: 0 0 15px rgba(100,255,218,0.1);
}
.btn-main:hover {
    background: rgba(100,255,218, 0.1);
    box-shadow: 0 0 25px rgba(100,255,218,0.4); transform: scale(1.05);
}
.btn-main svg { width: 24px; fill: var(--color-primary); }
#icon-play { margin-left: 4px; }

/* Volume Slider */
.vol-wrap {
    flex: 1; display: flex; align-items: center; gap: 15px;
}
.vol-slider {
    width: 100%; height: 6px; background: rgba(255,255,255,0.1);
    border-radius: 3px; appearance: none; outline: none;
}
.vol-slider::-webkit-slider-thumb {
    appearance: none; width: 16px; height: 16px;
    background: var(--color-primary); border-radius: 50%;
    cursor: pointer; transition: transform 0.1s;
}
.vol-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Footer & Viz */
.tech-footer {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-top: 15px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 15px;
}
.stream-select {
    background: transparent; color: var(--color-secondary); border: none;
    font-family: 'Courier New', monospace; font-size: 0.8rem; cursor: pointer; outline: none;
}
.stream-select option { background: #020c1b; } 

/* NEU: LAUFZEIT ANZEIGE */
.runtime-display {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(100, 255, 218, 0.3);
}

/* Mini Visualizer */
.mini-viz { display: flex; gap: 4px; height: 20px; align-items: flex-end; }
.v-bar {
    width: 4px; background: var(--color-secondary); border-radius: 2px; height: 3px;
    transition: height 0.1s;
}

.rp-compact.playing .v-bar {
    background: var(--color-primary); 
    animation-name: vizJump;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.v-bar:nth-child(1) { animation-duration: 0.5s; animation-delay: -0.2s; }
.v-bar:nth-child(2) { animation-duration: 0.7s; animation-delay: -0.5s; }
.v-bar:nth-child(3) { animation-duration: 0.6s; animation-delay: -0.1s; }
.v-bar:nth-child(4) { animation-duration: 0.8s; animation-delay: -0.3s; }

@keyframes vizJump { 
    0%, 100% { height: 3px; opacity: 0.5; } 
    50% { height: 20px; opacity: 1; } 
}

/* =========================================
   2. TECH MODAL
   ========================================= */
.rp-modal-overlay {
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 12, 27, 0.95);
    z-index: 999; 
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; 
    pointer-events: none;
    transition: opacity 0.3s;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}
.rp-modal-overlay.open { 
    opacity: 1; pointer-events: auto; 
}

.modal-box {
    background: rgba(10, 25, 47, 0.9);
    border: 1px solid var(--color-primary);
    padding: 25px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    width: 320px;
    box-shadow: 0 0 40px rgba(100,255,218,0.15);
    text-align: left;
}
.modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px; margin-bottom: 10px;
    color: var(--color-primary); font-weight: bold;
    display: flex; justify-content: space-between;
}
.tech-table { width: 100%; font-size: 0.85rem; color: var(--color-secondary); }
.tech-table td { padding: 4px 0; }
.tech-val { text-align: right; color: white; word-break: break-all; }

.close-tech {
    display: block; width: 100%; margin-top: 15px;
    background: rgba(100,255,218, 0.1); border: none; color: var(--color-primary);
    padding: 8px; cursor: pointer; font-family: 'Courier New', monospace; font-weight: bold;
}
.close-tech:hover { background: var(--color-primary); color: #000; }

/* =========================================
   3. ADMIN PANEL STYLES
   ========================================= */
.rp-admin-nav {
    background: var(--color-panel);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 30px;
}
.rp-admin-nav a { color: var(--color-text); text-decoration: none; margin-left: 20px; font-size: 0.9rem; transition: color 0.2s; }
.rp-admin-nav a:hover, .rp-admin-nav a.active { color: var(--color-primary); }

.rp-card {
    background: var(--color-panel);
    border-radius: 8px; padding: 20px; margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.05);
}

.rp-table { width: 100%; border-collapse: collapse; color: var(--color-text); }
.rp-table th { text-align: left; padding: 10px; border-bottom: 2px solid var(--color-primary); color: var(--color-primary); font-weight: 600; }
.rp-table td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }

.rp-input {
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: white;
    padding: 10px; border-radius: 4px; width: 100%; box-sizing: border-box; outline: none;
}
.rp-input:focus { border-color: var(--color-primary); }

.rp-btn {
    background: var(--color-primary); color: var(--color-bg-dark); border: none;
    padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold; text-decoration: none; display: inline-block; transition: opacity 0.2s;
}
.rp-btn:hover { opacity: 0.9; }
.rp-btn-danger { background: var(--color-danger); color: white; }
.rp-badge-on { color: #2ecc71; font-weight: bold; }
.rp-badge-off { color: #e74c3c; font-weight: bold; }

/* Admin Cover Grid */
.rp-cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 15px; margin-top: 20px; }
.rp-cover-item {
    background: rgba(0,0,0,0.2); border-radius: 8px; padding: 5px; text-align: center; position: relative;
    border: 1px solid rgba(255,255,255,0.05); transition: transform 0.2s;
}
.rp-cover-item:hover { transform: translateY(-2px); border-color: var(--color-primary); }
.rp-cover-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 4px; display: block; }
.rp-cover-item .delete-btn {
    position: absolute; top: -8px; right: -8px; background: var(--color-danger); color: white; border-radius: 50%; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    text-decoration: none; z-index: 10;
}

/* =========================================
   4. RESPONSIVE (HANDY & TABLET)
   ========================================= */
@media screen and (max-width: 768px) {
    :root {
        --player-width: 90%;
        --player-height: auto;
    }
    .rp-compact {
        flex-direction: column; height: auto; padding-bottom: 20px; margin: 20px 0;
    }
    .rp-side-cover { width: 100%; height: 300px; }
    .rp-cover-img { border-radius: var(--radius) var(--radius) 0 0; mask-image: none; -webkit-mask-image: none; }
    
    .rp-side-controls { padding: 20px; gap: 20px; }
    .song-title { font-size: 1.3rem; white-space: normal; max-width: 100%; }
    .controls-row { justify-content: space-between; gap: 15px; }
    
    .tech-footer { flex-wrap: wrap; gap: 10px; }
    .stream-select { font-size: 0.7rem; max-width: 150px; }
    
    /* Timer auf Handy */
    .runtime-display { width: 100%; text-align: center; order: 3; margin-bottom: 10px; }
    
    .modal-box { width: 85%; }
}