/* ========================================
   우주 테마 - 가독성 개선 버전
   ======================================== */

/* 우주 배경 */
body {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 50%, #0f1419 100%) !important;
    position: relative;
    min-height: 100vh;
}

/* 은은한 별 애니메이션 (배경에만) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 90% 60%, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% 200%;
    animation: stars 200s linear infinite;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

@keyframes stars {
    from { transform: translateY(0); }
    to { transform: translateY(-1000px); }
}

/* 헤더 - 깔끔하고 전문적 */
.header {
    background: rgba(15, 20, 25, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.logo-icon i {
    font-size: 3rem;
    background: linear-gradient(135deg, #4A90E2, #7B68EE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(74, 144, 226, 0.5));
}

.logo-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFFFFF !important;
    text-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

.logo-subtitle {
    font-size: 0.9rem;
    color: #B8C5D6 !important;
    letter-spacing: 0.5px;
}

.logo-version {
    font-size: 0.75rem;
    color: #FFD700 !important;
    font-weight: 600;
}

/* 섹션 카드 - 더 높은 대비 */
.section {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

/* 인트로 카드 */
.intro-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-2xl);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(123, 104, 238, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.intro-icon i {
    font-size: 4rem;
    background: linear-gradient(135deg, #4A90E2, #7B68EE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(74, 144, 226, 0.4));
}

.intro-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1f2e !important;
    margin-bottom: var(--spacing-sm);
}

.intro-developer {
    color: #4A90E2 !important;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.intro-main-text {
    font-size: 1.1rem;
    line-height: 2;
    color: #2d3748 !important;
    text-align: center;
}

.highlight-text {
    color: #4A90E2 !important;
    font-weight: 700;
    background: linear-gradient(135deg, #4A90E2, #7B68EE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 질문 카드 - 깔끔한 흰 배경 */
.question-card {
    background: #ffffff !important;
    backdrop-filter: none;
    border: 1px solid rgba(74, 144, 226, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.question-card:hover {
    border-color: rgba(74, 144, 226, 0.5) !important;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.2) !important;
    transform: translateX(3px);
}

.question-text {
    color: #1a202c !important;
    font-weight: 500;
}

/* 질문 번호 - 높은 가독성 */
.question-number {
    display: inline-block;
    background: linear-gradient(135deg, #4A90E2, #5a9fe8);
    color: #FFFFFF !important;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
    margin-right: 8px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    font-size: 0.9rem;
}

/* 옵션 버튼 - 명확한 색상 */
.option-button {
    background: #f7fafc !important;
    border: 2px solid #e2e8f0 !important;
    color: #2d3748 !important;
    transition: all 0.3s ease;
}

.option-button:hover {
    background: #edf2f7 !important;
    border-color: #4A90E2 !important;
    transform: translateY(-2px);
}

.option-label input[type="radio"]:checked + .option-button {
    background: linear-gradient(135deg, #4A90E2, #5a9fe8) !important;
    border-color: #4A90E2 !important;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3) !important;
    color: white !important;
}

.option-value {
    color: inherit !important;
    font-weight: 700;
}

.option-text {
    color: inherit !important;
}

/* 결과 화면 */
.result-header {
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3748 100%) !important;
    border: 2px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

.result-header h2,
.result-header p {
    color: #FFFFFF !important;
}

.result-header i {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* 점수 카드 - 깔끔한 흰 배경 */
.score-card {
    background: #ffffff !important;
    backdrop-filter: none;
    border: 1px solid rgba(74, 144, 226, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.score-card::before {
    background: linear-gradient(90deg, #4A90E2, #7B68EE) !important;
}

.score-card h3 {
    color: #1a202c !important;
    font-weight: 600;
}

.score-number {
    color: #4A90E2 !important;
    font-weight: 700;
}

.score-max,
.score-label {
    color: #718096 !important;
}

/* 진단 결과 섹션 */
.diagnosis-title {
    color: #1a202c !important;
    font-weight: 700;
}

.diagnosis-description {
    color: #2d3748 !important;
    line-height: 1.8;
}

/* 버튼 */
.btn-primary {
    background: linear-gradient(135deg, #4A90E2, #5a9fe8) !important;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3) !important;
    color: white !important;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5) !important;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #718096 !important;
    color: white !important;
}

.btn-info {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #1a1a2e !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3) !important;
}

.btn-info:hover {
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5) !important;
    transform: translateY(-2px);
}

/* 진행 바 */
.progress-container {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.progress-fill {
    background: linear-gradient(90deg, #4A90E2, #7B68EE) !important;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.progress-text {
    color: #FFFFFF !important;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Info 박스 */
.info-box {
    background: rgba(255, 255, 255, 0.98) !important;
    border-left-width: 4px !important;
    color: #2d3748 !important;
}

.info-box.warning {
    background: rgba(255, 245, 230, 0.98) !important;
    border-left-color: #F59E0B !important;
}

.info-box.info {
    background: rgba(240, 249, 255, 0.98) !important;
    border-left-color: #4A90E2 !important;
}

.info-box.danger {
    background: rgba(255, 240, 240, 0.98) !important;
    border-left-color: #E94B3C !important;
}

/* 섹션 헤더 */
.section-header h2 {
    color: #1a202c !important;
    font-weight: 700;
}

.section-desc {
    color: #4a5568 !important;
}

.section-badge {
    background: linear-gradient(135deg, #4A90E2, #7B68EE);
    color: white !important;
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #ffffff;
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, #4A90E2, #5a9fe8);
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
}

.modal-header h2 {
    color: #FFFFFF !important;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.modal-header h2 i {
    color: #FFD700 !important;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--spacing-xl);
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    background: #ffffff;
}

/* 응답 섹션 */
.response-section {
    margin-bottom: var(--spacing-2xl);
    background: #f7fafc;
    padding: var(--spacing-xl);
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.response-section-title {
    font-size: 1.3rem;
    color: #1a202c !important;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
}

.response-section-title i {
    color: #4A90E2;
}

.response-item {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    background: #ffffff;
    border-left: 4px solid #4A90E2;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.response-question {
    color: #2d3748 !important;
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.response-answer {
    color: #4A90E2 !important;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.response-answer-score {
    display: inline-block;
    background: linear-gradient(135deg, #4A90E2, #7B68EE);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 상세 해석 스타일 */
.clinical-interpretation,
.detailed-interpretation {
    background: #f0f9ff;
    padding: var(--spacing-xl);
    border-radius: 12px;
    border-left: 4px solid #4A90E2;
    margin: var(--spacing-xl) 0;
}

.clinical-interpretation h4,
.detailed-interpretation h4 {
    color: #1a202c !important;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
}

.clinical-interpretation h4 i,
.detailed-interpretation h4 i {
    color: #4A90E2;
}

.interpretation-content {
    color: #2d3748 !important;
    line-height: 1.8;
    font-size: 0.95rem;
}

.interpretation-content strong {
    color: #1a202c !important;
    display: block;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

/* 생활 가이드라인 스타일 */
.lifestyle-guidelines {
    background: #faf5ff;
    padding: var(--spacing-xl);
    border-radius: 12px;
    border: 2px solid rgba(123, 104, 238, 0.2);
    margin: var(--spacing-xl) 0;
}

.lifestyle-guidelines > h4 {
    color: #1a202c !important;
    font-size: 1.3rem;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
}

.lifestyle-guidelines > h4 i {
    color: #7B68EE;
}

.guideline-category {
    background: #ffffff;
    padding: var(--spacing-lg);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
    border-left: 4px solid #7B68EE;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.guideline-category h5 {
    color: #1a202c !important;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
}

.guideline-category h5 i {
    color: #7B68EE;
}

.guideline-items {
    list-style: none;
    padding-left: 0;
}

.guideline-items li {
    padding: var(--spacing-sm) 0;
    padding-left: var(--spacing-xl);
    position: relative;
    color: #2d3748 !important;
    line-height: 1.6;
}

.guideline-items li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #52C41A;
    font-weight: 700;
    font-size: 1.1rem;
}

/* 권장 사항 섹션 */
.recommendation-section {
    margin: var(--spacing-xl) 0;
}

.recommendation-section h4 {
    color: #1a202c !important;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.recommendation-section h4 i {
    color: #4A90E2;
}

.recommendation-list {
    list-style: none;
    padding-left: 0;
}

.recommendation-list li {
    padding: var(--spacing-sm) 0;
    padding-left: var(--spacing-xl);
    position: relative;
    color: #2d3748 !important;
    line-height: 1.6;
}

.recommendation-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #4A90E2;
    font-weight: 700;
}

/* 레벨 배지 */
.diagnosis-level {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.level-0 { background: #F59E0B; color: white; }
.level-1 { background: #52C41A; color: white; }
.level-2 { background: #13C2C2; color: white; }
.level-3 { background: #1890FF; color: white; }
.level-4 { background: #722ED1; color: white; }
.level-5 { background: #F5222D; color: white; }
.level-6 { background: #8B0000; color: white; }

/* 푸터 */
.footer {
    background: rgba(15, 20, 25, 0.95);
    color: #B8C5D6 !important;
    border-top: 1px solid rgba(74, 144, 226, 0.2);
}

.footer p {
    color: #B8C5D6 !important;
}

.footer-note {
    color: #8b95a5 !important;
    font-size: 0.9rem;
}

/* 텍스트 색상 전역 조정 */
h1, h2, h3, h4, h5, h6 {
    color: #1a202c !important;
}

p, li, span {
    color: #2d3748 !important;
}

.text-secondary {
    color: #718096 !important;
}

/* 점수 가이드 */
.score-guide {
    background: #f0f9ff;
    padding: var(--spacing-xl);
    border-radius: 12px;
    border: 2px solid rgba(74, 144, 226, 0.2);
}

.score-guide h4 {
    color: #1a202c !important;
    font-weight: 700;
}

.score-guide-desc {
    color: #4a5568 !important;
}

.score-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.score-item {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.score-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.score-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c !important;
    margin-bottom: var(--spacing-sm);
}

.score-desc {
    display: block;
    font-weight: 600;
    color: #2d3748 !important;
    margin-bottom: var(--spacing-xs);
}

.score-detail {
    display: block;
    font-size: 0.85rem;
    color: #718096 !important;
    line-height: 1.4;
}

/* 목적 그리드 */
.purpose-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.purpose-item {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.2);
    text-align: center;
}

.purpose-item i {
    font-size: 2.5rem;
    color: #4A90E2;
    margin-bottom: var(--spacing-md);
}

.purpose-item h4 {
    color: #1a202c !important;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.purpose-item p {
    color: #4a5568 !important;
    font-size: 0.9rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .score-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .purpose-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .score-items {
        grid-template-columns: 1fr;
    }
}
