body {
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
}

.cassette-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* --- Корпус кассеты --- */
.cassette {
    position: relative;
    width: 300px;
    height: 190px;
    background: #e0e0e0;
    /* Цвет пластика кассеты */
    border-radius: 10px;
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.3);
    padding: 15px;
    box-sizing: border-box;
    border: 2px solid #ccc;
}

/* Этикетка (верхняя часть) */
.label {
    height: 60px;
    background: #fff;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    color: #333;
    font-weight: bold;
    letter-spacing: 1px;
    /* Если хотите вставить фото обложки, раскомментируйте ниже: */
    /* background-image: url('path/to/image.jpg'); */
    /* background-size: cover; */
}

/* Окно с механизмом */
.window {
    position: relative;
    height: 70px;
    background: #333;
    border-radius: 4px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 20px;
    overflow: hidden;
    border: 2px solid #555;
}

/* Катушки */
.reel {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    /* Цвет самой бобины */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid #111;
    /* Лента на катушке */
}

/* Зубцы катушки для визуализации вращения */
.spoke {
    position: absolute;
    width: 4px;
    height: 100%;
    background: #333;
}

.spoke:nth-child(1) {
    transform: rotate(0deg);
}

.spoke:nth-child(2) {
    transform: rotate(60deg);
}

.spoke:nth-child(3) {
    transform: rotate(120deg);
}

/* Имитация ленты между катушками */
.tape-path {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 40px;
    border-bottom: 3px solid #5c3a21;
    /* Цвет магнитной ленты */
    border-radius: 0 0 50% 50%;
    z-index: 1;
}

/* Декоративный винт */
.screw {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* --- Анимация вращения --- */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

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

/* --- Кнопки --- */
.controls {
    display: flex;
    gap: 15px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 0 #000;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #000;
}

button:hover {
    background: #555;
}

/* --- Адаптивность --- */
@media (max-width: 400px) {
    .cassette {
        transform: scale(0.9);
    }
}

@media (max-width: 320px) {
    .cassette {
        transform: scale(0.75);
    }

    button {
        padding: 8px 16px;
        font-size: 14px;
    }
}