/* =============================================
   벽돌깨기 게임 스타일
   테마: 다크 + 네온 오렌지
   ============================================= */

html { background: #0f0f23; }

.bo-body {
    overflow: hidden;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #f0f0f0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* Game Area */
.bo-game {
    width: 100%;
    height: 100dvh;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #0f0f23;
}

/* Top Bar */
.bo-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    z-index: 10;
    flex-shrink: 0;
}
.bo-back {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}
.bo-back:hover { color: #fff; }
.bo-info-badge {
    font-size: 13px;
    font-weight: 600;
    color: #FB923C;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.2);
}

/* Canvas Wrapper */
.bo-canvas-wrap {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    position: relative;
    flex-shrink: 0;
    padding: 0 8px;
}
.bo-canvas-wrap canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    border: 1px solid #2d2d44;
    touch-action: none;
}

/* Content area */
.bo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 20px;
    overflow-y: auto;
}

/* ===== INTRO ===== */
.state-intro .bo-canvas-wrap { display: none; }
.state-intro .bo-info-badge { display: none; }
.state-intro .bo-content {
    justify-content: center;
    padding-top: 0;
}

.bo-intro-emoji { font-size: 72px; margin-bottom: 16px; }
.bo-intro-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.bo-intro-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}
.bo-intro-desc strong { color: #FB923C; }

.bo-best {
    background: rgba(251, 146, 60, 0.1);
    border-radius: 10px;
    padding: 10px 18px;
    margin-bottom: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.bo-challenge {
    background: rgba(251, 146, 60, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 16px;
    color: #FB923C;
    text-align: center;
}
.bo-challenge strong { font-size: 22px; }

.bo-rules {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}
.bo-rule-chip {
    padding: 6px 14px;
    background: rgba(251, 146, 60, 0.08);
    border: 1px solid rgba(251, 146, 60, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.bo-btn-start {
    display: inline-block;
    padding: 16px 48px;
    background: linear-gradient(135deg, #FB923C, #F97316);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s;
}
.bo-btn-start:active { transform: scale(0.95); }

/* ===== COUNTDOWN ===== */
.state-countdown { background: #0f0f1a; }
.state-countdown .bo-canvas-wrap { display: none; }
.state-countdown .bo-info-badge { display: none; }
.state-countdown .bo-content {
    justify-content: center;
    padding: 0;
}
.bo-countdown-wrap { text-align: center; }
.bo-countdown-num {
    font-size: 120px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    animation: boCountPop 0.5s ease-out;
}
.bo-countdown-num.bo-countdown-pop {
    animation: boCountPop 0.5s ease-out;
}
.bo-countdown-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 16px;
}
@keyframes boCountPop {
    0% { transform: scale(1.6); opacity: 0.3; }
    50% { transform: scale(0.95); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== PLAYING ===== */
.state-playing .bo-content { display: none; }

/* ===== GAMEOVER overlay ===== */
.bo-gameover-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 15, 35, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    animation: boFadeIn 0.3s ease;
}
@keyframes boFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bo-gameover-text {
    font-size: 32px;
    font-weight: 900;
    color: #EF4444;
    margin-bottom: 16px;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.bo-gameover-score {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 4px;
}
.bo-gameover-score small { font-size: 18px; color: rgba(255,255,255,0.5); }

.bo-gameover-detail {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
}

.bo-btn-result {
    padding: 16px 48px;
    background: linear-gradient(135deg, #FB923C, #F97316);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s;
}
.bo-btn-result:active { transform: scale(0.95); }

/* ===== RESULT ===== */
.state-result .bo-canvas-wrap { display: none; }
.state-result .bo-info-badge { display: none; }
.state-result .bo-content {
    justify-content: flex-start;
    padding-top: 24px;
}

/* Result — 공통 game-result.css 사용 */

/* Toast */
.bo-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.bo-toast-show {
    opacity: 1;
    pointer-events: auto;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .bo-canvas-wrap {
        max-width: calc(100vw - 16px);
    }
    .bo-intro-title { font-size: 24px; }
    .bo-intro-emoji { font-size: 56px; }
    .bo-gameover-score { font-size: 40px; }
}

@media (max-width: 360px) {
    .bo-canvas-wrap {
        max-width: calc(100vw - 12px);
        padding: 0 4px;
    }
    .bo-top-bar { padding: 10px 12px; }
    .bo-content { padding: 12px 16px; }
}
