/* ============================================
   OPIc Master - Main Stylesheet
   ============================================ */

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-gold: #fbbf24;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-red: #ef4444;
  --accent-pink: #ec4899;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --font-main: 'Inter', 'Noto Sans KR', -apple-system, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Header */
.header {
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky; top: 0; z-index: 100;
}
.header-top { display: flex; justify-content: space-between; align-items: center; }
.logo {
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-gold), #f59e0b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header-links { display: flex; gap: 12px; }
.nav-link {
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  padding: 6px 14px; border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.nav-link:hover { color: var(--text-primary); border-color: var(--accent-blue); background: rgba(59, 130, 246, 0.1); }
.tagline { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

/* Hero Banner */
.hero-banner {
  margin: 28px 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.hero-content h2 {
  font-size: 1.3rem; font-weight: 700;
  margin-bottom: 8px;
}
.hero-content p { color: var(--text-secondary); font-size: 0.9rem; }
.badge-inline {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  font-size: 0.75rem; font-weight: 600;
  padding: 2px 8px; border-radius: 6px;
}

/* Survey Grid */
.survey-section { margin-bottom: 100px; }
.survey-grid { display: flex; flex-direction: column; gap: 24px; }

/* Category Card */
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.category-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}
.category-header:hover { background: rgba(255, 255, 255, 0.05); }
.category-name {
  font-size: 1.05rem; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.category-desc { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }
.category-toggle {
  font-size: 1.2rem; color: var(--text-muted);
  transition: transform 0.3s ease;
}
.category-toggle.open { transform: rotate(180deg); }

.options-container {
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.options-container.open { max-height: 600px; padding: 20px 24px; }

/* Option Item */
.option-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.option-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.05);
  transform: translateY(-1px);
}
.option-item.selected {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}
.option-item.recommended {
  border-color: rgba(251, 191, 36, 0.3);
}
.option-item.recommended::before {
  content: '⭐';
  position: absolute; top: -6px; right: -6px;
  font-size: 0.7rem;
  background: var(--bg-secondary);
  padding: 2px 6px; border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.option-checkbox {
  width: 20px; height: 20px;
  border: 2px solid var(--text-muted);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  font-size: 0.7rem;
}
.option-item.selected .option-checkbox {
  border-color: var(--accent-blue);
  background: var(--accent-blue);
  color: white;
}
.option-name { font-size: 0.9rem; font-weight: 500; }
.option-note {
  font-size: 0.72rem; color: var(--text-muted);
  margin-top: 2px;
}

/* CTA Section */
.cta-section {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 16px 20px;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  z-index: 90;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cta-card {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.selected-summary {
  color: var(--text-secondary); font-size: 0.9rem;
}
.selected-count {
  font-size: 1.4rem; font-weight: 800;
  color: var(--accent-blue);
}
.btn-start {
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}
.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

/* Footer */
.footer {
  padding: 20px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-color);
}

/* Loading */
.loading {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 1rem;
}
.loading::before {
  content: ''; width: 24px; height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .hero-banner { padding: 20px; }
  .hero-content h2 { font-size: 1.1rem; }
  .options-container { grid-template-columns: 1fr; }
  .cta-card { flex-direction: column; gap: 12px; text-align: center; }
  .btn-start { width: 100%; }
}
