/* 한강공원 테마 색상 */
:root {
  --primary-blue: #1e88e5;
  --primary-green: #43a047;
  --light-blue: #e3f2fd;
  --light-green: #e8f5e9;
  --dark-text: #212121;
  --gray-text: #757575;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --warning-color: #ff9800;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--light-blue) 0%, var(--light-green) 100%);
  min-height: 100vh;
  color: var(--dark-text);
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* 헤더 */
.header {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  text-align: center;
}

.header h1 {
  color: var(--primary-blue);
  font-size: 28px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.header .subtitle {
  color: var(--gray-text);
  font-size: 16px;
  line-height: 1.8;
  margin-top: 10px;
}

/* 진행 바 */
.progress-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
  transition: width 0.3s ease;
}

.progress-text {
  margin-top: 10px;
  text-align: center;
  color: var(--gray-text);
  font-size: 14px;
}

/* 카드 */
.card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

/* 섹션 타이틀 */
.section-title {
  font-size: 20px;
  color: var(--primary-blue);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light-blue);
  font-weight: 600;
}

/* 질문 */
.question {
  margin-bottom: 30px;
}

.question-label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--dark-text);
}

.question-label .required {
  color: #e53935;
  margin-left: 4px;
}

.question-desc {
  font-size: 14px;
  color: var(--gray-text);
  margin-top: 5px;
}

/* 입력 필드 */
input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
}

textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

/* 라디오 버튼 */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-option {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.radio-option:hover {
  background: var(--light-blue);
  border-color: var(--primary-blue);
}

.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  cursor: pointer;
}

.radio-option.selected {
  background: var(--light-blue);
  border-color: var(--primary-blue);
}

/* 체크박스 */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.checkbox-option:hover {
  background: var(--light-green);
  border-color: var(--primary-green);
}

.checkbox-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  cursor: pointer;
}

.checkbox-option.selected {
  background: var(--light-green);
  border-color: var(--primary-green);
}

/* 리커트 척도 */
.likert-scale {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.likert-option {
  flex: 1;
  text-align: center;
}

.likert-option input[type="radio"] {
  display: none;
}

.likert-option label {
  display: block;
  padding: 12px 8px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.likert-option label:hover {
  background: var(--light-blue);
  border-color: var(--primary-blue);
}

.likert-option input[type="radio"]:checked + label {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.likert-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-text);
}

/* 버튼 */
.btn {
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
  color: white;
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 136, 229, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
  background: var(--light-blue);
}

.btn-block {
  width: 100%;
  display: block;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.button-group .btn {
  flex: 1;
}

/* 푸터 */
.footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--gray-text);
  font-size: 14px;
}

.footer a {
  color: var(--primary-blue);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* 성공 메시지 */
.success-message {
  background: var(--light-green);
  border: 2px solid var(--success-color);
  color: var(--success-color);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  margin: 20px 0;
}

.success-message h2 {
  margin-bottom: 10px;
}

/* 에러 메시지 */
.error-message {
  background: #ffebee;
  border: 2px solid #e53935;
  color: #c62828;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* 로딩 */
.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-blue);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .header h1 {
    font-size: 22px;
  }

  .header .subtitle {
    font-size: 14px;
  }

  .card {
    padding: 20px;
  }

  .likert-scale {
    flex-direction: column;
  }

  .likert-labels {
    display: none;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group .btn {
    width: 100%;
  }
}

/* 대시보드 전용 스타일 */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: var(--gray-text);
}

.chart-container {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.chart-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--dark-text);
}

/* 테이블 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--light-blue);
  font-weight: 600;
  color: var(--dark-text);
}

.data-table tr:hover {
  background: var(--light-blue);
}

/* 필터 */
.filter-group {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-group select {
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.filter-group select:focus {
  outline: none;
  border-color: var(--primary-blue);
}

/* 에러 하이라이트 애니메이션 */
.highlight-error {
  animation: errorPulse 0.5s ease-in-out 3;
  border: 3px solid #f44336 !important;
  background-color: #ffebee !important;
}

@keyframes errorPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 20px 10px rgba(244, 67, 54, 0.3);
  }
}
