/* ── Google Fonts — Orbitron (retro/arcade style for brand) ── */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&display=swap');

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

:root {
  --bg:           #0d0f1a;
  --surface:      #171a26;
  --surface-alt:  #1f2235;
  --surface-high: #272c44;
  --border:       #2b2f4a;
  --accent:       #6c63ff;
  --accent-hover: #5a52e0;
  --upvote:       #ff6b6b;
  --upvote-bg:    rgba(255, 107, 107, 0.12);
  --reply-color:  #4dabf7;
  --text:         #dfe2f0;
  --text-muted:   #767a9a;
  --error:        #ff5f6d;
  --success:      #3ecf8e;
  --radius:       10px;
  --transition:   0.18s ease;
  --navbar-height: 58px;
  --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-md:    0 4px 20px rgba(0, 0, 0, 0.22), 0 1px 5px rgba(0, 0, 0, 0.08);
}

html { font-size: 16px; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  padding-top: var(--navbar-height);
}

/* Prevent background scroll while modal is open */
body.modal-open {
  overflow: hidden;
}

/* ── Sub-page container (game pages, profile, etc.) ──────── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ── Feed header (homepage main panel) ────────────────────── */
.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.feed-header-text h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 400;
}

/* Legacy header-inner — kept for other pages */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

header h1 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1.15;
}

/* ── "Post Complaint" button ──────────────────────────────── */
.btn-post {
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.25px;
  padding: 0.6rem 1.3rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-post:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
}
.btn-post:active { transform: scale(0.97); }

/* ── Feed section ─────────────────────────────────────────── */
.feed-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.1rem;
}

.feed-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.feed-sort {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Complaint feed list ──────────────────────────────────── */
#complaints-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* ── Complaint card ───────────────────────────────────────── */
.complaint-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.complaint-card:hover {
  border-color: rgba(108, 99, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(108,99,255,0.08), 0 6px 24px rgba(0,0,0,0.22);
}

/* ── Card meta row (social style: author top, badges right) ── */
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.25rem 0.5rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.card-author-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.card-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface-high) 0%, var(--surface-alt) 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  user-select: none;
}

.card-author-info {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.2;
}

/* Legacy card-header — still used by feed.js on game pages */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0.5rem;
}

.card-title {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

/* Card title inside card-header (feed.js legacy) has no margin */
.card-header .card-title {
  margin-bottom: 0;
}

/* Badges wrapper */
.card-badges {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Category badge — color applied via JS */
.card-category {
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.65rem;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.15px;
}

/* Card body: title (new style) + description */
.card-body {
  padding: 0 1.25rem 0.85rem;
}

.card-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  word-break: break-word;
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0;
  margin-left: 0.25rem;
}

.read-more-btn:hover {
  text-decoration: underline;
}

/* Card actions bar: upvote, reply, delete */
.card-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem 0.75rem;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.06);
}

/* Vote group — upvote + downvote pair */
.vote-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.vote-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

/* Upvote — blue on hover / active */
.upvote-btn:hover,
.upvote-btn.active-up {
  background: rgba(77, 171, 247, 0.12);
  border-color: rgba(77, 171, 247, 0.6);
  color: rgba(77, 171, 247, 1);
}

/* Downvote — red on hover / active */
.downvote-btn:hover,
.downvote-btn.active-down {
  background: rgba(255, 95, 109, 0.12);
  border-color: rgba(255, 95, 109, 0.6);
  color: var(--error);
}

.vote-icon { font-size: 0.75rem; }

/* Reply toggle button */
.reply-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.reply-btn:hover {
  background: rgba(77, 171, 247, 0.1);
  border-color: var(--reply-color);
  color: var(--reply-color);
}

.reply-btn.active {
  background: rgba(77, 171, 247, 0.1);
  border-color: var(--reply-color);
  color: var(--reply-color);
}

/* Spacer pushes date to the right */
.card-actions .spacer {
  flex: 1;
}

.card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Replies section ──────────────────────────────────────── */
.replies-section {
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.replies-section.hidden {
  display: none;
}

/* Individual reply item */
.replies-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.reply-item {
  background: var(--surface-high);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
}

.reply-text {
  font-size: 0.875rem;
  color: var(--text);
  word-break: break-word;
  line-height: 1.5;
}

.reply-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.no-replies-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Reply input form */
.reply-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reply-input {
  background: var(--surface-high);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.6rem 0.85rem;
  resize: vertical;
  min-height: 70px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.reply-input::placeholder { color: var(--text-muted); }

.reply-input:focus {
  border-color: var(--reply-color);
  box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.15);
}

.reply-submit-btn {
  align-self: flex-end;
  background: var(--reply-color);
  border: none;
  border-radius: 8px;
  color: #0d0f1a;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0.48rem 1.15rem;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.reply-submit-btn:hover:not(:disabled) {
  opacity: 0.88;
  box-shadow: 0 3px 10px rgba(77, 171, 247, 0.3);
}
.reply-submit-btn:active:not(:disabled) { transform: scale(0.97); }
.reply-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.reply-error {
  font-size: 0.8rem;
  color: var(--error);
}

/* ── Modal overlay ────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;                          /* covers entire viewport */
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  backdrop-filter: blur(3px);
  animation: fadeIn 0.18s ease;
}

.modal-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal box */
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface-alt);
}

/* ── Shared form styles (used inside modal) ───────────────── */
form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1px;
}

input,
textarea,
select {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.65rem 0.85rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237b7f9e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select option { background: var(--surface-alt); }

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.field-hint-inline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Game Picker (custom nested dropdown) ────────────────────
   Inline panel (no position:absolute) so it scrolls correctly
   inside the modal's overflow-y:auto container.
   ─────────────────────────────────────────────────────────── */
.game-picker {
  position: relative;
}

.game-picker-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.85rem;
  text-align: left;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.game-picker-btn:hover,
.game-picker-btn:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.18);
}

.game-picker-chevron {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  display: inline-block;
}

.game-picker-btn[aria-expanded="true"] .game-picker-chevron {
  transform: rotate(180deg);
}

/* Panel — inline block (no absolute) */
.game-picker-panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 4px;
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
}

.game-picker-panel.open {
  display: block;
}

/* Individual option */
.game-opt {
  padding: 0.48rem 0.9rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  user-select: none;
}

.game-opt:hover {
  background: var(--surface-alt);
  color: var(--text);
}

/* CoD group header */
.game-opt-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.48rem 0.9rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  user-select: none;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.game-opt-group:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.game-sub-arrow {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
  display: inline-block;
  flex-shrink: 0;
}

.game-opt-group.sub-open .game-sub-arrow {
  transform: rotate(90deg);
}

/* Sub-panel (inline accordion) */
.game-sub-panel {
  display: none;
  background: rgba(108, 99, 255, 0.04);
  border-left: 2px solid var(--accent);
  margin-left: 0.75rem;
}

.game-sub-panel.open {
  display: block;
}

.sub-opt {
  padding-left: 1.4rem;
  font-size: 0.85rem;
}

/* ── Item Autocomplete ────────────────────────────────────────
   Also inline (no absolute) for modal safety.
   ─────────────────────────────────────────────────────────── */
.item-ac-wrap {
  display: flex;
  flex-direction: column;
}

/* The suggestion list */
.item-ac-list {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 3px;
  overflow: hidden;
}

.item-ac-list.open {
  display: block;
}

.item-ac-opt {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.item-ac-opt:hover,
.item-ac-opt.highlighted {
  background: var(--surface-alt);
  color: var(--text);
}

/* Form feedback */
.form-message {
  font-size: 0.875rem;
  min-height: 1.2em;
}

.form-message.success { color: var(--success); }
.form-message.error   { color: var(--error); }

/* Modal submit button */
button[type="submit"] {
  align-self: flex-start;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 0.72rem 1.85rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

button[type="submit"]:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
}
button[type="submit"]:active:not(:disabled) { transform: scale(0.98); }
button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Empty / loading states ───────────────────────────────── */
.loading-text,
.empty-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2.5rem 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 540px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .btn-post { width: 100%; text-align: center; }

  .card-header { flex-direction: column; gap: 0.5rem; }

  .modal { padding: 1.25rem; }

  button[type="submit"] { width: 100%; text-align: center; }
}

/* ── Sub-page hero header ─────────────────────────────────── */
.page-hero {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2.5rem 2.25rem;
  text-align: center;
  background: var(--surface); /* each page overrides this */
  box-shadow: var(--shadow-sm);
}

.page-hero-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  display: block;
}

.page-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.3px;
}

.page-hero .page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Active nav link for current section */
.nav-link.nav-link-active {
  color: var(--text);
  background: var(--surface-alt);
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════ */

/* ── Navbar shell ─────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  /* Sits above page content but below the modal overlay (z-index 1000) */
  z-index: 200;
}

.nav-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 1.5rem 0 0.75rem;
  gap: 0.5rem;
}

/* ── Brand ────────────────────────────────────────────────── */
.nav-brand {
  color: var(--accent);
  font-family: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  /* Pushes all other nav children to the right */
  margin-right: auto;
  text-shadow: 0 0 20px rgba(108, 99, 255, 0.5), 0 0 40px rgba(108, 99, 255, 0.18);
  transition: color var(--transition), text-shadow var(--transition);
}

.nav-brand:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 26px rgba(108, 99, 255, 0.7), 0 0 52px rgba(108, 99, 255, 0.28);
}

/* ── Menu row ─────────────────────────────────────────────── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

/* ── Individual nav item wrapper ─────────────────────────── */
.nav-item {
  position: relative;
}

/* ── Nav link / trigger button ───────────────────────────── */
.nav-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  user-select: none;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-alt);
}

/* Arrow rotates when dropdown is open */
.nav-arrow {
  font-size: 0.6rem;
  opacity: 0.6;
  transition: transform var(--transition);
  display: inline-block;
}

.has-dropdown:hover .nav-arrow,
.has-dropdown.dropdown-open .nav-arrow {
  transform: rotate(180deg);
}

/* ── Dropdown panel — desktop ─────────────────────────────── */
@media (min-width: 769px) {
  .nav-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;                   /* left-aligned by default */
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    min-width: 190px;
    padding: 0.35rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 300;
  }

  /* Right-edge items align dropdown to the right so it doesn't overflow */
  .nav-dropdown.align-right {
    left: auto;
    right: 0;
  }

  /* Show on CSS hover (no JS needed on desktop) */
  .has-dropdown:hover .nav-dropdown,
  .has-dropdown.dropdown-open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* ── Dropdown items ───────────────────────────────────────── */
.nav-dropdown-item {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.5rem 1.1rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-dropdown-item:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.nav-dropdown-group {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.45rem 1.1rem 0.2rem;
  pointer-events: none;
}

.nav-dropdown-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.25rem 0.75rem;
}

.nav-dropdown-sub {
  padding-left: 1.6rem;
}

/* ── "Post Complaint" button inside the navbar ────────────── */
.nav-post-btn {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-left: 0.6rem;
  padding: 0.45rem 1.05rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.nav-post-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 3px 12px rgba(108, 99, 255, 0.3);
}
.nav-post-btn:active { transform: scale(0.97); }

/* ── Hamburger button — hidden on desktop ─────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background var(--transition);
}

.nav-hamburger:hover { background: var(--surface-alt); }

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

/* Animate three lines → X when menu is open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile layout (≤ 768 px) ────────────────────────────── */
@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  /* Slide-down drawer */
  .nav-menu {
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    /* Hidden by default — max-height animates open */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }

  .nav-menu.open {
    max-height: 640px;
  }

  .nav-item { width: 100%; }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
  }

  /* Mobile dropdowns expand inline instead of floating */
  .nav-dropdown {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    background: var(--surface-alt);
    border-top: none;
    transition: max-height 0.22s ease;
  }

  .has-dropdown.dropdown-open .nav-dropdown {
    max-height: 400px;
  }

  .nav-dropdown-item {
    padding: 0.6rem 2rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
  }

  .nav-post-btn {
    margin: 0.75rem 1rem;
    padding: 0.7rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    border-radius: var(--radius);
  }
}

/* ═══════════════════════════════════════════════════════════
   AUTH / PROFILE UI
   ═══════════════════════════════════════════════════════════ */

/* Container — always visible, sits right of nav-menu */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

/* "Login / Sign Up" ghost button */
.nav-login-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1px;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.nav-login-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}

/* Profile avatar button */
.nav-profile-wrap {
  position: relative;
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding: 0;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.nav-avatar svg { width: 17px; height: 17px; }

.nav-avatar:hover,
.nav-avatar.open {
  border-color: var(--accent);
  background: var(--surface-high);
  color: var(--text);
}

/* Profile dropdown panel */
.nav-profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 230px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.nav-profile-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown header — mini user card */
.profile-dd-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.profile-dd-avatar-lg {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.profile-dd-avatar-lg svg { width: 20px; height: 20px; }

.profile-dd-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.profile-dd-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.15rem;
}

/* Menu list */
.profile-menu-list {
  list-style: none;
  padding: 0.35rem 0;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

.profile-menu-item:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.profile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0;
}

.profile-logout { color: var(--error) !important; }
.profile-logout:hover { background: rgba(255, 95, 109, 0.08) !important; }

/* Mobile-only auth links (login/logout inside hamburger drawer) — hidden on desktop */
.nav-mobile-only-auth { display: none; }
/* Wrapper for mobile auth CTA — hidden on desktop */
.nav-mobile-auth-header { display: none; }

@media (max-width: 520px) {
  .nav-auth { gap: 0.3rem; }
}

@media (max-width: 768px) {
  .nav-profile-dropdown {
    /* Prevent overflow on narrow screens */
    right: 0;
    width: min(230px, calc(100vw - 2rem));
  }
  /* Reduce brand to prevent overflow on small screens */
  .nav-brand { font-size: 0.9rem; }
  /* Tighter inner padding on mobile */
  .nav-inner { padding: 0 0.5rem; }
  /* Login button lives in the hamburger drawer on mobile */
  .nav-auth .nav-login-btn { display: none; }
  /* Theme toggle hidden on mobile to save nav row space */
  .theme-toggle { display: none; }
  /* Avatar hidden when not logged in (nothing useful to show) */
  html:not(.is-logged-in) .nav-auth .nav-avatar { display: none; }
  /* Show mobile-only auth links inside the hamburger drawer */
  .nav-mobile-only-auth { display: flex; }

  /* ── Mobile auth CTA header (top of hamburger drawer) ───── */
  .nav-mobile-auth-header {
    display: block;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    background: rgba(108, 99, 255, 0.04);
  }

  /* Base CTA style (shared by login + logout) */
  .nav-mobile-auth-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background var(--transition), box-shadow var(--transition);
  }

  /* Login CTA — accent purple */
  .nav-login-btn.nav-mobile-auth-cta {
    background: var(--accent);
    color: #fff !important;
  }
  .nav-login-btn.nav-mobile-auth-cta:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 14px rgba(108, 99, 255, 0.4);
  }

  /* Logout CTA — subtle red */
  .profile-logout.nav-mobile-auth-cta {
    background: rgba(255, 95, 109, 0.1);
    color: var(--error) !important;
    border: 1px solid rgba(255, 95, 109, 0.3);
  }
  .profile-logout.nav-mobile-auth-cta:hover {
    background: rgba(255, 95, 109, 0.18) !important;
    box-shadow: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   GAME BANNERS (base styles — each page adds its own theme)
   ═══════════════════════════════════════════════════════════ */

.game-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 3rem 2.5rem 2.25rem;
  background: var(--surface); /* overridden per page */
}

/* Banner decorative overlay — pseudo-element for patterns */
.game-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* All banner children stack above the pattern overlay */
.game-banner > * { position: relative; z-index: 1; }

.banner-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(108, 99, 255, 0.12);
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  margin-bottom: 1rem;
}

.banner-title {
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  color: var(--text);
  text-transform: uppercase;
}

.banner-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

/* Stats row */
.banner-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.stat-n {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-l {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .bc-sep { opacity: 0.4; }

/* Aliases used by game pages */
.breadcrumb-link { color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
.breadcrumb-link:hover { color: var(--accent); }
.breadcrumb-sep { opacity: 0.4; }
.breadcrumb-current { color: var(--text); }

.banner-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.stat-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

/* Responsive banner */
@media (max-width: 600px) {
  .game-banner { padding: 2rem 1.25rem 1.75rem; }
  .banner-title { font-size: 2rem; }
  .banner-stats { gap: 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════
   CARD BADGES — game tag + category wrapper
   ═══════════════════════════════════════════════════════════ */

.card-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.card-game-badge {
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.28);
  border-radius: 20px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
  letter-spacing: 0.15px;
}

.card-item-badge {
  background: rgba(32, 201, 151, 0.1);
  border: 1px solid rgba(32, 201, 151, 0.28);
  border-radius: 20px;
  color: #20c997;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
  letter-spacing: 0.15px;
}

/* ═══════════════════════════════════════════════════════════
   TOP COMPLAINT HIGHLIGHT (Part 6)
   Applied when votes >= TOP_THRESHOLD in JS
   ═══════════════════════════════════════════════════════════ */

.complaint-card.top-complaint {
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2), 0 4px 18px rgba(212, 175, 55, 0.08);
}

.complaint-card.top-complaint:hover {
  border-color: rgba(212, 175, 55, 0.8);
}

.top-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 20px;
  color: #d4af37;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   FILTER PANEL (Part 3)
   ═══════════════════════════════════════════════════════════ */

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.filter-select {
  flex: 0 0 auto;
  min-width: 120px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.79rem;
  padding: 0.38rem 2rem 0.38rem 0.75rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%237b7f9e' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.18);
}

.filter-select option { background: var(--surface-alt); }

.filter-input {
  flex: 0 0 auto;
  min-width: 90px;
  max-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.79rem;
  padding: 0.38rem 0.75rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.18);
}

.filter-input::placeholder { color: var(--text-muted); }

.filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: center;
  white-space: nowrap;
  display: none; /* hidden in compact mode */
}

/* "Filters active" indicator dot on the filter panel */
.filter-panel.has-filters .filter-label::after {
  content: '•';
  color: var(--accent);
  margin-left: 0.35rem;
}

@media (max-width: 540px) {
  .filter-panel { flex-direction: column; }
  .filter-select { min-width: 0; }
}

/* ═══════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON (Part 5)
   ═══════════════════════════════════════════════════════════ */

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  padding: 0;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--surface-alt);
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════
   LIGHT MODE OVERRIDES (Part 5)
   Toggle html.light-mode class via JS
   ═══════════════════════════════════════════════════════════ */

html.light-mode {
  --bg:           #eef0f8;
  --surface:      #ffffff;
  --surface-alt:  #eaecf5;
  --surface-high: #e0e3f2;
  --border:       #c8ccd9;
  --text:         #191c2c;
  --text-muted:   #52567a;
  --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md:    0 4px 16px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.04);
}

html.light-mode body {
  background-color: var(--bg);
  color: var(--text);
}

html.light-mode .navbar {
  background: var(--surface);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

html.light-mode .complaint-card {
  box-shadow: var(--shadow-sm);
}

html.light-mode .modal {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}

html.light-mode select option {
  background: var(--surface);
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════
   DEV RESPONSE BADGE
   ═══════════════════════════════════════════════════════════ */

.dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 20px;
  color: #38bdf8;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

/* Cards marked as dev posts get a subtle blue left border accent */
.complaint-card.dev-post {
  border-left: 3px solid rgba(56, 189, 248, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   HOTTEST GAME NAVBAR BUTTON
   ═══════════════════════════════════════════════════════════ */

.nav-hottest-btn {
  color: #fb923c !important;
}

.nav-hottest-btn:hover {
  background: rgba(251, 146, 60, 0.1) !important;
  color: #f97316 !important;
}

/* ═══════════════════════════════════════════════════════════
   FROM THE DEVS FILTER CHECKBOX
   ═══════════════════════════════════════════════════════════ */

.filter-devpost-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.79rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  user-select: none;
}

.filter-devpost-label:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

.filter-devpost-label:has(.filter-devpost-check:checked) {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.filter-devpost-check {
  accent-color: #38bdf8;
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   AUTH MODAL
   ═══════════════════════════════════════════════════════════ */

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1100;
  backdrop-filter: blur(3px);
  animation: fadeIn 0.18s ease;
}

.auth-modal-overlay.hidden { display: none; }

.auth-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: slideUp 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.auth-modal-close:hover {
  color: var(--text);
  background: var(--surface-alt);
}

/* ═══════════════════════════════════════════════════════════
   ADMIN UI
   Delete button: always in the DOM, shown only when html.is-admin
   ═══════════════════════════════════════════════════════════ */

/* Hidden for everyone by default — revealed via html.is-admin */
.delete-btn {
  display: none;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid rgba(255, 95, 109, 0.35);
  border-radius: 20px;
  color: var(--error);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}

.delete-btn:hover {
  background: rgba(255, 95, 109, 0.1);
  border-color: var(--error);
}

/* Show delete button for admins or when user owns the content */
html.is-admin .delete-btn { display: inline-flex; }
.delete-btn.own-delete-visible { display: inline-flex; }

/* Reply like button */
.reply-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid rgba(247, 131, 172, 0.35);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.reply-like-btn:hover:not(:disabled) {
  background: rgba(247, 131, 172, 0.1);
  border-color: #f783ac;
  color: #f783ac;
}

.reply-like-btn.liked,
.reply-like-btn:disabled {
  color: #f783ac;
  border-color: rgba(247, 131, 172, 0.6);
  cursor: default;
}

/* Reply delete button — same appearance as complaint delete, hidden by default */
.reply-delete-btn {
  display: none;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid rgba(255, 95, 109, 0.35);
  border-radius: 20px;
  color: var(--error);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}

.reply-delete-btn:hover {
  background: rgba(255, 95, 109, 0.1);
  border-color: var(--error);
}

html.is-admin .reply-delete-btn { display: inline-flex; }
.reply-delete-btn.own-delete-visible { display: inline-flex; }

/* Reply footer — date + optional delete button in a row */
.reply-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.reply-footer .reply-date {
  margin: 0;
}

/* Admin badge in profile dropdown */
.nav-admin-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(251, 113, 133, 0.14);
  border: 1px solid rgba(251, 113, 133, 0.4);
  border-radius: 4px;
  color: #fb7185;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* ── Password show/hide wrapper ─────────────────────────────── */
.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* Make room for the toggle button on the right */
.pw-wrap input[type="password"],
.pw-wrap input[type="text"] {
  padding-right: 2.6rem;
  width: 100%;
}

.pw-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.2rem;
  line-height: 0;
  border-radius: 4px;
  transition: color var(--transition);
  flex-shrink: 0;
}

.pw-toggle:hover { color: var(--text); }

.pw-toggle svg {
  width: 17px;
  height: 17px;
  display: block;
}

/* Tab row */
.auth-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.auth-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}

.auth-tab:hover { color: var(--text); }

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Pane content */
.auth-pane {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-pane.hidden { display: none; }

/* Feedback message */
.auth-message {
  font-size: 0.85rem;
  min-height: 1.2em;
}

.auth-message.error   { color: var(--error); }
.auth-message.success { color: var(--success); }

/* Submit button */
.auth-submit-btn {
  align-self: stretch;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 0.75rem 1.75rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.auth-submit-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.35);
}
.auth-submit-btn:active:not(:disabled) { transform: scale(0.98); }
.auth-submit-btn:disabled              { opacity: 0.5; cursor: not-allowed; }

/* Terms acceptance checkbox row in the signup form */
.auth-terms-group {
  margin-top: -0.25rem;
}

.auth-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
  user-select: none;
}

.auth-terms-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-terms-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-terms-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   VERIFIED DEV BADGE (navbar profile dropdown)
   ═══════════════════════════════════════════════════════════ */

.nav-verified-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
  color: #38bdf8;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════
   DEV REPLY STYLING
   Replies posted by verified developers get a blue accent
   ═══════════════════════════════════════════════════════════ */

.reply-item.dev-reply {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.04);
}

.reply-dev-header {
  margin-bottom: 0.35rem;
}

.dev-reply-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  color: #38bdf8;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   CARD AUTHOR / DATE
   ═══════════════════════════════════════════════════════════ */

/* In new card-meta structure (app.js) */
.card-author {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* In legacy card-actions structure (feed.js) */
.card-actions .card-author {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.card-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Legacy: card-date inside card-actions */
.card-actions .card-date {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   THREE-COLUMN PAGE LAYOUT (homepage only)
   ═══════════════════════════════════════════════════════════ */

.page-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  max-width: 1520px;
  margin: 0 auto;
  align-items: start;
  min-height: calc(100vh - var(--navbar-height));
}

/* ── LEFT SIDEBAR ───────────────────────────────────────── */
.left-sidebar {
  position: sticky;
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 0.85rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.left-sidebar::-webkit-scrollbar { width: 3px; }
.left-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.left-sidebar::-webkit-scrollbar-track { background: transparent; }

/* Post CTA button */
.lsb-post-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0.62rem 1rem;
  margin-bottom: 1rem;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.lsb-post-cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(108,99,255,0.38);
}

.lsb-post-cta:active { transform: scale(0.97); }

/* Section labels */
.lsb-section-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1rem 0.5rem 0.3rem;
  white-space: nowrap;
}

/* Nav groups */
.lsb-nav,
.lsb-section {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

/* Navigation links */
.lsb-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.6rem;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 0.865rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lsb-link:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.lsb-link.lsb-link-active {
  background: rgba(108,99,255,0.12);
  color: var(--accent);
  font-weight: 600;
}

.lsb-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
  width: 17px;
  text-align: center;
}

/* Color dot for game links */
.lsb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: 2px;
  margin-right: 1px;
}

/* Category quick-filter buttons */
.lsb-cat-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 500;
  padding: 0.42rem 0.6rem;
  transition: background var(--transition), color var(--transition);
}

.lsb-cat-btn:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.lsb-cat-btn.lsb-cat-active {
  background: rgba(108,99,255,0.1);
  color: var(--accent);
  font-weight: 600;
}

/* ── CENTER MAIN ────────────────────────────────────────── */
.page-main {
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

/* ── RIGHT SIDEBAR ──────────────────────────────────────── */
.page-sidebar {
  position: sticky;
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
  overflow-x: hidden;
  border-left: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.page-sidebar::-webkit-scrollbar { width: 3px; }
.page-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.page-sidebar::-webkit-scrollbar-track { background: transparent; }

/* ── Responsive breakpoints ─────────────────────────────── */

/* Tablet (≤1100px): collapse left sidebar */
@media (max-width: 1100px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .left-sidebar { display: none; }
}

/* Small tablet (≤820px): also hide right sidebar */
@media (max-width: 820px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .left-sidebar,
  .page-sidebar {
    display: none;
  }
  .page-main {
    padding: 1.25rem;
  }
}

/* Mobile (≤520px) */
@media (max-width: 520px) {
  .page-main { padding: 1rem 0.75rem; }
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR WIDGET SHELL
   ═══════════════════════════════════════════════════════════ */

.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sidebar-widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.sidebar-widget-icon {
  font-size: 1rem;
  line-height: 1;
}

.sidebar-widget-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   PATCH NOTES SLIDER
   ═══════════════════════════════════════════════════════════ */

.patch-slider {
  position: relative;
  overflow: hidden;
}

.patch-track {
  position: relative;
  min-height: 155px;
}

/* Individual patch card — all hidden by default */
.patch-card {
  display: none;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.75rem 1.3rem 0.7rem;
  animation: patchFadeIn 0.3s ease;
}

.patch-card.active {
  display: flex;
}

@keyframes patchFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.patch-card-game {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid;
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
}

.patch-card-version {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.patch-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.patch-card-summary {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.patch-card-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Navigation row */
.patch-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

.patch-nav-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem 0.55rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.patch-nav-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}

.patch-dots {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.patch-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.patch-dot.active {
  background: var(--accent);
  transform: scale(1.35);
}

/* ═══════════════════════════════════════════════════════════
   PROFILE PAGES
   ═══════════════════════════════════════════════════════════ */

/* Profile overview card */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.profile-avatar-wrap svg { width: 32px; height: 32px; }

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-username {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.profile-game,
.profile-role-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.profile-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.profile-link-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.profile-link-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}

/* Post count stats */
.profile-stats {
  display: flex;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
}

.profile-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-stat-n {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.profile-stat-l {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Replies page */
.rp-summary {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0 0.25rem 0.5rem;
}

.replies-page-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.rp-complaint-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.rp-complaint-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.rp-complaint-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.rp-complaint-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rp-complaint-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.replies-page-block .replies-list {
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--surface-alt);
}

/* ─── Settings page ──────────────────────────────────────── */

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.settings-block-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  margin: 0;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

.settings-row:last-child { border-bottom: none; }

.settings-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.settings-row-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.settings-row-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.settings-theme-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition);
}

.settings-theme-btn:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}

.settings-coming-soon {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR MULTI-WIDGET LAYOUT
   ═══════════════════════════════════════════════════════════ */

/* Stacked vertical widget layout */
.sidebar-widgets {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-widget-hottest {
  align-self: stretch;
}

/* ── Top-complaint vote pill in sidebar card ─────────────── */
.top-complaint-votes {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--upvote);
  margin-top: 0.1rem;
}

/* ── Hottest Game static widget body ─────────────────────── */
.hottest-game-body {
  padding: 1.1rem 1.2rem 1.25rem;
}

.hottest-game-name {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.hottest-game-reason {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.9rem;
}

.hottest-stats {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hottest-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hottest-stat-n {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.hottest-stat-l {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 0.15rem;
}

/* ── Light mode: reduce brand glow ───────────────────────── */
html.light-mode .nav-brand {
  text-shadow: 0 0 10px rgba(108, 99, 255, 0.3);
}

html.light-mode .nav-brand:hover {
  text-shadow: 0 0 14px rgba(108, 99, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   NESTED REPLIES (THREADING)
   ═══════════════════════════════════════════════════════════ */

/* Indented sub-replies */
.reply-nested {
  margin-left: 1.75rem;
  border-left: 2px solid var(--border);
  padding-left: 0.9rem;
  background: rgba(255,255,255,0.02);
  border-radius: 0 var(--radius) var(--radius) 0;
}

html.light-mode .reply-nested {
  background: rgba(0,0,0,0.02);
}

/* "Reply to reply" button */
.reply-to-reply-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0;
  transition: color var(--transition);
}

.reply-to-reply-btn:hover { color: var(--reply-color); }

/* Inline reply form (nested) */
.inline-reply-form {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.inline-reply-form.hidden { display: none; }

.inline-reply-input {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
  resize: none;
  transition: border-color var(--transition);
}

.inline-reply-input:focus {
  outline: none;
  border-color: var(--reply-color);
  box-shadow: 0 0 0 3px rgba(77,171,247,0.1);
}

.inline-reply-error { font-size: 0.78rem; color: var(--error); }

.inline-reply-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.inline-reply-cancel {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  transition: border-color var(--transition), color var(--transition);
}

.inline-reply-cancel:hover { border-color: var(--text-muted); color: var(--text); }

/* Reply author line in footer */
.reply-author {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   GOOGLE SIGN-IN ELEMENTS
   ═══════════════════════════════════════════════════════════ */

.auth-google-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

/* The Google button container */
#google-signin-btn {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ═══════════════════════════════════════════════════════════
   GAME PAGE INFO SECTION (facts + news)
   ═══════════════════════════════════════════════════════════ */

.game-info-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.game-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.game-info-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.game-info-card ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.game-info-card li {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}

.game-info-card li::before {
  content: '›';
  position: absolute;
  left: 0;
  font-weight: 700;
}

.news-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
}

.news-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.news-date { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.news-title { font-size: 0.84rem; font-weight: 600; color: var(--text); }

@media (max-width: 640px) {
  .game-info-section { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════
   REDESIGN ADDITIONS — v2 layout overrides
   ═══════════════════════════════════════════════════════════ */

/* ── Card ID list spacing ─────────────────────────────────── */
#complaints-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── "Post" button in feed header (compact on desktop) ──── */
.btn-post {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 0.55rem 1.15rem;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-post:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(108,99,255,0.35);
}

.btn-post:active { transform: scale(0.97); }

/* ── Top complaint gold highlight ────────────────────────── */
.complaint-card.top-complaint {
  border-color: rgba(212,175,55,0.45);
  box-shadow: 0 0 0 1px rgba(212,175,55,0.12), 0 4px 18px rgba(212,175,55,0.06);
}

.complaint-card.top-complaint:hover {
  border-color: rgba(212,175,55,0.7);
}

/* ── Dev post blue accent ─────────────────────────────────── */
.complaint-card.dev-post {
  border-left: 3px solid rgba(56,189,248,0.5);
}

/* ── Light mode: sidebar backgrounds ────────────────────── */
html.light-mode .left-sidebar,
html.light-mode .page-sidebar {
  background: var(--surface);
  border-color: var(--border);
}

html.light-mode .card-actions {
  background: rgba(0,0,0,0.02);
}

html.light-mode .card-avatar-circle {
  background: linear-gradient(135deg, var(--surface-high) 0%, var(--surface-alt) 100%);
}

/* ── Sidebar widget refinements for stacked layout ───────── */
.sidebar-widget-header {
  padding: 0.65rem 1.1rem;
}

.patch-track {
  min-height: 130px;
}

/* ── Feed section gap ────────────────────────────────────── */
.feed-section {
  gap: 0.85rem;
}

/* ── Compact feed bar ────────────────────────────────────── */
.feed-bar {
  padding: 0 0.1rem 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.15rem;
}

/* ── Loading & empty text ────────────────────────────────── */
.loading-text,
.empty-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem 0;
  text-align: center;
}

/* ── Right sidebar widget titles ─────────────────────────── */
.sidebar-widget-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.1px;
}

/* ── Post button — always blue and prominent ─────────────── */
.btn-post {
  background: #3b82f6 !important;
  border: none !important;
  color: #fff !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  padding: 0.65rem 1.5rem !important;
}

.btn-post:hover {
  background: #2563eb !important;
  box-shadow: 0 4px 14px rgba(59,130,246,0.4) !important;
  color: #fff !important;
}

/* ── Collapsible games section ───────────────────────────── */
.lsb-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.75rem 0.5rem 0.2rem;
  gap: 0.35rem;
}

.lsb-toggle-chevron {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  display: inline-block;
  line-height: 1;
}

.lsb-section-toggle[aria-expanded="true"] .lsb-toggle-chevron {
  transform: rotate(90deg);
}

#lsb-games-list {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

#lsb-games-list.lsb-list-collapsed {
  display: none;
}

/* ── Filters toggle button ───────────────────────────────── */
.feed-bar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  white-space: nowrap;
}

.filter-toggle-btn:hover,
.filter-toggle-btn.filter-toggle-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108,99,255,0.08);
}

/* Active filters dot on the toggle button */
.filter-toggle-btn.has-filters::after {
  content: '•';
  color: var(--accent);
  margin-left: 0.2rem;
  font-size: 1rem;
  line-height: 0.5;
  vertical-align: middle;
}

/* ── Mobile improvements ─────────────────────────────────── */
@media (max-width: 480px) {
  /* Compact login button on tiny screens */
  .nav-login-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
  }

  /* Feed header wraps instead of overflowing */
  .feed-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .feed-header-text h1 {
    font-size: 1.2rem;
  }

  /* Tighter card padding on very small screens */
  .card-meta {
    padding: 0.75rem 1rem 0.4rem;
  }

  .card-actions {
    padding: 0.5rem 1rem;
  }

  /* Ensure modal scrolls on small screens */
  .modal {
    max-height: 88vh;
    overflow-y: auto;
  }
}
