html {
    height: 100%;
    overflow: hidden;
}

body.page-music {
    height: 100%;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.page-music nav,
.page-music .site-footer {
    flex-shrink: 0;
}

.page-music .yt-fullscreen-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 24px;
    box-sizing: border-box;
    overflow: hidden;
    min-height: 0;
}

.music-workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 20px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
    min-height: 0;
}

.now-playing-panel {
    background: rgba(12, 12, 22, 0.85);
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 24px 32px;
    box-shadow: 0 0 35px rgba(0, 212, 255, 0.2), inset 0 0 15px rgba(0, 212, 255, 0.05);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.now-playing-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    background-size: 200% 100%;
    animation: gamerGlow 4s linear infinite;
}

@keyframes gamerGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.player-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-status-badge {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--accent);
    padding: 4px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.engine-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
}

.status-dot.playing {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.5; }
}

.art-and-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: auto 0;
}

.album-art-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow), inset 0 0 20px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #1a1a2e 0%, #05050a 100%);
    margin-bottom: 16px;
}

.album-art-wrap i {
    font-size: 5rem;
    color: var(--accent);
    filter: drop-shadow(0 0 15px var(--accent));
}

.album-art-wrap.spinning {
    animation: spinDisc 12s linear infinite;
}

@keyframes spinDisc {
    100% { transform: rotate(360deg); }
}

.track-details {
    width: 100%;
}

.track-details h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-details p {
    color: var(--text-muted);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.visualizer-container {
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    margin-top: 12px;
    overflow: hidden;
}

#spectrum-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.controls-wrapper {
    width: 100%;
}

.time-stamps {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.seek-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    accent-color: var(--accent);
}

.control-buttons-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.side-controls {
    display: flex;
    gap: 8px;
}

.main-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ctrl-btn {
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid var(--border);
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.2s ease;
}

.ctrl-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

.ctrl-btn.play-btn {
    width: 58px;
    height: 58px;
    background: var(--accent);
    color: #000;
    border: none;
    font-size: 1.5rem;
    box-shadow: 0 0 20px var(--accent-glow);
}

.ctrl-btn.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 30px var(--accent);
    color: #000;
}

.ctrl-btn.active-toggle {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.volume-bar {
    width: 90px;
    height: 4px;
    accent-color: var(--accent);
    cursor: pointer;
}

.playlist-panel {
    background: rgba(12, 12, 22, 0.85);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.playlist-header {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.playlist-count {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0;
}

.playlist-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
}

.playlist-list::-webkit-scrollbar { width: 6px; }
.playlist-list::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 3px; }
.playlist-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(18, 18, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.playlist-item:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--accent);
    transform: translateX(4px);
}

.playlist-item.active {
    background: rgba(0, 212, 255, 0.12);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.playlist-item .song-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.playlist-item .song-num {
    font-family: var(--font-heading);
    color: var(--accent);
    font-weight: 700;
    width: 20px;
    flex-shrink: 0;
}

.playlist-item .song-title {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item .song-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ai-disclaimer-box {
    width: 100%;
    max-width: 1600px;
    margin: 12px auto 0;
    box-sizing: border-box;
}

.disclaimer-card {
    background: rgba(18, 18, 30, 0.7);
    border: 1px dashed rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.disclaimer-card i {
    font-size: 1.2rem;
    color: var(--accent);
    flex-shrink: 0;
}

.disclaimer-card strong {
    color: #fff;
}

@media (max-width: 992px) {
    html,
    body.page-music {
        overflow: auto;
        height: auto;
    }

    .page-music .yt-fullscreen-container {
        height: auto;
        overflow: visible;
    }

    .music-workspace {
        grid-template-columns: 1fr;
    }

    .playlist-panel {
        height: 350px;
    }
}
