/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 화면 전환 */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

/* 헤더 */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a3e72;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #1a3e72 0%, #4a7ab5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 400;
}

/* 정보 카드 */
.info-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.info-card h3 {
    color: #1a3e72;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.info-card ul {
    list-style: none;
    margin-bottom: 25px;
}

.info-card li {
    padding: 8px 0;
    color: #212529;
    position: relative;
    padding-left: 25px;
}

.info-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #1a3e72;
    font-weight: bold;
}

/* 응답 척도 */
.response-scale {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.response-scale h4 {
    color: #1a3e72;
    margin-bottom: 15px;
    font-weight: 600;
}

.scale-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.scale-items span {
    background: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #212529;
    border: 1px solid #e9ecef;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

/* 면책 조항 */
.disclaimer {
    background: #fff9e6;
    border: 4px solid #f6ad55;
    border-radius: 8px;
    padding: 15px;
}

.disclaimer p {
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 5px;
}

/* 개인정보 동의 화면 */
.terms-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.terms-content {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.terms-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.terms-content li {
    margin: 5px 0;
    line-height: 1.6;
}

.agreement-checkbox {
    margin: 20px 0;
    padding: 15px;
    background: #fff9e6;
    border: 2px solid #f6ad55;
    border-radius: 8px;
}

.agreement-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
}

.agreement-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f6ad55;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* 네비게이션 버튼 */
.navigation-buttons {
    display: flex;
    justify-content: flex-start;
    margin: 30px 0;
}

.navigation-buttons button {
    max-width: 120px;
}

/* 버튼 */
.btn-primary {
    background: linear-gradient(135deg, #1a3e72 0%, #4a7ab5 100%);
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: #A0AEC0;
    color: #1A202C;
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #718096;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 진행률 바 */
.progress-bar {
    background: #e9ecef;
    border-radius: 25px;
    height: 8px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(135deg, #1a3e72 0%, #4a7ab5 100%);
    height: 100%;
    border-radius: 25px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* 문항 카드 */
.question-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  width: 100%;
}

.question-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
  min-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.question-text {
    font-size: 1.4rem;
    color: #1a3e72;
    margin-bottom: 40px;
    font-weight: 500;
    line-height: 1.5;
}

/* 선택지 */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
  align-items: stretch; /* ← 이거 중요! */
}

.option-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    width: 100%;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-card:hover {
    background: #e9ecef;
    border-color: #4a7ab5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.option-card.selected {
    background: linear-gradient(135deg, #1a3e72 0%, #4a7ab5 100%);
    border-color: #1a3e72;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 62, 114, 0.3);
}

.option-number {
    background: rgba(255, 255, 255, 0.2);
    color: #1a3e72;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.option-card.selected .option-number {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.option-text {
    font-size: 1.1rem;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

/* 경고 메시지 */
.warning-message {
    color: #e53e3e !important;
    border: 2px solid #e53e3e;
    background: #fff5f5;
    border-radius: 8px;
    padding: 12px 18px;
    margin: 20px 0 0 0;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
}

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

.result-header h1 {
    font-size: 2.2rem;
    color: #1a3e72;
    margin-bottom: 10px;
}

.result-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.result-section h2 {
    color: #1a365d;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #f6ad55;
    min-height: 120px;
}

.result-card.stable { border-left-color: #38a169; }   /* 안정(초록) */
.result-card.caution { border-left-color: #d69e2e; }  /* 주의(노랑) */
.result-card.warning { border-left-color: #dd6b20; }  /* 경고(주황) */
.result-card.danger { border-left-color: #e53e3e; }   /* 위험(빨강) */

.result-level {
    margin-bottom: 15px;
}

.level-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a365d;
}

.result-description {
    color: #333;
    line-height: 1.6;
}

.result-description p {
    margin-bottom: 10px;
}

/* 특별 관찰 영역 */
.observation-card {
    background: #fff9e6;
    border: 4px solid #f6ad55;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.observation-content h3 {
    color: #1a365d;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.observation-content h4 {
    color: #2d3748;
    margin: 15px 0 10px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.observation-content p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.observation-content p strong {
    color: #1a365d;
    font-weight: 600;
}

.observation-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.observation-content li {
    color: #333;
    margin: 5px 0;
    line-height: 1.5;
}

/* 척도별 결과 */
.scales-container {
    display: grid;
    gap: 20px;
}

.scale-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3182ce;
}

.scale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.scale-name {
    font-weight: 600;
    color: #1a365d;
    font-size: 1.1rem;
}

.scale-score {
    background: #3182ce;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.scale-description {
    color: #333;
    line-height: 1.5;
}

/* 이메일 섹션 */
.email-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    max-width: 700px; 
    margin: 0 auto;
    line-height: 1.7;
    text-align: center;
}

.email-section h3 {
    color: #1a365d;
    margin-bottom: 6px;
}

.email-section p {
    color: #333;
    margin-bottom: 10px;
}

.email-input-container {
    display: flex;
    gap: 5px;
    max-width: 500px;
    margin: 0 auto;
}

.email-input-container input {
    flex: 1;
    padding: 6px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
}

.email-input-container input:focus {
    outline: none;
    border-color: #3182ce;
}

/* 다시 검사하기 */
.retake-section {
    text-align: center;
}


/* 사용자 정보 입력 폼 스타일 */
.info-form-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    max-width: 700px;
    margin: 0 auto;
}

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

.form-section h3 {
    color: #1a3e72;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.optional {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 400;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 12px;
    font-size: 1rem;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 12px 18px;
    border-radius: 25px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    min-width: 120px;
    justify-content: center;
    margin-bottom: 0;
}

.radio-group label:hover {
    background: #e9ecef;
    border-color: #4a7ab5;
    transform: translateY(-1px);
}

.radio-group label input[type="radio"] {
    margin: 0;
    accent-color: #1a3e72;
}

.radio-group label:has(input:checked) {
    background: linear-gradient(135deg, #1a3e72 0%, #4a7ab5 100%);
    color: white;
    border-color: #1a3e72;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 62, 114, 0.3);
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.form-buttons button {
    flex: 1;
    max-width: 200px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .info-form-card {
        padding: 20px;
        margin: 15px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .radio-group label {
        min-width: auto;
        width: 100%;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .form-buttons button {
        max-width: none;
    }
  }
}

@media (max-width: 480px) {
    .form-section h3 {
        font-size: 1.1rem;
    }
    
    .radio-group label {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
.question-card {
  width: 100%;
  max-width: 600px;
  min-width: unset;
  margin: 0 auto;
  box-sizing: border-box;
}
    .question-text {
        font-size: 1.2rem;
         margin-bottom: 40px; 
    }
    
.option-card {
  width: 100%;
  max-width: none;          /* ← 이걸 꼭 제거하거나 none으로 둬야 꽉 찹니다 */
  padding: 16px;
  box-sizing: border-box;
}
    .option-text {
        font-size: 1rem;
    }
    .options-container {
    margin-top: 20px;
  }
    .scale-items {
        flex-direction: column;
    }
    
    .scale-items span {
        min-width: auto;
    }
    
    .email-input-container {
        flex-direction: column;
    }
    
    .btn-primary {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .option-card {
        padding: 12px;
    }
    .options-container {
    margin-top: 20px;
  }
    .option-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* 문항 텍스트 영역 고정 및 반응형 */
.question-text {
    min-height: 48px;
     margin-bottom: 40px; 
    font-size: 1.15rem;
    line-height: 1.6;
    word-break: keep-all;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (max-width: 600px) {
    .question-text {
        font-size: 1rem;
        margin-bottom: 40px; 
        min-height: 38px;
        padding: 0 6px;
        line-height: 1.5;
    max-width: 90%;   /* ✅ 양옆 여백 줘서 시각 안정감 */
    margin: 0 auto;   /* ✅ 중앙 정렬 */
    }
   .options-container {
    margin-top: 20px;
  }
      .combo-line {
    margin-left: 1.2em;    /* ✅ 조합명 들여쓰기 */
    text-align: left;      /* ✅ 혹시 정렬 깨졌다면 확실히 고정 */
  }
} 
