/* 기본 스타일 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* 공통 컨테이너 */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 화면 전환 관리 */
.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.screen.active {
    display: block;
}

/* 시작 화면 스타일 */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.subtitle {
    font-size: 1.2rem;
    color: #f0f0f0;
    font-weight: 300;
}

.intro-content {
    background: white;
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.intro-text p {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.8;
}

.gender-selection h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
}

.gender-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    pointer-events: auto;
}

.gender-btn {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    border: none;
    border-radius: 20px;
    padding: 20px 30px;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 120px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.gender-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.gender-btn.selected {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    box-shadow: 0 10px 25px rgba(78, 205, 196, 0.4);
    transform: translateY(-5px);
}

.gender-btn .emoji {
    font-size: 2rem;
}

/* 테스트 화면 스타일 */
.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.question-container {
    background: white;
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.question-number {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
}

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

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

.option-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 20px;
    padding: 20px 25px;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.option-btn .emoji {
    font-size: 1.5rem;
}

/* 중간 결과 화면 */
.intermediate-content {
    background: white;
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.intermediate-content h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.intermediate-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.dimension-scores {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.dimension-score {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid #667eea;
}

.dimension-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.score-bars {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.score-bar-container {
    flex: 1;
    margin: 0 10px;
}

.score-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 20px;
    position: relative;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.score-fill-primary {
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
}

.score-fill-secondary {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.score-text-weak {
    opacity: 0.6;
    font-weight: normal;
}

.score-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.continue-btn {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    border: none;
    border-radius: 20px;
    padding: 15px 40px;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.continue-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

/* 결과 화면 스타일 */
.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-header h2 {
    font-size: 2.2rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.result-header p {
    font-size: 1.2rem;
    color: #f0f0f0;
}

.result-card {
    background: white;
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
}

.result-character {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.result-type {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.result-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.result-description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
}

.result-strengths,
.result-mission,
.result-celebrity {
    margin-bottom: 25px;
    text-align: left;
}

.result-strengths h4,
.result-mission h4,
.result-celebrity h4 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.strengths-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.strength-tag {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.mission-text {
    font-size: 1rem;
    color: #555;
    text-align: center;
    background: #fff3cd;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #ffa500;
}

.celebrity-info {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #2196f3;
}

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

.celebrity-description {
    font-size: 1rem;
    color: #555;
    text-align: center;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn,
.intermediate-btn,
.restart-btn {
    border: none;
    border-radius: 20px;
    padding: 15px 30px;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

.intermediate-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.restart-btn {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
}

.share-btn:hover,
.intermediate-btn:hover,
.restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* 로딩 화면 */
.loading-content {
    background: white;
    border-radius: 25px;
    padding: 50px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.loading-spinner {
    font-size: 3rem;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-content p {
    font-size: 1.2rem;
    color: #555;
}

/* 공유 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 25px;
}

.share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.share-option {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #333;
}

.share-option:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.share-icon {
    font-size: 1.5rem;
}

/* 애니메이션 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .intro-content,
    .question-container,
    .intermediate-content,
    .result-card {
        padding: 30px 20px;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .option-btn {
        font-size: 1rem;
        padding: 18px 20px;
    }
    
    .result-type {
        font-size: 2rem;
    }
    
    .result-character {
        font-size: 3rem;
    }
    
    .gender-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .gender-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .share-btn,
    .intermediate-btn,
    .restart-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .intro-text p {
        font-size: 1.1rem;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .option-btn {
        font-size: 0.95rem;
        padding: 15px 18px;
    }
    
    .result-type {
        font-size: 1.8rem;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
    
    .score-text {
        font-size: 0.8rem;
    }
}

/* 접근성 개선 */
.option-btn:focus,
.gender-btn:focus,
.continue-btn:focus,
.share-btn:focus,
.intermediate-btn:focus,
.restart-btn:focus {
    outline: 3px solid #ffa500;
    outline-offset: 2px;
}

/* 스크린 리더를 위한 숨김 텍스트 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
} 