/* ============================================
   Filter Forge — Design System & Shared Styles
   ============================================ */

/* CSS Custom Properties */
:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-tertiary: #0f3460;
  --bg-card: #1e1e3a;
  --accent-primary: #c8aa6e;
  --accent-hover: #e0c882;
  --accent-dark: #a08030;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-heading: #c8aa6e;
  --border: #2a2a4a;
  --code-bg: #0d1117;
  --search-bg: #1e1e3a;
  --success: #00b894;
  --warning: #fdcb6e;
  --error: #e17055;
  --nav-height: 60px;
  --content-max-width: 900px;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  line-height: 1.3;
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

p { margin-bottom: 0.75rem; }

code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  position: relative;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 1000;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-right: 2rem;
  white-space: nowrap;
}

.nav-logo:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

.nav-logo-img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--accent-primary);
  background: rgba(200, 170, 110, 0.1);
}

.nav-issue-btn {
  margin-left: auto;
  margin-right: 0.75rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.nav-issue-btn:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  text-decoration: none;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-top: var(--nav-height);
  padding: 2rem 1.5rem;
}

.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: auto;
}

.footer a {
  color: var(--accent-primary);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

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

.card h2 {
  font-size: 1.17em;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.card a {
  display: block;
  height: 100%;
  color: inherit;
}

.card a:hover {
  text-decoration: none;
}

/* Hero Section */
.hero-logo {
  display: block;
  margin: 0 auto 1rem;
  max-width: 200px;
  height: auto;
}

.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero .tagline {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 2rem;
}

/* Callout Boxes */
.callout {
  border-left: 4px solid var(--accent-primary);
  background: var(--bg-secondary);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1rem;
}

.callout.warning {
  border-left-color: var(--warning);
}


.callout.success {
  border-left-color: var(--success);
}

/* Copy Button */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-body);
  transition: color 0.2s, border-color 0.2s;
}

.copy-btn:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.copy-btn.copied {
  color: var(--success);
  border-color: var(--success);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

td {
  font-size: 0.9rem;
}

td code {
  font-size: 0.85rem;
}

tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Page Title */
.page-title {
  text-align: center;
  margin-bottom: 2rem;
}

/* Search Input (shared base) */
.search-input {
  width: 100%;
  max-width: 500px;
  padding: 0.75rem 1rem;
  background: var(--search-bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.search-wrap {
  text-align: center;
  margin-bottom: 1.5rem;
}

.search-wrap .search-input {
  font-size: 1.25rem;
  padding: 0.85rem 1.25rem;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-input:focus {
  border-color: var(--accent-primary);
}

/* Utility */
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-hamburger {
    display: block;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 1.5rem 1rem;
  }
}
