@import url('https://fonts.googleapis.com/css2?family=Besley:ital,wght@0,400..900;1,400..900&display=swap');

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

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    background-image: radial-gradient(ellipse at 30% 40%, #3a3a3a, #1a1a1a);
    font-family: 'Barlow Condensed', sans-serif;
}

.player-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

/* =========================================
   MAIN BODY
   ========================================= */
.player-body {
    width: 200px;
    height: 400px;
    background: linear-gradient(115deg,
            #dcdcde 0%, #c8c8cc 15%, #d8d8dc 30%,
            #c0c0c4 50%, #d4d4d8 70%, #c4c4c8 85%, #d0d0d4 100%);
    border-radius: 14px 14px 18px 18px;
    box-shadow:
        inset 2px 0 4px rgba(255, 255, 255, 0.6),
        inset -2px 0 4px rgba(0, 0, 0, 0.15),
        inset 0 2px 3px rgba(255, 255, 255, 0.7),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2),
        4px 8px 24px rgba(0, 0, 0, 0.6),
        1px 2px 4px rgba(0, 0, 0, 0.4);
    padding: 14px 12px 16px;
    position: relative;
    overflow: hidden;
    user-select: none;
}

/* Brushed metal texture */
.player-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg,
            transparent 0px, transparent 2px,
            rgba(255, 255, 255, 0.04) 2px, rgba(255, 255, 255, 0.04) 3px);
    pointer-events: none;
    border-radius: inherit;
}

/* Right-edge shadow for 3D */
.player-body::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 8px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.18));
    pointer-events: none;
}



/* =========================================
   TOP
   ========================================= */
.top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 9px;
}

.brand {
    margin: 0 10px 0;
    font-family: 'Besley', sans-serif;
    font-weight: 700;
    font-size: 20px;
    transform: scale(1.25, 1);
    letter-spacing: 1.5px;
    color: #575757;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5), 0 -1px 0 rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.rec-batt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.rec-batt-lbl {
    font-size: 7px;
    line-height: 1.15;
    color: #555;
    text-align: center;
    letter-spacing: 0.3px;
}

.led-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 35%, #c04040, #7a0000);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 3px rgba(150, 0, 0, 0.3);
    transition: all 0.12s;
}

.led-dot.on {
    background: radial-gradient(circle at 38% 35%, #ff5050, #cc0000);
    box-shadow: 0 0 8px #ff1111, 0 0 16px rgba(255, 0, 0, 0.25);
    animation: blink 0.9s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0.2
    }
}

/* =========================================
   CASSETTE WINDOW — left-aligned, narrow
   ========================================= */

/* Row: narrow cassette window on left, decorative info on right */
.window-row,
.content-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

/* Right info column beside window */
.info-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cass-window {
    background: #000000;
    border-radius: 5px;
    padding: 5px;
    flex-shrink: 0;
    width: 72px;
    box-shadow:
        inset 0 3px 10px rgba(0, 0, 0, 0.9),
        inset 0 1px 3px rgba(0, 0, 0, 0.6),
        0 1px 0 rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
}

/* Glass glint */
.cass-window::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    height: 28%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.06), transparent);
    pointer-events: none;
    border-radius: 3px 3px 0 0;
}

/* Right-side info area next to window */
.window-right-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 2px;
    min-height: 108px;
}


.tick-marks {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
}

.tick {
    width: 10px;
    height: 1.5px;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 1px;
}

/* Inner cassette body — label strip left, reels stacked right */
.cass-inner {
    background: linear-gradient(170deg, #1e1e2e 0%, #101018 60%, #1a1a24 100%);
    border-radius: 3px;
    padding: 5px 4px;
    border: 1px solid #252535;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 4px;
}

/* Reels — vertical stack, narrower */
.reels {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.reel {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.reel svg {
    width: 100%;
    height: 100%;
}

.tape-bridge {
    width: 5px;
    height: 18px;
    background: linear-gradient(to right, #0d0d0d, #252525, #0d0d0d);
    border-radius: 1px;
}

@keyframes cw {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ccw {
    to {
        transform: rotate(-360deg);
    }
}

.state-play .reel-l svg {
    animation: cw 2.4s linear infinite;
    transform-origin: 50% 50%;
}

.state-play .reel-r svg {
    animation: cw 3.6s linear infinite;
    transform-origin: 50% 50%;
}

.state-rew .reel-l svg {
    animation: ccw 0.45s linear infinite;
    transform-origin: 50% 50%;
}

.state-rew .reel-r svg {
    animation: ccw 0.65s linear infinite;
    transform-origin: 50% 50%;
}

.state-ffwd .reel-l svg {
    animation: cw 0.65s linear infinite;
    transform-origin: 50% 50%;
}

.state-ffwd .reel-r svg {
    animation: cw 0.45s linear infinite;
    transform-origin: 50% 50%;
}

/* =========================================
   COUNTER STRIP
   ========================================= */
.counter-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 5px;
}

.counter-box {
    background: #181818;
    border-radius: 3px;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    gap: 1px;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cdig {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #ded8c8;
    line-height: 1;
    min-width: 9px;
    text-align: center;
    text-shadow: 0 0 6px rgba(210, 190, 140, 0.5);
}

.csep {
    color: #666;
    font-size: 10px;
}


.rst-btn {
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #555;
    background: linear-gradient(180deg, #c8c8c8, #aaa);
    border: none;
    border-radius: 2px;
    padding: 2px 4px;
    cursor: pointer;
    box-shadow: 0 1px 0 #888, inset 0 1px 0 rgba(255, 255, 255, 0.4);
    font-family: 'Barlow Condensed', sans-serif;
}

.rst-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* =========================================
   PROGRESS
   ========================================= */
.progress-area {
    padding: 0;
    margin-bottom: 6px;
}

.prog-track {
    height: 3px;
    background: #9a9a9a;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.3);
}

.prog-fill {
    height: 100%;
    background: #c0392b;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.prog-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    background: radial-gradient(circle at 35% 35%, #eee, #aaa);
    border-radius: 50%;
    left: 0%;
    transition: left 0.1s linear;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* =========================================
   TAPE NAME / LABELS (in info-col)
   ========================================= */
.cvp-text {
    font-size: 12px;
    letter-spacing: 1px;
    color: #c0392b;
    font-weight: 700;
    font-family: 'Barlow Condensed', sans-serif;
    margin-bottom: 3px;
    margin-top: 72px;
    transform: rotate(270deg) translate(45px, -45px);
}

.tape-fname {
    font-size: 4px;
    color: #555;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Barlow', sans-serif;
    font-weight: 300;
}

/* =========================================
   SPEAKER GRILLE
   ========================================= */
.speaker {
    margin: 20px -2px 4px;
    height: 150px;
    width: 140px;
}

.grille {
    width: 100%;
    height: 100%;
    background-color: #b8b8bc;
    background-image: radial-gradient(circle, #aaa 1.2px, transparent 1.2px);
    background-size: 5px 5px;
    border-radius: 6px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.22), inset 0 -1px 3px rgba(0, 0, 0, 0.1);
}

/* Model label (bottom, like Sony branding) */
.model-lbl {
    text-align: left;
    font-size: 6px;
    letter-spacing: 2px;
    color: #888;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 300;
    padding-right: 0px;
}

/* Bottom strip: V·O·R on left, model text on right */
.bottom-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
    padding: 0 2px;
}

.vor-lbl {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 2px;
    margin-top: 6px;
    color: #c0392b;
    transform: rotate(270deg) translate(60px, 20px);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* =========================================
   SIDE CONTROL PANEL
   ========================================= */
.side-panel {
    width: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 0 16px;
    gap: 5px;
    margin-left: 4px;
}

.s-btn {
    width: 24px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.06s;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.s-btn:active {
    transform: translateX(1px) translateY(1px) !important;
}

.s-btn-xl {
    height: 42px;
    font-size: 17px;
    background: linear-gradient(160deg, #606060 0%, #3a3a3a 60%, #484848 100%);
    color: #ffffff;
    box-shadow:
        3px 0 0 #111,
        0 3px 0 #111,
        inset 1px 0 0 rgba(255, 255, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.s-btn-lg {
    height: 34px;
    font-size: 13px;
    background: linear-gradient(180deg, #585858 0%, #383838 100%);
    color: #ddd;
    box-shadow:
        3px 0 0 #111,
        0 2px 0 #111,
        inset 1px 0 0 rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.s-btn-sm {
    height: 26px;
    font-size: 11px;
    background: linear-gradient(180deg, #686868 0%, #484848 100%);
    color: #ccc;
    box-shadow:
        3px 0 0 #111,
        0 2px 0 #111,
        inset 1px 0 0 rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Eject/load button at top */
.eject-wrap {
    width: 24px;
    height: 24px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: linear-gradient(180deg, #888, #666);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #ddd;
    cursor: pointer;
    box-shadow: 3px 0 0 #333, 0 2px 0 #333, inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-bottom: 4px;
    flex-shrink: 0;
}

.eject-wrap input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

.eject-wrap:active {
    transform: translateX(1px) translateY(1px);
    box-shadow: none;
}

/* Volume slider - vertical */
.vol-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.vol-lbl {
    font-size: 7px;
    letter-spacing: 1px;
    color: #888;
}

input[type=range].vol-v {
    -webkit-appearance: none;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 22px;
    height: 64px;
    background: #4a4a4a;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 3px 0 0 #111;
}

input[type=range].vol-v::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 14px;
    background: linear-gradient(to bottom, #999, #666);
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.model-tag {
    writing-mode: vertical-rl;
    font-size: 7px;
    letter-spacing: 1.5px;
    color: #666;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 300;
    margin-top: auto;
}