@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(51, 65, 85, 0.8);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #6366f1;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-primary: #6366f1;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --accent-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #db2777 100%);
  --success-color: #10b981;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-glow: 0 10px 30px -10px rgba(99, 102, 241, 0.4);
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans KR', sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.survey-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.survey-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.survey-header h1 {
  font-size: 2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.survey-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  word-break: keep-all;
}

.question-group {
  margin-bottom: 2.25rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.question-group:focus-within, .question-group:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.question-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.question-title span.q-num {
  color: var(--accent-primary);
  font-size: 1rem;
}

.question-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

@media (min-width: 640px) {
  .options-grid.two-cols {
    grid-template-columns: 1fr 1fr;
  }
}

.option-label {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-size: 0.95rem;
}

.option-label:hover {
  background: rgba(51, 65, 85, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #64748b;
  border-radius: 4px;
  margin-right: 0.75rem;
  outline: none;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.option-label input[type="radio"] {
  border-radius: 50%;
}

.option-label input[type="radio"]:checked,
.option-label input[type="checkbox"]:checked {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.option-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
}

.option-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 2px;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.option-label:has(input:checked) {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent-primary);
  color: #fff;
  font-weight: 500;
}

.other-input-container {
  margin-top: 0.75rem;
  display: none;
}

.other-input-container.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.text-input, .textarea-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.text-input:focus, .textarea-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.textarea-input {
  min-height: 100px;
  resize: vertical;
}

/* Q7 NPS Scale */
.nps-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nps-scale {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 0.35rem;
}

.nps-btn {
  aspect-ratio: 1;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nps-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: #fff;
  transform: translateY(-2px);
}

.nps-btn.selected {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
  transform: scale(1.1);
}

.nps-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 0.2rem;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -10px rgba(99, 102, 241, 0.6);
}

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

.survey-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Modal Toast */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-close-btn {
  padding: 0.75rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
