/* Rich Test Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Noto+Serif+KR:wght@400;600;700&display=swap');

:root {
    --primary-color: #1a237e;
    /* Deep Navy */
    --accent-color: #FFD700;
    /* Gold */
    --accent-hover: #FFC107;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #212121;
    --text-sub: #616161;
    --border-color: #e0e0e0;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-gold: 0 4px 15px rgba(255, 215, 0, 0.3);
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
.serif {
    font-family: 'Noto Serif KR', serif;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    width: 100%;
}

/* Home Button */
.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin-bottom: 20px;
    color: var(--text-sub);
    text-decoration: none;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-home:hover {
    background-color: #e8eaf6;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.main-title {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-sub);
    margin-bottom: 40px;
}

.intro-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 50px 30px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
}

.intro-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.intro-desc {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: var(--text-main);
}

.btn-start {
    background: var(--primary-color);
    color: var(--accent-color);
    border: 2px solid var(--primary-color);
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    font-family: 'Noto Serif KR', serif;
}

.btn-start:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

/* Test Page */
.test-container {
    max-width: 700px;
}

.progress-section {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-sub);
    font-weight: 500;
}

.question-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    border-top: 4px solid var(--primary-color);
}

.question-badge {
    display: inline-block;
    background: var(--bg-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.6rem;
    margin-bottom: 40px;
    color: var(--text-main);
    line-height: 1.4;
    font-weight: 600;
}

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

.choice-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 20px 25px;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

.choice-btn:hover {
    border-color: var(--primary-color);
    background: #e8eaf6;
    color: var(--primary-color);
    font-weight: 500;
}

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

/* Result Page */
.result-container {
    max-width: 800px;
}

.loading {
    text-align: center;
    padding: 100px 20px;
}

.loading i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.result-section {
    text-align: center;
}

.result-header {
    margin-bottom: 40px;
}

.score-badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--accent-color);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.result-grade {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.result-title {
    font-size: 1.5rem;
    color: var(--text-sub);
    font-weight: 500;
}

.result-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    text-align: left;
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.result-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
    text-align: center;
}

.ad-banner {
    margin: 30px 0;
    min-height: 90px;
    background: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Recommend Cards */
.recommend-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.recommend-card {
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.recommend-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.recommend-card.investment {
    background-color: #e3f2fd;
    border-color: #90caf9;
}

.recommend-card.spending {
    background-color: #ffebee;
    border-color: #ef9a9a;
}

.recommend-card.home {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
}

.recommend-title {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.recommend-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--text-sub);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-share {
    background: var(--primary-color);
    color: white;
}

.btn-share:hover {
    background: #283593;
    box-shadow: 0 4px 8px rgba(26, 35, 126, 0.3);
}

.btn-retry {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-retry:hover {
    background: #f5f5f5;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.2rem;
    }

    .intro-card {
        padding: 30px 20px;
    }

    .question-text {
        font-size: 1.3rem;
    }

    .result-grade {
        font-size: 2.5rem;
    }

    .recommend-container {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }
}

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

.intro-section-box {
    margin-bottom: 25px;
    background-color: #ffffff;
    padding: 25px;
    border-radius: var(--radius-lg);
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.intro-section-box h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.intro-section-box p {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.7;
    word-break: keep-all;
}

.intro-section-box.highlight {
    background-color: #fffde7;
    /* Light Yellow */
    border-left-color: var(--accent-color);
}

.intro-section-box strong {
    color: #333;
    font-weight: 700;
    background: linear-gradient(120deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.2) 100%);
    box-shadow: inset 0 -0.4em 0 rgba(255, 215, 0, 0.2);
}