/* Superstar Racing forums (forum/ on /forums). Loaded after site.css, which styles the page shell, .btn, .btn-dark,
   .panel, .notice, .error and .fine. Everything here is forum-only and prefixed f- (bb- for formatted post text).
   2009 look: black page, dark rows, thin #333 separators, orange links, bold white titles. */

.content { --f-bg: #000; --f-text: #fff; --f-muted: #b5b5b5; --f-orange: #ff6600; --f-orange-2: #ffa21f;
  --f-panel: #1b1b1b; --f-row: #141414; --f-row-alt: #181818; --f-hover: #222; --f-line: #333; --f-head: #262626; }

/* ------------------------------------------------------------------ small helpers */
.f-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; }
.f-inline { display: inline; margin: 0; }
.f-linkbtn { display: inline; padding: 0; margin: 0; border: 0; background: none; color: var(--f-orange);
  font: inherit; text-decoration: underline; cursor: pointer; }
.f-linkbtn:hover, .f-linkbtn:focus-visible { color: var(--f-orange-2); }
.f-danger.f-linkbtn { color: #ff7a5c; }
.f-empty { color: var(--f-muted); }
/* titles are player text: a long word or pasted address must wrap instead of pushing the page sideways */
.content h1, .f-crumbs, .f-table .f-last, .f-result, .f-list, .f-form p, .f-here-text { overflow-wrap: anywhere; }
.content mark { background: #5a2a00; color: #fff; padding: 0 1px; }

/* ------------------------------------------------------------------ top bar: breadcrumbs + who is logged in */
.f-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  margin: 0 0 12px; padding: 7px 10px; background: var(--f-panel); border: 1px solid var(--f-line);
  border-radius: 4px; font-size: 13px; }
.f-crumbs { min-width: 0; color: var(--f-muted); }
.f-crumbs span:not(.f-sep) { color: var(--f-text); font-weight: bold; }
.f-sep { color: #666; margin: 0 2px; }
.f-userbox { color: var(--f-muted); }
.f-userbox b { color: var(--f-text); }
.f-userbox .f-inline { margin-left: 8px; }
.f-who { margin-right: 2px; }
.f-login-link { font-weight: bold; }

/* ------------------------------------------------------------------ search box */
.f-search { display: flex; gap: 6px; margin: 0 0 14px; max-width: 420px; }
.f-search input { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ form fields */
.f-form input[type="text"], .f-form input:not([type]), .f-form input[type="password"], .f-form textarea,
.f-form select, .f-search input, .f-modtools select {
  box-sizing: border-box; padding: 6px 8px; background: #0c0c0c; color: var(--f-text);
  border: 1px solid #444; border-radius: 3px; font: 14px Arial, Helvetica, sans-serif; }
.f-form input:focus, .f-form textarea:focus, .f-search input:focus, .f-modtools select:focus {
  outline: none; border-color: var(--f-orange); box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.25); }
.f-form { margin: 16px 0; padding: 14px 16px; }
.f-form h2 { margin-top: 0; }
.f-form p { margin: 0 0 12px; }
.f-form label { display: block; margin-bottom: 4px; font-weight: bold; color: var(--f-text); }
.f-form input:not([type="hidden"]), .f-form textarea { width: 100%; }
.f-form textarea { min-height: 160px; resize: vertical; line-height: 1.45; }
.f-login { max-width: 420px; }
.f-cancel { margin-left: 10px; }

/* ------------------------------------------------------------------ board index and topic list tables */
.content .f-board-desc { color: var(--f-muted); margin: -4px 0 10px; }
.f-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0; }
.f-table { width: 100%; border-collapse: collapse; margin: 0 0 16px; background: var(--f-row);
  border: 1px solid var(--f-line); }
.f-table thead th { padding: 6px 10px; background: linear-gradient(#2e2e2e, #1c1c1c); color: var(--f-muted);
  font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.04em; text-align: left;
  border-bottom: 1px solid var(--f-line); }
.f-table td { padding: 9px 10px; vertical-align: top; border-top: 1px solid var(--f-line); }
.f-table tbody tr:nth-child(even) { background: var(--f-row-alt); }
.f-table tbody tr:hover { background: var(--f-hover); }
.f-table .f-num { width: 70px; text-align: center; white-space: nowrap; color: var(--f-muted); }
.f-table td.f-num { color: var(--f-text); font-weight: bold; }
.f-table .f-last { width: 220px; font-size: 12px; color: var(--f-muted); line-height: 1.5; }
.f-table .f-main { overflow-wrap: anywhere; }
.f-title { color: var(--f-text); font-weight: bold; font-size: 15px; text-decoration: none; }
.f-boards .f-title { font-size: 16px; }
.f-topics .f-title { font-size: 14px; }
a.f-title:hover { color: var(--f-orange-2); text-decoration: underline; }
.content .f-desc { margin: 3px 0 0; color: var(--f-muted); font-size: 12px; }
.f-sticky { background: #1d1408 !important; }
.f-tag { font-size: 12px; font-weight: bold; }
.f-tag-sticky { color: var(--f-orange-2); }
.f-tag-locked { color: #ff7a5c; }

/* ------------------------------------------------------------------ pagination */
.f-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; font-size: 13px; }
.f-pager-label { margin-right: 6px; color: var(--f-muted); }
.f-pager a, .f-pager .f-cur { display: inline-block; min-width: 26px; padding: 3px 7px; text-align: center;
  border: 1px solid var(--f-line); border-radius: 3px; background: var(--f-panel); text-decoration: none; }
.f-pager a:hover { border-color: var(--f-orange); }
.f-pager .f-cur { background: var(--f-orange); border-color: var(--f-orange); color: #000; font-weight: bold; }
.f-gap { color: var(--f-muted); padding: 0 2px; }

/* ------------------------------------------------------------------ posts: author column on the left */
.f-post { display: grid; grid-template-columns: 170px minmax(0, 1fr); margin: 0 0 10px;
  background: var(--f-row); border: 1px solid var(--f-line); border-radius: 4px; overflow: hidden; }
.f-post:target { border-color: var(--f-orange); }
.f-post-author { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 12px;
  background: var(--f-panel); border-right: 1px solid var(--f-line); }
.f-post-author .f-user { color: var(--f-orange); font-weight: bold; font-size: 15px; word-break: break-word; }
.f-postcount { margin-top: 2px; }
.f-post-main { display: flex; flex-direction: column; min-width: 0; }
.f-post-head { padding: 6px 12px; font-size: 12px; color: var(--f-muted); border-bottom: 1px solid var(--f-line);
  background: var(--f-row-alt); }
.f-permalink { margin-right: 6px; font-weight: bold; text-decoration: none; }
.f-post-body { flex: 1; padding: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.content .f-edited { margin: 0; padding: 0 12px 8px; font-style: italic; }
.f-post-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; padding: 6px 12px;
  border-top: 1px solid var(--f-line); font-size: 12px; }
.content .f-replybox { margin: 16px 0; }
.f-tool { text-decoration: none; }
.f-tool:hover { text-decoration: underline; }

/* role badges */
.f-badge { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 11px; font-weight: bold;
  line-height: 1.5; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.03em; }
.f-badge-admin { background: #b3001b; color: #fff; }
.f-badge-gm { background: #1f6fd1; color: #fff; }
.f-badge-vip { background: linear-gradient(#ffd24a, #e3a000); color: #000; }

/* formatted post text */
.f-post-body a, .f-snippet a { color: var(--f-orange); }
.bb-quote { margin: 8px 0; padding: 8px 10px; background: #101010; border: 1px solid var(--f-line);
  border-left: 3px solid var(--f-orange); border-radius: 3px; color: #ddd; }
.bb-quote cite { display: block; margin-bottom: 4px; font-style: normal; font-weight: bold; font-size: 12px;
  color: var(--f-orange-2); }
.bb-quote-body { overflow-wrap: anywhere; }
.bb-code { margin: 8px 0; padding: 8px 10px; background: #0a0a0a; border: 1px solid var(--f-line); border-radius: 3px;
  overflow-x: auto; white-space: pre; font: 13px/1.45 Consolas, "Courier New", monospace; color: #e8e8e8; }

/* ------------------------------------------------------------------ moderator tools */
.f-modtools { margin: 18px 0; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.f-modtools h2 { width: 100%; margin: 0 0 4px; }
.f-modtools .f-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-right: 10px; }
.btn.f-danger { color: #ff7a5c; }

/* ------------------------------------------------------------------ who's here, profiles, search results */
.f-here { margin-top: 8px; padding: 12px 14px; }
.f-here h2 { margin-top: 0; }
.f-here-text .f-inline { margin-left: 4px; }
.f-profile { padding: 14px 16px; }
.content .f-profile-name { margin: 0 0 10px; font-size: 18px; }
.f-profile dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.f-profile dt { color: var(--f-muted); }
.f-profile dd { margin: 0; font-weight: bold; }
.f-list { padding-left: 18px; }
.f-list li { margin: 4px 0; }
.f-results { list-style: none; padding: 0; margin: 0; border: 1px solid var(--f-line); }
.f-result { padding: 10px 12px; border-top: 1px solid var(--f-line); background: var(--f-row); }
.f-result:first-child { border-top: 0; }
.f-result:nth-child(even) { background: var(--f-row-alt); }
.content .f-snippet { margin: 4px 0; color: #ddd; overflow-wrap: anywhere; }
.f-result .fine { margin: 0; }

/* ------------------------------------------------------------------ narrow screens: one column */
@media (max-width: 699px) {
  .f-table, .f-table tbody, .f-table tr, .f-table td { display: block; width: auto; }
  .f-table thead { display: none; }
  .f-table tr { border-top: 1px solid var(--f-line); padding: 6px 0; }
  .f-table tbody tr:first-child { border-top: 0; }
  .f-table td { border: 0; padding: 3px 10px; }
  .f-table .f-num, .f-table .f-last { width: auto; text-align: left; }
  .f-table td.f-num, .f-table td.f-last { display: inline-block; font-size: 12px; }
  .f-table td.f-num::before, .f-table td.f-last::before { content: attr(data-label) ": "; color: var(--f-muted);
    font-weight: normal; }
  .f-post { grid-template-columns: minmax(0, 1fr); }
  .f-post-author { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 12px;
    border-right: 0; border-bottom: 1px solid var(--f-line); }
  .f-postcount { margin: 0 0 0 auto; }
  .f-pager { margin-left: 0; }
  .f-search { max-width: none; }
  .f-modtools .f-inline { margin-right: 0; }
  /* below 16px iPhones zoom the page in when a field is tapped */
  .f-form input, .f-form textarea, .f-form select, .f-search input, .f-modtools select { font-size: 16px; }
}
