/* ========================================
   TANTU HELP — Dark Fantasy Theme
   for Docsify
   ======================================== */

:root {
  /* Core palette */
  --gold: #c8a951;
  --gold-light: #e6c96e;
  --gold-dim: #9a7f3a;
  --gold-glow: rgba(200, 169, 81, 0.12);
  
  --bg-deep: #0d0f1a;
  --bg-main: #111425;
  --bg-card: #161a30;
  --bg-elevated: #1c2040;
  --bg-hover: #222650;
  
  --text-primary: #e8e6e0;
  --text-secondary: #a8a6a0;
  --text-muted: #706e68;
  --border: #2a2d45;
  --border-light: #353860;
  
  /* Docsify themeable overrides */
  --theme-color: var(--gold);
  --base-background-color: var(--bg-main);
  --base-color: var(--text-primary);
  --sidebar-background: var(--bg-deep);
  --sidebar-border-color: var(--border);
  --sidebar-nav-link-color: var(--text-secondary);
  --sidebar-nav-link-color--active: var(--gold-light);
  --sidebar-name-color: var(--gold);
  --sidebar-name-font-size: 1.1rem;
  --sidebar-width: 280px;
  --link-color: var(--gold-light);
  --link-color--hover: var(--gold);
  --heading-color: var(--gold);
  --blockquote-border-color: var(--gold-dim);
  --code-theme-background: var(--bg-card);
  --search-input-color: var(--text-primary);
  --search-input-background-color: var(--bg-card);
  --search-result-heading-color: var(--gold-light);
  --pagination-title-color: var(--gold);
  --cover-background-color: var(--bg-deep);
  --notice-tip-border-color: var(--gold-dim);
}

/* ---- Global ---- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

/* ---- Sidebar ---- */
.sidebar {
  background: var(--bg-deep) !important;
  border-right: 1px solid var(--border) !important;
}

.sidebar .app-name {
  font-family: 'Cinzel', serif !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 24px 20px 16px !important;
}

.sidebar .app-name a {
  color: var(--gold) !important;
  text-decoration: none !important;
}

.sidebar ul li a {
  font-size: 13.5px !important;
  padding: 6px 20px !important;
  transition: all 0.15s ease !important;
  border-left: 2px solid transparent;
  margin-left: -1px;
}

.sidebar ul li a:hover {
  color: var(--text-primary) !important;
  background: var(--gold-glow) !important;
}

.sidebar ul li a.active {
  color: var(--gold-light) !important;
  border-left-color: var(--gold) !important;
  background: var(--gold-glow) !important;
  font-weight: 500;
}

/* Category headers (bold items in sidebar) */
.sidebar ul li strong {
  display: block;
  padding: 12px 20px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-dim) !important;
  font-weight: 600;
}

/* Nested items indent */
.sidebar ul ul {
  padding-left: 0 !important;
}

.sidebar ul ul li a {
  padding-left: 28px !important;
  font-size: 13px !important;
}

/* ---- Search ---- */
.sidebar .search {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--border);
}

.sidebar .search input {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text-primary) !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  transition: border-color 0.2s;
}

.sidebar .search input:focus {
  border-color: var(--gold-dim) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px var(--gold-glow) !important;
}

.sidebar .search input::placeholder {
  color: var(--text-muted) !important;
}

.sidebar .search .matching-post {
  border-bottom: 1px solid var(--border) !important;
}

.sidebar .search .matching-post p {
  color: var(--text-secondary) !important;
}

/* ---- Main Content ---- */
.content {
  background: var(--bg-main) !important;
}

.markdown-section {
  max-width: 780px !important;
  padding: 40px 48px !important;
}

/* Headings */
.markdown-section h1 {
  font-family: 'Cinzel', serif !important;
  color: var(--gold) !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  border-bottom: 1px solid var(--border) !important;
  padding-bottom: 12px !important;
  margin-bottom: 24px !important;
}

.markdown-section h2 {
  font-family: 'Cinzel', serif !important;
  color: var(--gold-light) !important;
  font-size: 20px !important;
  font-weight: 500 !important;
  margin-top: 36px !important;
  margin-bottom: 12px !important;
}

.markdown-section h3 {
  color: var(--text-primary) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-top: 24px !important;
}

/* Text */
.markdown-section p {
  color: var(--text-secondary) !important;
  line-height: 1.75 !important;
  margin: 0 0 14px !important;
}

.markdown-section strong {
  color: var(--text-primary) !important;
  font-weight: 600;
}

.markdown-section em {
  color: var(--text-secondary);
}

/* Links */
.markdown-section a {
  color: var(--gold-light) !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(200, 169, 81, 0.25);
  transition: border-color 0.2s;
}

.markdown-section a:hover {
  border-bottom-color: var(--gold) !important;
}

/* Lists */
.markdown-section ul,
.markdown-section ol {
  color: var(--text-secondary) !important;
  padding-left: 24px !important;
}

.markdown-section li {
  margin: 6px 0 !important;
  line-height: 1.65 !important;
}

.markdown-section li::marker {
  color: var(--gold-dim);
}

/* Tables */
.markdown-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.markdown-section th {
  background: var(--bg-card) !important;
  color: var(--gold) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 10px 14px !important;
  text-align: left !important;
  border-bottom: 1px solid var(--border) !important;
}

.markdown-section td {
  padding: 8px 14px !important;
  font-size: 13px !important;
  color: var(--text-secondary) !important;
  border-bottom: 1px solid rgba(42, 45, 69, 0.5) !important;
}

.markdown-section tr:hover td {
  background: var(--gold-glow) !important;
}

/* Blockquotes (Tips) */
.markdown-section blockquote {
  border-left: 3px solid var(--gold-dim) !important;
  background: var(--gold-glow) !important;
  padding: 14px 18px !important;
  margin: 20px 0 !important;
  border-radius: 0 8px 8px 0 !important;
}

.markdown-section blockquote p {
  color: var(--text-primary) !important;
  margin: 0 !important;
}

/* Code blocks */
.markdown-section pre {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 16px !important;
}

.markdown-section code {
  color: var(--gold-light) !important;
  font-size: 13px !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
}

.markdown-section p code,
.markdown-section li code {
  background: var(--bg-card) !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 12.5px !important;
  border: 1px solid var(--border);
}

/* Horizontal rules */
.markdown-section hr {
  border: none !important;
  border-top: 1px solid var(--border) !important;
  margin: 32px 0 !important;
}

/* ---- Pagination ---- */
.docsify-pagination-container {
  border-top: 1px solid var(--border) !important;
  margin-top: 40px;
  padding-top: 20px;
}

.pagination-item-title {
  color: var(--gold) !important;
  font-family: 'Cinzel', serif !important;
}

.pagination-item-label {
  color: var(--text-muted) !important;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .markdown-section {
    padding: 20px 16px !important;
  }
  
  .markdown-section h1 {
    font-size: 22px !important;
  }
  
  body .sidebar-toggle {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    padding: 8px !important;
  }
  
  body .sidebar-toggle span {
    background-color: var(--gold) !important;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dim);
}

/* ---- 404 Page ---- */
.markdown-section .emoji {
  font-size: 48px;
}

/* ---- Copy Code Button ---- */
.docsify-copy-code-button {
  font-size: 12px !important;
  background: var(--bg-elevated) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
}

/* Hero-Background für Docs - subtil */
body {
  background-image: url('./hero-docs.webp');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  background-attachment: fixed;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,22,37,0.85) 0%, rgba(26,22,37,0.95) 30%, rgba(26,22,37,1) 50%);
  z-index: -1;
  pointer-events: none;
}
