html{
    background-color: #f8c8b8;
    background-image: url("image/background2.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100%;
}
body{
    background-color: #f8c8b8;
    background-image: url("image/background2.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    font-family: "Silkscreen", sans-serif;
}
.star-layer{
    position: fixed;
    inset: 0;
    z-index: 12;
    overflow: hidden;
    pointer-events: none;
}
.floating-star{
    position: absolute;
    bottom: -24px;
    color: var(--star-color, #fff4c9);
    font-size: var(--star-size, 14px);
    opacity: 0;
    text-shadow:
        0 0 6px currentColor,
        0 0 12px rgba(255, 214, 220, 0.72);
    animation: floatStar var(--star-duration, 10s) linear infinite;
    animation-delay: var(--star-delay, 0s);
}
@keyframes floatStar {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    12% {
        opacity: 0.88;
    }
    82% {
        opacity: 0.88;
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--star-drift, 24px), -110vh, 0) rotate(180deg);
    }
}
.music-controls{
    position: fixed;
    top: clamp(10px, 2vw, 16px);
    right: clamp(10px, 2vw, 16px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.music-button{
    width: clamp(56px, 7vw, 100px);
    height: clamp(56px, 7vw, 100px);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: transparent;
    background-image: url("image/play_icon_button.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    cursor: pointer;
    filter: drop-shadow(0 5px 5px rgba(145, 52, 65, 0.22));
    transition: filter 120ms ease, transform 120ms ease;
}
.music-button:hover{
    filter: brightness(1.06) drop-shadow(0 0 8px rgba(255, 214, 220, 0.8));
    transform: translateY(-3px);
}
.music-button:active{
    filter: brightness(0.98) drop-shadow(0 0 4px rgba(255, 214, 220, 0.7));
    transform: translateY(2px);
}
.music-button.is-playing{
    background-image: url("image/stop_icon_button.png");

}
.volume-control{
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 120ms ease, transform 120ms ease;
}
.music-controls.is-active .volume-control{
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.volume-icon{
    width: clamp(24px, 3.4vw, 44px);
    height: clamp(24px, 3.4vw, 44px);
    padding: 0;
    border: 0;
    background-color: transparent;
    background-image: url("image/volume_icon.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    cursor: pointer;
    filter: drop-shadow(0 2px 3px rgba(145, 52, 65, 0.18));
    transition: filter 120ms ease, transform 120ms ease;
}
.volume-icon:hover{
    filter: brightness(1.06) drop-shadow(0 0 8px rgba(255, 214, 220, 0.8));
    transform: translateY(-3px);
}
.volume-icon:active{
    filter: brightness(0.98) drop-shadow(0 0 4px rgba(255, 214, 220, 0.7));
    transform: translateY(2px);
}
.volume-icon.is-muted{
    background-image: url("image/no_audio_icon.png");
}
.volume-slider{
    width: clamp(54px, 6vw, 86px);
    accent-color: #8d7ec0;
    cursor: pointer;
    filter: drop-shadow(0 2px 3px rgba(145, 52, 65, 0.18));
}
h1{
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 4px 14px 2px;
    margin-left:auto;
    margin-right:auto;
    margin-bottom: 8px;
    text-align: center;
    font-size: 40px;
    color: #5f3818;
    font-family: "Pixelify Sans", sans-serif;
    font-weight: 800;
    text-shadow:
        0 1px 0 #fff0c9,
        0 3px 0 #8f4d27,
        0 0 10px rgba(255, 205, 162, 0.72),
        0 0 18px rgba(255, 181, 190, 0.55);
    filter: drop-shadow(0 3px 0 rgba(111, 62, 31, 0.28));
    background: rgba(255, 255, 255, 0.38);
    border-radius: 12px;
    box-sizing: border-box;
}
p{
    width: max-content;
    max-width: calc(100% - 32px);
    margin-left:auto;
    margin-right:auto;
    text-align: center;
    font-size: 18px;
    padding: 4px 12px;
    color: #8d4b34;
    font-weight: 700;
    font-family: "Silkscreen", sans-serif;
    text-shadow: 0 1px 0 rgba(255, 241, 216, 0.85);
    background: rgba(255, 255, 255, 0.38);
    border-radius: 10px;
    box-sizing: border-box;
}
a{
    text-decoration: none;
}
.menu{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    text-align: center;
}
.menu a{
    display: block;
}
.home-page .menu{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    margin-top: 18px;
}
.home-page .button{
    margin-top: 20px;
}

.button,
.active-button{
    position: relative;
    z-index: 0;
    color: #a95a39;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    font-family: "Silkscreen", sans-serif;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    padding: 11px 10px;
    width: 118px;
    box-sizing: border-box;
    margin: 0;
    display: block;
    border: 2px solid #c97945;
    background:
        linear-gradient(180deg, rgba(255, 239, 205, 0.96), rgba(255, 211, 151, 0.96));
    box-shadow:
        0 4px 0 #a85c31,
        0 8px 12px rgba(128, 75, 45, 0.18),
        inset 0 0 0 3px rgba(255, 250, 229, 0.72),
        inset 0 -5px 10px rgba(221, 135, 74, 0.18);
    text-shadow: 0 1px 0 rgba(255, 248, 229, 0.9);
    transition: box-shadow 120ms ease, filter 120ms ease, transform 120ms ease;
}
.button::before,
.active-button::before{
    content: "♥";
    position: absolute;
    top: 4px;
    left: 10px;
    z-index: 1;
    color: #f08c91;
    font-size: 10px;
    line-height: 1;
    text-shadow: none;
    pointer-events: none;
}
.button::after,
.active-button::after{
    content: "♥";
    position: absolute;
    right: 10px;
    bottom: 5px;
    color: #f08c91;
    font-size: 9px;
    line-height: 1;
    pointer-events: none;
}
.button:hover{
    box-shadow:
        0 5px 0 #a85c31,
        0 10px 14px rgba(128, 75, 45, 0.2),
        0 0 12px rgba(255, 195, 197, 0.68),
        inset 0 0 0 3px rgba(255, 250, 229, 0.82),
        inset 0 -5px 10px rgba(221, 135, 74, 0.14);
    filter: brightness(1.03);
    animation: buttonBounce 520ms ease;
}
.button:active{
    filter: brightness(0.98);
    box-shadow:
        0 2px 0 #a85c31,
        0 5px 8px rgba(128, 75, 45, 0.16),
        inset 0 0 0 3px rgba(255, 250, 229, 0.72),
        inset 0 -3px 8px rgba(221, 135, 74, 0.2);
    transform: translateY(2px);
}
.active-button{
    border-color: #d66f7c;
    color: #9e4f51;
    background:
        linear-gradient(180deg, rgba(255, 223, 226, 0.98), rgba(255, 181, 190, 0.96));
    box-shadow:
        0 4px 0 #b95463,
        0 8px 12px rgba(128, 75, 45, 0.16),
        inset 0 0 0 3px rgba(255, 245, 246, 0.7),
        inset 0 -5px 10px rgba(188, 82, 96, 0.14);
}
@keyframes buttonBounce {
    0% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-6px);
    }
    45% {
        transform: translateY(0);
    }
    65% {
        transform: translateY(-4px);
    }
    82% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-3px);
    }
}
.game-controls{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}
.status-bar{
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255, 245, 246, 0.98), rgba(255, 212, 218, 0.96));
    width: max-content;
    min-width: 300px;
    height: 30px;
    padding: 0 14px;
    box-sizing: border-box;
    margin: 0;
    border: 2px solid #d66f7c;
    border-radius: 12px;
    box-shadow:
        0 4px 0 #b95463,
        0 8px 12px rgba(128, 75, 45, 0.16),
        inset 0 0 0 3px rgba(255, 250, 250, 0.7),
        inset 0 -4px 8px rgba(188, 82, 96, 0.12);
    color: #9e4f51;
    font-weight: 800;
    font-family: "Silkscreen", sans-serif;
    line-height: 30px;
}
.status-spacer{
    display: inline-block;
    width: 8px;
}
.status-new-game{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    margin: 0;
    padding: 0 12px;
    box-sizing: border-box;
    border: 2px solid #75677f;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(155, 143, 174, 0.98), rgba(116, 101, 138, 0.96));
    color: #fff4fb;
    font-size: 11px;
    font-family: "Silkscreen", sans-serif;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    box-shadow:
        0 4px 0 #5a4c6a,
        0 8px 12px rgba(35, 28, 46, 0.18),
        inset 0 0 0 3px rgba(247, 235, 255, 0.32),
        inset 0 -4px 8px rgba(35, 28, 46, 0.16);
    text-shadow:
        0 1px 0 rgba(35, 28, 46, 0.72),
        0 0 8px rgba(255, 231, 238, 0.58);
    transition: filter 120ms ease, transform 120ms ease;
}
.status-new-game:hover{
    filter: brightness(1.04);
    box-shadow:
        0 5px 0 #5a4c6a,
        0 10px 14px rgba(35, 28, 46, 0.2),
        0 0 12px rgba(189, 180, 246, 0.62),
        inset 0 0 0 3px rgba(247, 235, 255, 0.38),
        inset 0 -4px 8px rgba(35, 28, 46, 0.14);
    transform: translateY(-1px);
}
.status-new-game:active{
    box-shadow:
        0 2px 0 #5a4c6a,
        0 5px 8px rgba(35, 28, 46, 0.16),
        inset 0 0 0 3px rgba(247, 235, 255, 0.32),
        inset 0 -3px 6px rgba(35, 28, 46, 0.2);
    transform: translateY(1px);
}
.popup {
    padding: 72px 72px 64px;
    display: none;
    position: fixed;
    z-index: 30;
    top: 50%;
    left: 50%;
    width: min(560px, calc(100% - 34px));
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    text-align: center;
    border: 3px solid rgba(87, 65, 70, 0.95);
    border-radius: 18px;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.36), transparent 26%),
        linear-gradient(180deg, rgba(15, 2, 5, 0.88), rgba(189, 180, 246, 0.82));
    box-shadow:
        0 0 0 3px rgba(246, 145, 164, 0.42),
        0 0 22px rgba(255, 181, 190, 0.85),
        0 0 48px rgba(189, 180, 246, 0.65),
        inset 0 0 0 4px rgba(255, 250, 250, 0.42),
        inset 0 -18px 32px rgba(128, 104, 196, 0.18);
    animation: popupGlow 1800ms ease-in-out infinite alternate;
}
.popup-minimize{
    position: absolute;
    top: 18px;
    right: 20px;
    width: 30px;
    height: 26px;
    padding: 0;
    border: 2px solid rgba(255, 231, 238, 0.95);
    border-radius: 9px;
    background:
        linear-gradient(180deg, rgba(238, 232, 255, 0.98), rgba(197, 185, 242, 0.94));
    color: #6f5d8f;
    cursor: pointer;
    font-family: "Silkscreen", sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 18px;
    box-shadow:
        0 2px 0 #8d7ec0,
        0 0 10px rgba(189, 180, 246, 0.78),
        inset 0 0 0 2px rgba(255, 250, 255, 0.58);
    transition: filter 120ms ease, transform 120ms ease;
}
.popup-minimize:hover{
    filter: brightness(1.06);
    transform: translateY(-1px);
}
.popup-minimize:active{
    transform: translateY(1px);
}
.popup::before{
    content: "";
    position: absolute;
    inset: 10px;
    border: 2px dashed rgba(255, 246, 250, 0.54);
    border-radius: 12px;
    pointer-events: none;
}
.popup::after{
    content: "";
    position: absolute;
    inset: -10px;
    z-index: -1;
    border-radius: 24px;
    background:
        radial-gradient(circle, rgba(255, 214, 220, 0.72), transparent 68%);
    filter: blur(10px);
    pointer-events: none;
}
.popup .button{
    margin: 18px auto 0;
    width: 132px;
    white-space: nowrap;
}
.status{
    background-color: transparent;
    text-align: center;
    color: #fff8fb;
    text-shadow:
        0 2px 0 rgba(107, 79, 136, 0.42),
        0 0 10px rgba(255, 255, 255, 0.75),
        0 0 18px rgba(255, 181, 190, 0.82);
}
.message{
    color: #fff8fb;
    text-shadow:
        0 2px 0 rgba(107, 79, 136, 0.36),
        0 0 10px rgba(255, 255, 255, 0.66);
}
@keyframes popupGlow {
    from {
        box-shadow:
            0 0 0 3px rgba(246, 145, 164, 0.38),
            0 0 18px rgba(255, 181, 190, 0.72),
            0 0 42px rgba(189, 180, 246, 0.56),
            inset 0 0 0 4px rgba(255, 250, 250, 0.42),
            inset 0 -18px 32px rgba(128, 104, 196, 0.18);
    }
    to {
        box-shadow:
            0 0 0 3px rgba(246, 145, 164, 0.52),
            0 0 28px rgba(255, 181, 190, 0.95),
            0 0 58px rgba(189, 180, 246, 0.78),
            inset 0 0 0 4px rgba(255, 250, 250, 0.52),
            inset 0 -18px 32px rgba(128, 104, 196, 0.2);
    }
}
/*@media only screen and( max-width: 480px){*/
/*    .popup{*/
/*        top: 27%;*/
/*        left: 10%;*/
/*        border: 3px solid black;*/
/*    }*/
/*}*/
