/* ============================================================
   💕 애정 결핍 지수 - Warm Heart & Yarn Theme
   UI_STANDARD_GUIDE v4.3.0 Golden Compact 준수
   ============================================================ */

:root {
    --love-bg: #FFF0F5;
    --love-card: #FFFFFF;
    --love-pink: #FF69B4;
    --love-purple: #BA68C8;
    --love-dark: #C2185B;
    --love-text: #4A4A4A;
}

/* 테마 바디 */
.affection-theme {
    background: var(--love-bg);
    background-image:
        radial-gradient(circle at 80% 20%, rgba(255, 105, 180, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(186, 104, 200, 0.1) 0%, transparent 40%);
}

/* 하트/털실 장식 */
.affection-theme::before {
    content: "💕";
    position: fixed;
    top: 12%;
    right: 6%;
    font-size: 2.5rem;
    opacity: 0.15;
    pointer-events: none;
}

.affection-theme::after {
    content: "🧶";
    position: fixed;
    bottom: 20%;
    left: 5%;
    font-size: 2rem;
    opacity: 0.12;
    pointer-events: none;
}

/* 헤더 */
.affection-theme .test-header-fixed {
    background: rgba(255, 240, 245, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 105, 180, 0.2);
}

.affection-theme .header-text {
    color: var(--love-pink);
    font-weight: 700;
}

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

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

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

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

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

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

.affection-theme .progress-track {
    position: relative;
    height: 8px;
    background: linear-gradient(90deg, #FFB6C1, var(--love-pink), var(--love-purple));
    border-radius: 999px;
    overflow: visible;
}

.affection-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);
}

.affection-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.15));
}

/* 질문 영역 */
.affection-theme .question-area {
    background: var(--love-card);
    margin: 0 20px;
    padding: 24px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.12);
    border: 1px solid rgba(255, 105, 180, 0.2);
}

.affection-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(--love-text);
    line-height: 1.6;
    word-break: keep-all;
    padding: 10px;
}

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

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

.affection-theme .option-btn:hover {
    border-color: var(--love-pink);
    background: rgba(255, 105, 180, 0.08);
    transform: translateY(-2px);
}

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

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

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

.affection-theme .btn-ghost:hover {
    background: rgba(255, 105, 180, 0.1);
}

/* ============ 결과 화면 ============ */
.affection-theme .result-container {
    padding: 30px 20px;
    text-align: center;
    background: var(--love-card);
    margin: 0 16px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.18);
    border: 2px solid var(--love-pink);
    position: relative;
    overflow: hidden;
}

/* 장식 */
.affection-theme .result-container::before {
    content: "💗";
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 1.8rem;
    opacity: 0.12;
}

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

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

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

/* 물리 시각화 영역 */
.affection-theme .physics-visual-area {
    position: relative;
    width: 100%;
    height: 180px;
    margin: 16px 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.2) 0%, var(--love-bg) 50%, rgba(186, 104, 200, 0.1) 100%);
    border: 1px solid rgba(255, 105, 180, 0.2);
    overflow: hidden;
}

.affection-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(255, 105, 180, 0.3));
}

/* 분석 텍스트 */
.affection-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(255, 105, 180, 0.08);
    border-radius: 14px;
    text-align: left;
    position: relative;
    z-index: 1;
}

/* 뼈 때리는 한 줄 영역 */
.affection-theme .bone-hit-area {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.12) 0%, rgba(186, 104, 200, 0.1) 100%);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
    border-left: 4px solid var(--love-dark);
    text-align: left;
}

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

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

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

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

.affection-theme .action-btn-secondary:hover {
    background: rgba(186, 104, 200, 0.1);
}

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

.affection-theme .action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

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

.love-item.heart-sparkle {
    animation: heartSparkle 0.6s forwards;
}

.love-item.yarn-unravel {
    animation: yarnUnravel 0.8s forwards;
}

@keyframes heartSparkle {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    30% {
        transform: scale(1.3);
        filter: brightness(1.5);
    }

    60% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

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

    25% {
        transform: scale(0.9) rotate(-20deg);
    }

    50% {
        transform: scale(0.7) rotate(-40deg) translateY(10px);
    }

    75% {
        transform: scale(0.5) rotate(-60deg) translateY(20px);
        opacity: 0.7;
    }

    100% {
        transform: scale(0.3) rotate(-90deg) translateY(40px);
        opacity: 0.4;
    }
}

/* 핑크 가루 이펙트 */
.pink-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--love-pink);
    border-radius: 50%;
    opacity: 0;
    animation: sparkleFloat 0.8s forwards;
    pointer-events: none;
    z-index: 10;
}

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

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

    100% {
        opacity: 0;
        transform: scale(0.5) translateY(-30px);
    }
}

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