/* ==========================================================================
   Podmaster Documentation — Styles
   ========================================================================== */

:root {
  --brand: #5c6ac4;
  --brand-dark: #4959bd;
  --brand-darker: #223274;
  --brand-light: #7b88d0;
  --brand-pale: #eef0fb;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --surface: #ffffff;
  --bg: #f8fafc;
  --sidebar-w: 280px;
  --header-h: 64px;
  --radius: 0.5rem;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1.5rem); }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */
.docs-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.5rem;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.95);
}
.docs-header .logo { height: 32px; }
.docs-header .logo-text {
  font-weight: 700; font-size: 1.1rem; color: var(--text);
  margin-left: 0.5rem;
}
.docs-header .logo-text span { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; margin-left: 0.35rem; }
.header-left { display: flex; align-items: center; gap: 0.75rem; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.header-search {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.4rem 0.75rem;
  width: 260px; transition: border-color .2s;
}
.header-search:focus-within { border-color: var(--brand); }
.header-search input {
  border: none; background: none; outline: none;
  font-size: 0.875rem; color: var(--text); width: 100%;
  font-family: inherit;
}
.header-search svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.header-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--brand); color: #fff; font-weight: 600;
  font-size: 0.8rem; padding: 0.45rem 1rem; border-radius: var(--radius);
  transition: background .2s;
}
.header-cta:hover { background: var(--brand-dark); color: #fff; }

/* Mobile menu toggle */
.sidebar-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 0.25rem; color: var(--text);
}
.sidebar-toggle svg { width: 24px; height: 24px; }

/* ---------- Layout ---------- */
.docs-layout {
  display: flex; margin-top: var(--header-h); min-height: calc(100vh - var(--header-h));
}

/* ---------- Sidebar ---------- */
.docs-sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w); background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto; padding: 1.5rem 0;
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-section { margin-bottom: 1.25rem; }
.sidebar-heading {
  padding: 0 1.25rem; margin-bottom: 0.35rem;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
}
.sidebar-nav { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1.25rem; font-size: 0.875rem;
  color: var(--text-muted); transition: all .15s; border-left: 3px solid transparent;
}
.sidebar-nav li a:hover { color: var(--brand); background: var(--brand-pale); }
.sidebar-nav li a.active {
  color: var(--brand); background: var(--brand-pale);
  border-left-color: var(--brand); font-weight: 600;
}
.sidebar-nav li a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.sidebar-nav li a.active svg { opacity: 1; }

/* Nested nav */
.sidebar-nav .sub-nav { padding-left: 1rem; }
.sidebar-nav .sub-nav a { font-size: 0.82rem; padding-top: 0.3rem; padding-bottom: 0.3rem; }

/* ---------- Main Content ---------- */
.docs-main {
  margin-left: var(--sidebar-w); flex: 1;
  padding: 2rem 2.5rem 4rem; max-width: 900px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--border); }

/* ---------- Content Typography ---------- */
.doc-content h1 {
  font-size: 2rem; font-weight: 800; color: var(--text);
  margin: 0 0 0.5rem; line-height: 1.2;
}
.doc-content .subtitle {
  font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; line-height: 1.5;
}
.doc-content h2 {
  font-size: 1.4rem; font-weight: 700; color: var(--text);
  margin: 2.5rem 0 0.75rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.doc-content h3 {
  font-size: 1.1rem; font-weight: 650; color: var(--text);
  margin: 1.75rem 0 0.5rem;
}
.doc-content h4 {
  font-size: 0.95rem; font-weight: 650; color: var(--text);
  margin: 1.25rem 0 0.4rem;
}
.doc-content p { margin: 0 0 1rem; }
.doc-content ul, .doc-content ol {
  margin: 0 0 1rem; padding-left: 1.5rem;
}
.doc-content li { margin-bottom: 0.35rem; }
.doc-content li::marker { color: var(--brand); }
.doc-content strong { font-weight: 650; }
.doc-content code {
  background: var(--brand-pale); color: var(--brand-darker);
  padding: 0.15rem 0.4rem; border-radius: 3px;
  font-size: 0.85em; font-family: 'JetBrains Mono', monospace;
}
.doc-content pre {
  background: #1e293b; color: #e2e8f0; padding: 1rem 1.25rem;
  border-radius: var(--radius); overflow-x: auto;
  font-size: 0.85rem; margin: 0 0 1.25rem; line-height: 1.6;
}
.doc-content pre code { background: none; color: inherit; padding: 0; }
.doc-content blockquote {
  margin: 0 0 1rem; padding: 0.75rem 1rem;
  border-left: 4px solid var(--brand); background: var(--brand-pale);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.doc-content blockquote p { margin-bottom: 0; color: var(--brand-darker); }
.doc-content img {
  border-radius: var(--radius); border: 1px solid var(--border);
  margin: 0.5rem 0 1rem; box-shadow: var(--shadow);
}
.doc-content hr {
  border: none; border-top: 1px solid var(--border); margin: 2rem 0;
}

/* ---------- Info / Warning / Tip Callouts ---------- */
.callout {
  display: flex; gap: 0.75rem; padding: 1rem 1.25rem;
  border-radius: var(--radius); margin: 1rem 0 1.25rem;
  font-size: 0.9rem; line-height: 1.55;
}
.callout svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 0.1rem; }
.callout p { margin: 0; }
.callout-info { background: #eff6ff; border: 1px solid #bfdbfe; }
.callout-info svg { color: #3b82f6; }
.callout-tip { background: #f0fdf4; border: 1px solid #bbf7d0; }
.callout-tip svg { color: #22c55e; }
.callout-warning { background: #fffbeb; border: 1px solid #fde68a; }
.callout-warning svg { color: #f59e0b; }
.callout-danger { background: #fef2f2; border: 1px solid #fecaca; }
.callout-danger svg { color: #ef4444; }

/* ---------- Step Cards ---------- */
.steps { counter-reset: step-counter; margin: 1rem 0 1.5rem; }
.step {
  display: flex; gap: 1rem; margin-bottom: 1.25rem;
  padding: 1.25rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--brand); color: #fff;
  font-weight: 700; font-size: 0.9rem;
  border-radius: 50%;
}
.step-body h4 { margin: 0 0 0.25rem; font-size: 0.95rem; }
.step-body p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Feature Grid ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem; margin: 1rem 0 1.5rem;
}
.feature-card {
  padding: 1.25rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.feature-card h4 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.feature-card p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.feature-card .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-pale); display: flex;
  align-items: center; justify-content: center; margin-bottom: 0.75rem;
}
.feature-card .icon svg { width: 20px; height: 20px; color: var(--brand); }

/* ---------- Table ---------- */
.doc-content table {
  width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.25rem;
  font-size: 0.9rem;
}
.doc-content th, .doc-content td {
  padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border);
}
.doc-content th {
  font-weight: 650; color: var(--text); background: var(--bg);
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.doc-content tr:hover td { background: var(--brand-pale); }

/* ---------- TOC (On-page) ---------- */
.page-toc {
  position: fixed; right: 1.5rem; top: calc(var(--header-h) + 2rem);
  width: 200px; font-size: 0.8rem;
}
.page-toc-title {
  font-weight: 700; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.5rem;
}
.page-toc ul { list-style: none; margin: 0; padding: 0; }
.page-toc li { margin-bottom: 0.25rem; }
.page-toc a {
  color: var(--text-muted); display: block; padding: 0.2rem 0;
  border-left: 2px solid var(--border); padding-left: 0.75rem;
  transition: all .15s;
}
.page-toc a:hover, .page-toc a.active {
  color: var(--brand); border-left-color: var(--brand);
}

/* ---------- Navigation Cards (Next/Prev) ---------- */
.doc-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border);
}
.doc-nav a {
  display: block; padding: 1rem 1.25rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: all .2s;
}
.doc-nav a:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.doc-nav .nav-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.doc-nav .nav-title { font-weight: 650; color: var(--text); }
.doc-nav .next { text-align: right; }

/* ---------- Search Results ---------- */
.search-results {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 320px; overflow-y: auto; display: none; z-index: 200;
}
.search-results.active { display: block; }
.search-result-item {
  padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
}
.search-result-item:hover { background: var(--brand-pale); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item .result-title { font-weight: 600; font-size: 0.875rem; }
.search-result-item .result-path { font-size: 0.75rem; color: var(--text-muted); }

/* ---------- Index Page Extras ---------- */
.page-header { margin-bottom: 1.5rem; }
.page-subtitle {
  font-size: 1.1rem; color: var(--text-muted); margin: 0.25rem 0 0; line-height: 1.5;
}
.doc-section { margin-bottom: 2rem; }
.feature-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--brand-pale); display: flex;
  align-items: center; justify-content: center; margin-bottom: 0.75rem;
}
.feature-card-icon svg { color: var(--brand); }
.feature-card h3 { font-size: 1rem; font-weight: 650; margin: 0 0 0.35rem; color: var(--text); }
.feature-card p { font-size: 0.875rem; color: var(--text-muted); margin: 0; line-height: 1.55; }
a.feature-card-link { color: inherit; }
a.feature-card-link:hover { border-color: var(--brand); }
a.feature-card-link:hover h3 { color: var(--brand); }

.page-nav { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.page-nav-next { text-align: right; }
.page-nav-label { font-size: 0.75rem; color: var(--text-muted); }
.page-nav-title {
  font-weight: 650; color: var(--text); display: flex;
  align-items: center; justify-content: flex-end; gap: 0.25rem;
}
.page-nav a { color: inherit; }
.page-nav a:hover .page-nav-title { color: var(--brand); }

.callout-icon { flex-shrink: 0; }
.callout-content { flex: 1; }
.callout-content a { font-weight: 600; }

.breadcrumb-sep { display: inline-flex; }
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* ---------- Screenshot Placeholder ---------- */
.screenshot-needed {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #f8fafc;
  margin: 0.75rem 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.screenshot-needed .sn-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.screenshot-needed .sn-icon svg {
  width: 18px;
  height: 18px;
  color: #94a3b8;
}
.screenshot-needed .sn-body {}
.screenshot-needed .sn-label {
  font-weight: 700;
  color: #475569;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.screenshot-needed .sn-detail {
  color: #64748b;
  font-size: 0.85rem;
}

/* ---------- Footer ---------- */
.docs-footer {
  margin-left: var(--sidebar-w); padding: 2rem 2.5rem;
  border-top: 1px solid var(--border); background: var(--surface);
  font-size: 0.82rem; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center;
}
.docs-footer a { color: var(--text-muted); }
.docs-footer a:hover { color: var(--brand); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .page-toc { display: none; }
}
@media (max-width: 768px) {
  .sidebar-toggle { display: flex; }
  .docs-sidebar {
    transform: translateX(-100%); transition: transform .3s ease;
    box-shadow: none;
  }
  .docs-sidebar.open {
    transform: translateX(0); box-shadow: var(--shadow-lg);
  }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.3); z-index: 40;
  }
  .sidebar-overlay.active { display: block; }
  .docs-main { margin-left: 0; padding: 1.5rem 1rem 3rem; }
  .docs-footer { margin-left: 0; padding: 1.5rem 1rem; flex-direction: column; gap: 0.5rem; }
  .doc-content h1 { font-size: 1.6rem; }
  .doc-nav { grid-template-columns: 1fr; }
  .header-search { width: 180px; }
}
@media (max-width: 480px) {
  .header-search { display: none; }
  .header-cta span { display: none; }
}

/* ---------- Coming Soon Page ---------- */
.coming-soon-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 3rem 1.5rem;
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #5c6ac4, #7b88d0);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 16px rgba(92,106,196,0.35);
  animation: badgePulse 2.5s ease-in-out infinite;
}

.coming-soon-badge-dot {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.85;
  animation: dotBlink 1.4s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(92,106,196,0.35); }
  50% { box-shadow: 0 6px 24px rgba(92,106,196,0.55); }
}

@keyframes dotBlink {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.3; }
}

.coming-soon-icon {
  width: 90px;
  height: 90px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--brand-pale) 0%, #dde1f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  box-shadow: 0 8px 32px rgba(92,106,196,0.12);
  animation: iconFloat 3.5s ease-in-out infinite;
}

.coming-soon-icon svg {
  width: 44px;
  height: 44px;
  color: var(--brand);
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.coming-soon-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.coming-soon-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

.coming-soon-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

.coming-soon-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand-pale);
  color: var(--brand-darker);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #c8cef0;
}

.coming-soon-feature-chip svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
}

.coming-soon-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.coming-soon-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(92,106,196,0.25);
}

.coming-soon-btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(92,106,196,0.35);
}

.coming-soon-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all .2s;
}

.coming-soon-btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-pale);
}

.coming-soon-btn-primary svg,
.coming-soon-btn-secondary svg {
  width: 15px;
  height: 15px;
}

.coming-soon-divider {
  width: 64px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 999px;
  margin: 0 auto 2rem;
}
