* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow: hidden;
}

.header {
  background: #ffffff;
  padding: 15px 32px;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.nav {
  display: flex;
  width: 100%;
}

.nav-item {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  border-radius: 12px;
  font-size: 1.2em;
  font-weight: 600;
  color: #666;
  text-decoration: none;
  transition: all 0.25s;
}

.nav-item:hover {
  background: rgba(250, 112, 154, 0.08);
  color: #fa709a;
}

/* 현재 페이지 */
.nav-item.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(250, 112, 154, 0.3);
}

.back-btn {
  font-size: 0.95em;
  font-weight: 500;
  color: #667eea;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.back-btn:hover {
  background: rgba(128, 112, 250, 0.08);
  color: #4c5eae;
}

.header h1 {
  text-align: center;
  font-size: 1.4em;
  font-weight: 700;
  color: #222;
  letter-spacing: -0.3px;
}

.spacer {
  width: 100px;
}

.content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.survey-container {
  background: white;
  border-radius: 25px;
  padding: 50px 60px;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.5s ease;
}

.survey-title {
  text-align: center;
  margin-bottom: 25px;
}

.survey-title h2 {
  font-size: 2.2em;
  color: #333;
  margin-bottom: 10px;
}

.survey-title p {
  font-size: 1.2em;
  color: #666;
}

.question-group {
  margin-bottom: 35px;
}

.question-label {
  font-size: 1.3em;
  color: #333;
  font-weight: 600;
  margin-bottom: 15px;
  display: block;
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.option {
  position: relative;
}

.option input[type="radio"],
.option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.option label {
  display: block;
  padding: 18px 20px;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  border-radius: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.1em;
  color: #555;
  font-weight: 500;
}

.option input:checked + label {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  transform: scale(1.05);
}

.option label:hover {
  border-color: #667eea;
  background: #f0f0ff;
}

.option input:checked + label:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.text-input {
  width: 100%;
  padding: 18px;
  font-size: 1.1em;
  border: 2px solid #e0e0e0;
  border-radius: 15px;
  transition: border-color 0.3s;
  font-family: inherit;
}

.text-input:focus {
  outline: none;
  border-color: #667eea;
}

.submit-btn {
  width: 100%;
  padding: 20px;
  font-size: 1.4em;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 30px;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.submit-btn:active {
  transform: translateY(-1px);
}

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

/* 1205x750 태블릿 최적화 */
@media (max-width: 1280px) and (min-height: 700px) {
  .content {
    padding: 30px;
  }

  .survey-container {
    padding: 35px 45px;
    max-height: 85vh;
  }

  .survey-title h2 {
    font-size: 1.9em;
  }

  .survey-title p {
    font-size: 1.05em;
  }

  .question-group {
    margin-bottom: 20px;
  }

  .question-label {
    font-size: 1.15em;
    margin-bottom: 12px;
  }

  .option label {
    padding: 14px 16px;
    font-size: 0.95em;
  }

  .submit-btn {
    padding: 16px;
    font-size: 1.2em;
    margin-top: 10px;
  }
}

@media (max-width: 800px) {
  .survey-container {
    padding: 35px 30px;
  }

  .survey-title h2 {
    font-size: 1.8em;
  }

  .question-label {
    font-size: 1.1em;
  }

  .options {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }

  .option label {
    padding: 15px;
    font-size: 1em;
  }
}

/* 로딩 모달 */
.loading-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.loading-modal.show {
  display: flex;
}

.loading-content {
  background: white;
  padding: 50px 60px;
  border-radius: 25px;
  text-align: center;
  animation: modalFadeIn 0.3s ease;
}

.spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-content h3 {
  font-size: 1.8em;
  color: #333;
  margin-bottom: 10px;
}

.loading-content p {
  font-size: 1.2em;
  color: #666;
}

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

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
