/* Cassette player styles */
.cassette-container {
    margin: 2rem auto;
    max-width: 500px;
    width: 100%;
}

.cassette-tape {
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    border-radius: 13px;
    padding: 22px;
    box-shadow:
        0 20px 40px rgba(0,0,0,0.6),
        inset 0 2px 4px rgba(255,255,255,0.1);
    position: relative;
    aspect-ratio: 3.2/1.8;
    margin-bottom: 24px;
    border: 2px solid #1a1a1a;
}

/* Perspective shadow/bottom */
.cassette-tape::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 8px;
    background: #000;
    border-radius: 0;
    clip-path: polygon(
        1% 0%, 99% 0%,
        92% 95%, 85% 100%,
        15% 100%, 8% 95%
    );
    opacity: 1;
    z-index: -1;
}

.cassette-screws {
    position: absolute;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #e8e8e8 20%, #c0c0c0 40%, #a0a0a0 60%, #808080 80%);
    border-radius: 50%;
    border: 2px solid #666;
    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.3),
        0 2px 4px rgba(0,0,0,0.5);
}

.cassette-screws::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #555;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.screw-tl { top: 8px; left: 8px; }
.screw-tr { top: 8px; right: 8px; }
.screw-bl { bottom: 8px; left: 8px; }
.screw-br { bottom: 8px; right: 8px; }

.cassette-body {
    background: transparent;
    padding: 16px;
    position: relative;
    height: 97%;
    display: flex;
    flex-direction: column;
    /* Chiseled top corners only */
    clip-path: polygon(
        50px 0%,
        calc(100% - 50px) 0%,
        100% 50px,
        100% 100%,
        0% 100%,
        0% 50px
    );
}

.cassette-label {
    background: linear-gradient(180deg, #f8f8f0 0%, #f0f0e8 100%);
    border-radius: 8px 8px 0 0;
    padding: 8px 8px;
    margin-bottom: 0;
    border: 0px solid #d8d8d0;
    border-bottom: none;
    font-family: 'Biro Script', 'Courier New', monospace;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.2;
    flex-shrink: 0;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.5);
    height: 80px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Horizontal lines on the sticker - aligned with text lines */
.cassette-label::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: #ccc;
    z-index: 0;
    box-shadow: 0 20px 0 #ccc;
}

.label-line {
    margin: 1px 0;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: normal;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
    text-align: left;
    max-width: 100%;
}

.label-line.biro-font {
    font-family: 'biro-script-plus', 'Biro Script', 'Courier New', monospace !important;
}

.label-line.courier-font {
    font-family: 'Courier New', monospace !important;
}

.hunter-id {
    font-family: 'biro-script-plus', 'Biro Script', 'Courier New', monospace !important;
    color: #666;
}

.date-time {
    font-family: 'biro-script-plus', 'Biro Script', 'Courier New', monospace !important;
}

.label-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1px 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    text-align: left;
}

.label-compact .song-info {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.label-compact .track-id {
    flex-shrink: 0;
    font-weight: bold;
    color: #666;
}

.loading {
    font-size: 0.9rem;
    text-align: left;
    color: #333;
}

/* Main cassette section with colorful stripes */
.cassette-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg,
        #ff4757 0%, #ff4757 16.67%,
        #ff6b35 16.67%, #ff6b35 33.33%,
        #f7931e 33.33%, #f7931e 50%,
        #ffcd3c 50%, #ffcd3c 66.67%,
        #ebeb8d 66.67%, #ebeb8d 83.33%,
        #bcdcdd 83.33%, #bcdcdd 100%);
    border-radius: 0px 0px 6px 6px;
    padding: 8px;
    margin: 0;
    position: relative;
    min-height: 60px;
    border: 0px solid #d8d8d0;
    border-top: none;
}

/* Drawing overlay on the striped area */
.cassette-drawing {
    position: absolute;
    bottom: 2px;
    right: 8px;
    max-width: 90px;
    max-height: 45px;
    z-index: 10;
}

.cassette-drawing img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* Dark center section for reels */
.cassette-center {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 100px;
    padding: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
    width: 70%;
    margin: -40px auto 0 auto;
}

.cassette-reels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 280px;
}

.reel {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #fffff7 20%, #e3e3dc 40%, #c9c9c3 60%, #eaeaea 80%);
    border-radius: 50%;
    border: 3px solid #75736e;
    position: relative;
    box-shadow:
        0 3px 6px rgba(0,0,0,0.8),
        inset 0 2px 4px rgba(255,255,255,0.8);
    transition: transform 0.3s ease;
}

.reel.spinning {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Reel spokes - white background */
.reel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background:
        linear-gradient(0deg, transparent 35%, black 45%, black 55%, transparent 65%),
        linear-gradient(45deg, transparent 35%, black 45%, black 55%, transparent 65%),
        linear-gradient(90deg, transparent 35%, black 45%, black 55%, transparent 65%),
        linear-gradient(135deg, transparent 35%, black 45%, black 55%, transparent 65%);
    z-index: 1;
}

/* Center hole - larger to create teeth effect */
.reel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: #222;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
    z-index: 2;
}

.tape-window {
    width: 110px;
    height: 30px;
    background: linear-gradient(90deg, #8B4513 0%, #654321 30%, #4a2c17 50%, #654321 70%, #8B4513 100%);
    margin: 0 16px;
    border-radius: 2px;
    border: 1px solid #222;
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.7),
        0 1px 2px rgba(255,255,255,0.1);
    position: relative;
}

.tape-window::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    border-radius: 1px;
}

/* Player deck controls */
.player-deck {
    padding: 20px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.control-button {
    background: linear-gradient(145deg, #555, #333);
    border: none;
    border-radius: 8px;
    width: 50px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border: 1px solid #666;
}

.control-button:hover {
    background: linear-gradient(145deg, #666, #444);
    transform: translateY(-2px);
}

.control-button:active {
    transform: translateY(0);
}

.control-button.playing {
    background: linear-gradient(145deg, #ff6b6b, #ee5a52);
    box-shadow: 0 4px 8px rgba(255,107,107,0.3);
}

.track-info {
    text-align: center;
    color: #000000;
    font-size: 0.9rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
}

/* Mobile responsive clip-path */
@media (max-width: 768px) {
    .cassette-body {
        clip-path: polygon(
            30px 0%,
            calc(100% - 30px) 0%,
            100% 30px,
            100% 100%,
            0% 100%,
            0% 30px
        );
    }
}
