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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.btn {
    padding: 12px 20px;
    font-size: 1em;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background: #1DB954;
    color: #000;
}

.btn-primary:hover {
    background: #1ed760;
    transform: scale(1.02);
}

/* Player Section */
.player-section {
    width: 100%;
    height: 100%;
}

.player-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    height: 100%;
    align-items: center;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Now Playing Section */
.now-playing {
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.album-art {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.album-art img {
    width: 100%;
    height: auto;
    display: block;
}

.track-info h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #1DB954;
}

.track-info p {
    opacity: 0.8;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.time-display {
    margin: 15px 0;
    font-size: 0.9em;
    opacity: 0.7;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-top: 10px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1DB954;
    width: 0%;
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* McIntosh VU Meter */
.vu-meter-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mcintosh-frame {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 40%),
        linear-gradient(160deg, #2b2b2e 0%, #0c0c0e 55%, #000 100%);
    border: 1px solid #3a3a3e;
    border-radius: 10px;
    padding: 28px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.7),
        0 0 0 6px #050505,
        0 0 0 7px #4a4a4e,
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    min-width: 400px;
}

.mcintosh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
}

.mcintosh-header h3 {
    font-family: 'UnifrakturMaguntia', Georgia, serif;
    font-size: 2em;
    font-weight: 400;
    letter-spacing: 1px;
    color: #4dff9e;
    text-shadow: 0 0 6px rgba(90, 255, 160, 0.75), 0 0 16px rgba(60, 220, 130, 0.45);
}

.power-indicator {
    font-size: 1.3em;
    color: #ff4444;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.8);
    animation: pulse 1.5s infinite;
}

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

/* VU Meters */
.vu-meters {
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
    gap: 20px;
}

.vu-meter {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.vu-label {
    font-size: 0.65em;
    font-weight: 600;
    letter-spacing: 3px;
    color: #9a9a9a;
}

.vu-svg {
    width: 100%;
    height: 90px;
}

.vu-svg g[id^="needle"] {
    transition: transform 0.06s ease-out;
}

/* Frequency Analyzer */
.frequency-analyzer {
    background: #000;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow:
        inset 0 0 0 1px #050505,
        inset 0 0 0 2px #3d3d40;
}

#frequencyCanvas {
    width: 100%;
    height: 80px;
    display: block;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-btn {
    background: linear-gradient(180deg, #e8e8e8 0%, #b8b8ba 45%, #8a8a8d 100%);
    border: 1px solid #444;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2em;
    color: #111;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.control-btn:hover {
    background: linear-gradient(180deg, #f5f5f5 0%, #c8c8ca 45%, #9a9a9d 100%);
    transform: scale(1.08);
}

.control-btn.play {
    font-size: 1.3em;
    padding: 12px 25px;
}

.control-btn.logout {
    background: #ff4444;
    color: #fff;
    font-size: 0.9em;
    padding: 10px 15px;
}

.control-btn.logout:hover {
    background: #ff6666;
}

/* Playlist Section */
.playlist-section {
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 15px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

.playlist-header {
    margin-bottom: 20px;
}

.playlist-header h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #1DB954;
}

#playlistSearch {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #1DB954;
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 0.95em;
}

#playlistSearch::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.playlist-list {
    flex: 1;
    overflow-y: auto;
}

.playlist-item {
    background: rgba(29, 185, 84, 0.1);
    border: 1px solid #1DB954;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.playlist-item:hover {
    background: rgba(29, 185, 84, 0.3);
    transform: translateX(5px);
}

.playlist-item.active {
    background: #1DB954;
    color: #000;
}

.playlist-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.playlist-count {
    font-size: 0.85em;
    opacity: 0.8;
}

/* Scrollbar Styling */
.playlist-list::-webkit-scrollbar {
    width: 8px;
}

.playlist-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.playlist-list::-webkit-scrollbar-thumb {
    background: #1DB954;
    border-radius: 4px;
}

.playlist-list::-webkit-scrollbar-thumb:hover {
    background: #1ed760;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .player-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mcintosh-frame {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .mcintosh-frame {
        padding: 15px;
    }
}
