/* ═══════════════════════════════════════════════════════════════
   EphyroMC — Forum Styles  |  Dipende da: assets/css/style.css
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   PAGE HEADER
───────────────────────────────────────────── */
#forum-header {
  padding: calc(var(--nav-h) + 50px) 0 52px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--gold-border);
  position: relative;
  overflow: hidden;
}

#forum-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 80% at 50% 0%,
    rgba(142,108,200,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.forum-header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* Entrance */
#forum-header .s-label { animation: f-enter 600ms cubic-bezier(0.16,1,0.3,1) both; }
#forum-header .s-title { animation: f-enter 600ms cubic-bezier(0.16,1,0.3,1) 90ms both; }
#forum-header .s-text  { animation: f-enter 600ms cubic-bezier(0.16,1,0.3,1) 200ms both; }
#forum-header .forum-header-cta { animation: f-enter 600ms cubic-bezier(0.16,1,0.3,1) 310ms both; }

@keyframes f-enter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.forum-header-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   LAYOUT: sidebar + main
───────────────────────────────────────────── */
#forum-body {
  padding: 48px 0 80px;
  background: var(--bg-0);
}

.forum-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
  align-items: flex-start;
}

/* ─────────────────────────────────────────────
   CATEGORY BLOCK
───────────────────────────────────────────── */
.forum-categories { display: flex; flex-direction: column; gap: 36px; }

.cat-block { display: flex; flex-direction: column; gap: 2px; }

.cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-card2);
  border: 1px solid var(--gold-border);
  border-radius: 8px 8px 0 0;
  position: relative;
  overflow: hidden;
}

.cat-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cat-color, var(--gold));
  border-radius: 2px 0 0 0;
}

.cat-icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-info { flex: 1; min-width: 0; }

.cat-name {
  font-family: var(--ff-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-1);
}

.cat-desc {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}

/* Store link inside category */
.cat-store-link {
  font-family: var(--ff-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--gold-border);
  padding: 5px 14px;
  border-radius: 99px;
  transition: all var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}

.cat-store-link:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
}

/* ─────────────────────────────────────────────
   SUBCATEGORY ROW
───────────────────────────────────────────── */
.subcat-list { display: flex; flex-direction: column; gap: 1px; }

.subcat-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.04);
  border-top: none;
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease);
  cursor: pointer;
  position: relative;
}

.subcat-row:last-child { border-radius: 0 0 8px 8px; }

.subcat-row:hover {
  background: rgba(255,255,255,0.03);
  border-color: var(--gold-border);
}

/* Icon col */
.subcat-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--ease);
}

.subcat-row:hover .subcat-icon { border-color: var(--gold-border); }

/* Info col */
.subcat-info { min-width: 0; }

.subcat-name {
  font-family: var(--ff-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-1);
  transition: color var(--ease);
}

.subcat-row:hover .subcat-name { color: var(--gold-bright); }

.subcat-desc {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats col */
.subcat-stats {
  text-align: right;
  flex-shrink: 0;
}

.subcat-stat-val {
  font-family: var(--ff-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-2);
  display: block;
}

.subcat-stat-lbl {
  font-family: var(--ff-head);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Latest col */
.subcat-latest {
  min-width: 160px;
  flex-shrink: 0;
}

.subcat-latest-title {
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  transition: color var(--ease);
}

.subcat-row:hover .subcat-latest-title { color: var(--gold); }

.subcat-latest-meta {
  font-family: var(--ff-head);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-top: 2px;
}

/* ─────────────────────────────────────────────
   PROPOSTE badge (voti)
───────────────────────────────────────────── */
.subcat-vote-badge {
  font-family: var(--ff-head);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(142,108,200,0.1);
  border: 1px solid rgba(142,108,200,0.25);
  padding: 2px 10px;
  border-radius: 99px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Locked row (Staff — private) */
.subcat-row--locked {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.subcat-row--locked::after {
  content: 'Solo Staff';
  position: absolute;
  right: 20px;
  font-family: var(--ff-head);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(184,64,64,0.1);
  border: 1px solid rgba(184,64,64,0.2);
  padding: 3px 10px;
  border-radius: 99px;
}

/* ─────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────── */
.forum-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  overflow: hidden;
}

.sidebar-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}

.sidebar-card-title {
  font-family: var(--ff-head);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.sidebar-card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4caf50;
  box-shadow: 0 0 6px #4caf50;
  flex-shrink: 0;
}

.sidebar-card-body { padding: 12px 0; }

/* Staff online list */
.staff-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  transition: background var(--ease);
}

.staff-member:hover { background: rgba(255,255,255,0.025); }

.staff-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card2);
  border: 1px solid var(--gold-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

.staff-name {
  font-size: 13.5px;
  color: var(--text-2);
  flex: 1;
  min-width: 0;
}

.staff-role {
  font-family: var(--ff-head);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}

.staff-role--admin { color: #c94040; background: rgba(184,64,64,0.1); border: 1px solid rgba(184,64,64,0.22); }
.staff-role--mod   { color: var(--teal); background: rgba(74,184,180,0.1); border: 1px solid rgba(74,184,180,0.22); }
.staff-role--modp  { color: var(--purple); background: rgba(142,108,200,0.1); border: 1px solid rgba(142,108,200,0.22); }
.staff-role--helper{ color: var(--gold); background: rgba(201,150,58,0.1); border: 1px solid rgba(201,150,58,0.22); }

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.04);
  margin: 8px 16px;
}

/* Online users */
.sidebar-online-users {
  padding: 6px 16px 4px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.7;
}

.sidebar-online-name {
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--ease);
}

.sidebar-online-name:hover { color: var(--gold-bright); }

/* Stats sidebar */
.sidebar-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 16px;
}

.sidebar-stat-label {
  font-family: var(--ff-head);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sidebar-stat-val {
  font-family: var(--ff-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

/* Quick links */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-family: var(--ff-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--ease), background var(--ease);
}

.sidebar-link:hover {
  color: var(--gold-bright);
  background: var(--gold-glow);
}

/* ─────────────────────────────────────────────
   THREAD LIST VIEW (quando si apre una sottocategoria)
───────────────────────────────────────────── */
#thread-view { display: none; }
#thread-view.visible { display: block; }

.thread-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.thread-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-head);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.thread-breadcrumb a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--ease);
}

.thread-breadcrumb a:hover { color: var(--gold-bright); }

.thread-breadcrumb-sep { opacity: 0.4; }

.btn-new-thread {
  font-family: var(--ff-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a0702;
  background: linear-gradient(135deg, var(--gold-pale), var(--gold-bright) 45%, var(--gold));
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity var(--ease), box-shadow var(--ease);
  box-shadow: 0 3px 16px rgba(201,150,58,0.36);
}

.btn-new-thread:hover {
  opacity: 0.9;
  box-shadow: 0 5px 24px rgba(201,150,58,0.48);
}

/* Thread rows */
.thread-list { display: flex; flex-direction: column; gap: 2px; }

.thread-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease);
  position: relative;
}

.thread-row:hover {
  background: rgba(255,255,255,0.03);
  border-color: var(--gold-border);
}

/* Pinned / staff thread */
.thread-row--pinned {
  border-color: rgba(201,150,58,0.28);
  background: rgba(201,150,58,0.04);
}

.thread-row--pinned::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: 3px 0 0 3px;
}

.thread-row--announcement {
  border-color: rgba(142,108,200,0.3);
  background: rgba(142,108,200,0.04);
}

.thread-row--announcement::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--purple);
  border-radius: 3px 0 0 3px;
}

/* Thread icon */
.thread-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Thread info */
.thread-info { min-width: 0; }

.thread-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.thread-title {
  font-family: var(--ff-head);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: 0.02em;
  transition: color var(--ease);
}

.thread-row:hover .thread-title { color: var(--gold-bright); }

.thread-badge {
  font-family: var(--ff-head);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}

.thread-badge--pin    { color: var(--gold);   background: rgba(201,150,58,0.1); border: 1px solid rgba(201,150,58,0.25); }
.thread-badge--ann    { color: var(--purple);  background: rgba(142,108,200,0.1); border: 1px solid rgba(142,108,200,0.25); }
.thread-badge--hot    { color: var(--red);     background: rgba(184,64,64,0.1); border: 1px solid rgba(184,64,64,0.22); }
.thread-badge--solved { color: var(--teal);    background: rgba(74,184,180,0.1); border: 1px solid rgba(74,184,180,0.22); }

.thread-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

.thread-meta-author { color: var(--gold); font-weight: 600; }

/* Thread stats */
.thread-stats { text-align: right; flex-shrink: 0; }

.thread-stat-val { font-family: var(--ff-head); font-size: 14px; font-weight: 700; color: var(--text-2); display: block; }
.thread-stat-lbl { font-family: var(--ff-head); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }

/* Vote column (Proposte) */
.thread-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.vote-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
}

.vote-btn:hover,
.vote-btn.voted {
  background: rgba(142,108,200,0.14);
  border-color: rgba(142,108,200,0.4);
}

.vote-count {
  font-family: var(--ff-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.vote-count.high { color: var(--purple); }

/* ─────────────────────────────────────────────
   BACK BUTTON
───────────────────────────────────────────── */
.btn-back {
  font-family: var(--ff-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--ease);
  margin-bottom: 20px;
}

.btn-back:hover { color: var(--gold); border-color: var(--gold-border); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 960px) {
  .forum-layout { grid-template-columns: 1fr; }
  .forum-sidebar { position: static; }
}

@media (max-width: 720px) {
  .subcat-row {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  .subcat-stats,
  .subcat-latest { display: none; }

  .thread-row {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  .thread-stats { display: none; }
  .thread-vote { display: none; }

  .forum-header-inner { flex-direction: column; align-items: flex-start; }
  .forum-header-cta { align-items: flex-start; }

  #forum-header { padding: calc(var(--nav-h) + 32px) 0 36px; }
}

@media (max-width: 480px) {
  .cat-header { padding: 12px 14px; }
  .subcat-row { padding: 12px 14px; }
  .thread-row { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #forum-header .s-label,
  #forum-header .s-title,
  #forum-header .s-text,
  #forum-header .forum-header-cta { animation: none; opacity: 1; }
}