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

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    overflow-x: hidden;
}

h1 {
    font-size: 16px;
    margin-top: 0;
}

p {
    color: rgb(107, 114, 128);
    font-size: 15px;
    margin-bottom: 10px;
    margin-top: 5px;
}

.card {
    max-width: 620px;
    margin: 0 auto;
    padding: 16px;
    border: 1px solid lightgray;
    border-radius: 16px;
}

.card p:last-child {
    margin-bottom: 0;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #4a4a6a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6a6a8a;
}

.track-container {
    position: relative;
    min-height: 48px;
    overflow: hidden;
}

.waveform-canvas {
    cursor: crosshair;
}

.clip {
    position: absolute;
    top: 0;
    height: 100%;
    cursor: grab;
    border: 2px solid transparent;
    transition: border-color 0.15s;
}

.clip:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.clip.dragging {
    cursor: grabbing;
    opacity: 0.85;
}

.clip.selected {
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.clip-handle {
    position: absolute;
    top: 0;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clip-handle::after {
    content: '';
    width: 3px;
    height: 24px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.15s;
}

.clip-handle:hover::after {
    background: #f59e0b;
}

.clip-handle-left {
    left: -5px;
}

.clip-handle-right {
    right: -5px;
}

.crossfade-zone {
    position: absolute;
    top: 0;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.playhead {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: #ef4444;
    z-index: 20;
    pointer-events: none;
    transition: left 0.05s linear;
}

.playhead::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -5px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ef4444;
}

.time-ruler {
    position: relative;
    height: 28px;
    background: #12121f;
    border-bottom: 1px solid #2a2a40;
}

.slider-track {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #2a2a40;
    outline: none;
}

.slider-track::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

.slider-track::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8b5cf6;
    cursor: pointer;
    border: none;
}

.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-glow:hover::before {
    opacity: 1;
}

.toggle-pitch {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 13px;
    background: #2a2a40;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-pitch.active {
    background: #8b5cf6;
}

.toggle-pitch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    transition: transform 0.3s;
}

.toggle-pitch.active::after {
    transform: translateX(22px);
}

.track-header {
    background: linear-gradient(135deg, #1a1a2e, #16162a);
    border: 1px solid #2a2a40;
}

.track-header .track-title {
    font-size: 10px;
}

.track-header .track-info {
    font-size: 9px;
}

.track-header .track-btn {
    padding: 2px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    padding: 12px 20px;
    border-radius: 10px;
    background: #1e1e32;
    border: 1px solid #3a3a5a;
    color: #e0e0e0;
    font-size: 14px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

@keyframes pulse-border {
    0%,
    100% {
        border-color: #8b5cf6;
    }
    50% {
        border-color: #a78bfa;
    }
}

.recording {
    animation: pulse-border 1s infinite;
}

.zoom-indicator {
    font-size: 11px;
    color: #8b8ba0;
    background: #1a1a2e;
    padding: 2px 8px;
    border-radius: 4px;
}

.spectrum-bar {
    display: inline-block;
    width: 3px;
    margin: 0 1px;
    background: #8b5cf6;
    border-radius: 2px;
    animation: spectrum 0.8s ease-in-out infinite alternate;
}

@keyframes spectrum {
    0% {
        height: 4px;
    }
    100% {
        height: 20px;
    }
}

.drag-over {
    outline: 2px dashed #8b5cf6 !important;
    outline-offset: -4px;
    background: rgba(139, 92, 246, 0.08) !important;
}

.drag-over::after {
    content: 'Solte para importar';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    font-size: 14px;
    font-weight: 600;
    background: rgba(10, 10, 20, 0.7);
    z-index: 50;
    pointer-events: none;
}

[data-track="2"].drag-over::after {
    color: #d946ef;
}

[data-track="2"].drag-over {
    outline-color: #d946ef !important;
    background: rgba(217, 70, 239, 0.08) !important;
}