/* [맑눈광 테스트] 테마 상세 스타일링 - v4.3.4 Button Sync Applied */
:root {
    --madness-yellow: #F3FF00;
    --madness-dark: #1a1a1a;
    --madness-black: #0d0d0d;
    --madness-gray: #262626;
    --madness-text: #ffffff;
    --madness-glow: rgba(243, 255, 0, 0.4);
}

body.madness-theme {
    background: linear-gradient(180deg, var(--madness-dark) 0%, var(--madness-black) 100%) !important;
    background-attachment: fixed !important;
    color: var(--madness-text) !important;
    font-family: 'Pretendard Variable', sans-serif !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 🏗️ 7-LOCK: Logo Hard-Lock */
.madness-theme .test-header-fixed {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(243, 255, 0, 0.1) !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 20px !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000 !important;
}

.madness-theme .header-logo {
    height: 32px !important;
    width: auto !important;
    filter: drop-shadow(0 0 5px var(--madness-glow));
}

.madness-theme .header-text {
    color: var(--madness-yellow);
    font-weight: 800;
    margin-left: 8px;
    text-shadow: 0 0 10px var(--madness-glow);
}

/* 🏗️ Golden Compact: Layout Adjustments */
.madness-theme .test-wrapper {
    padding-top: 74px !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
    min-height: 100vh;
}

.madness-theme .test-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.madness-theme .test-intro-text {
    text-align: center;
    margin-bottom: 16px;
    width: 100%;
}

.madness-theme .main-title {
    color: var(--madness-yellow);
    font-size: 1.55rem !important;
    font-weight: 900;
    margin-bottom: 6px;
    text-shadow: 0 0 15px var(--madness-glow);
}

.madness-theme .sub-title {
    font-size: 0.95rem;
    color: #999;
    line-height: 1.5;
}

/* Progress Area */
.madness-theme .progress-box {
    margin: 10px 0 20px !important;
    width: 100%;
}

.madness-theme .progress-info {
    text-align: center;
    margin-bottom: 8px;
    font-weight: 850;
    color: var(--madness-yellow);
    text-shadow: 0 0 5px var(--madness-glow);
}

.madness-theme .progress-track {
    background: #333 !important;
    height: 8px !important;
    border-radius: 999px !important;
    position: relative;
    overflow: visible;
}

.madness-theme .progress-active-bar {
    background: var(--madness-yellow) !important;
    height: 100% !important;
    border-radius: 999px !important;
    box-shadow: 0 0 15px var(--madness-glow) !important;
    transition: width 0.4s ease;
}

.madness-theme .progress-runner-icon {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -60%);
    font-size: 1.6rem !important;
    transition: left 0.4s ease;
    z-index: 10;
}

/* 🏗️ Premium Wrap LOCK: Integrated Structure */
.madness-theme .question-area {
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 28px !important;
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(243, 255, 0, 0.1) !important;
    margin-bottom: 20px !important;
}

.madness-theme .q-box {
    margin-bottom: 20px !important;
    min-height: 160px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: keep-all;
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    background: #262626 !important;
    border: 1px solid #333 !important;
    border-radius: 20px !important;
    padding: 24px 20px !important;
}

.madness-theme .options-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 🏗️ Width Sync Fix: Enforced Width */
.madness-theme .option-btn {
    background: #1a1a1a !important;
    border: 1.5px solid #333 !important;
    border-radius: 14px !important;
    padding: 14px 20px !important;
    width: 100% !important;
    min-height: 68px !important;
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box !important;
}

.madness-theme .option-btn:hover {
    background: var(--madness-yellow) !important;
    color: #000 !important;
    border-color: var(--madness-yellow) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--madness-glow) !important;
}

/* Navigation - Capsule Pill Style */
.madness-theme .nav-control-btns {
    display: flex;
    justify-content: center;
    padding-bottom: 20px;
    width: 100%;
}

.madness-theme .btn-ghost {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid #444 !important;
    color: #999 !important;
    padding: 10px 48px !important;
    border-radius: 999px !important;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box !important;
}

/* 🏗️ Result Screen (Golden Compact & Sync Applied) */
.madness-card-wrap {
    background: #1a1a1a !important;
    border-radius: 28px !important;
    padding: 32px 20px !important;
    border: 1px solid #333 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative !important;
}

.madness-badge {
    background: var(--madness-yellow) !important;
    color: #000 !important;
    font-weight: 900 !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;
    margin-bottom: 20px !important;
}

.madness-theme .result-title {
    font-size: 1.7rem !important;
    font-weight: 950 !important;
    color: var(--madness-yellow) !important;
    margin-bottom: 12px !important;
    text-shadow: 0 0 15px var(--madness-glow) !important;
    text-align: center;
}

.result-quote {
    font-style: italic;
    color: #ccc;
    margin-bottom: 24px;
    text-align: center;
}

.result-desc {
    font-size: 1rem;
    line-height: 1.7 !important;
    color: #eee;
    text-align: left;
    margin-bottom: 24px;
    width: 100%;
}

/* Scale Box */
.ms-scale-item {
    width: 100%;
    margin-bottom: 16px;
}

.ms-scale-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.ms-scale-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 999px;
    overflow: hidden;
}

.ms-scale-fill {
    height: 100%;
    background: var(--madness-yellow);
    box-shadow: 0 0 10px var(--madness-glow);
}

/* 🏗️ Result Buttons: Golden Standard Sync */
.result-action-btns {
    display: flex !important;
    width: 100% !important;
    gap: 12px !important;
    margin-top: 24px !important;
    box-sizing: border-box !important;
}

.action-btn-primary,
.action-btn-secondary {
    flex: 1 !important;
    height: 56px !important;
    border-radius: 14px !important;
    font-weight: 850 !important;
    cursor: pointer;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    border: none !important;
}

.action-btn-primary {
    background: var(--madness-yellow) !important;
    color: #000 !important;
}

.action-btn-secondary {
    background: #333 !important;
    color: #fff !important;
}

/* Canvas Layer */
.madness-canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.hidden {
    display: none !important;
}