:root {
    /* Adjusted exactly to your NEXUS branding */
    --bg-color: #05070d; 
    --card-bg: rgba(15, 20, 30, 0.7);
    --primary-color: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --active-color: #10b981;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }

body {
    background: var(--bg-color);
    background-image: radial-gradient(circle at top right, #111827 0%, var(--bg-color) 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 30px 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

header { text-align: center; margin-bottom: 30px; }
header h1 { font-size: 2rem; font-weight: 800; background: linear-gradient(to right, #60a5fa, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: flex; align-items: center; justify-content: center; gap: 10px; letter-spacing: 1px;}
header p { color: var(--text-muted); font-size: 0.9rem; margin-top: 5px; }

.player-card { background: rgba(5, 7, 13, 0.6); border-radius: 20px; padding: 25px; text-align: center; margin-bottom: 25px; border: 1px solid rgba(255, 255, 255, 0.05); }

.status-badge { display: inline-block; padding: 4px 12px; background: rgba(255, 255, 255, 0.1); border-radius: 20px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 15px; text-transform: uppercase; font-weight: 600; }
.status-badge.playing { color: var(--active-color); background: rgba(16, 185, 129, 0.1); }
.status-badge.buffering { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.status-badge.error { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

#current-station-name { font-size: 1.5rem; margin-bottom: 20px; font-weight: 600; }

.visualizer { display: flex; justify-content: center; align-items: center; gap: 4px; height: 40px; margin-bottom: 25px; opacity: 0.3; transition: opacity 0.3s; }
.visualizer.active { opacity: 1; }
.visualizer span { display: block; width: 6px; height: 5px; background: var(--primary-color); border-radius: 3px; transition: height 0.1s ease; }
.visualizer.active span { animation: bounce 1.2s ease infinite alternate; }
.visualizer span:nth-child(1) { animation-delay: 0.1s; } .visualizer span:nth-child(2) { animation-delay: 0.3s; } .visualizer span:nth-child(3) { animation-delay: 0.6s; } .visualizer span:nth-child(4) { animation-delay: 0.2s; } .visualizer span:nth-child(5) { animation-delay: 0.8s; } .visualizer span:nth-child(6) { animation-delay: 0.4s; } .visualizer span:nth-child(7) { animation-delay: 0.7s; } .visualizer span:nth-child(8) { animation-delay: 0.2s; } .visualizer span:nth-child(9) { animation-delay: 0.5s; } .visualizer span:nth-child(10) { animation-delay: 0.1s; }

@keyframes bounce { 0% { height: 5px; } 100% { height: 40px; background: #60a5fa; box-shadow: 0 0 10px var(--primary-glow); } }

.controls { display: flex; justify-content: center; align-items: center; margin-bottom: 25px; }
.control-btn { background: var(--primary-color); color: white; border: none; width: 65px; height: 65px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; box-shadow: 0 10px 20px var(--primary-glow); transition: all 0.3s; display: flex; justify-content: center; align-items: center; }
.control-btn:disabled { background: #1e293b; box-shadow: none; color: #475569; cursor: not-allowed; }
.control-btn:not(:disabled):hover { transform: scale(1.1); }
.control-btn:not(:disabled):active { transform: scale(0.95); }

.volume-container { display: flex; align-items: center; gap: 15px; background: rgba(255, 255, 255, 0.03); padding: 10px 15px; border-radius: 12px; }
.volume-icon { color: var(--text-muted); font-size: 1rem; cursor: pointer; }
input[type=range] { flex-grow: 1; -webkit-appearance: none; background: transparent; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background: var(--primary-color); cursor: pointer; box-shadow: 0 0 10px var(--primary-glow); }

.station-list { display: flex; flex-direction: column; gap: 10px; max-height: 40vh; overflow-y: auto; padding-right: 5px; }
.station-list::-webkit-scrollbar { width: 6px; }
.station-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 3px; }
.station-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.station-item { display: flex; align-items: center; justify-content: space-between; padding: 15px; background: rgba(255, 255, 255, 0.03); border-radius: 12px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; }
.station-item:hover { background: rgba(255, 255, 255, 0.08); }
.station-item.active { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); }

.station-info { display: flex; align-items: center; gap: 15px; }
.station-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 10px; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; color: var(--primary-color); }
.station-item.active .station-icon { background: var(--primary-color); color: white; box-shadow: 0 0 15px var(--primary-glow); }
.station-name { font-weight: 600; font-size: 1.05rem; }

.station-actions { display: flex; align-items: center; gap: 10px; }
.playing-indicator { display: none; color: var(--active-color); }
.station-item.active .playing-indicator { display: block; }
.edit-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 5px; transition: color 0.2s; }
.edit-btn:hover { color: var(--primary-color); }

.add-station-btn { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 15px; background: rgba(255, 255, 255, 0.02); border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 12px; color: var(--text-muted); font-weight: 600; cursor: pointer; transition: all 0.2s; margin-top: 5px; }
.add-station-btn:hover { background: rgba(255, 255, 255, 0.05); color: white; border-color: var(--primary-color); }

/* Modal Styles */
.modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
.modal.active { display: flex; }
.modal-content { background: var(--bg-color); width: 100%; max-width: 400px; border-radius: 20px; padding: 25px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8); }
.modal-content h3 { margin-bottom: 20px; text-align: center; font-size: 1.2rem; }
.modal-content input { width: 100%; padding: 15px; margin-bottom: 15px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: white; outline: none; font-size: 1rem; }
.modal-content input:focus { border-color: var(--primary-color); }
.modal-buttons { display: flex; gap: 10px; }
.modal-buttons button { padding: 12px 20px; border-radius: 10px; border: none; font-weight: 600; cursor: pointer; transition: background 0.2s; color: white; }
.btn-primary { background: var(--primary-color); }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: #1f2937; }
.btn-secondary:hover { background: #374151; }
.btn-delete { background: #ef4444; padding: 12px !important; }
.btn-delete:hover { background: #dc2626; }