:root {
    --bg: #14161a;
    --panel: #1d2026;
    --panel-hover: #232730;
    --border: #2e333d;
    --text: #e8eaed;
    --text-dim: #9aa0ab;
    --accent: #f5c542;
    --accent-dim: #8a6d1d;
    --danger: #e05555;
    --radius: 10px;
    --gap: 14px;
    --font: -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
}

.app {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.app-header h1 {
    font-size: 22px;
    letter-spacing: 0.03em;
}

.app-header p {
    color: var(--accent);
    font-size: 15px;
    margin-top: 4px;
}

.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 34px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone-hover {
    border-color: var(--accent);
    background: var(--panel);
}

.dropzone-line1 {
    font-size: 16px;
}

.dropzone-line2 {
    color: var(--text-dim);
    font-size: 13px;
    margin-top: 6px;
}

.browser {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.browser-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.browser-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.browser-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-dim);
}

.file-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-folder {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    padding: 6px 6px 2px;
    text-transform: uppercase;
}

.file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.file-row:hover {
    background: var(--panel-hover);
}

.file-active {
    background: var(--accent-dim);
    font-weight: 700;
}

.file-ext {
    font-size: 10px;
    color: var(--text-dim);
}

.transport {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    flex-wrap: wrap;
}

.hidden {
    display: none;
}

.btn {
    background: var(--panel-hover);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn:hover {
    background: var(--border);
}

.btn-play {
    background: var(--accent);
    color: #1a1a1a;
    border-color: var(--accent);
    font-weight: 600;
}

.btn-play:hover {
    background: #ffd75e;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-active {
    background: var(--accent);
    color: #1a1a1a;
    border-color: var(--accent);
}

.loop-label {
    color: var(--text-dim);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.song-info {
    color: var(--text-dim);
    font-size: 13px;
    margin-left: auto;
}

.timeline {
    position: relative;
    flex-basis: 100%;
    height: 26px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.sections {
    position: absolute;
    inset: 0;
}

.section-block {
    position: absolute;
    top: 0;
    bottom: 0;
    border-right: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 11px;
    padding: 5px 0 0 6px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.section-block:hover {
    background: var(--panel-hover);
    color: var(--text);
}

.section-active {
    background: var(--accent-dim);
    color: var(--text);
    font-weight: 700;
}

.section-key {
    font-size: 9px;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    border-radius: 3px;
    padding: 0 3px;
    margin-right: 2px;
}

.progress {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    background: var(--accent);
    opacity: 0.25;
    pointer-events: none;
}

.loadbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
}

.loadbar-track {
    flex: 1;
    height: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.loadbar-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.15s;
}

.loadbar-text {
    color: var(--text-dim);
    font-size: 12px;
    white-space: nowrap;
}

.tracks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    max-width: 460px;
}

.pad {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 6px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.12s, border-color 0.12s, background 0.12s;
    min-width: 0;
}

.pad:hover {
    border-color: var(--accent-dim);
}

.pad-empty {
    opacity: 0.25;
    cursor: default;
}

.pad-muted {
    background: #241a1a;
    border-color: var(--danger);
}

.track-silent {
    opacity: 0.45;
}

.pad-fx {
    grid-column: span 2;
    border-style: dashed;
}

.pad-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pad-num {
    font-size: 10px;
    font-weight: 700;
}

.pad-key {
    font-size: 9px;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid var(--accent-dim);
    border-radius: 3px;
    padding: 0 4px;
}

.pad-voice {
    font-size: 9px;
    line-height: 1.2;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pad-foot {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-tiny {
    padding: 0 5px;
    font-size: 9px;
    line-height: 16px;
    border-radius: 4px;
}

input[type="range"] {
    accent-color: var(--accent);
    width: 100%;
    min-width: 0;
    height: 10px;
}

.status {
    color: var(--text-dim);
    font-size: 13px;
    min-height: 18px;
}

.status-error {
    color: var(--danger);
}

@media (max-width: 560px) {
    .tracks {
        grid-template-columns: repeat(2, 1fr);
    }
}
