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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-app-region: drag;
}

.player-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    -webkit-app-region: no-drag;
}

.station-info {
    text-align: center;
    margin-bottom: 30px;
}

.station-logo {
    font-size: 48px;
    margin-bottom: 10px;
}

h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 5px;
}

.tagline {
    color: #666;
    font-size: 14px;
}

.album-artwork-container {
    text-align: center;
    margin-bottom: 25px;
}

.album-artwork {
    width: 200px;
    height: 200px;
    min-width: 200px;
    min-height: 200px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    transition: all 0.4s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: block;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.album-artwork img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    animation: fadeIn 0.4s ease;
    display: block !important;
    flex-shrink: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.album-artwork.loading::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.artwork-placeholder {
    font-size: 64px;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.artwork-credit {
    font-size: 9px;
    color: #bbb;
    text-align: center;
    margin-top: 5px;
}

.now-playing {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.now-playing-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 8px;
}

.track-info {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.artist {
    color: #667eea;
    font-weight: 600;
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
}

.title {
    color: #333;
    font-size: 18px;
    display: block;
    font-weight: 500;
}

.last-updated {
    font-size: 10px;
    color: #aaa;
    margin-top: 8px;
    font-style: italic;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#playBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#playBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

#playBtn:active {
    transform: translateY(0);
}

#playBtn.playing {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

#playBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.volume-icon {
    font-size: 20px;
}

input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.vu-meters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 12px;
    justify-content: center;
}

.vu-meter-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vu-label {
    font-size: 14px;
    font-weight: 700;
    color: #888;
    width: 20px;
    text-align: center;
}

.vu-meter {
    display: flex;
    flex-direction: column-reverse;
    gap: 3px;
    height: 150px;
    justify-content: flex-start;
}

.led-bar {
    width: 40px;
    height: 12px;
    border-radius: 2px;
    background: #1a1a1a;
    border: 1px solid #333;
    transition: all 0.05s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.led-bar.active.led-green {
    background: linear-gradient(90deg, #00ff00 0%, #00cc00 100%);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border-color: #00ff00;
}

.led-bar.active.led-yellow {
    background: linear-gradient(90deg, #ffff00 0%, #ffcc00 100%);
    box-shadow: 0 0 8px rgba(255, 255, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border-color: #ffff00;
}

.led-bar.active.led-red {
    background: linear-gradient(90deg, #ff0000 0%, #cc0000 100%);
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border-color: #ff0000;
}

.led-bar.active.led-green.peak {
    box-shadow: 0 0 16px rgba(0, 255, 0, 1), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    filter: brightness(1.5);
    transition: filter 0.3s ease, box-shadow 0.3s ease;
}

.led-bar.active.led-yellow.peak {
    box-shadow: 0 0 16px rgba(255, 255, 0, 1), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    filter: brightness(1.5);
    transition: filter 0.3s ease, box-shadow 0.3s ease;
}

.led-bar.active.led-red.peak {
    box-shadow: 0 0 16px rgba(255, 0, 0, 1), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    filter: brightness(1.5);
    transition: filter 0.3s ease, box-shadow 0.3s ease;
}

.quality-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.quality-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.quality-row:last-child {
    margin-bottom: 0;
}

.quality-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
}

.quality-value {
    font-size: 16px;
    color: #667eea;
    font-weight: 700;
}

.quality-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.quality-badge.excellent {
    background: #d4edda;
    color: #155724;
}

.quality-badge.good {
    background: #cce5ff;
    color: #004085;
}

.quality-badge.fair {
    background: #fff3cd;
    color: #856404;
}

.quality-badge.poor {
    background: #f8d7da;
    color: #721c24;
}

.status {
    text-align: center;
    font-size: 13px;
    color: #999;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.status.error {
    color: #f5576c;
    background: #fff0f0;
}

.status.success {
    color: #28a745;
    background: #d4edda;
}

.quality-selector {
    margin-bottom: 20px;
}

.quality-selector label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 8px;
}

.quality-selector select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: white;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
}

.quality-selector select:focus {
    outline: none;
    border-color: #667eea;
}

.tech-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
    text-align: center;
}

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

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

.playlist-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.playlist-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.history-count {
    font-size: 12px;
    color: #999;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
}

.playlist-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.playlist-empty {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 20px;
}

.playlist-item {
    background: white;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.playlist-item:last-child {
    margin-bottom: 0;
}

.playlist-track-info {
    flex: 1;
}

.playlist-artist {
    font-weight: 600;
    color: #667eea;
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.playlist-title {
    color: #333;
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.playlist-album {
    color: #666;
    font-size: 12px;
    font-style: italic;
    display: block;
    margin-bottom: 4px;
}

.playlist-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    display: block;
}

.playlist-remove {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.playlist-remove:hover {
    background: #cc0000;
    transform: translateY(-1px);
}

.playlist-controls {
    display: flex;
    gap: 10px;
}

.playlist-controls button {
    flex: 1;
    padding: 8px;
    font-size: 13px;
}

.clear-btn {
    background: #dc3545;
    color: white;
}

.clear-btn:hover {
    background: #c82333;
}

.export-btn {
    background: #28a745;
    color: white;
}

.export-btn:hover {
    background: #218838;
}
