@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: linear-gradient(135deg, #1a1a4e 0%, #2d1b69 40%, #11335a 100%);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 0;
}

body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

body::before {
  width: 500px;
  height: 500px;
  background: #7c3aed;
  top: -100px;
  left: -100px;
}

body::after {
  width: 400px;
  height: 400px;
  background: #2563eb;
  bottom: -100px;
  right: -100px;
}

.container {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 48px;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 480px;
  width: 90%;
}

h1 {
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.5);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #ffffff;
}

h2 {
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.5);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #ffffff;
}

.description {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.8;
  margin-bottom: 32px;
}

button {
  transition: all 0.2s ease;
}

/* Google 로그인 버튼 */
.btn-google {
  background: transparent;
  color: #60a5fa;
  border: 1px solid #60a5fa;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  width: 100%;
}

.btn-google:hover {
  background: rgba(96, 165, 250, 0.15);
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.3);
  transform: translateY(-1px);
}

/* 주요 버튼 */
.btn-primary {
  background: transparent;
  color: #a78bfa;
  border: 1px solid #a78bfa;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  width: 100%;
  margin-bottom: 12px;
}

.btn-primary:hover {
  background: rgba(167, 139, 250, 0.15);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.3);
  transform: translateY(-1px);
}

/* 보조 버튼 */
.btn-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  width: 100%;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

#user-name {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
}

#user-name-result {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 24px;
}

/* 진행 바 */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0%;
}

#progress-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 32px;
}

#stage-text,
#practice-stage-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 16px;
}

/* 음성 듣기 버튼 */
.btn-play {
  background: transparent;
  color: #60a5fa;
  border: 1px solid #60a5fa;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 18px;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  width: 100%;
  margin-bottom: 24px;
}

.btn-play:hover {
  background: rgba(96, 165, 250, 0.15);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.35);
  transform: translateY(-2px);
}

/* 판단 버튼 그룹 */
#decision-btns,
#answer-btns,
#practice-decision-btns,
#practice-answer-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.judge-label {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 4px;
}

/* 모국어 버튼 */
.btn-korean {
  background: transparent;
  color: #6ee7b7;
  border: 1px solid #6ee7b7;
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
}

.btn-korean:hover {
  background: rgba(110, 231, 183, 0.15);
  box-shadow: 0 0 16px rgba(110, 231, 183, 0.3);
  transform: translateY(-1px);
}

/* 외국어 버튼 */
.btn-foreign {
  background: transparent;
  color: #fca5a5;
  border: 1px solid #fca5a5;
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
}

.btn-foreign:hover {
  background: rgba(252, 165, 165, 0.15);
  box-shadow: 0 0 16px rgba(252, 165, 165, 0.3);
  transform: translateY(-1px);
}

/* 완료 화면 */
#complete-section h2 {
  font-size: 28px;
  margin-bottom: 16px;
  color: #ffffff;
}

#complete-section p {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 32px;
}

/* 결과 요약 카드 */
.result-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.summary-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.summary-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
}

.summary-value {
  font-size: 20px;
  font-weight: 600;
  color: #a78bfa;
}

/* 결과 테이블 */
#result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

#result-table th {
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

#result-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
}

#result-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* 폼 그룹 */
.form-group {
  text-align: left;
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 8px;
}

.form-group input[type="number"],
.form-group select {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Noto Sans KR', sans-serif;
  color: #ffffff;
  outline: none;
}

.form-group input[type="number"]::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group select option {
  background: #2d1b69;
  color: #ffffff;
}

.form-group input[type="number"]:focus,
.form-group select:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.2);
}

/* 라디오 버튼 그룹 */
.radio-group {
  display: flex;
  gap: 16px;
  padding-left: 12px;
}

.radio-group.vertical {
  flex-direction: column;
  gap: 10px;
  padding-left: 12px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

.radio-label input[type="radio"] {
  accent-color: #a78bfa;
  width: 16px;
  height: 16px;
}

/* 안내 목록 */
.instruction-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 28px;
  text-align: left;
}

.instruction-step {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

.instruction-list {
  text-align: left;
  padding-inline: 16px;
  padding-top: 5px;
  padding-bottom: 5px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 2;
  font-size: 14px;
}

/* 언어 항목 */
.language-item {
  margin-bottom: 10px;
}

.language-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.language-select,
.duration-select {
  flex: 1;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  color: #ffffff;
  outline: none;
}

.language-select option,
.duration-select option {
  background: #2d1b69;
  color: #ffffff;
}

.language-select:focus,
.duration-select:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.2);
}

.btn-remove {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  flex-shrink: 0;
  font-family: 'Noto Sans KR', sans-serif;
}

.btn-remove:hover {
  border-color: #fca5a5;
  color: #fca5a5;
  box-shadow: 0 0 10px rgba(252, 165, 165, 0.2);
}

/* 연습 결과 */
#practice-result {
  margin-top: 24px;
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

#practice-result-icon {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #ffffff;
}

#practice-result-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
}

/* ================================
   모바일 대응 (480px 이하)
================================ */
@media (max-width: 480px) {

  .container {
    padding: 28px 20px;
    border-radius: 18px;
    width: 95%;
  }

  h1 {
    font-size: 22px;
  }

  .btn-play {
    font-size: 16px;
    padding: 14px 24px;
  }

  .result-summary {
    flex-direction: column;
    gap: 10px;
  }

  .summary-value {
    font-size: 18px;
  }

  #result-table th,
  #result-table td {
    padding: 8px 6px;
    font-size: 12px;
  }

  .form-group input[type="number"],
  .form-group select {
    font-size: 16px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-google,
  .btn-korean,
  .btn-foreign {
    min-height: 44px;
  }

  .description {
    font-size: 14px;
  }
}

.kakao-notice {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}