/* RealRadio Noticeboard — cork-board themed community surface */

:root {
  --nb-bg: #1a1a2e;
  --nb-surface: #16213e;
  --nb-card: #0f3460;
  --nb-accent: #e94560;
  --nb-text: #eee;
  --nb-muted: #9ca3af;
  --nb-border: rgba(255,255,255,0.08);
  --nb-green: #22c55e;
  --nb-blue: #3b82f6;
  --nb-amber: #f59e0b;
  --nb-radius: 8px;
  --nb-max-width: 960px;
  --nb-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --nb-mono: 'JetBrains Mono', 'Consolas', monospace;
}

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

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

a { color: var(--nb-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.nb-header {
  background: var(--nb-surface);
  border-bottom: 1px solid var(--nb-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nb-header__inner {
  max-width: var(--nb-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
}
.nb-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--nb-text);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.nb-logo__icon { font-size: 24px; }
.nb-nav { display: flex; gap: 4px; flex: 1; }
.nb-nav__link {
  padding: 6px 14px;
  border-radius: var(--nb-radius);
  color: var(--nb-muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.nb-nav__link:hover { background: rgba(255,255,255,0.06); color: var(--nb-text); text-decoration: none; }
.nb-nav__link--active { color: var(--nb-text); background: rgba(255,255,255,0.08); }
.nb-nav__link--back { font-size: 13px; }
.nb-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nb-user { font-size: 13px; color: var(--nb-muted); }

/* Main */
.nb-main {
  flex: 1;
  max-width: var(--nb-max-width);
  margin: 0 auto;
  padding: 32px 20px;
  width: 100%;
}

/* Footer */
.nb-footer {
  text-align: center;
  padding: 20px;
  color: var(--nb-muted);
  font-size: 13px;
  border-top: 1px solid var(--nb-border);
}

/* Cards */
.nb-card {
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: var(--nb-radius);
  padding: 20px;
  margin-bottom: 16px;
}
.nb-card:hover { border-color: rgba(255,255,255,0.15); }
.nb-card__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.nb-card__meta {
  font-size: 13px;
  color: var(--nb-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Grid */
.nb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Buttons */
.nb-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: var(--nb-radius);
  border: 1px solid var(--nb-border);
  background: var(--nb-surface);
  color: var(--nb-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.nb-btn:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.nb-btn--primary { background: var(--nb-accent); border-color: var(--nb-accent); }
.nb-btn--primary:hover { background: #d63852; }
.nb-btn--sm { padding: 4px 12px; font-size: 13px; }
.nb-btn--danger { border-color: #ef4444; color: #ef4444; }

/* Forms */
.nb-form { margin: 20px 0; }
.nb-field {
  margin-bottom: 12px;
}
.nb-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--nb-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.nb-input, .nb-textarea, .nb-select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--nb-border);
  border-radius: var(--nb-radius);
  color: var(--nb-text);
  font-family: var(--nb-font);
  font-size: 14px;
}
.nb-input:focus, .nb-textarea:focus, .nb-select:focus {
  outline: none;
  border-color: var(--nb-blue);
}
.nb-textarea { min-height: 120px; resize: vertical; font-family: var(--nb-mono); }

/* Labels / chips */
.nb-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

/* Markdown content */
.nb-markdown {
  line-height: 1.7;
}
.nb-markdown h1 { font-size: 24px; margin: 24px 0 12px; }
.nb-markdown h2 { font-size: 20px; margin: 20px 0 10px; border-bottom: 1px solid var(--nb-border); padding-bottom: 6px; }
.nb-markdown h3 { font-size: 17px; margin: 16px 0 8px; }
.nb-markdown p { margin: 8px 0; }
.nb-markdown ul, .nb-markdown ol { padding-left: 24px; margin: 8px 0; }
.nb-markdown code {
  background: rgba(0,0,0,0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--nb-mono);
  font-size: 13px;
}
.nb-markdown pre {
  background: rgba(0,0,0,0.4);
  padding: 16px;
  border-radius: var(--nb-radius);
  overflow-x: auto;
  margin: 12px 0;
}
.nb-markdown pre code { background: none; padding: 0; }
.nb-markdown blockquote {
  border-left: 3px solid var(--nb-accent);
  padding-left: 16px;
  margin: 12px 0;
  color: var(--nb-muted);
}
.nb-markdown a { color: var(--nb-blue); }

/* Feature cards */
.nb-feature-card { text-align: center; }
.nb-feature-card .nb-card__title { margin-top: 8px; }
.nb-feature-icon { font-size: 36px; line-height: 1; }
.nb-download-card { background: linear-gradient(135deg, var(--nb-card), #1a365d); border-color: var(--nb-blue); }

/* Utility */
.nb-loading { text-align: center; padding: 60px; color: var(--nb-muted); }
.nb-error { text-align: center; padding: 40px; color: var(--nb-accent); }
.nb-empty { text-align: center; padding: 40px; color: var(--nb-muted); font-style: italic; }
.nb-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nb-spacer { flex: 1; }
.nb-mb { margin-bottom: 20px; }
.nb-mt { margin-top: 20px; }

/* Hero / landing */
.nb-hero {
  text-align: center;
  padding: 60px 20px;
}
.nb-hero__title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}
.nb-hero__sub {
  font-size: 18px;
  color: var(--nb-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Thread list */
.nb-thread-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--nb-border);
  cursor: pointer;
  transition: background 0.1s;
}
.nb-thread-item:hover { background: rgba(255,255,255,0.03); }
.nb-thread-item__title { font-weight: 500; flex: 1; }
.nb-thread-item__meta { font-size: 13px; color: var(--nb-muted); }
.nb-thread-item__replies {
  font-size: 12px;
  color: var(--nb-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Post */
.nb-post {
  padding: 16px 0;
  border-bottom: 1px solid var(--nb-border);
}
.nb-post__header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--nb-muted);
}
.nb-post__author { font-weight: 600; color: var(--nb-text); }

/* Category chips */
.nb-category-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.nb-category-chip {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  background: var(--nb-surface);
  border: 1px solid var(--nb-border);
  cursor: pointer;
  color: var(--nb-text);
  text-decoration: none;
}
.nb-category-chip:hover { border-color: var(--nb-blue); text-decoration: none; }
.nb-category-chip--active { background: var(--nb-blue); border-color: var(--nb-blue); }

/* Toasts */
.nb-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.nb-toast {
  padding: 10px 20px;
  border-radius: var(--nb-radius);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: auto;
  max-width: 380px;
}
.nb-toast--visible { opacity: 1; transform: translateX(0); }
.nb-toast--success { background: #16a34a; }
.nb-toast--error { background: #dc2626; }

/* Disabled button */
.nb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Filter bar */
.nb-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}
.nb-filter-bar__label {
  font-size: 13px;
  color: var(--nb-muted);
  font-weight: 500;
  margin-right: 4px;
}
.nb-filter-chip {
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--nb-surface);
  border: 1px solid var(--nb-border);
  cursor: pointer;
  color: var(--nb-text);
  transition: border-color 0.15s, background 0.15s;
}
.nb-filter-chip:hover { border-color: var(--nb-blue); }
.nb-filter-chip--active { background: var(--nb-blue); border-color: var(--nb-blue); }

/* Status colors */
.nb-status { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 12px; }
.nb-status--open { background: rgba(34,197,94,0.2); color: #22c55e; }
.nb-status--closed { background: rgba(156,163,175,0.2); color: #9ca3af; }
.nb-status--resolved { background: rgba(59,130,246,0.2); color: #3b82f6; }

/* Markdown preview */
.nb-preview-toggle {
  display: inline-flex;
  gap: 0;
  margin-bottom: 8px;
  border-radius: var(--nb-radius);
  overflow: hidden;
  border: 1px solid var(--nb-border);
}
.nb-preview-toggle__btn {
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--nb-muted);
  cursor: pointer;
}
.nb-preview-toggle__btn--active {
  background: var(--nb-surface);
  color: var(--nb-text);
}
.nb-preview-pane {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--nb-border);
  border-radius: var(--nb-radius);
  padding: 12px 14px;
  min-height: 120px;
}

/* Pagination */
.nb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--nb-muted);
}

@media (max-width: 640px) {
  .nb-header__inner { flex-wrap: wrap; gap: 12px; }
  .nb-nav { order: 3; width: 100%; justify-content: center; }
  .nb-hero__title { font-size: 28px; }
  .nb-grid { grid-template-columns: 1fr; }
}
