body {
    margin: 0;
    padding: 0;
    height: 100dvh; /* Изменено с 100vh на 100dvh */
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    background-color: #000;
    font-family: 'Arial', sans-serif;
    color: white;
    overflow-x: hidden;
    /* Добавлены отступы для безопасной зоны */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    box-sizing: border-box;
}

header {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    height: 20dvh; /* Изменено с vh на dvh */
    padding-top: 2vh;
    background: border-box;
    margin-bottom: 4vw;
}

.logo {
    /*max-width: 150px;*/
    height: 100%;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-height: 72dvh;
    flex-direction: column;
    padding-bottom: 2vw;
    box-sizing: border-box;
}

.cassette-container {
    position: relative;
    width: 80%;
    max-width: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    height: 80%;
}

.cassette-container picture {
    height: 100%;
}

.cassette {
    width: auto;
    display: block;
    transition: all 0.3s ease;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.button-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

footer {
    width: 100%;
    padding-bottom: 5vh;
    text-align: center;
    box-sizing: border-box;
}


/* --- СТИЛИ ВАШЕЙ КНОПКИ --- */
.device-body {
    background: linear-gradient(145deg, #3a3a3a, #1a1a1a);
    border-radius: 6px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border-radius: 11px;
    justify-content: center;
    box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.6), inset 0px 2px 5px rgba(0, 0, 0, 0.8);
}

.button-recess {
    background: linear-gradient(145deg, #0a0a0a, #2a2a2a);
    border-radius: 14px;
    padding: 4px;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(0, 0, 0, 0.8), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    width: min-content;
}

.play-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 36px;
    width: 140px;
    background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #e0e0e0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    transition: all 0.1s ease;
    user-select: none;
    outline: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.5);
    background-image: linear-gradient(145deg, #2c2c2c 0%, #1a1a1a 50%, #0f0f0f 100%);
}

.play-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1), inset 0 -1px 0 rgba(0,0,0,0.5);
    background-image: linear-gradient(145deg, #3a3a3a 0%, #2c2c2c 50%, #1a1a1a 100%);
}

.play-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.4), inset 0 2px 4px rgba(0,0,0,0.6), inset 0 -1px 0 rgba(255,255,255,0.05);
    background-image: linear-gradient(145deg, #0f0f0f 0%, #1a1a1a 50%, #2c2c2c 100%);
}

.play-icon {
    width: 0;
    height: 0;
    border-left: 12px solid #e0e0e0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    margin-left: 2px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
    transition: all 0.2s ease;
    opacity: 1;
}

.pause-icon {
    width: 12px !important;
    height: 16px !important;
    position: relative;
    margin-left: 0 !important;
    background: transparent !important;
    border: none !important;
    transition: all 0.2s ease;
    opacity: 1;
    display: inline-block;
    min-width: 12px;
}

.pause-icon::before,
.pause-icon::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 16px;
    background: #e0e0e0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
    top: 0;
}

.pause-icon::before { left: 1px; }
.pause-icon::after { right: 1px; }

.play-text {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 16px;
    transition: all 0.2s ease;
}

/* Классическая механическая кнопка */
.btn-mechanical {
    background: #fff;
    border-radius: 80px;
    color: #000000;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 15px 25px;
    position: relative;
    transition: all 0.15s ease;
    text-decoration: none;
    margin: 2vw 0;
}


@media (max-width: 500px) {

    .play-button {
            width: 20vw;
            flex-direction: column;
    }
    .cassette-container {
        height: 90%;
    }

}