/* 애니팝 (Ani Pop) — 페이지 스타일 */

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

html,
body {
    height: 100%;
    background: #2a2118;
    overflow: hidden;
    font-family: "Pretendard", -apple-system, "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    display: flex;
    flex-direction: column;
}

#stage {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game {
    height: 100%;
    max-height: 100%;
    max-width: 100vw;
    aspect-ratio: 9 / 16;
    background: #fdf6ec;
    display: block;
    touch-action: none;
}

/* ------------------------------------------------ 오버레이 (시작/게임오버) */

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    color: #fff;
    background: rgba(30, 22, 12, 0.66);
    padding: 24px;
}

.overlay.hidden {
    display: none;
}

.overlay__eyebrow {
    font-size: 11px;
    letter-spacing: 0.3em;
    color: #ffd76a;
    font-weight: 700;
}

.overlay__title {
    font-size: clamp(2.4rem, 9vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}

.overlay__title .pop {
    background: linear-gradient(120deg, #ffb347, #ff6b9d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.overlay__sub {
    font-family: Consolas, monospace;
    font-size: 13px;
    letter-spacing: 0.34em;
    color: #9adcff;
    font-weight: 700;
}

.overlay__desc {
    font-size: 14px;
    line-height: 1.8;
    color: #f3e9dc;
}

.overlay__chain {
    font-size: 17px;
    letter-spacing: 2px;
}

.overlay__hint {
    font-size: 12px;
    color: #c9b8a4;
}

.overlay__best {
    font-size: 13px;
    color: #ffd76a;
}

.overlay__gameover {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    font-weight: 900;
    color: #ff8a5c;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
}

.overlay__stats {
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid #5a4a38;
    border-radius: 10px;
    padding: 14px 26px;
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: #e0d2c0;
}

.overlay__stats strong {
    color: #fff;
    font-size: 17px;
    margin-left: 8px;
}

.overlay__newrecord {
    color: #ffd76a;
    font-weight: 700;
    animation: blink 0.9s step-end infinite;
}

.overlay__newrecord.hidden {
    display: none;
}

@keyframes blink {
    50% { opacity: 0.25; }
}

.btn-retro {
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    color: #3a2410;
    background: linear-gradient(#ffd97a, #ffab4d);
    border: 3px solid #3a2410;
    border-radius: 12px;
    box-shadow: 0 5px 0 #3a2410;
    padding: 13px 34px;
    cursor: pointer;
    transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.btn-retro:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #3a2410;
}

.overlay__backlink a {
    font-size: 12px;
    color: #c9b8a4;
}

/* ------------------------------------------------------ 하단 배너 광고 바 */

#ad-bar {
    flex: 0 0 auto;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #201810;
    border-top: 1px solid #443624;
    overflow: hidden;
}

.ad-placeholder {
    font-family: Consolas, monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4em;
    color: rgba(255, 255, 255, 0.16);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 8px 26px 8px 32px;
}
