/*
Theme Name:        SOF2MP
Theme URI:         https://www.sof2mp.com/
Author:            BuLLy
Author URI:        https://www.sof2mp.com/
Description:       The live pulse of Soldier of Fortune 2 multiplayer. Built hand in hand with the SOF2 Stats Hub plugin: real-time human player counts, live games, history, leaderboards, match reports and player interaction front and centre.
Version:           1.0.3
Requires at least: 5.8
Tested up to:      6.8
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       sof2mp
Tags:              dark, full-width-template, custom-logo, custom-menu, featured-images, threaded-comments, wide-blocks
*/

/* =============================================================================
   1. Tokens
   ============================================================================= */
:root {
  --bg: #0a0e12;
  --bg-2: #0e141a;
  --panel: #131b21;
  --panel-2: #18222a;
  --panel-3: #1e2a32;
  --line: #26333b;
  --line-2: #33434c;
  --text: #eef1ee;
  --muted: #aab6b5;
  --dim: #7f8d8b;
  --gold: #d3a45d;
  --gold-2: #f2ce8d;
  --gold-dark: #8f6f42;
  --green: #7fd18c;
  --red: #e0675c;
  --blue: #6fa3dc;
  --radius: 14px;
  --radius-sm: 8px;
  --wrap: min(100% - 48px, 1640px);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Rajdhani", "Inter", system-ui, sans-serif;
  --shadow: 0 18px 40px rgba(0, 0, 0, .35);

  /* Feed the SOF2 Stats Hub plugin's palette. */
  --sof-bg: var(--bg);
  --sof-bg2: var(--bg-2);
  --sof-panel: var(--panel);
  --sof-panel2: var(--panel-2);
  --sof-line: var(--line);
  --sof-gold: var(--gold);
  --sof-gold2: var(--gold-2);
  --sof-text: var(--text);
  --sof-muted: var(--muted);
  --sof-dim: var(--dim);
  --sof-green: var(--green);
  --sof-radius: var(--radius);
}

/* =============================================================================
   2. Base
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@supports (overflow: clip) { html { overflow-x: clip; } } /* clip keeps the sticky header working */
body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(211, 164, 93, .08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(111, 163, 220, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  /* Subtle HUD grid. */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000, transparent 70%);
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--gold-2); text-decoration: none; transition: color .15s, background-color .15s, border-color .15s; }
a:hover { color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: .01em; margin: 0 0 .5em; color: var(--text); }
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
::selection { background: var(--gold); color: #141410; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; z-index: 100000; top: 8px; left: 8px; padding: 12px 18px; background: var(--gold); color: #141410; border-radius: 8px; }
.wrap { width: var(--wrap); margin-inline: auto; }

/* Forms */
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], textarea, select {
  background: #0f161b; border: 1px solid var(--line-2); color: var(--text); border-radius: var(--radius-sm);
  padding: 11px 14px; font: inherit; font-size: 1rem; max-width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(211, 164, 93, .2); }
button, input[type="submit"], input[type="button"], .button, .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: #141410; border: 1px solid #b98d52; border-radius: var(--radius-sm);
  padding: 11px 20px; font: 700 1rem/1.2 var(--font-body); cursor: pointer; text-decoration: none;
}
button:hover, input[type="submit"]:hover, .button:hover, .wp-block-button__link:hover { background: var(--gold-2); color: #141410; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 24px; border-radius: 10px; font: 700 1.08rem/1 var(--font-body); border: 1px solid transparent; white-space: nowrap; cursor: pointer; }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--gold); color: #141410; border-color: #b98d52; box-shadow: 0 10px 26px rgba(211, 164, 93, .25); }
.btn-primary:hover { background: var(--gold-2); color: #141410; transform: translateY(-1px); }
.btn-ghost { background: rgba(20, 28, 33, .7); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-green { background: #2f5b38; color: #fff; border-color: #4f8f5c; }
.btn-green:hover { background: #3a6f45; color: #fff; }
.btn-sm { min-height: 40px; padding: 9px 16px; font-size: .95rem; }

/* =============================================================================
   3. Pulse bar (sitewide live strip)
   ============================================================================= */
.pulse-bar { background: #080b0e; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
.pulse-bar .wrap { display: flex; align-items: center; gap: 22px; min-height: 44px; }
.pulse-live { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.live-dot { position: relative; width: 11px; height: 11px; border-radius: 50%; background: var(--green); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: pulse-ring 2s ease-out infinite; }
@keyframes pulse-ring { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } }
.pulse-item strong { color: var(--text); font-weight: 700; font-size: 1.05rem; }
.pulse-item .sof2s-live { color: var(--gold-2); font-weight: 800; }
.pulse-sep { color: var(--line-2); }
.pulse-links { margin-left: auto; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pulse-links::-webkit-scrollbar { display: none; }
.pulse-links ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pulse-links a { display: block; padding: 5px 11px; border-radius: 6px; background: #1a2328; color: #d7dedb; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.pulse-links a:hover { background: #584329; color: #fff; }

/* =============================================================================
   4. Header
   ============================================================================= */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(12, 17, 21, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 84px; }
.site-branding { flex: none; display: flex; align-items: center; }
.site-branding img { max-height: 62px; width: auto; display: block; }
.site-title { margin: 0; font: 700 2rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.site-title a { color: var(--text); }
.site-title span { color: var(--gold); }

.primary-nav { flex: 1; min-width: 0; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav > ul, .primary-nav .menu { display: flex; align-items: center; gap: 2px; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 12px 15px; border-radius: 8px; color: #e7ebe8; font: 700 1.12rem/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a, .primary-nav .current-menu-ancestor > a { background: var(--panel-2); color: var(--gold-2); }
.primary-nav .menu-item-has-children > a::after { content: "▾"; margin-left: 6px; font-size: .8em; color: var(--gold); }
.primary-nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 240px; padding: 8px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; z-index: 60; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { font: 600 1rem/1.3 var(--font-body); letter-spacing: 0; text-transform: none; padding: 10px 12px; }
.primary-nav .sub-menu .sub-menu { top: 0; left: 100%; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn { width: 46px; height: 46px; padding: 0; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); }
.icon-btn:hover { background: var(--panel-3); border-color: var(--gold); color: var(--gold-2); }
.icon-btn svg { width: 22px; height: 22px; }
.me-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 16px 6px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font-weight: 700; }
.me-btn img { width: 32px; height: 32px; border-radius: 50%; }
.me-btn .me-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #403220; color: var(--gold-2); }
.me-btn .me-avatar svg { width: 18px; height: 18px; }
.me-btn:hover { border-color: var(--gold); color: var(--gold-2); }
.menu-toggle { display: none; }

.header-search { border-top: 1px solid var(--line); background: var(--bg-2); padding: 18px 0; }
.header-search[hidden] { display: none; }
.search-form { display: flex; gap: 10px; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; font-size: 1.1rem; padding: 14px 18px; }

/* =============================================================================
   5. Sections & shared components
   ============================================================================= */
.site-content { min-height: 50vh; }
.section { padding: 56px 0; }
.section + .section { padding-top: 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 1.05rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-2); font: 700 .95rem/1 var(--font-display); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 10px; }
.more-link { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.more-link::after { content: " →"; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); }

.panel { background: linear-gradient(180deg, var(--panel), #11181d); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; min-width: 0; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font: 700 1.35rem/1.2 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.panel-title .more-link { font: 700 1rem/1 var(--font-body); text-transform: none; letter-spacing: 0; }
.panel-title svg { width: 22px; height: 22px; color: var(--gold); flex: none; }
.panel-title > span { display: inline-flex; align-items: center; gap: 10px; }

/* Stat chips */
.stat-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat-chip { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; position: relative; overflow: hidden; }
.stat-chip::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--gold), var(--gold-dark)); }
.stat-chip .num { font: 700 2.6rem/1 var(--font-display); color: var(--gold-2); }
.stat-chip .label { margin-top: 6px; color: var(--muted); font-weight: 600; font-size: 1rem; }
.stat-chip .sub { margin-top: 4px; color: var(--dim); font-size: .95rem; }
.stat-chip .sub a { color: var(--text); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state .big { font: 700 2rem/1.2 var(--font-display); margin-bottom: 8px; }
.empty-state p { color: var(--muted); font-size: 1.1rem; }

/* =============================================================================
   6. Front page
   ============================================================================= */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 40%; filter: saturate(.6) contrast(1.1); opacity: .45; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 0%, rgba(10, 14, 18, .92) 42%, rgba(10, 14, 18, .7) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 40%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 64px 0 56px; }
.live-tag { display: inline-flex; align-items: center; gap: 12px; padding: 8px 16px 8px 14px; border: 1px solid #3f6b47; border-radius: 999px; background: rgba(47, 91, 56, .25); color: var(--green); font: 700 1rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; }
.live-tag .ago { color: var(--muted); font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-weight: 500; font-size: .95rem; }
.hero-count { font: 700 clamp(7rem, 17vw, 15rem)/.85 var(--font-display); color: var(--gold-2); letter-spacing: -.02em; margin: 22px 0 6px; text-shadow: 0 0 60px rgba(242, 206, 141, .22); font-variant-numeric: tabular-nums; }
.hero-count .sof2s-live { color: inherit; }
.hero-label { font: 700 clamp(1.5rem, 2.6vw, 2.25rem)/1.15 var(--font-display); text-transform: uppercase; letter-spacing: .04em; max-width: 640px; }
.hero-sub { color: var(--muted); font-size: 1.15rem; margin: 14px 0 0; }
.hero-sub strong, .hero-sub .sof2s-live { color: var(--text); font-weight: 700; }
.hero-status { margin-top: 18px; }
.hero-status .sof2s-status { font-size: 1.05rem; padding: 7px 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-side .panel { background: rgba(19, 27, 33, .88); backdrop-filter: blur(6px); }
.hero-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.hero-tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.hero-tile .num { font: 700 2rem/1 var(--font-display); color: var(--gold-2); }
.hero-tile .label { color: var(--muted); font-size: .95rem; margin-top: 4px; }

/* Live server strip (updates from the API) */
.live-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 24px; }
.live-strip-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.live-strip-item:hover { border-color: var(--gold-dark); }
.live-strip-count { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 70px; height: 64px; padding: 0 6px; border-radius: 10px; background: rgba(47, 91, 56, .3); border: 1px solid #3f6b47; color: var(--green); }
.live-strip-count .n { font: 700 1.8rem/1 var(--font-display); }
.live-strip-count .l { font: 700 .78rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: #a9d6b1; }
.live-strip-name { font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: var(--text); }
.live-strip-meta { color: var(--muted); font-size: .95rem; }
.live-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.live-games .sof2s-server-card { margin: 0; }
.live-game { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.live-game .sof2s-server-card { border: 0; background: transparent; }

/* Get in the game */
.cta-card { display: flex; flex-direction: column; }
.cta-card .panel-title { color: var(--text); }
.cta-card .cta-text { color: var(--muted); font-size: 1.05rem; }
.cta-card .sof2s-rsvp > .sof2s-eyebrow, .cta-card .sof2s-predict > .sof2s-eyebrow { display: none; }
.claim-steps { counter-reset: step; list-style: none; margin: 0 0 20px; padding: 0; }
.claim-steps li { counter-increment: step; position: relative; padding: 8px 0 8px 46px; font-size: 1.05rem; }
.claim-steps li::before { content: counter(step); position: absolute; left: 0; top: 6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #403220; border: 1px solid var(--gold-dark); color: var(--gold-2); font: 700 1.1rem/1 var(--font-display); }

/* Tabs */
.tabs-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tabs-nav button { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); padding: 10px 18px; font: 700 1rem/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; }
.tabs-nav button:hover { color: var(--text); background: var(--panel-3); }
.tabs-nav button[aria-selected="true"] { background: var(--gold); color: #141410; border-color: #b98d52; }
.tab-panel[hidden] { display: none; }

/* Discord band */
.discord-band { background: linear-gradient(120deg, #2b2f6b, #1a1f3f 55%, #15192e); border: 1px solid #4752c4; border-radius: var(--radius); padding: 34px 38px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.discord-band h2 { margin: 0 0 6px; }
.discord-band p { margin: 0; color: #c9cdf4; font-size: 1.1rem; }
.btn-discord { background: #5865f2; color: #fff; border-color: #7983f5; }
.btn-discord:hover { background: #6d78f4; color: #fff; }

/* =============================================================================
   7. Posts (cards, single, archive)
   ============================================================================= */
.post-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .18s, border-color .18s; min-width: 0; }
.post-card:hover { transform: translateY(-4px); border-color: var(--gold-dark); }
.post-card-media { position: relative; aspect-ratio: 16 / 9; background: var(--panel-3) center/cover; overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-media img { transform: scale(1.05); }
.post-card-media .cat-badge { position: absolute; left: 14px; top: 14px; }
.post-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card-title { font: 700 1.45rem/1.2 var(--font-display); margin: 0 0 10px; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--gold-2); }
.post-card-excerpt { color: var(--muted); font-size: 1rem; margin: 0 0 14px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--dim); font-size: .95rem; margin-top: auto; }
.post-meta a { color: var(--muted); }
.cat-badge { display: inline-block; padding: 5px 11px; border-radius: 6px; background: rgba(23, 27, 31, .9); border: 1px solid rgba(179, 150, 98, .45); color: #ead1a8; font: 700 .85rem/1.2 var(--font-display); letter-spacing: .1em; text-transform: uppercase; }
.cat-badge:hover { background: #403220; color: var(--gold-2); }
.post-card.is-feature { grid-column: span 2; }
.post-card.is-feature .post-card-title { font-size: 1.9rem; }

.page-hero { padding: 48px 0 30px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(19, 27, 33, .6), transparent); }
.page-hero h1 { margin: 0; }
.page-hero .lead { color: var(--muted); font-size: 1.15rem; margin: 10px 0 0; max-width: 820px; }
.page-hero .sof2s-crumbs { font-size: 1rem; margin-bottom: 8px; }

.content-area { padding: 40px 0 64px; }
.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }

.single-hero { position: relative; isolation: isolate; min-height: 420px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); overflow: hidden; }
.single-hero-media { position: absolute; inset: 0; z-index: -2; background: var(--panel-3) center/cover; }
.single-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--bg) 4%, rgba(10, 14, 18, .75) 50%, rgba(10, 14, 18, .35)); }
.single-hero .wrap { padding: 80px 0 40px; }
.single-hero.no-image { min-height: 0; }
.single-hero.no-image .wrap { padding: 56px 0 36px; }
.single-hero h1 { max-width: 1000px; margin: 14px 0 12px; }
.single-hero .post-meta { font-size: 1.05rem; color: var(--muted); }

.entry-content { font-size: 1.1rem; line-height: 1.75; max-width: 820px; }
.entry-content > * { margin-bottom: 1.2em; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content a { text-decoration: underline; text-decoration-color: rgba(242, 206, 141, .4); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: var(--gold-2); }
.entry-content img { border-radius: 10px; }
.entry-content blockquote { margin: 1.5em 0; padding: 18px 24px; border-left: 4px solid var(--gold); background: var(--panel); border-radius: 0 10px 10px 0; color: var(--muted); font-size: 1.15rem; }
.entry-content table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 10px; overflow: hidden; }
.entry-content th, .entry-content td { padding: 10px 14px; border-top: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--panel-2); color: var(--muted); font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
.entry-content code { background: var(--panel-2); padding: 2px 7px; border-radius: 5px; font-size: .95em; }
.entry-content pre { background: #0b1013; border: 1px solid var(--line); padding: 18px; border-radius: 10px; overflow-x: auto; }
.entry-content .alignwide { max-width: 1200px; }
.entry-content .alignfull { max-width: none; }
.full-width .entry-content, .entry-content.is-wide { max-width: none; }
.entry-content .hr-wrap, .entry-content .sof2s-block { max-width: none; }
.page-links { margin-top: 2em; }

.post-footer { max-width: 820px; margin-top: 2.5em; padding-top: 1.5em; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0; max-width: 820px; }
.post-nav a { display: block; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-weight: 700; }
.post-nav a:hover { border-color: var(--gold-dark); color: var(--gold-2); }
.post-nav small { display: block; color: var(--dim); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.post-nav .next { text-align: right; }

/* Sidebar & widgets */
.sidebar { display: grid; gap: 22px; position: sticky; top: 120px; min-width: 0; }
.widget { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; overflow-wrap: anywhere; }
.widget .wp-block-search__label { display: block; margin-bottom: 10px; font: 700 1.2rem/1.2 var(--font-display); letter-spacing: .05em; text-transform: uppercase; }
.widget .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.widget .wp-block-search__input { flex: 1; min-width: 0; width: 100%; }
.widget .wp-block-search__button { margin: 0; flex: none; }
.widget-title, .widget .wp-block-heading { font: 700 1.25rem/1.2 var(--font-display); letter-spacing: .05em; text-transform: uppercase; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-top: 1px solid var(--line); }
.widget li:first-child { border-top: 0; }
.widget select { width: 100%; }

/* Pagination */
.pagination, .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 40px 0 0; }
.page-numbers { display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 700; }
.page-numbers.current, .page-numbers:hover { background: var(--gold); border-color: #b98d52; color: #141410; }

/* Comments */
.comments-area { max-width: 820px; margin-top: 48px; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .9rem; color: var(--dim); }
.comment-metadata a { color: var(--dim); }
.comment-respond { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 12px; padding: 24px; }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { width: 100%; }
.comment-form label { display: block; margin-bottom: 6px; color: var(--muted); }

/* Reports page */
.reports-day { margin: 34px 0 16px; font: 700 1.4rem/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); display: flex; align-items: center; gap: 14px; }
.reports-day::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

/* Search & 404 */
.search-group { margin-bottom: 40px; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.result-list li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-size: 1.05rem; }
.result-list small { display: block; color: var(--dim); font-size: .95rem; }
.error-404 { text-align: center; padding: 80px 0; }
.error-404 .code { font: 700 clamp(6rem, 18vw, 12rem)/.9 var(--font-display); color: var(--gold-2); }

/* =============================================================================
   8. Footer & mobile tab bar
   ============================================================================= */
.site-footer { margin-top: 64px; background: #080b0e; border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.footer-about img { max-height: 56px; width: auto; margin-bottom: 16px; }
.footer-about p { color: var(--muted); }
.footer-col h3 { font-size: 1.15rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 6px 0; }
.footer-col a { color: #d3dbd6; font-size: 1.02rem; }
.footer-col a:hover { color: var(--gold-2); }
.footer-col .widget { background: transparent; border: 0; padding: 0; }
.footer-col .widget-title { border: 0; padding: 0; color: var(--gold-2); font-size: 1.15rem; letter-spacing: .1em; }
.footer-live { display: grid; gap: 10px; }
.footer-live div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.footer-live strong, .footer-live .sof2s-live { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line); padding: 20px 0; color: var(--dim); font-size: .95rem; }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }
.footer-bottom a { color: var(--muted); }

.tab-bar { display: none; }

/* Chat pop-up (ported) */
.popup-trigger { position: fixed; right: 22px; bottom: 22px; z-index: 70; }
#chat-button { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 12px; background: #b9874e; border: 1px solid #e2b579; color: #fff; font-weight: 800; font-size: 1rem; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
#chat-button:hover { background: var(--gold); }
#chat-button.button-opened { background: var(--panel-2); border-color: var(--gold-dark); }
.popup-modal { position: fixed; right: 22px; bottom: 92px; width: min(360px, calc(100vw - 32px)); height: min(70vh, 640px); background: var(--panel); border: 1px solid var(--gold-dark); border-radius: var(--radius); box-shadow: var(--shadow); display: none; z-index: 69; overflow: auto; }
.popup-content { padding: 14px; }

/* =============================================================================
   9. SOF2 Stats Hub — sizing & integration inside this theme
   (The plugin's own stylesheet is compact for sidebars; here everything is bigger.)
   ============================================================================= */
.sof2mp-theme .sof2s { font-size: 1rem; }
.sof2mp-theme .sof2s small { font-size: .92em; }
.sof2mp-theme .sof2s-eyebrow { font: 700 .95rem/1.1 var(--font-display); letter-spacing: .16em; }
.sof2mp-theme .sof2s-pill { font-size: .85rem; padding: 5px 10px; }
.sof2mp-theme .sof2s-status { font-size: .95rem; padding: 6px 14px; }
.sof2mp-theme .sof2s-btn, .sof2mp-theme .sof2s button.sof2s-btn { font-size: .98rem; padding: 10px 16px; }
.sof2mp-theme .sof2s-copy { font-size: .92rem; padding: 8px 13px; }
.sof2mp-theme .sof2s-card { padding: 24px 26px; }
.sof2mp-theme .sof2s-card-title { font: 700 1.3rem/1.2 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.sof2mp-theme .sof2s-tile-value { font: 700 2.5rem/1 var(--font-display); }
.sof2mp-theme .sof2s-tile-label { font-size: .9rem; }
.sof2mp-theme .sof2s-tile-sub { font-size: .9rem; }
.sof2mp-theme .sof2s-table { font-size: 1rem; }
.sof2mp-theme .sof2s-table th { font-size: .8rem; }
.sof2mp-theme .sof2s-table td { padding: 12px 14px; }
.sof2mp-theme .sof2s-controls { font-size: 1rem; }
.sof2mp-theme .sof2s-controls input[type="search"] { font-size: 1.05rem; padding: 11px 14px; min-width: 300px; }
.sof2mp-theme .sof2s-count-visible { font-size: .95rem; }
.sof2mp-theme .sof2s-plist li { font-size: 1rem; padding: 9px 14px; }
.sof2mp-theme .sof2s-pping { font-size: .85rem; }
.sof2mp-theme .sof2s-team-head { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .04em; }
.sof2mp-theme .sof2s-team-count { font-family: var(--font-body); font-size: .85rem; }
.sof2mp-theme .sof2s-team-score { font: 700 1.8rem/1 var(--font-display); }
.sof2mp-theme .sof2s-server-name { font: 700 1.5rem/1.2 var(--font-display); }
.sof2mp-theme .sof2s-counts { font-size: 1rem; }
.sof2mp-theme .sof2s-counts strong { font: 700 1.5rem/1 var(--font-display); }
.sof2mp-theme .sof2s-scoreline { font: 700 1.35rem/1.2 var(--font-display); }
.sof2mp-theme .sof2s-map-label { font-size: .85rem; }
.sof2mp-theme .sof2s-match-score { font: 700 1.3rem/1 var(--font-display); min-width: 74px; padding: 8px 10px; }
.sof2mp-theme .sof2s-match-info { font-size: 1.02rem; }
.sof2mp-theme .sof2s-leaderboard li { font-size: 1.05rem; padding: 10px 0; }
.sof2mp-theme .sof2s-rank { font-size: .95rem; width: 30px; }
.sof2mp-theme .sof2s-lvalue { font: 700 1.2rem/1 var(--font-display); }
.sof2mp-theme .sof2s-barlist li { padding: 7px 0; }
.sof2mp-theme .sof2s-bar-label { font-size: 1rem; }
.sof2mp-theme .sof2s-bar-value { font-size: .92rem; }
.sof2mp-theme .sof2s-event-text { font-size: 1rem; }
.sof2mp-theme .sof2s-list li { font-size: 1.02rem; padding: 9px 0; }
.sof2mp-theme .sof2s-ticker-item { font-size: 1rem; }
.sof2mp-theme .sof2s-ticker-track { padding: 12px 0; }
.sof2mp-theme .sof2s-split { height: 12px; }
.sof2mp-theme .sof2s-split-legend { font-size: 1rem; }
.sof2mp-theme .sof2s-axis { font-size: 12px; }
.sof2mp-theme .sof2s-dl { font-size: 1rem; }
.sof2mp-theme .sof2s-form label { font-size: .95rem; }
.sof2mp-theme .sof2s-form input[type="text"], .sof2mp-theme .sof2s-form select, .sof2mp-theme .sof2s-form textarea, .sof2mp-theme .sof2s-search input { font-size: 1rem; padding: 10px 13px; }
.sof2mp-theme .sof2s-form-msg { font-size: 1rem; }
.sof2mp-theme .sof2s-badge { font-size: 1rem; padding: 5px 10px; }
.sof2mp-theme .sof2s-badge span { font-size: .9rem; }
.sof2mp-theme .sof2s-headline { font-size: 1.2rem; }
.sof2mp-theme .sof2s-where-name { font: 700 1.5rem/1.2 var(--font-display); }
.sof2mp-theme .sof2s-big-score { font-family: var(--font-display); }
.sof2mp-theme .sof2s-page-title { font-family: var(--font-display); }
.sof2mp-theme .sof2s-tabs { gap: 6px; border-bottom: 2px solid var(--gold-dark); margin-bottom: 26px; }
.sof2mp-theme .sof2s-tabs a { font: 700 1.1rem/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; padding: 14px 18px; }
.sof2mp-theme .sof2s-wrapped-name { font-family: var(--font-display); font-size: 2rem; }
.sof2mp-theme .sof2s-grid { gap: 22px; margin-bottom: 22px; }
.sof2mp-theme .sof2s-tiles { gap: 16px; margin-bottom: 22px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.sof2mp-theme .panel .sof2s-block:last-child, .sof2mp-theme .panel .sof2s-card-body > :last-child { margin-bottom: 0; }
.sof2mp-theme .panel .sof2s-card { background: transparent; border: 0; padding: 0; margin: 0; }
.sof2mp-theme .sof2s-live.is-updated { animation: count-flash 1.4s ease; }
@keyframes count-flash { 0% { color: #fff; text-shadow: 0 0 30px rgba(127, 209, 140, .95); } 100% { text-shadow: inherit; } }

/* In-game names (players & servers): white base, colour codes on top — not gold links. */
.sof2mp-theme .sof2s-name, .sof2mp-theme a .sof2s-name { color: #f1f3f1; }
.sof2mp-theme a:hover .sof2s-name { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.server-of-month { padding: 4px 0 18px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel-note { color: var(--dim); font-size: .95rem; margin: 14px 0 0; }

/* Stats pages (rendered through sof2s-page.php) */
.stats-page .content-area { padding-top: 30px; }

/* =============================================================================
   10. Responsive
   ============================================================================= */
@media (max-width: 1380px) {
  .primary-nav a { padding: 11px 11px; font-size: 1.02rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main-side, .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .live-games { grid-template-columns: 1fr; }
}
@media (max-width: 1060px) {
  .menu-toggle { display: inline-flex; }
  /* Closed menu stays inside the screen (hidden), so it never widens the page on phones. */
  .primary-nav { position: fixed; inset: 0 0 0 auto; width: min(380px, 88vw); background: var(--bg-2); border-left: 1px solid var(--line); padding: 90px 20px 120px; overflow-y: auto; z-index: 80; visibility: hidden; opacity: 0; transition: opacity .2s, visibility 0s linear .2s; }
  .nav-open .primary-nav { visibility: visible; opacity: 1; transition: opacity .2s; box-shadow: -20px 0 60px rgba(0, 0, 0, .6); }
  .primary-nav > ul, .primary-nav .menu { flex-direction: column; align-items: stretch; }
  .primary-nav a { font-size: 1.2rem; padding: 14px 16px; }
  .primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 14px; }
  .nav-close { position: absolute; top: 20px; right: 20px; }
  .header-actions { margin-left: auto; }
  .me-btn .me-label { display: none; }
  .me-btn { padding: 6px; }
}
@media (min-width: 1061px) { .nav-close { display: none; } }
@media (max-width: 900px) {
  :root { --wrap: min(100% - 32px, 1640px); }
  body { padding-bottom: 76px; }
  .pulse-bar .wrap { gap: 14px; min-height: 40px; }
  .pulse-hide-sm { display: none; }
  .pulse-links { display: none; }
  .header-inner { min-height: 70px; gap: 14px; }
  .site-branding img { max-height: 46px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .post-card.is-feature { grid-column: auto; }
  .section { padding: 38px 0; }
  .panel { padding: 20px; }
  .hero-grid { padding: 40px 0; }
  .hero-actions .btn { flex: 1 1 auto; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .post-nav { grid-template-columns: 1fr; }
  .single-hero { min-height: 320px; }
  .admin-bar .site-header { top: 0; }

  .tab-bar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 75; background: rgba(10, 14, 18, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line-2); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tab-bar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--muted); font-size: .88rem; font-weight: 700; border-radius: 10px; }
  .tab-bar a svg { width: 24px; height: 24px; }
  .tab-bar a.is-current, .tab-bar a:hover { color: var(--gold-2); background: var(--panel-2); }
  .tab-bar .tab-live { position: relative; }
  .tab-bar .tab-badge { position: absolute; top: 2px; right: calc(50% - 26px); min-width: 22px; padding: 2px 6px; border-radius: 999px; background: #2f5b38; border: 1px solid #4f8f5c; color: #fff; font-size: .75rem; line-height: 1.2; }
  .popup-trigger { bottom: 88px; right: 14px; }
  .sof2s-toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
  #chat-button { padding: 11px 14px; }
  #chat-button-text { display: none; }
  .popup-modal { bottom: 152px; right: 14px; }
  .sof2mp-theme .sof2s-controls input[type="search"] { min-width: 0; }
}
@media (max-width: 560px) {
  .live-strip { grid-template-columns: 1fr; }
  .hero-tiles { grid-template-columns: 1fr 1fr; }
  .discord-band { padding: 24px; }
  .header-actions .search-toggle { display: none; }
}
