

:root {
    --bg: #f5f2ed;
    --surface: #eae6df;
    --border: #d4cfc7;
    --text: #1a1815;
    --text-dim: #8a857c;
    --accent: #c43d2e;
    --accent-glow: #c43d2e22;
    --groove: #ccc7be;
    --dark: #2a2722;
    --cassette: #d6cfc4;
    --tape: #3a3530;
    --reel-hub: #7a756c;
}

.player_body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    font-family: 'DM Mono', monospace;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.player {
    width: 520px;
    background: var(--surface);
    border-radius: 20px;
    padding: 32px 36px 28px;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: 0 1px 0 #fff inset, 0 20px 60px rgba(26, 24, 21, 0.08), 0 2px 8px rgba(26, 24, 21, 0.04);
}

.player::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%23000' opacity='0.015'/%3E%3C/svg%3E");
    pointer-events: none;
}

.brand-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
}

.brand-name {
    font-family: 'Instrument Serif', serif;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.brand-tag {
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.cassette {
    background: var(--cassette);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(26, 24, 21, 0.06) inset;
    position: relative;
}

.cassette-window {
    background: var(--dark);
    border-radius: 8px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    position: relative;
    overflow: hidden;
}

.cassette-window::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.02) 2px, rgba(255, 255, 255, 0.02) 4px);
    pointer-events: none;
    border-radius: 8px;
}

.reel {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #5a554c;
    background: var(--tape);
    position: relative;
}

.reel::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--reel-hub);
    border: 1.5px solid #6a655c;
}

.reel::after {
    content: '';
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    border: 1px dashed #5a554c;
}

.reel.spinning {
    animation: reelSpin 2s linear infinite;
}

.reel.spinning::after {
    animation: reelSpin 1s linear infinite reverse;
}

@keyframes reelSpin {
    to {
        transform: rotate(360deg);
    }
}

.tape-bridge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 8px;
    background: var(--tape);
    border-radius: 2px;
    opacity: 0.5;
}

.tape-label {
    position: absolute;
    bottom: 6px;
    right: 10px;
    font-size: 7px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
}

.cassette-screw {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--groove);
    border: 0.5px solid var(--border);
}

.cassette-screw::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 1px;
    width: 5px;
    height: 0.8px;
    background: var(--border);
    border-radius: 1px;
}

.cs-tl {
    top: 8px;
    left: 8px;
}

.cs-tr {
    top: 8px;
    right: 8px;
}

.cs-bl {
    bottom: 8px;
    left: 8px;
}

.cs-br {
    bottom: 8px;
    right: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 0 2px;
}

.track-name {
    font-size: 13px;
    font-weight: 500;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-time {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

.track-meta {
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

.progress-wrap {
    width: 100%;
    height: 3px;
    background: var(--groove);
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 24px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    width: 0%;
    transition: width 0.25s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -3px;
    top: -3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-wrap:hover .progress-fill::after {
    opacity: 1;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 22px;
}

.ctrl {
    width: 44px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s;
    box-shadow: 0 1px 2px rgba(26, 24, 21, 0.04);
}

.ctrl:hover {
    background: #fff;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(26, 24, 21, 0.06);
}

.ctrl:active {
    transform: scale(0.96);
}

.ctrl.play {
    width: 56px;
    height: 44px;
    border-radius: 10px;
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    font-size: 16px;
}

.ctrl.play:hover {
    background: #333028;
    color: #fff;
}

.ctrl.play.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.vu-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.vu-label {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: uppercase;
    min-width: 16px;
}

.vu-track {
    flex: 1;
    height: 16px;
    display: flex;
    gap: 2px;
    align-items: center;
}

.vu-seg {
    flex: 1;
    height: 8px;
    background: var(--groove);
    border-radius: 1.5px;
    transition: background 0.08s, height 0.08s;
}

.vu-seg.on {
    background: var(--text);
    height: 12px;
}

.vu-seg.peak {
    background: var(--accent);
    height: 14px;
}

.vol-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 0 4px;
}

.vol-icon {
    font-size: 11px;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
}

.vol-track {
    flex: 1;
    height: 3px;
    background: var(--groove);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.vol-fill {
    height: 100%;
    background: var(--text);
    border-radius: 2px;
    width: 70%;
    transition: width 0.1s;
}

.vol-pct {
    font-size: 9px;
    color: var(--text-dim);
    min-width: 28px;
    text-align: right;
    letter-spacing: 1px;
}

.status-led {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--groove);
    transition: all 0.3s;
}

.status-led.on {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.load-area {
    margin-top: 16px;
    text-align: center;
}

.load-btn {
    background: none;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 10px 20px;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.load-btn:hover {
    border-color: var(--text-dim);
    color: var(--text);
    background: #fff;
}

.drop-overlay {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: rgba(245, 242, 237, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 2px dashed var(--accent);
}

.drop-overlay.visible {
    display: flex;
}

.drop-text {
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--accent);
    text-transform: uppercase;
}

.playlist {
    margin-top: 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.playlist.open {
    max-height: 180px;
    overflow-y: auto;
}

.pl-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 11px;
    color: var(--text-dim);
}

.pl-item:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text);
}

.pl-item.active {
    color: var(--accent);
}

.pl-num {
    font-size: 9px;
    min-width: 18px;
    text-align: right;
    opacity: 0.5;
}

@media (max-width: 560px) {
    .player {
        width: 95vw;
        padding: 24px 20px 20px;
    }
}