/* ==========================================================================
   Base & CSS Variables (Dark Minimalist Theme)
   ========================================================================== */
:root {
  --bg-body: #0a0c12;
  --bg-surface: #111520;
  --bg-surface-elevated: #171d2c;
  --bg-surface-hover: #1e2538;
  
  --border-subtle: #1e2433;
  --border-medium: #2d374d;
  --border-focus: #38bdf8;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-green: #34d399;
  --accent-red: #f87171;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", Menlo, Monaco, Consolas, "Courier New", monospace;

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ==========================================================================
   Progress Bar & Toast Notification
   ========================================================================== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-gradient);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--bg-surface-elevated);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.toast.hidden {
  opacity: 0;
  transform: translateY(12px);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(10, 12, 18, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 800;
}

.accent-dot {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  gap: 1.8rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

.nav-cta-btn {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  color: var(--accent-indigo);
  border: 1px solid var(--accent-indigo);
  text-decoration: none;
  transition: var(--transition);
}

.nav-cta-btn:hover {
  background-color: var(--accent-indigo);
  color: #05070a;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.35);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 6rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-content {
  max-width: 840px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #05070a;
  border: none;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.stat-card {
  background-color: rgba(17, 21, 32, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem 1rem;
}

.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Sections Common Layout
   ========================================================================= */
.content-section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--accent-indigo);
  margin-bottom: 0.6rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   Comparison Grid (Overview)
   ========================================================================== */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.comp-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.comp-card.vibe {
  border-color: rgba(56, 189, 248, 0.35);
  background-color: rgba(17, 21, 32, 0.85);
  position: relative;
}

.comp-card.vibe::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent-gradient);
}

.comp-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.comp-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background-color: var(--bg-surface-elevated);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
}

.comp-badge.active {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
}

.comp-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.comp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.comp-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.comp-card.traditional .comp-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.comp-card.vibe .comp-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

/* ==========================================================================
   Rules Grid (5 Golden Rules)
   ========================================================================== */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.rule-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.rule-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-subtle);
}

.rule-index {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-indigo);
  margin-bottom: 0.8rem;
}

.rule-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.rule-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.rule-tip {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  background-color: rgba(56, 189, 248, 0.06);
  border: 1px dashed rgba(56, 189, 248, 0.25);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  line-height: 1.45;
}

.inline-code {
  font-family: var(--font-mono);
  background-color: var(--bg-surface-elevated);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent-cyan);
}

/* ==========================================================================
   Interactive Prompt Templates
   ========================================================================== */
.prompt-tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tab-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-elevated);
}

.tab-btn.active {
  background-color: var(--bg-surface-elevated);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.prompt-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.4rem;
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.prompt-role {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.copy-btn {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  background-color: rgba(56, 189, 248, 0.1);
}

.code-box {
  padding: 1.4rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #cbd5e1;
  background-color: #0b0e14;
}

/* ==========================================================================
   Do & Don't Section
   ========================================================================== */
.dodont-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.dodont-column {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.do-col {
  border-top: 3px solid var(--accent-green);
}

.dont-col {
  border-top: 3px solid var(--accent-red);
}

.dodont-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
}

.badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-icon.green {
  background-color: rgba(52, 211, 153, 0.15);
  color: var(--accent-green);
}

.badge-icon.red {
  background-color: rgba(248, 113, 113, 0.15);
  color: var(--accent-red);
}

.dodont-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.dodont-item {
  margin-bottom: 1.25rem;
}

.dodont-item:last-child {
  margin-bottom: 0;
}

.dodont-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.dodont-item p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Interactive Checklist & Vibe Meter
   ========================================================================== */
.checklist-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-subtle);
}

.vibe-score-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.8rem;
  margin-bottom: 2rem;
}

.score-display {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.score-circle {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem;
  min-width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
  border: 2px solid var(--accent-cyan);
  padding: 1.2rem;
}

#scoreValue {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  line-height: 1;
}

.score-unit {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.score-text-group h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.score-text-group p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.gauge-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.gauge-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  background-color: rgba(17, 21, 32, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.check-item:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-medium);
}

.check-item input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  min-width: 20px;
  height: 20px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
  transition: var(--transition);
}

.check-item input[type="checkbox"]:checked + .checkbox-custom {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.check-item input[type="checkbox"]:checked + .checkbox-custom::after {
  content: "✔";
  color: #05070a;
  font-size: 0.75rem;
  font-weight: 900;
}

.check-item input[type="checkbox"]:checked ~ .check-text strong {
  color: var(--accent-cyan);
}

.check-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.check-text strong {
  font-size: 0.98rem;
  color: var(--text-primary);
  font-weight: 600;
  transition: var(--transition);
}

.check-text small {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--border-medium);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  font-size: 1.3rem;
  color: var(--accent-cyan);
  transition: transform 0.25s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-body);
  padding: 3rem 1.5rem 2.5rem;
}

.footer-container {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-brand strong {
  font-size: 1rem;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 768px) {
  .nav-links, .nav-cta-btn {
    display: none;
  }
  
  .hero-section {
    padding: 4.5rem 1.2rem 3rem;
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .comparison-grid, .dodont-container {
    grid-template-columns: 1fr;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }

  .score-display {
    flex-direction: column;
    text-align: center;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}
