/* 레트로 빈티지 테마 */
:root {
    --vintage-cream: #faf5f0;
    --warm-orange: #d2691e;
    --deep-brown: #8b4513;
    --soft-gold: #daa520;
    --muted-red: #cd5c5c;
    --sage-green: #9caf88;
    --dusty-blue: #6b8db5;
    --charcoal: #36454f;
    --light-tan: #f5deb3;
    --shadow-brown: rgba(139, 69, 19, 0.2);
    --vh: 1vh;
}

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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(45deg, var(--vintage-cream) 0%, var(--light-tan) 100%);
    color: var(--charcoal);
    min-height: 100vh;
    line-height: 1.7;
    position: relative;
}

/* 빈티지 패턴 배경 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(139, 69, 19, 0.02) 20px, rgba(139, 69, 19, 0.02) 21px),
        repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(210, 105, 30, 0.01) 20px, rgba(210, 105, 30, 0.01) 21px);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: calc(var(--vh, 1vh) * 100);
}

.hidden {
    display: none !important;
}

/* 광고 컨테이너 */
.ad-container {
    margin: 20px 0;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--soft-gold);
    box-shadow: 0 4px 15px var(--shadow-brown);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container.top {
    margin-top: 0;
    margin-bottom: 25px;
}

.ad-container.mid {
    margin: 25px 0;
    padding: 15px;
}

.ad-container.result {
    margin: 30px 0;
    padding: 15px;
}

/* 시작 페이지 */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.header-section {
    text-align: center;
    position: relative;
}

.year-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, var(--warm-orange), var(--muted-red));
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(210, 105, 30, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.update-indicator {
    animation: blink 1.5s infinite;
    color: #90ee90;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.main-title {
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--deep-brown);
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.1);
}

.title-emphasis {
    background: linear-gradient(45deg, var(--warm-orange), var(--soft-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.subtitle {
    font-size: 1.2em;
    color: var(--charcoal);
    opacity: 0.8;
    font-style: italic;
}

/* 통계 디스플레이 */
.stats-display {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 6px 20px var(--shadow-brown);
    border: 2px solid var(--soft-gold);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.1), transparent);
    transition: left 0.6s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px var(--shadow-brown);
}

.stat-icon {
    font-size: 3em;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, var(--sage-green), var(--dusty-blue));
    border-radius: 50%;
    color: white;
    box-shadow: 0 4px 15px rgba(156, 175, 136, 0.4);
}

.stat-value {
    font-size: 2em;
    font-weight: 800;
    color: var(--deep-brown);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1em;
    color: var(--charcoal);
    opacity: 0.7;
}

/* 기능 그리드 */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    padding: 25px;
    text-align: center;
    border: 2px solid var(--dusty-blue);
    box-shadow: 0 6px 20px rgba(107, 141, 181, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(107, 141, 181, 0.3);
    border-color: var(--warm-orange);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.feature-item h3 {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--deep-brown);
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--charcoal);
    opacity: 0.8;
    font-size: 0.95em;
}

/* 테스트 섹션 */
.test-section {
    background: linear-gradient(45deg, rgba(218, 165, 32, 0.1), rgba(156, 175, 136, 0.1));
    border-radius: 25px;
    padding: 35px;
    text-align: center;
    border: 3px solid var(--soft-gold);
    box-shadow: inset 0 2px 10px rgba(218, 165, 32, 0.1);
    position: relative;
}

.test-section::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--warm-orange), var(--soft-gold), var(--sage-green));
    border-radius: 25px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.test-section:hover::after {
    opacity: 0.3;
}

.test-header h2 {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--deep-brown);
    margin-bottom: 12px;
}

.test-header p {
    color: var(--charcoal);
    font-size: 1.1em;
    margin-bottom: 25px;
    opacity: 0.8;
}

.test-features {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px 0;
    border-top: 1px solid var(--soft-gold);
    border-bottom: 1px solid var(--soft-gold);
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--charcoal);
}

.feature .feature-icon {
    font-size: 1.8em;
    color: var(--warm-orange);
}

/* 시작 버튼 */
.start-btn {
    background: linear-gradient(45deg, var(--warm-orange), var(--muted-red));
    border: none;
    border-radius: 50px;
    padding: 20px 40px;
    font-size: 1.2em;
    font-weight: 700;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(210, 105, 30, 0.4);
    width: 100%;
    font-family: inherit;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.start-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(210, 105, 30, 0.5);
}

.btn-arrow {
    font-size: 1.4em;
    transition: transform 0.3s ease;
}

.start-btn:hover .btn-arrow {
    transform: translateX(8px);
}

/* 정보 공지 */
.info-notice {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    border-left: 5px solid var(--sage-green);
    box-shadow: 0 4px 15px var(--shadow-brown);
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.notice-icon {
    font-size: 1.6em;
    color: var(--sage-green);
}

.notice-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--deep-brown);
}

.notice-list {
    list-style: none;
    color: var(--charcoal);
    line-height: 1.8;
}

.notice-list li {
    margin: 10px 0;
    font-size: 0.95em;
}

/* 질문 페이지 */
.question-container {
    margin-bottom: 40px;
}

.progress-area {
    margin-bottom: 35px;
}

.progress-label {
    text-align: center;
    font-size: 1.3em;
    font-weight: 600;
    color: var(--deep-brown);
    margin-bottom: 15px;
}

.progress-track {
    background: rgba(218, 165, 32, 0.2);
    height: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--soft-gold);
}

.progress-fill {
    background: linear-gradient(90deg, var(--warm-orange), var(--soft-gold));
    height: 100%;
    width: 0%;
    border-radius: 12px;
    transition: width 0.6s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.question-title {
    font-size: 1.6em;
    font-weight: 700;
    text-align: center;
    color: var(--deep-brown);
    line-height: 1.4;
    margin-bottom: 15px;
}

.question-desc {
    text-align: center;
    color: var(--charcoal);
    opacity: 0.7;
    font-size: 1em;
    font-style: italic;
}

/* 답변 그리드 */
.answers-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-option {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid var(--dusty-blue);
    border-radius: 20px;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    color: var(--charcoal);
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(218, 165, 32, 0.1), transparent);
    transition: left 0.4s ease;
}

.answer-option:hover::before {
    left: 100%;
}

.answer-option:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--warm-orange);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 8px 25px var(--shadow-brown);
}

.answer-option.selected {
    background: linear-gradient(45deg, var(--sage-green), var(--dusty-blue));
    border-color: var(--sage-green);
    color: white;
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(156, 175, 136, 0.4);
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(54, 69, 79, 0.8);
    backdrop-filter: blur(8px);
}

.modal-box {
    background: var(--vintage-cream);
    border-radius: 25px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    border: 3px solid var(--soft-gold);
    box-shadow: 0 20px 60px rgba(139, 69, 19, 0.3);
}

.analysis-visual {
    margin-bottom: 35px;
}

.calc-icon {
    font-size: 4.5em;
    margin-bottom: 20px;
    animation: calculate 3s infinite;
}

@keyframes calculate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(5deg); }
    75% { transform: scale(0.9) rotate(-5deg); }
}

.loading-text {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--deep-brown);
    margin-bottom: 25px;
}

.progress-ring {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(218, 165, 32, 0.2);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
}

.ring-fill {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 60px;
    height: 60px;
    border: 6px solid transparent;
    border-top: 6px solid var(--warm-orange);
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

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

.calc-steps {
    text-align: left;
    margin-bottom: 30px;
}

.calc-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(218, 165, 32, 0.2);
}

.calc-step:last-child {
    border-bottom: none;
}

.step-dot {
    color: var(--dusty-blue);
    font-size: 1.2em;
}

.calc-step.active .step-dot {
    color: var(--warm-orange);
}

.step-label {
    flex: 1;
    font-weight: 500;
    color: var(--charcoal);
}

.step-check {
    font-size: 1.2em;
    color: var(--sage-green);
}

.timer-section {
    margin-bottom: 25px;
}

.timer-text {
    color: var(--charcoal);
    opacity: 0.7;
    margin-bottom: 8px;
}

.timer-display {
    font-size: 3em;
    font-weight: 800;
    color: var(--muted-red);
}

.modal-ad {
    margin-top: 30px;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    min-height: 120px;
    border: 2px solid var(--soft-gold);
}

/* 결과 페이지 */
.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    color: white;
    box-shadow: 0 10px 30px var(--shadow-brown);
}

.result-title {
    font-size: 2.2em;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--deep-brown);
}

.result-summary {
    font-size: 1.2em;
    color: var(--charcoal);
    opacity: 0.8;
}

.result-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

/* 액션 영역 */
.action-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-btn, .share-btn, .restart-btn {
    padding: 16px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.detail-btn {
    background: linear-gradient(45deg, var(--warm-orange), var(--muted-red));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.share-btn {
    background: #FEE500;
    color: #3C1E1E;
    border: 2px solid #ffd700;
}

.restart-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--deep-brown);
    border: 2px solid var(--dusty-blue);
}

.detail-btn:hover, .share-btn:hover, .restart-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px var(--shadow-brown);
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .main-title {
        font-size: 2.2em;
    }
    
    .stats-display {
        gap: 12px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .test-features {
        flex-direction: column;
        gap: 15px;
    }
    
    .feature {
        flex-direction: row;
        gap: 10px;
    }
}

@media (max-width: 360px) {
    .main-title {
        font-size: 2em;
    }
    
    .container {
        padding: 12px;
    }
}
