/* =============================================
   MBTI 테스트 게임 스타일
   ============================================= */

html { background: #000; }
* { box-sizing: border-box; margin: 0; padding: 0; }

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 */
.mb-game {
    width: 100%;
    height: 100dvh;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Top Bar */
.mb-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    z-index: 10;
    flex-shrink: 0;
}
.mb-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);
}
.mb-back:hover { color: #fff; }
.mb-info-badge {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.2);
}

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

/* ===== States ===== */

/* Intro */
.state-intro { background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%); }
.state-intro .mb-content {
    justify-content: flex-start;
    padding-top: 40px;
}

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

.mb-best {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.mb-btn-start {
    display: inline-block;
    padding: 16px 48px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s;
}
.mb-btn-start:active { transform: scale(0.95); }

/* Playing */
.state-playing { background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%); }
.state-playing .mb-content {
    justify-content: center;
    padding: 16px 20px;
}

.mb-progress-bar {
    width: 100%;
    max-width: 360px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
}
.mb-progress-fill {
    height: 100%;
    background: #818cf8;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.mb-q-number {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.mb-q-category {
    font-size: 12px;
    color: rgba(129, 140, 248, 0.8);
    background: rgba(129, 140, 248, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.mb-question {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 32px;
    max-width: 360px;
}

.mb-choices {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 360px;
}

.mb-btn-choice {
    width: 100%;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.2s, background 0.2s;
    text-align: left;
    line-height: 1.4;
}
.mb-btn-choice:active {
    transform: scale(0.97);
    border-color: #818cf8;
    background: rgba(129, 140, 248, 0.15);
}

.mb-choice-label {
    display: inline-block;
    font-weight: 700;
    color: #818cf8;
    margin-right: 8px;
}

/* Result */
.state-result { background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%); }
.state-result .mb-content {
    justify-content: flex-start;
    padding-top: 32px;
}

.mb-result-type {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 4px;
}

.mb-result-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.mb-result-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    text-align: center;
    max-width: 340px;
    margin-bottom: 16px;
}

.mb-result-compat {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}
.mb-result-compat strong { color: #818cf8; }

.mb-dimension-chart {
    width: 100%;
    max-width: 340px;
    margin-bottom: 20px;
}
.mb-dim-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.mb-dim-label {
    width: 24px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    flex-shrink: 0;
}
.mb-dim-bar-wrap {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
.mb-dim-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
}
.mb-dim-pct {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

/* Toast */
.mb-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;
    white-space: nowrap;
}
.mb-toast-show {
    opacity: 1;
    pointer-events: auto;
}
