/* Past Life Test Styles - Traditional Korean Theme */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;600;700;900&display=swap');

:root {
    --bg-paper: #fdfbf7;
    --text-ink: #2c2c2c;
    /* 먹색 */
    --primary-brown: #8d6e63;
    /* 갈색/나무색 */
    --accent-red: #d84315;
    /* 인주색 */
    --border-color: #d7ccc8;

    --font-main: 'Noto Serif KR', serif;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-paper: 2px 2px 5px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-paper);
    color: var(--text-ink);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    width: 100%;
    border-left: 1px solid rgba(0, 0, 0, 0.03);
    border-right: 1px solid rgba(0, 0, 0, 0.03);
    background-color: rgba(255, 255, 255, 0.4);
    min-height: 100vh;
}

/* Buttons */
.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 30px;
    color: var(--text-ink);
    text-decoration: none;
    border: 1px solid var(--primary-brown);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: white;
}

.btn-home:hover {
    background-color: var(--primary-brown);
    color: white;
}

/* Intro Section */
.intro-section {
    text-align: center;
    padding: 40px 0;
}

.intro-title-deco {
    width: 60px;
    height: 60px;
    border: 2px solid var(--text-ink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.main-title {
    font-size: 2.8rem;
    color: var(--text-ink);
    margin-bottom: 15px;
    font-weight: 900;
    letter-spacing: -1px;
    word-break: keep-all;
}

.subtitle {
    font-size: 1.1rem;
    color: #5d4037;
    margin-bottom: 40px;
    font-weight: 600;
}

.intro-card {
    background: white;
    border: 2px solid var(--text-ink);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
}

.intro-card::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.intro-desc {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-ink);
    line-height: 1.8;
}

.btn-start {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    box-shadow: 0 4px 6px rgba(216, 67, 21, 0.3);
}

.btn-start:hover {
    background: #bf360c;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(216, 67, 21, 0.4);
}

.ad-banner {
    margin: 40px 0;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-sm);
}

footer {
    text-align: center;
    padding: 30px 0;
    color: #8d6e63;
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

/* --- Additional Styles for Test & Result --- */

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-red);
    transition: width 0.3s ease;
}

.question-count {
    text-align: right;
    font-size: 0.9rem;
    color: #8d6e63;
    margin-bottom: 30px;
}

/* Question Box */
.question-box {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-paper);
    border: 1px solid var(--border-color);
}

.question-text {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 30px;
    word-break: keep-all;
    line-height: 1.4;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.choice-btn {
    padding: 18px 20px;
    background: #fdfbf7;
    border: 1px solid #d7ccc8;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
    color: var(--text-ink);
}

.choice-btn:hover {
    background: #efebe9;
    border-color: var(--primary-brown);
}

.choice-btn.selected {
    background: var(--primary-brown);
    color: white;
}

/* Result Page */
.loading-screen {
    text-align: center;
    padding: 100px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #efebe9;
    border-top: 5px solid var(--accent-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-subtitle {
    font-size: 1.2rem;
    color: var(--accent-red);
    font-weight: 700;
    margin-bottom: 10px;
}

.result-title {
    font-size: 2.2rem;
    font-weight: 900;
    word-break: keep-all;
}

.result-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    border: 2px solid var(--text-ink);
    margin-bottom: 30px;
}

.result-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.partner-box {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.partner-item {
    flex: 1;
    padding: 15px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.partner-item.good {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.partner-item.bad {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
}

.partner-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.partner-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.advice-box {
    background-color: #fff8e1;
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid #ffecb3;
}

.advice-box h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #f57f17;
}

/* Cross Links */
.cross-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s;
    color: var(--text-ink);
    border: 1px solid transparent;
}

.link-btn:hover {
    transform: translateY(-2px);
}

.link-btn.spending {
    background-color: #ffebee;
    color: #c62828;
    border-color: #ffcdd2;
}

.link-btn.rich {
    background-color: #fff8e1;
    color: #f57f17;
    border-color: #ffecb3;
}

.link-btn.home {
    background-color: #f5f5f5;
    color: #616161;
    border-color: #e0e0e0;
}

.btn-retry {
    width: 100%;
    padding: 15px;
    background: white;
    border: 1px solid var(--text-ink);
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-main);
    transition: all 0.2s;
}

.btn-retry:hover {
    background: var(--text-ink);
    color: white;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .partner-box {
        flex-direction: column;
    }

    .main-title {
        font-size: 2.2rem;
    }
}

/* Intro Content Styles (SEO) */
.intro-content {
    text-align: left;
    margin: 40px 0;
    width: 100%;
}

.intro-section-box {
    margin-bottom: 25px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--text-ink);
    box-shadow: var(--shadow-paper);
}

.intro-section-box h3 {
    color: var(--accent-red);
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-main);
    font-weight: 700;
}

.intro-section-box p {
    color: var(--text-ink);
    font-size: 1.1rem;
    line-height: 1.8;
    word-break: keep-all;
}

.intro-section-box.highlight {
    background-color: #fff3e0;
    /* Light Orange */
    border-color: var(--accent-red);
}

.intro-section-box strong {
    color: #3e2723;
    font-weight: 900;
    background: linear-gradient(120deg, rgba(216, 67, 21, 0.2) 0%, rgba(216, 67, 21, 0.2) 100%);
    box-shadow: inset 0 -0.4em 0 rgba(216, 67, 21, 0.2);
}