body {
    background-image: url('../img/background.webp');
    background-repeat: no-repeat;
    background-size: 105%;
    font-family: 'Noto Sans KR', sans-serif;
    /* background-color: #f4f4f4; */ /* 배경 이미지가 있으므로 주석 처리 또는 삭제 */
    color: #333;
    margin: 0;
    /* padding: 20px; */ /* body 패딩 대신 container에 패딩을 주는 것을 고려 */
    display: flex;
    justify-content: center;
    align-items: center; /* 수직 중앙 정렬을 위해 flex-start 에서 center로 변경 또는 min-height와 함께 사용 */
    min-height: 100vh; /* body가 전체 화면 높이를 가지도록 */
    box-sizing: border-box;
}

#socio-test-container {
    background-color: #fff;
    margin-top: 5px; /* body가 align-items: center면 이 margin-top은 수직 중앙 정렬에 영향을 줄 수 있음 */
    padding: 5px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    /* 너비 고정 */
    width: 900px; /* 90% 제거하고 고정 너비 설정 */
    max-width: 900px; /* 필요 시 유지 */


/* 플렉스 설정 제거 또는 간소화 */
    flex: 0 0 auto; /* flex-grow: 0, flex-shrink: 0, flex-basis: auto */
    box-sizing: border-box;
    text-align: center;
}

.area {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    /* 너비 고정 */
    width: 100%; /* 부모(#socio-test-container)의 너비를 정확히 따름 */
    max-width: 100%; /* 넘치지 않도록 */
    min-width: 0; /* 플렉스/그리드 환경에서 축소 방지 */
}

/* 검사버튼 */
#start-area h2 {
    color: #333;
    margin-bottom: 15px;
}

/* 시작화면 안내문구 스타일*/
#start-area p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px; 
}

#question-title {
    font-size: 22px;
    color: #555;
    margin-bottom: 10px;
}

#question-text {
    font-size: 28px;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 60px;
    
    /* 텍스트 래핑 및 오버플로우 제어 */
    word-break: break-word; /* 긴 단어 강제 줄바꿈 */
    overflow-wrap: break-word; /* 현대적인 래핑 속성 */
    white-space: normal; /* 텍스트가 자연스럽게 줄바꿈 */
    width: 100%; /* 부모(.area)의 너비를 따름 */
    box-sizing: border-box;
}

.media-placeholder {
    width: 200px;
    height: 200px; /* 이미지/애니메이션 공간 높이 (조절 가능) */
    /*background-color: #ffffff; */
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto; /* 부모(.area)가 text-align:center가 아니거나, 
                           .media-placeholder 자체가 블록처럼 중앙 정렬되길 원할 때 */
    margin-right: auto; /* 위와 동일 */
    margin-bottom: 20px;
    overflow: hidden; /* 내부 이미지가 넘치지 않도록 */
}

.media-placeholder img,
.media-placeholder video { /* 실제 이미지/비디오 태그 사용 시 */
    width: 100%;
    height: 100%;
    object-fit: cover; /* 또는 cover, 필요에 따라 */
}

.placeholder-text {
    color: #777;
    font-style: italic;
}

#options-container {
    display: flex;
    flex-direction: column; /* 답변 버튼 세로 정렬 */
    gap: 10px; /* 버튼 사이 간격 */
    margin-bottom: 20px;
}

.option-btn {
    background-color: #4CAF50; 
    color: white;
    /* border: none; */ /* 이 줄을 수정합니다. */
    border: 2px solid transparent; /* ⭐ 초기에는 투명한 테두리를 주어 공간 확보 */
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block; 
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    /* ⭐ transition에 border-color도 추가 (테두리 색상 변경을 부드럽게) */
    transition: background-color 0.3s ease, border-color 0.3s ease; 
    box-sizing: border-box; /* ⭐ padding과 border가 width/height에 포함되도록 명시 */
}

.option-btn:hover {
    background-color: #45a049;
    border-color: #aa3a3a; /* ⭐ 테두리 색상만 변경 (예시 색상) */
    /* border-width와 border-style은 기본 상태와 동일하게 유지되므로 크기 변화 없음 */
}

.option-btn.selected { 
    background-color: #3e8e41;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    border-color: #2a652c; /* ⭐ 선택 시 테두리 색상 (예시 색상) */
}


.action-btn {
    background-color: #007bff; /* 다음/다시하기 버튼 색상 */
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.action-btn:hover {
    background-color: #0056b3;
}

#result-display {
    display: flex;
    flex-direction: column; /* 결과 이미지와 텍스트 세로 정렬 */
    align-items: center;
}

#result-score-text {
    font-size: 24px;
    font-weight: bold;
    color: #c2185b; /* 포인트 색상 */
    margin-top: 15px; /* 결과 미디어와의 간격 */
    margin-bottom: 10px;
}

#result-message-text {
    font-size: 18px;
    color: #333;
    line-height: 1.6;
}

footer {
    margin-top: 30px;
    font-size: 14px;
    color: #777;
}
/* socio-style.css 파일에 추가 */

.action-buttons-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
  /* 결과 내용과 버튼 사이의 간격 */
  margin-bottom: 15px;
  /* '다시 검사하기' 버튼과의 간격 */
}


/* === 모바일 === */
@media (max-width: 600px) {

  /*
    1. index.html의 body에 적용될 스타일 (socio 페이지 활성 시 & 모바일)
       - 배경 이미지 제거 (패럴랙스 효과 자동 비활성화 유도)
       - 모바일 환경 일관된 배경색 적용
  */
body {
    background-image: none !important;
    background-color: #f0f2f5 !important;
    background-position: center center !important;
    display: block !important; /* flex 대신 block으로 변경하여 상단부터 콘텐츠 시작 */
    min-height: 100vh; /* 최소 높이 유지 */
    margin: 0; /* 기본 여백 유지 */
    padding-top:0px; /* 상단 메뉴 높이(110px)만큼 여백 추가 */
  }

  /*
    2. #socio-test-container 모바일 스타일 조정
       (이전 답변에서 제공된 레이아웃 일관성을 위한 스타일들을 여기에 포함합니다.)
  */
#socio-test-container {
    width: 100%;
    max-width: 100%;
    padding: 15px;
    margin-top: 0; /* 상단 여백은 body에서 처리 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-sizing: border-box;
  }

  #socio-test-container header h1 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .area {
    padding: 10px;
    margin-bottom: 15px;
  }

  #start-area h2,
  #question-area #question-title,
  #result-area h2 {
    font-size: 18px;
  }

  #start-area p,
  #question-area #question-text,
  #result-area #result-message-text,
  #result-area {
    font-size: 16px;
    line-height: 1.6;
  }

  #question-area #question-text {
    font-size: 18px;
    min-height: auto;
    margin-bottom: 15px;
  }

  .media-placeholder {
    width: 100%;
    max-width: 200px;
    height: auto;
    min-height: 120px;
    margin-bottom: 15px;
  }
  
  .media-placeholder img,
  .media-placeholder video {
      object-fit: contain;
  }

  #options-container {
    gap: 8px;
  }

  .option-btn,
  .action-btn {
    font-size: 16px;
    padding: 12px 15px;
  }

  #result-score-text {
    font-size: 28px;
  }

  #socio-test-container footer {
    margin-top: 15px;
    font-size: 12px;
  }
}