/* Dollars Competitor Wiki */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1a1d23;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --green: #16a34a;
  --yellow: #ca8a04;
  --red: #dc2626;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.07);
}

html { font-size: 16px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  background: var(--text);
  color: white;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: 20px; }
.brand { color: white; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand:hover { color: #93c5fd; }
.header-sub { color: #9ca3af; font-size: 0.85rem; flex: 1; }
.logout-link { color: #9ca3af; font-size: 0.82rem; text-decoration: none; }
.logout-link:hover { color: #fca5a5; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 16px 0; color: var(--text-muted); font-size: 0.85rem; margin-top: 48px; }
footer a { color: var(--accent); text-decoration: none; }

/* Page header */
.page-header { padding: 32px 0 24px; }
.page-header h1 { margin: 0 0 6px; font-size: 1.6rem; }
.subtitle { color: var(--text-muted); margin: 0; }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #e5e7eb;
  color: #374151;
}
.badge-hybrid { background: #dbeafe; color: #1e40af; }
.badge-sports { background: #dcfce7; color: #15803d; }
.badge-casino { background: #fce7f3; color: #9d174d; }
.badge-crypto { background: #fef3c7; color: #92400e; }
.badge-priority-high { background: #fee2e2; color: #991b1b; }
.badge-priority-medium { background: #fef3c7; color: #92400e; }
.badge-priority-low { background: #f3f4f6; color: #4b5563; }

/* Competitor table */
.competitor-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.competitor-table th {
  background: #f9fafb;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.competitor-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.competitor-table tr:last-child td { border-bottom: none; }
.competitor-table tr:hover td { background: #f9fafb; }

.competitor-link { font-weight: 600; color: var(--accent); text-decoration: none; display: block; }
.competitor-link:hover { color: var(--accent-hover); }
.domain { display: block; font-size: 0.8rem; color: var(--text-muted); }

.section-count { font-weight: 600; }
.section-count.complete { color: var(--green); }
.section-count.partial { color: var(--yellow); }
.section-count.empty { color: var(--red); }
.never { color: var(--text-muted); font-style: italic; }

/* Wiki layout */
.wiki-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 32px 0;
  align-items: start;
}

/* Wiki sidebar */
.wiki-nav {
  position: sticky;
  top: 72px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 0;
  box-shadow: var(--shadow);
}
.wiki-nav-title {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.wiki-nav ul { list-style: none; margin: 0; padding: 0; }
.wiki-nav li a {
  display: block;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.1s;
}
.wiki-nav li a:hover { background: #f3f4f6; color: var(--accent); }
.wiki-nav li a.no-content { color: var(--text-muted); }

/* Wiki content */
.wiki-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.wiki-header h1 { margin: 0 0 8px; font-size: 1.7rem; }
.wiki-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.domain-link { color: var(--text-muted); font-size: 0.85rem; text-decoration: none; }
.domain-link:hover { color: var(--accent); }
.wiki-build-info { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }
.wiki-build-info.empty { color: var(--red); }
.wiki-build-info code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; }

/* Wiki sections */
.wiki-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
}
.section-header h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.section-ts { font-size: 0.75rem; color: var(--text-muted); }
.section-body { padding: 20px 24px; }
.section-body h2 { font-size: 0.95rem; margin-top: 1.2em; color: #374151; }
.section-body h3 { font-size: 0.9rem; }
.section-body p { margin: 0.5em 0; }
.section-body ul, .section-body ol { padding-left: 1.4em; margin: 0.5em 0; }
.section-body li { margin: 0.3em 0; }
.section-body strong { color: var(--text); }
.section-body code { background: #f3f4f6; padding: 2px 5px; border-radius: 3px; font-size: 0.85em; }
.section-body pre { background: #f3f4f6; padding: 14px; border-radius: var(--radius); overflow-x: auto; font-size: 0.85em; }
.section-body table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.section-body th { background: #f9fafb; padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); font-weight: 600; }
.section-body td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.placeholder { color: var(--text-muted); font-style: italic; }

@media (max-width: 768px) {
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-nav { position: static; }
  .competitor-table { font-size: 0.875rem; }
  .competitor-table th:nth-child(5),
  .competitor-table td:nth-child(5) { display: none; }
}
