:root {
    --bg-main: #191919;
    --bg-header: #2a2a2a;
    --bg-track: #232323;
    --playhead: #ffd500;
    --text: #cdcdcd;
}

body {
    margin: 0; background-color: var(--bg-main); color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden; user-select: none; -webkit-tap-highlight-color: transparent;
}

.control-bar {
    height: 60px;
    background: linear-gradient(to bottom, #3a3a3a, #252525);
    border-bottom: 1px solid #000;
    display: flex; align-items: center; padding: 0 10px; justify-content: space-between;
}

.transport-group { display: flex; gap: 8px; align-items: center; }

.btn {
    background: #444; border: 1px solid #111; color: #ddd; border-radius: 4px;
    padding: 8px 12px; font-size: 0.85em; cursor: pointer;
}
.btn:active { background: #333; }
.btn-play.active { background: #2ed573; color: #000; }
.btn-stop:active { background: #b71540; }
.btn-click.active { background: #0984e3; color: white; border-color: #74b9ff; }

.lcd-display {
    background: #111; border: 2px solid #444; border-radius: 6px;
    padding: 5px 10px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; min-width: 140px;
}
#timeDisplay { font-family: 'Courier New', monospace; font-weight: bold; font-size: 1.2em; margin-bottom: 2px; }
.lcd-meta { display: flex; gap: 10px; font-size: 0.75em; color: #888; }
.lcd-meta input, .lcd-meta select {
    background: transparent; border: none; color: #00d2ff; font-weight: bold; width: 40px; text-align: center; font-size: 1em;
}

.arrange-window { display: flex; height: calc(100vh - 60px); }
.track-list { width: 220px; background: var(--bg-track); border-right: 1px solid #111; flex-shrink: 0; }

.track-header {
    height: 100px; border-bottom: 1px solid #111; background: #2b2b2b; padding: 10px;
    display: flex; flex-direction: column; justify-content: space-between;
}
.track-top { display: flex; align-items: center; }
.track-name { background: transparent; border: none; color: white; width: 100%; margin-left: 5px; }
.track-controls { display: flex; gap: 5px; }
.btn-m, .btn-s { width: 30px; height: 30px; border:none; border-radius:4px; font-weight:bold; cursor:pointer;}
.btn-m.active { background: #ff4757; color: white; }
.btn-s.active { background: #e1b12c; color: black; }

/* 타임라인 영역 수정 */
.timeline-area { flex: 1; overflow: scroll; position: relative; background: var(--bg-main); }
.ruler { height: 30px; background: #1e1e1e; border-bottom: 1px solid #000; position: sticky; top: 0; z-index: 10; white-space: nowrap; }
.ruler span {
    display: inline-block; height: 100%; border-left: 1px solid #666;
    padding-left: 5px; font-size: 11px; color: #aaa; box-sizing: border-box; vertical-align: bottom;
}

.tracks-container {
    position: relative;
    background-image: linear-gradient(90deg, #444 1px, transparent 1px), linear-gradient(90deg, #2a2a2a 1px, transparent 1px);
    /* 트랙이 없어도 전체 영역 확보 */
    min-height: calc(100% - 30px);
}

.track-lane { height: 100px; border-bottom: 1px solid #2a2a2a; position: relative; width: 100%; }
.audio-region {
    position: absolute; top: 10px; height: 80px; background: #3f7cac;
    border: 1px solid #62a1d6; border-radius: 6px; overflow: hidden;
}
.audio-region.dimmed { opacity: 0.3; filter: grayscale(100%); }
canvas { width: 100%; height: 100%; opacity: 0.8; }

.playhead { position: absolute; top:0; bottom:0; width: 2px; background: var(--playhead); z-index: 20; pointer-events: none; }
.file-btn { background: #444; padding: 4px; font-size: 11px; text-align: center; border-radius: 3px; margin-top:5px; display:block;}
