/* -------------------------------------------------------
   Global variables: light + dark system
------------------------------------------------------- */
:root {
  --font-sans: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "Fira Code", monospace;

  /* Colors (light) */
 --bg: #f7fff7;
  --text: #1a202c;
  --muted: #64748b;
  --accent: #10b981; /* Green accent */
  --accent-hover: #059669;
  --border: #d1fae5;
  --card: #f0fdf4;

  --radius: 10px;
  --shadow: 0 2px 6px rgba(0,0,0,0.05);
  --transition: 200ms cubic-bezier(.2,.9,.3,1);
  --container: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1f13;
    --text: #e6f5eb;
    --muted: #94a3b8;
    --accent: #10b981;
    --accent-hover: #059669;
    --border: #14532d;
    --card: #142d1e;
    --shadow: 0 2px 8px rgba(0,0,0,0.6);
  }
}


/* -------------------------------------------------------
   Base styles
------------------------------------------------------- */
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

img { max-width: 100%; border-radius: 6px; }

.container {
  width: 92%;
  max-width: var(--container);
  margin: 0 auto;
}

/* -------------------------------------------------------
   Header + Navigation
------------------------------------------------------- */
header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}
.header-inner h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--accent);
}
.tagline {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
nav a {
  font-weight: 600;
  font-size: 0.95rem;
}

/* -------------------------------------------------------
   Layout
------------------------------------------------------- */
.layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 20px auto;
}
.layout aside {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.layout main {
  flex: 1;
}

@media (min-width: 900px) {
  .layout {
    flex-direction: row;
    align-items: flex-start;
  }
  .layout aside {
    flex: 0 0 260px;
  }
}

/* -------------------------------------------------------
   Thread cards (index, category pages)
------------------------------------------------------- */
.thread-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.thread-card:hover { transform: translateY(-3px); }

.thread-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}
.thread-card .meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}






/* -------------------------------------------------------
   Thread detail (thread.php)
------------------------------------------------------- */
article.thread {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
article.thread h1 {
  font-size: 1.4rem;
  margin: 0 0 8px;
}
article.thread .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.thread-body {
  font-size: 1rem;
  line-height: 1.7;
}

/* -------------------------------------------------------
   Replies
------------------------------------------------------- */
#replies { margin-top: 24px; }
.reply {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.reply .meta {
  font-size: 0.85rem;
  color: var(--muted);
}
.reply .content { margin-top: 6px; }

/* -------------------------------------------------------
   Forms
------------------------------------------------------- */
form textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  transition: background var(--transition);
}
.btn:hover { background: var(--accent-hover); }

/* -------------------------------------------------------
   Utility
------------------------------------------------------- */
.breadcrumbs {
  font-size: 0.65rem;
  color: var(--muted);
  margin: 12px 0;
}
.breadcrumbs a { color: var(--accent); }

.related-box, .hub-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.pagination {
  margin: 20px 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.pagination a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* -------------------------------------------------------
   Footer
------------------------------------------------------- */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 18px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 40px;
}
