/* ============================================================
   🕯️ 과거 미련 지수 - Retro & Fading Theme
   UI_STANDARD_GUIDE v4.3.0 Golden Compact 준수
   ============================================================ */

:root {
    --past-bg: #F5F5F5;
    --past-card: #FFFFFF;
    --past-brown: #795548;
    --past-gray: #9E9E9E;
    --past-dark: #5D4037;
    --past-text: #424242;
}

/* 테마 바디 */
.past-theme {
    background: var(--past-bg);
    background-image:
        radial-gradient(circle at 80% 20%, rgba(121, 85, 72, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(158, 158, 158, 0.1) 0%, transparent 40%);
}

/* 장식 */
.past-theme::before {
    content: "🕯️";
    position: fixed;
    top: 12%;
    right: 6%;
    font-size: 2.5rem;
    opacity: 0.12;
    pointer-events: none;
}

.past-theme::after {
    content: "📸";
    position: fixed;
    bottom: 20%;
    left: 5%;
    font-size: 2rem;
    opacity: 0.1;
    pointer-events: none;
    filter: sepia(100%) grayscale(50%);
}

/* 헤더 */
.past-theme .test-header-fixed {
    background: rgba(245, 245, 245, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(121, 85, 72, 0.2);
}

.past-theme .header-text {
    color: var(--past-brown);
    font-weight: 700;
}

/* 래퍼 */
.past-theme .test-wrapper {
    padding-top: 74px;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
}

/* 인트로 텍스트 */
.past-theme .test-intro-text {
    text-align: center;
    padding: 20px 20px 10px;
}

.past-theme .main-title {
    font-family: 'Gowun Batang', serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--past-dark);
    margin: 0 0 8px;
}

.past-theme .sub-title {
    font-size: 0.95rem;
    color: var(--past-brown);
    margin: 0;
    line-height: 1.5;
}

/* 진행바 */
.past-theme .progress-box {
    padding: 0 20px;
    margin-bottom: 16px;
}

.past-theme .progress-info {
    text-align: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--past-dark);
    font-weight: 600;
}

.past-theme .progress-track {
    position: relative;
    height: 8px;
    background: linear-gradient(90deg, var(--past-gray), var(--past-brown), #A1887F);
    border-radius: 999px;
    overflow: visible;
}

.past-theme .progress-active-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.past-theme .progress-runner-icon {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    z-index: 10;
    transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 질문 영역 */
.past-theme .question-area {
    background: var(--past-card);
    margin: 0 20px;
    padding: 24px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(121, 85, 72, 0.1);
    border: 1px solid rgba(121, 85, 72, 0.15);
}

.past-theme .q-box {
    min-height: 160px !important;
    max-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--past-text);
    line-height: 1.6;
    word-break: keep-all;
    padding: 10px;
}

/* 옵션 버튼 */
.past-theme .option-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.past-theme .option-btn {
    width: 100%;
    min-height: 60px !important;
    padding: 14px 18px;
    border: 2px solid rgba(121, 85, 72, 0.25);
    border-radius: 14px;
    background: var(--past-card);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--past-text);
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.past-theme .option-btn:hover {
    border-color: var(--past-brown);
    background: rgba(121, 85, 72, 0.06);
    transform: translateY(-2px);
}

.past-theme .option-btn:active {
    transform: scale(0.98);
}

/* 이전 버튼 */
.past-theme .nav-control-btns {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.past-theme .btn-ghost {
    padding: 10px 48px;
    border: 1.5px solid var(--past-brown);
    border-radius: 999px;
    background: transparent;
    color: var(--past-brown);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.past-theme .btn-ghost:hover {
    background: rgba(121, 85, 72, 0.1);
}

/* ============ 결과 화면 ============ */
.past-theme .result-container {
    padding: 30px 20px;
    text-align: center;
    background: var(--past-card);
    margin: 0 16px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(121, 85, 72, 0.15);
    border: 2px solid var(--past-brown);
    position: relative;
    overflow: hidden;
}

/* 장식 */
.past-theme .result-container::before {
    content: "📸";
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 1.8rem;
    opacity: 0.1;
    filter: sepia(100%) grayscale(50%);
}

.past-theme .result-container::after {
    content: "⏳";
    position: absolute;
    bottom: 50px;
    right: 12px;
    font-size: 1.5rem;
    opacity: 0.1;
}

.past-theme .result-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--past-brown);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.past-theme .result-title {
    font-family: 'Gowun Batang', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--past-dark);
    margin: 0 0 16px;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* 물리 시각화 영역 */
.past-theme .physics-visual-area {
    position: relative;
    width: 100%;
    height: 180px;
    margin: 16px 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(158, 158, 158, 0.15) 0%, var(--past-bg) 50%, rgba(121, 85, 72, 0.1) 100%);
    border: 1px solid rgba(121, 85, 72, 0.15);
    overflow: hidden;
}

.past-theme .main-emoji-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    z-index: 5;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

/* 분석 텍스트 */
.past-theme .analysis-text {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.7;
    margin: 0 0 16px;
    padding: 16px;
    word-break: keep-all;
    background: rgba(121, 85, 72, 0.08);
    border-radius: 14px;
    text-align: left;
    position: relative;
    z-index: 1;
}

/* 뼈 때리는 한 줄 영역 */
.past-theme .bone-hit-area {
    background: linear-gradient(135deg, rgba(121, 85, 72, 0.12) 0%, rgba(158, 158, 158, 0.1) 100%);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
    border-left: 4px solid var(--past-dark);
    text-align: left;
}

.past-theme .bone-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #5D4037;
    display: block;
    margin-bottom: 8px;
}

.past-theme .bone-hit-area p {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
    font-weight: 500;
}

/* 액션 버튼 */
.past-theme .result-action-btns {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.past-theme .action-btn-secondary {
    flex: 1;
    padding: 14px;
    border: 2px solid var(--past-gray);
    border-radius: 14px;
    background: transparent;
    color: #757575;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.past-theme .action-btn-secondary:hover {
    background: rgba(158, 158, 158, 0.15);
}

.past-theme .action-btn-primary {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--past-brown) 0%, #8D6E63 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.past-theme .action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(121, 85, 72, 0.4);
}

/* 물리 아이템 */
.past-item {
    position: absolute;
    font-size: 24px;
    user-select: none;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.2s, filter 0.3s, opacity 0.4s;
}

.past-item.letter-crumble {
    animation: letterCrumble 0.7s forwards;
}

.past-item.dust-vanish {
    animation: dustVanish 0.5s forwards;
}

@keyframes letterCrumble {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    30% {
        transform: scale(1.1) rotate(-10deg);
        opacity: 0.9;
    }

    60% {
        transform: scale(0.8) rotate(20deg);
        opacity: 0.5;
        filter: blur(1px);
    }

    100% {
        transform: scale(0.3) rotate(45deg) translateY(30px);
        opacity: 0;
        filter: blur(3px);
    }
}

@keyframes dustVanish {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* 먼지 파티클 */
.dust-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--past-brown);
    border-radius: 50%;
    opacity: 0;
    animation: dustFloat 0.8s forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes dustFloat {
    0% {
        opacity: 0;
        transform: scale(0) translateY(0);
    }

    30% {
        opacity: 0.8;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.5) translateY(-25px) translateX(var(--dx, 0px));
    }
}

/* 히든 */
.hidden {
    display: none !important;
}