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

body {
    background-color: #000;
    color: #fff;
    font-family: 'IBM Plex Mono', monospace;
    overflow-x: hidden;
    min-height: 100vh;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
}

.logo {
    position: fixed;
    top: 25px;
    left: 25px;
    z-index: 1000;
}

.logo-img {
    height: clamp(40px, 5vw, 70px);
    width: auto;
    display: block;
}

#sphere-canvas-container {
    position: fixed;
    z-index: 1;
    pointer-events: none;
}

#sphere-canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.container {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(100px, 13vh, 150px) clamp(20px, 5vw, 80px);
}

.video-upload-section {
    margin-bottom: clamp(30px, 4vw, 50px);
}

.drop-zone {
    width: 100%;
    aspect-ratio: 16/9;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s;
    position: relative;
}

.drop-zone:hover {
    opacity: 0.7;
}

.drop-zone:has(#video-player[style*="display: block"]):hover {
    opacity: 0.95;
}

.drop-zone.drag-over {
    opacity: 0.5;
}

.upload-prompt {
    text-align: center;
    pointer-events: none;
}

.upload-prompt p {
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-weight: 300;
}

.upload-prompt svg {
    opacity: 0.7;
    width: clamp(25px, 3vw, 35px);
    height: clamp(25px, 3vw, 35px);
}

#video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#video-trim-row {
    /* spacing handled by timeline-panel gap */
}



#trim-canvas {
    display: block;
    width: 100%;
    cursor: default;
}

/* Track selector */
.track-selector {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6px, 1vw, 10px);
    margin-bottom: clamp(14px, 2vw, 20px);
}

.track-btn {
    width: clamp(30px, 3.2vw, 40px);
    height: clamp(30px, 3.2vw, 40px);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.track-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    color: rgba(255, 255, 255, 0.9);
}

.track-btn.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.85);
    color: #fff;
}

/* Timelines + Mixer grid */
.timelines-mixer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 clamp(16px, 2vw, 28px);
    align-items: start;
    margin-bottom: clamp(40px, 6vw, 60px);
}

.timelines-col {
    min-width: 0;
}

#audio-timeline-row {
    min-width: 0;
}

#waveform-canvas {
    display: block;
    width: 100%;
    cursor: default;
}

.mixer-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

/* Timeline panel */
.timeline-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.timeline-label {
    display: block;
    font-size: 8px;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.audio-timeline-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.audio-timeline-header .timeline-label {
    margin-bottom: 0;
    flex-shrink: 0;
}

.audio-timeline-header .track-selector {
    margin-bottom: 0;
    flex-wrap: wrap;
}

/* Transport / play panel */
.play-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.audio-play-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
}

.audio-play-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

.audio-play-btn svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Mixer panel */
.mixer-panel {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 0 12px;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
}

.fader-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
}

.fader-strip + .fader-strip {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.fader-label {
    font-size: 8px;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
}

.fader-rail {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
}

.fader-slider {
    -webkit-appearance: none;
    appearance: none;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 3px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.fader-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 8px;
    background: #fff;
    border-radius: 1px;
    cursor: pointer;
}

.fader-slider::-moz-range-thumb {
    width: 28px;
    height: 8px;
    background: #fff;
    border-radius: 1px;
    cursor: pointer;
    border: none;
}

.mute-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.35);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    width: 28px;
    height: 20px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mute-btn:hover {
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.4);
}

.mute-btn.active {
    background: rgba(255, 130, 40, 0.9);
    border-color: transparent;
    color: #000;
}

.info-text {
    max-width: 600px;
    margin: 0 auto;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    line-height: 1.7;
    font-weight: 400;
    opacity: 0.8;
    text-align: center;
}

.info-column p {
    margin-bottom: clamp(16px, 2vw, 24px);
}

footer {
    position: relative;
    z-index: 10;
    padding: clamp(30px, 5vh, 50px) clamp(20px, 5vw, 80px) clamp(30px, 4vh, 40px);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-links {
    display: flex;
    gap: clamp(15px, 2vw, 20px);
    flex-wrap: wrap;
}

.footer-copyright {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.6rem, 0.85vw, 0.75rem);
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.03em;
    text-align: center;
    align-self: flex-end;
}

.footer-links.secondary {
    gap: clamp(15px, 2vw, 20px);
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    opacity: 0.5;
    transition: opacity 0.3s;
    font-weight: 400;
}

.footer-links a:hover {
    opacity: 1;
}


@media (max-width: 768px) {
    footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}
