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

html, body {
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    background: #000;
    font-family: 'Courier New', Courier, monospace;
    cursor: crosshair;
    -webkit-tap-highlight-color: transparent;
}

#canvas {
    display: block;
    width: 100vw;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
}

/* Effect switcher */
.switcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: #fff;
    font-size: 12px;
    font-family: 'Courier New', Courier, monospace;
    opacity: 0.3;
    transition: opacity 0.6s ease;
    z-index: 10;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.switcher.visible {
    opacity: 0.9;
}

/* Music player bar */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    height: 50px;
}

.player-line {
    display: none;
}

.player-expanded {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    height: 50px;
    gap: 16px;
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4));
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.spectrogram {
    width: 200px;
    height: 36px;
    flex-shrink: 0;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.player-btn:hover {
    border-color: rgba(220, 50, 50, 0.8);
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    border-radius: 1px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
}

.track-info {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-family: 'Courier New', Courier, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .switcher {
        bottom: 80px;
        right: 16px;
        font-size: 11px;
    }

    .spectrogram {
        width: 120px;
        height: 40px;
    }

    .track-info {
        max-width: 100px;
        font-size: 10px;
    }

    .volume-slider {
        width: 60px;
    }
}

@media (hover: none) {
    body {
        cursor: default;
    }
}
