@charset "UTF-8";

/* ==========================================================================
   POLL Survey System - Premium Glassmorphic Stylesheet
   ========================================================================== */

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --secondary: #ec4899;
  --accent: #10b981;
  --accent-cyan: #06b6d4;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.35);
  
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Outfit', 'Inter', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(236, 72, 153, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Container */
.survey-wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* Header & Intro */
.survey-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.survey-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #ec4899, #10b981);
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-light);
  color: #818cf8;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.survey-header h1 {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.survey-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Progress Bar Sticky Indicator */
.progress-container {
  position: sticky;
  top: 15px;
  z-index: 100;
  margin-bottom: 30px;
  padding: 12px 20px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.progress-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #818cf8;
  min-width: 80px;
  text-align: right;
}

/* Question Cards */
.question-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.question-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.question-card.active-focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

.q-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.q-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  color: #818cf8;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.q-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.45;
}

.q-title .badge-req {
  color: #f43f5e;
  font-size: 0.9rem;
  margin-left: 4px;
}

.q-title .q-desc {
  display: block;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Option Groups (Radio & Checkbox Cards) */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.option-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

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

.custom-indicator {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.2);
}

.option-item.radio-item .custom-indicator {
  border-radius: 50%;
}

.custom-indicator::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: white;
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.option-item.radio-item .custom-indicator::after {
  border-radius: 50%;
}

.option-item input:checked ~ .custom-indicator {
  background: var(--primary);
  border-color: var(--primary);
}

.option-item input:checked ~ .custom-indicator::after {
  transform: scale(1);
}

.option-item input:checked ~ .option-label {
  color: #ffffff;
  font-weight: 600;
}

.option-item.is-selected {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

.option-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  flex: 1;
}

/* Other Custom Input Box */
.other-input-wrap {
  margin-top: 10px;
  display: none;
  animation: fadeIn 0.3s ease;
}

.other-input-wrap.visible {
  display: block;
}

.input-custom {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

/* Textarea for Q5 */
.textarea-wrap {
  position: relative;
}

.textarea-custom {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

.char-counter {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* NPS Rating Scale (Q7) */
.nps-container {
  padding: 10px 0;
}

.nps-scale-grid {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.nps-btn-item {
  position: relative;
}

.nps-btn-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

.nps-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.nps-btn-item:hover .nps-box {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.nps-btn-item input:checked + .nps-box {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px) scale(1.05);
}

.nps-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 0 4px;
}

/* Submit Action Button */
.submit-action-wrap {
  text-align: center;
  margin-top: 40px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  padding: 18px 36px;
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-submit:hover:not(:disabled)::before {
  left: 100%;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

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

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s ease-in-out infinite;
}

/* Success Card Screen */
.success-screen {
  display: none;
  text-align: center;
  padding: 60px 30px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon-wrap {
  width: 90px;
  height: 90px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  border: 2px solid rgba(16, 185, 129, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.success-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff, #a7f3d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.success-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-secondary {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Footer info */
.survey-footer {
  text-align: center;
  margin-top: 50px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.survey-footer a {
  color: #818cf8;
  text-decoration: none;
}

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

/* Keyframes */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 640px) {
  .survey-wrapper {
    padding: 20px 14px 60px;
  }
  .survey-header {
    padding: 24px 16px;
  }
  .survey-header h1 {
    font-size: 1.6rem;
  }
  .question-card {
    padding: 20px 16px;
  }
  .options-grid {
    grid-template-columns: 1fr;
  }
  .nps-scale-grid {
    gap: 4px;
  }
  .nps-box {
    height: 38px;
    font-size: 0.85rem;
  }
  .nps-labels {
    font-size: 0.75rem;
  }
}
