:root {
    --primary: #6c5ce7;
    --primary-dark: #5b4cdb;
    --secondary: #00cec9;
    --background: #0a0a0f;
    --surface: #1a1a2e;
    --surface-light: #252540;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e74c3c;
    --gradient: linear-gradient(135deg, #6c5ce7, #a855f7, #ec4899);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Main Radio Player */
.radio-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.visualizer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

#visualizerCanvas {
    width: 100%;
    height: 100%;
}

.station-info {
    text-align: center;
    margin-bottom: 30px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--danger);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 15px;
    animation: glow 2s ease-in-out infinite;
}

.pulse {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px rgba(231, 76, 60, 0.5); }
    50% { box-shadow: 0 0 20px rgba(231, 76, 60, 0.8); }
}

.station-info h1 {
    font-size: 2rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-muted);
    margin-top: 5px;
}

.album-art {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(108, 92, 231, 0.3);
    margin-bottom: 30px;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.album-art:hover img {
    transform: scale(1.05);
}

.playing-animation {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
    opacity: 0;
    transition: opacity 0.3s;
}

.playing-animation.active {
    opacity: 1;
}

.playing-animation span {
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
    animation: soundBar 0.5s ease-in-out infinite alternate;
}

.playing-animation span:nth-child(1) { height: 10px; animation-delay: 0s; }
.playing-animation span:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.playing-animation span:nth-child(3) { height: 15px; animation-delay: 0.2s; }
.playing-animation span:nth-child(4) { height: 25px; animation-delay: 0.3s; }
.playing-animation span:nth-child(5) { height: 12px; animation-delay: 0.4s; }

@keyframes soundBar {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

.song-info {
    text-align: center;
    margin-bottom: 25px;
}

.song-info h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.song-info p {
    color: var(--text-muted);
}

.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.progress-container span {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--surface-light);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.control-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: var(--gradient);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.5);
}

.control-btn:active {
    transform: scale(0.95);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 250px;
    margin-bottom: 25px;
}

.volume-control i {
    color: var(--text-muted);
}

.volume-control input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: var(--surface-light);
    border-radius: 3px;
    outline: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.volume-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.listeners-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 25px;
}

.listeners-count i {
    color: var(--secondary);
}

.up-next {
    width: 100%;
    background: var(--surface);
    border-radius: 15px;
    padding: 20px;
}

.up-next h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.next-song {
    display: flex;
    flex-direction: column;
}

.next-title {
    font-weight: 600;
}

.next-artist {
    font-size: 14px;
    color: var(--text-muted);
}

.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s;
}

.admin-link:hover {
    background: var(--surface-light);
    color: var(--text);
    transform: rotate(90deg);
}

/* Admin Styles */
.admin-container {
    min-height: 100vh;
    padding: 20px;
}

.login-panel {
    max-width: 400px;
    margin: 100px auto;
    background: var(--surface);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.login-panel h1 {
    margin-bottom: 30px;
    color: var(--primary);
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    background: var(--surface-light);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: #333;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-control {
    background: var(--surface-light);
    color: var(--text);
    flex-direction: column;
    padding: 20px;
}

.btn-control.btn-large {
    padding: 30px 40px;
    font-size: 20px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.btn-small {
    padding: 10px 15px;
    font-size: 14px;
}

.error-message {
    color: var(--danger);
    margin-top: 15px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: 20px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--text);
}

.admin-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--surface-light);
}

.admin-header h1 {
    color: var(--primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.panel {
    background: var(--surface);
    border-radius: 15px;
    padding: 25px;
}

.panel h2 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: var(--surface-light);
    border-radius: 8px;
}

.status-item .label {
    color: var(--text-muted);
}

.status-item .value {
    font-weight: 600;
}

.playback-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.seek-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.time-inputs input {
    width: 60px;
    padding: 10px;
    background: var(--surface-light);
    border: none;
    border-radius: 8px;
    color: var(--text);
    text-align: center;
    font-size: 16px;
}

.time-inputs span {
    font-size: 20px;
    color: var(--text-muted);
}

.quick-seek {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.playlist-controls {
    margin-bottom: 15px;
}

.playlist {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.playlist li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--surface-light);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.playlist li:hover {
    background: var(--primary-dark);
}

.playlist li.active {
    background: var(--primary);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
}

.playlist li .song-number {
    width: 30px;
    color: var(--text-muted);
}

.playlist li .song-details {
    flex: 1;
}

.playlist li .song-details .title {
    font-weight: 600;
}

.playlist li .song-details .artist {
    font-size: 12px;
    color: var(--text-muted);
}

.playlist li .song-duration {
    color: var(--text-muted);
}

.playlist li .song-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.playlist li .song-actions button {
    padding: 5px 10px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 5px;
    color: var(--text);
    cursor: pointer;
}

.playlist li .song-actions button:hover {
    background: rgba(255,255,255,0.2);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .playback-controls {
        flex-wrap: wrap;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}