/* 전체 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 페이지 공통 */
.page {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* 시작 페이지 */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.main-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.intro-section {
    text-align: center;
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    color: white;
}

.intro-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.intro-section h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.intro-section p {
    font-size: 1rem;
    opacity: 0.95;
}

/* 기능 목록 */
.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 30px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.feature-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.feature-text h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: #333;
}

.feature-text p {
    font-size: 0.8rem;
    color: #666;
}

/* 버튼 스타일 */
.start-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.warning-text {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin: 20px 0;
}

/* 공유 버튼 */
.share-container {
    text-align: center;
    margin-top: 20px;
}

.kakao-share-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    background: #FEE500;
    color: #371D1E;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.kakao-share-btn:hover {
    background: #FFDB00;
    transform: translateY(-1px);
}

.kakao-icon {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* 테스트 페이지 */
.progress-container {
    margin-bottom: 30px;
}

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

.progress {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.question-container {
    text-align: center;
}

.question-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
    line-height: 1.4;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-btn {
    padding: 15px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    font-weight: 500;
}

.answer-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-1px);
}

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

.result-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 15px;
}

.result-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.result-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.result-content {
    margin-bottom: 30px;
}

.result-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.result-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.result-section p {
    margin-bottom: 10px;
    color: #555;
}

.result-section ul {
    list-style: none;
    padding-left: 0;
}

.result-section li {
    padding: 5px 0;
    color: #555;
}

/* 액션 버튼들 */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.retry-btn {
    padding: 15px 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* 팝업 스타일 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.analysis-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    z-index: 1001;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.analysis-header {
    margin-bottom: 20px;
}

.analysis-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.analysis-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.countdown {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin: 15px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

.popup-ad-container {
    margin: 20px 0;
    text-align: center;
}

.popup-ad {
    max-width: 100%;
    height: auto;
}

.confirm-popup-btn {
    width: 100%;
    padding: 15px 25px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.confirm-popup-btn:enabled {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.confirm-popup-btn:enabled:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.confirm-popup-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* 광고 컨테이너 */
.ad-container {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

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

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

/* 반응형 디자인 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .page {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        gap: 10px;
    }
    
    .analysis-popup {
        width: 95%;
        padding: 20px;
    }
    
    .card-recommendations {
        grid-template-columns: 1fr;
    }
    
    .result-section {
        padding: 12px;
        margin: 15px 0;
    }
    
    .card-item, .site-item, .method-item, .step-item, .app-item {
        padding: 10px;
    }
    
    .result-section h3 {
        font-size: 1em;
    }
    
    .card-item h4, .site-item h4, .method-item h4, .step-item h4 {
        font-size: 0.9em;
    }
}

/* 결과 섹션 */
.result-section {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
}

.result-section h3 {
    color: #1e40af;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.result-section h4 {
    color: #374151;
    margin: 10px 0 5px 0;
    font-size: 1em;
}

.result-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.result-section li {
    margin: 5px 0;
    line-height: 1.5;
}

/* 카드 추천 섹션 */
.card-recommendations {
    display: grid;
    gap: 15px;
    margin: 15px 0;
}

.card-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-item h4 {
    color: #1f2937;
    margin-bottom: 8px;
    font-weight: 600;
}

.card-item p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.9em;
}

.card-item a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.card-item a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* 도움되는 사이트 섹션 */
.helpful-sites {
    display: grid;
    gap: 12px;
    margin: 15px 0;
}

.site-item {
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px;
    transition: background-color 0.2s;
}

.site-item:hover {
    background: #f3f4f6;
}

.site-item h4 {
    margin: 0 0 5px 0;
    color: #374151;
    font-size: 0.95em;
}

.site-item p {
    margin: 5px 0 8px 0;
    font-size: 0.85em;
    color: #6b7280;
    line-height: 1.4;
}

.site-item a {
    color: #059669;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
}

.site-item a:hover {
    color: #047857;
    text-decoration: underline;
}

/* 변경 방법 가이드 */
.change-methods, .change-guide {
    margin: 15px 0;
}

.method-item, .step-item {
    background: #fef7ff;
    border: 1px solid #e879f9;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.method-item h4, .step-item h4 {
    color: #a21caf;
    margin-bottom: 10px;
}

.method-item ul, .step-item ul {
    margin: 10px 0;
    padding-left: 20px;
}

.method-item li, .step-item li {
    margin: 8px 0;
    line-height: 1.5;
}

.method-item a, .step-item a {
    color: #7c3aed;
    text-decoration: none;
}

.method-item a:hover, .step-item a:hover {
    color: #5b21b6;
    text-decoration: underline;
}

/* 앱 추천 섹션 */
.app-recommendations {
    display: grid;
    gap: 12px;
    margin: 15px 0;
}

.app-item {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 12px;
}

.app-item h4 {
    color: #0369a1;
    margin-bottom: 8px;
}

.app-item p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.5;
}

.app-item a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 500;
}

.app-item a:hover {
    color: #0369a1;
    text-decoration: underline;
}
