/* ═══════════════════════════════════════════
   OddsForge Help Center — Styles
   Polymarket-style clean help center
   ═══════════════════════════════════════════ */

:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --border: #334155;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #10b981;
  --hero-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-hover); }

/* ─── Header / Navbar ─── */
.help-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.help-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.help-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.help-logo:hover { color: white; }

.help-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.help-nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}

.help-nav-links a:hover { color: white; }

/* ─── Hero ─── */
.help-hero {
  background: var(--hero-bg);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.help-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .help-hero h1 { font-size: 2.5rem; }
}

/* ─── Search ─── */
.help-search-wrap {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.help-search-wrap .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.25rem;
  pointer-events: none;
}

.help-search {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.help-search::placeholder { color: var(--text-dim); }
.help-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.search-results.active { display: block; }

.search-result-item {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(51,65,85,0.3);
  color: var(--text);
  font-size: 0.875rem;
  transition: background 0.1s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-hover); color: white; }

.search-result-item .result-collection {
  font-size: 0.6875rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ─── Quick Links ─── */
.quick-links {
  max-width: 900px;
  margin: -1.5rem auto 0;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s;
}

.quick-link:hover {
  background: var(--bg-hover);
  color: white;
}

.quick-link .material-icons {
  font-size: 1.125rem;
  color: var(--primary);
}

/* ─── Collections Grid ─── */
.collections-section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.collections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .collections-grid { grid-template-columns: repeat(2, 1fr); }
}

.collection-card {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.2s, transform 0.15s;
  color: var(--text);
}

.collection-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  color: white;
}

.collection-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
}

.collection-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.collection-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.collection-count {
  font-size: 0.6875rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* ─── Collection Page ─── */
.collection-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}

.collection-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.collection-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.collection-header .article-count {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.article-list {
  max-width: 900px;
  margin: 1rem auto 3rem;
  padding: 0 1.5rem;
}

.article-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}

.article-list-item:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
  color: white;
}

.article-list-item .material-icons {
  color: var(--text-dim);
  font-size: 1.25rem;
}

/* ─── Article Page ─── */
.article-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.article-breadcrumb a { color: var(--text-muted); }
.article-breadcrumb a:hover { color: var(--primary); }

.article-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-meta {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.article-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.article-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content strong {
  color: var(--text);
  font-weight: 600;
}

.article-content code {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.875em;
}

.article-content .callout {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--primary);
  background: rgba(59, 130, 246, 0.05);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.article-content .callout-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

/* ─── Related Articles ─── */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-articles h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.related-link {
  display: block;
  padding: 0.625rem 0;
  font-size: 0.9375rem;
  color: var(--primary);
  border-bottom: 1px solid rgba(51,65,85,0.3);
}

.related-link:last-child { border-bottom: none; }
.related-link:hover { color: var(--primary-hover); }

/* ─── Feedback ─── */
.article-feedback {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}

.article-feedback p {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.feedback-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.feedback-btn {
  font-size: 1.75rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.15s, transform 0.15s;
  filter: grayscale(0.5);
}

.feedback-btn:hover {
  background: var(--bg-hover);
  transform: scale(1.2);
  filter: grayscale(0);
}

.feedback-btn.selected {
  filter: grayscale(0);
  transform: scale(1.2);
}

/* ─── Footer ─── */
.help-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
}

.help-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.help-footer a {
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.help-footer a:hover { color: var(--text); }

.help-footer .footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.help-footer .copyright {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ─── Back to top ─── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--primary-hover); }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .help-hero { padding: 2.5rem 1rem 2rem; }
  .help-hero h1 { font-size: 1.5rem; }
  .quick-links-grid { grid-template-columns: 1fr; }
  .help-nav-links { gap: 1rem; }
  .article-page h1 { font-size: 1.5rem; }
}
