/* ============================================
   guide.css — 이용 가이드 스타일 (2026 v2)
   Premium modern design with animations
   ============================================ */

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

/* ── Guide Container ── */
.guide-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  animation: guideFadeIn 0.6s ease-out;
}

@keyframes guideFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Guide Header ── */
.guide-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 2.5rem 1.5rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.guide-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: headerShimmer 6s ease-in-out infinite;
}

@keyframes headerShimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, 10%); }
}

.guide-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.guide-header p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 1;
}

.guide-header .guide-version {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 1;
}

/* ── Guide Section ── */
.guide-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-card, #ffffff);
  border-radius: 16px;
  border: 1px solid var(--border-color, #e5e7eb);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.guide-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main, #111827);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #667eea, #764ba2) 1;
}

.guide-section h2 .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.guide-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main, #374151);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.guide-section p {
  line-height: 1.7;
  color: var(--text-main, #374151);
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
}

.guide-section ul,
.guide-section ol {
  margin-left: 0;
  margin-bottom: 1rem;
  color: var(--text-main, #374151);
  padding-left: 1.25rem;
}

.guide-section li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
  font-size: 0.92rem;
  position: relative;
}

.guide-section li::marker {
  color: #667eea;
}

/* ── Screenshot Images ── */
.guide-screenshot {
  display: block;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin: 1rem auto;
  border: 1px solid var(--border-color, #e5e7eb);
}

/* ── Feature Cards Grid ── */
.feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

.feature-card {
  padding: 1rem;
  background: var(--bg-subtle, #f9fafb);
  border-radius: 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.feature-card:hover {
  transform: scale(1.02);
}

.feature-card .feature-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.4rem;
}

.feature-card .feature-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main, #374151);
}

.feature-card .feature-desc {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* ── Tip / Warning Callout ── */
.guide-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin: 1rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.guide-tip.tip-info {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-left: 4px solid #3b82f6;
  color: #1e40af;
}

.guide-tip.tip-warning {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-left: 4px solid #f59e0b;
  color: #92400e;
}

.guide-tip.tip-success {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-left: 4px solid #10b981;
  color: #065f46;
}

.guide-tip .tip-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ── Keyboard Shortcut / Badge ── */
.guide-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}

.guide-badge-outline {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  border: 1.5px solid #667eea;
  color: #667eea;
}

/* ── Back Button ── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.back-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ── Guide Footer ── */
.guide-footer {
  text-align: center;
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--bg-subtle, #f9fafb);
  border-radius: 16px;
  border: 1px solid var(--border-color, #e5e7eb);
}

.guide-footer p {
  color: var(--text-muted, #6b7280);
  font-size: 0.9rem;
  line-height: 1.6;
}

.guide-footer .footer-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* ── TOC (Table of Contents) ── */
.guide-toc {
  padding: 1.25rem 1.5rem;
  background: var(--bg-subtle, #f9fafb);
  border-radius: 14px;
  border: 1px solid var(--border-color, #e5e7eb);
  margin-bottom: 2rem;
}

.guide-toc h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main, #111827);
  margin-bottom: 0.75rem;
}

.guide-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.guide-toc li {
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

.guide-toc a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.guide-toc a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* ── Inline Code / Highlight ── */
.guide-section code {
  padding: 0.15rem 0.4rem;
  background: var(--bg-subtle, #f3f4f6);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: 'SF Mono', Menlo, monospace;
  color: #667eea;
  border: 1px solid var(--border-color, #e5e7eb);
}

/* ── mark highlight ── */
.guide-section mark {
  background: linear-gradient(120deg, #fef08a 0%, #fde68a 100%);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  color: #854d0e;
}

/* ── Divider ── */
.guide-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color, #e5e7eb), transparent);
  margin: 1.5rem 0;
  border: none;
}

/* ============================================
   Dark Theme Overrides
   ============================================ */
[data-theme="dark"] .guide-container {
  color: #e5e7eb;
}

[data-theme="dark"] .guide-header {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}

[data-theme="dark"] .guide-section {
  background: var(--bg-card, #1f2937);
  border-color: var(--border-color, #374151);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .guide-section:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .guide-section h2 {
  color: #f3f4f6;
  border-image: linear-gradient(90deg, #818cf8, #a78bfa) 1;
}

[data-theme="dark"] .feature-card {
  background: var(--bg-subtle, #111827);
  border-color: var(--border-color, #374151);
}

[data-theme="dark"] .guide-tip.tip-info {
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(59,130,246,0.08));
  border-left-color: #60a5fa;
  color: #93c5fd;
}

[data-theme="dark"] .guide-tip.tip-warning {
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.08));
  border-left-color: #fbbf24;
  color: #fcd34d;
}

[data-theme="dark"] .guide-tip.tip-success {
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.08));
  border-left-color: #34d399;
  color: #6ee7b7;
}

[data-theme="dark"] .guide-toc {
  background: var(--bg-subtle, #111827);
  border-color: var(--border-color, #374151);
}

[data-theme="dark"] .guide-toc a {
  color: #818cf8;
}

[data-theme="dark"] .guide-footer {
  background: var(--bg-subtle, #111827);
  border-color: var(--border-color, #374151);
}

[data-theme="dark"] .guide-section code {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-color, #374151);
  color: #818cf8;
}

[data-theme="dark"] .guide-section mark {
  background: linear-gradient(120deg, rgba(250,204,21,0.25), rgba(253,224,71,0.2));
  color: #fde68a;
}

[data-theme="dark"] .guide-screenshot {
  border-color: var(--border-color, #374151);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

[data-theme="dark"] .guide-badge-outline {
  border-color: #818cf8;
  color: #818cf8;
}

/* ============================================
   Paper Theme Overrides
   ============================================ */
[data-theme="paper"] .guide-header {
  background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
}

[data-theme="paper"] .guide-section h2 {
  border-image: linear-gradient(90deg, #b45309, #92400e) 1;
}

[data-theme="paper"] .guide-section h2 .step-number {
  background: linear-gradient(135deg, #b45309, #92400e);
}

[data-theme="paper"] .guide-tip.tip-info {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-left-color: #b45309;
  color: #78350f;
}

[data-theme="paper"] .guide-toc a {
  color: #b45309;
}

[data-theme="paper"] .guide-badge {
  background: linear-gradient(135deg, #b45309, #92400e);
}

[data-theme="paper"] .guide-badge-outline {
  border-color: #b45309;
  color: #b45309;
}

[data-theme="paper"] .back-btn {
  background: linear-gradient(135deg, #b45309, #92400e);
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.3);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
  .guide-container {
    padding: 1rem 1rem 2rem;
  }

  .guide-header {
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 16px;
  }

  .guide-header h1 {
    font-size: 1.4rem;
  }

  .guide-section {
    padding: 1.25rem;
    border-radius: 14px;
  }

  .guide-section h2 {
    font-size: 1.1rem;
  }

  .feature-cards {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .feature-card {
    padding: 0.8rem 0.5rem;
  }

  .feature-card .feature-icon {
    font-size: 1.5rem;
  }

  .feature-card .feature-name {
    font-size: 0.8rem;
  }

  .feature-card .feature-desc {
    font-size: 0.7rem;
  }

  .guide-tip {
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
  }
}
