/* ================================================
   1. CSS Variables & Reset
   ================================================ */

:root {
  --bg: #e8ecf4;
  --bg-card: rgba(22,23,40,0.88);
  --bg-card-hover: rgba(26,27,48,0.92);
  --bg-surface: rgba(0,0,0,0.20);
  --glass: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.12);
  --glass-strong: rgba(255,255,255,0.10);
  --border: rgba(255,255,255,0.10);
  --border-hover: rgba(255,255,255,0.18);
  --text: #d4d8e4;
  --text-dim: #8e94a8;
  --text-bright: #f2f3f7;
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-glow: rgba(129,140,248,0.15);
  --accent2: #22d3ee;
  --accent3: #f59e0b;
  --green: #34d673;
  --red: #ef4444;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.08);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.25);
  --blur: blur(40px) saturate(1.4);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1400px;
}

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

/* ================================================
   2. Typography
   ================================================ */

html {
  background-color: var(--bg);
  background-image: url('/assets/img/bg-gaming.svg');
  background-repeat: repeat;
  background-size: 320px 320px;
}

body {
  font-family: var(--font);
  background: transparent;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: inherit; }


/* ================================================
   3. Layout (header, nav, page grid)
   ================================================ */

/* --- HEADER --- */

header {
  background: rgba(26,27,46,0.95);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.logo:hover { opacity: 0.85; }

.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.header-tagline {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  overflow: hidden;
  display: inline-block;
}

.header-tagline .tl-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .05s ease, transform .05s ease;
}

.header-tagline .tl-char.visible {
  opacity: 1;
  transform: translateY(0);
}

.header-tagline .tl-char.space {
  width: 0.3em;
}

.header-tagline .tl-char.accent { color: var(--accent); }

.mod-count-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  height: 22px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
}

.badge-slide {
  display: flex;
  flex-direction: column;
}

.badge-item {
  height: 22px;
  display: flex;
  align-items: center;
  line-height: 1;
}

/* --- GAME NAV (second row) --- */

.game-nav {
  border-top: 1px solid var(--glass-border);
  position: relative;
}

/* Subtle glow line under nav */
.game-nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent2) 70%, transparent);
  opacity: 0.2;
}

.game-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 42px;
  flex-wrap: wrap;
}

.game-dropdown {
  position: relative;
}

.game-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.game-link-arrow {
  opacity: 0.5;
  transition: transform var(--transition), opacity var(--transition);
}

.game-dropdown:hover .game-link-arrow,
.game-dropdown.dropdown-open .game-link-arrow {
  opacity: 0.8;
  transform: rotate(180deg);
}

.game-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.game-link.active { color: #fff; background: rgba(255,255,255,0.08); }

/* Highlight game link when dropdown is open */
.game-dropdown:hover .game-link,
.game-dropdown.dropdown-open .game-link {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-count {
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.05);
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

/* --- GAME DROPDOWN MEGA-MENU --- */

.game-dropdown-menu {
  /* position/top/left set by JS portal */
  background: rgba(26,27,46,0.72);
  backdrop-filter: blur(24px) saturate(2);
  -webkit-backdrop-filter: blur(24px) saturate(2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.3);
  min-width: 620px;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.game-dropdown-menu.dropdown-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Header */
.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius) var(--radius) 0 0;
}

.dropdown-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.dropdown-viewall {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: opacity var(--transition);
  opacity: 0.7;
}

.dropdown-viewall:hover { opacity: 1; }

/* Category grid — 4 columns */
.dropdown-cats {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  max-height: 400px;
  overflow-y: auto;
}

/* Scrollbar */
.dropdown-cats::-webkit-scrollbar { width: 4px; }
.dropdown-cats::-webkit-scrollbar-track { background: transparent; }
.dropdown-cats::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Single category item */
.dropdown-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.dropdown-cat:hover {
  background: rgba(255,255,255,0.06);
}

/* Category icon */
.dropdown-cat-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-cat-icon svg {
  width: 16px;
  height: 16px;
}

.dropdown-cat:hover .dropdown-cat-icon {
  background: var(--accent-glow);
  color: var(--accent);
}

/* Text block */
.dropdown-cat-text {
  min-width: 0;
}

.dropdown-cat-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  transition: color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.dropdown-cat:hover .dropdown-cat-name { color: #fff; }

.dropdown-cat-count {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  display: block;
  margin-top: 1px;
}

/* Nav "More" games button */
.game-link-more {
  border: none;
  background: none;
  font-family: var(--font);
  cursor: pointer;
}

.game-dropdown-more {
  width: 740px;
  min-width: auto;
}

/* Two-panel layout */
.more-panel {
  display: flex;
  min-height: 300px;
  max-height: calc(100vh - 120px);
}

.more-games {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
}

.more-games-list {
  padding: 6px;
  overflow-y: auto;
  flex: 1;
}

.more-game-item {
  position: relative;
}

.more-game-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.more-game-link .dropdown-cat-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.more-game-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-game-arrow {
  opacity: 0.3;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.more-game-item:hover .more-game-link,
.more-game-item.active .more-game-link {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.more-game-item:hover .more-game-arrow,
.more-game-item.active .more-game-arrow {
  opacity: 0.7;
}

.more-game-item:hover .dropdown-cat-icon,
.more-game-item.active .dropdown-cat-icon {
  background: var(--accent-glow);
  color: var(--accent);
}

/* Right panel: categories */
.more-cats {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.more-cats-panel {
  display: none;
  flex-direction: column;
  height: 100%;
}

.more-cats-panel.visible {
  display: flex;
}

.more-cats-grid {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}

.more-cat-all {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  margin-bottom: 4px;
}

.more-cat-all .dropdown-cat-icon {
  background: var(--accent-glow);
  color: var(--accent);
}

/* Placeholder when no game hovered */
.more-cats-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-dim);
  font-size: 13px;
  padding: 24px;
  text-align: center;
}

/* --- HEADER RIGHT --- */

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.search-wrap {
  position: relative;
}

.search-wrap input {
  width: 220px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px 8px 36px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.search-wrap input:focus {
  width: 280px;
  border-color: rgba(129,140,248,0.4);
  background: rgba(129,140,248,0.06);
  box-shadow: 0 0 0 4px rgba(129,140,248,0.1);
}

.search-wrap input::placeholder { color: var(--text-dim); }

.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.btn-upload {
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-upload:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* --- LANG SWITCHER --- */

.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.lang-btn:hover {
  background: var(--glass-strong);
  border-color: var(--border-hover);
  color: var(--text-bright);
}

.lang-flag { font-size: 14px; line-height: 1; border-radius: 2px; }
.lang-btn svg:first-child { opacity: 0.6; }

.lang-arrow {
  opacity: 0.4;
  transition: transform .2s ease;
}

.lang-switcher:hover .lang-arrow,
.lang-switcher.open .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  background: rgba(30,32,52,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s cubic-bezier(0.4,0,0.2,1);
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  transition: var(--transition);
}

.lang-option:hover {
  background: var(--glass-strong);
  color: var(--text-bright);
}

.lang-option.active {
  color: var(--accent);
}

.lang-option svg {
  margin-left: auto;
  color: var(--accent);
}

.lang-code {
  font-weight: 700;
  font-size: 11px;
  background: var(--glass);
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  min-width: 26px;
  text-align: center;
}

.lang-option.active .lang-code {
  background: var(--accent-glow);
  color: var(--accent);
}

.lang-name {
  font-weight: 500;
}

/* --- PAGE GRID --- */

.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 24px;
}

.page-full {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px;
  display: block;
  grid-template-columns: none;
}

/* --- SIDEBAR --- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 106px;
  align-self: start;
}

.sidebar-section {
  background: rgba(26,27,46,0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 12px 16px 8px;
  text-transform: uppercase;
}

.cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border-left: 3px solid transparent;
}

.cat-link:hover { background: rgba(255,255,255,0.03); border-left-color: var(--border-hover); color: var(--text); }
.cat-link.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
}

.cat-link .count {
  font-size: 11px;
  color: var(--text-dim);
}

/* --- MAIN CONTENT --- */

/* Soft radial glow behind main content top area */
main {
  position: relative;
}

main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(129,140,248,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.breadcrumb {
  font-size: 14px;
  color: #5a6072;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a { color: #5a6072; text-decoration: none; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: #8e94a8; font-size: 11px; }
.breadcrumb .current { color: #1a1b2e; font-weight: 500; }

.result-count {
  font-size: 12px;
  color: #5a6072;
  margin-left: auto;
}

.sort-select {
  font-family: var(--font);
  font-size: 12px;
  color: #1a1b2e;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.sort-select:focus { border-color: var(--accent); }

/* Tag page header */
.tag-page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: rgba(26,27,46,0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
}
.tag-page-header svg { color: var(--accent); flex-shrink: 0; }
.tag-page-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0;
}
.tag-page-count {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: auto;
}

/* ================================================
   4. Components (mod-card, pagination, tags, badges)
   ================================================ */

/* --- MOD GRID --- */

.mod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* --- MONTHLY HOT BLOCK --- */

.mh-block {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #2e2215 0%, #261c12 100%);
  border: 1px solid rgba(249,115,22,0.30);
  box-shadow: 0 0 20px rgba(249,115,22,0.06), inset 0 1px 0 rgba(249,115,22,0.08);
  border-radius: 14px;
  padding: 20px;
  margin: 8px 0;
}

.mh-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.mh-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mh-flame {
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(249,115,22,0.4));
}

.mh-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.mh-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.mh-weeks {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.mh-week {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.25s ease;
}

.mh-week:hover {
  background: rgba(249,115,22,0.12);
  color: #f97316;
  border-color: rgba(249,115,22,0.25);
}

.mh-week.active {
  background: rgba(249,115,22,0.15);
  color: #f97316;
  border-color: rgba(249,115,22,0.35);
}

.mh-slides {
  position: relative;
  min-height: 180px;
}

.mh-slide {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  animation: mhFadeIn 0.4s ease;
}

.mh-slide.active {
  display: grid;
}

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

.mh-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: block;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid rgba(249,115,22,0.12);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.mh-card:hover {
  transform: translateY(-3px);
  border-color: rgba(249,115,22,0.35);
}

.mh-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mh-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(249,115,22,0.4);
}

.mh-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.mh-game {
  font-size: 10px;
  font-weight: 600;
  color: #f97316;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mh-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mh-dl {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mh-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.mh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: all 0.25s ease;
  cursor: pointer;
}

.mh-dot.active {
  background: #f97316;
  box-shadow: 0 0 6px rgba(249,115,22,0.5);
}

/* --- Hot This Month: List View variant --- */

.mh-block-list {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #271a0f 0%, #1e1409 100%);
  border: 1px solid rgba(249,115,22,0.22);
  border-radius: 16px;
  padding: 20px;
  margin: 4px 0;
}

.mh-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.mh-list-header .mh-title { font-size: 15px; }

.mh-list-slides { position: relative; }

.mh-list-slide {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mh-list-slide.active { display: grid; }

.mh-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  text-decoration: none;
  color: var(--text);
  transition: background .18s, border-color .18s;
  overflow: hidden;
}

.mh-list-item:hover {
  background: rgba(249,115,22,0.10);
  border-color: rgba(249,115,22,0.20);
}

.mh-list-rank {
  font-size: 18px;
  font-weight: 800;
  color: rgba(249,115,22,0.35);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.mh-list-item:nth-child(1) .mh-list-rank { color: #fbbf24; }
.mh-list-item:nth-child(2) .mh-list-rank { color: #d1d5db; }
.mh-list-item:nth-child(3) .mh-list-rank { color: #cd7c3a; }

.mh-list-thumb {
  width: 80px;
  height: 50px;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(0,0,0,0.4);
}

.mh-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.mh-list-item:hover .mh-list-thumb img { transform: scale(1.06); }

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

.mh-list-name {
  font-size: 13px;
  font-weight: 700;
  color: #e8eaf6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.mh-list-meta {
  display: flex;
  gap: 6px;
  font-size: 10px;
  align-items: center;
}

.mh-list-game {
  color: #f97316;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: 10px;
}

.mh-list-dl {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
  white-space: nowrap;
}

/* --- RECOMMENDED BLOCK --- */

.rec-block-list {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #161c35 0%, #111627 100%);
  border: 1px solid rgba(129,140,248,0.22);
  border-radius: 14px;
  padding: 20px;
  margin: 4px 0;
}

.rec-list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.rec-list-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/10;
  display: block;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease;
}

.rec-list-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.30);
}

.rec-list-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.rec-list-card:hover img { transform: scale(1.05); }

.rec-list-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,9,20,0.85) 0%, transparent 55%);
}

.rec-list-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px;
}

.rec-list-game {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 3px;
}

.rec-list-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.rec-block {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #161c35 0%, #111627 100%);
  border: 1px solid rgba(129,140,248,0.22);
  box-shadow: 0 0 20px rgba(129,140,248,0.05), inset 0 1px 0 rgba(129,140,248,0.08);
  border-radius: 14px;
  padding: 20px;
  margin: 8px 0;
}

.rec-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.rec-header-icon {
  flex-shrink: 0;
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(129,140,248,0.45));
}

.rec-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.rec-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.rec-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 12px;
}

.rec-hero {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: block;
  text-decoration: none;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(129,140,248,0.12);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.rec-hero:hover {
  transform: translateY(-3px);
  border-color: rgba(129,140,248,0.4);
}

.rec-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rec-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, transparent 100%);
}

.rec-hero-cat {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.rec-hero-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rec-hero-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rec-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rec-side-card {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  color: var(--text);
  flex: 1;
  min-height: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rec-side-card:hover {
  background: rgba(129,140,248,0.08);
  border-color: rgba(129,140,248,0.22);
}

.rec-side-thumb {
  width: 80px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
}

.rec-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rec-side-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rec-side-cat {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rec-side-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.rec-side-info .mod-badge,
.rec-hero-meta .mod-badge {
  margin-top: 4px;
  font-size: 10px;
  width: fit-content;
  align-self: flex-start;
}

@media (max-width: 700px) {
  .rec-layout { grid-template-columns: 1fr; }
  .rec-hero { aspect-ratio: 16 / 8; }
}

/* --- HOME LAYOUT --- */

.home-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.home-main {
  min-width: 0;
}

.section-count {
  font-size: 13px;
  color: #5a6072;
  font-weight: 500;
}

.feed-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  position: relative;
  max-width: 100%;
  overflow: hidden;
}
.feed-tabs-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: #6366f1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
}
.feed-tabs-arrow:hover {
  color: #4f46e5;
  transform: scale(1.15);
}
.feed-tabs-arrow:active {
  transform: scale(0.9);
}
.feed-tabs-wrap.has-overflow .feed-tabs-arrow { display: flex; }
.feed-tabs-wrap.at-start .feed-tabs-arrow-left,
.feed-tabs-wrap.at-end .feed-tabs-arrow-right {
  opacity: 0.25;
  pointer-events: none;
}
.feed-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  flex: 1;
  min-width: 0;
  padding-bottom: 2px;
}
.feed-tabs::-webkit-scrollbar { display: none; }

.feed-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #5a6072;
  background: rgba(26,27,46,0.08);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.feed-tab:hover {
  color: #1a1b2e;
  background: rgba(26,27,46,0.12);
  border-color: rgba(26,27,46,0.15);
}

.feed-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.feed-tab.active .feed-tab-count {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.feed-tab-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(26,27,46,0.08);
  color: #5a6072;
}

.mod-grid-home {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* View Toggle */
.section-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-toggle {
  display: flex;
  gap: 2px;
  background: rgba(26,27,46,0.08);
  border: 1px solid rgba(26,27,46,0.1);
  border-radius: 8px;
  padding: 2px;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: none;
  color: #5a6072;
  cursor: pointer;
  transition: var(--transition);
}

.view-btn:hover { color: #1a1b2e; }

.view-btn.active {
  background: var(--accent);
  color: #fff;
}

/* List View */
.mod-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mod-list-item {
  display: flex;
  align-items: stretch;
  height: 92px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: transform .2s, box-shadow .2s;
}

.mod-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.10);
}

.mod-list-thumb {
  width: 140px;
  flex-shrink: 0;
  overflow: hidden;
}

.mod-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.mod-list-item:hover .mod-list-thumb img {
  transform: scale(1.05);
}

.mod-list-body {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.mod-list-top { }

.mod-list-game {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 4px;
}

.mod-list-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-list-cat-pill {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  background: #f3f4f6;
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mod-list-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.mod-list-date {
  font-size: 10px;
  color: #9ca3af;
  margin-left: auto;
}

@media (max-width: 600px) {
  .mod-list { grid-template-columns: 1fr; }
  .mod-list-thumb { width: 110px; }
  .mod-list-title { font-size: 13px; }
}

.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: stretch;
}

/* --- HERO BANNER --- */

.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 24px 0;
}

.hero-card {
  background: linear-gradient(135deg, rgba(30,27,75,0.95) 0%, rgba(15,23,42,0.95) 50%, rgba(12,74,110,0.9) 100%);
  border-radius: var(--radius);
  padding: 44px 36px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(129,140,248,0.15);
  margin-bottom: 24px;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(34,211,238,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-deco {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 200px;
  opacity: 1;
  pointer-events: none;
}

.hero-deco svg {
  width: 100%;
  height: 100%;
}

.hero-title {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  position: relative;
  text-shadow: 0 0 30px rgba(129,140,248,0.3), 0 2px 4px rgba(0,0,0,0.3);
}

.hero-title span { color: var(--accent); text-shadow: 0 0 20px rgba(129,140,248,0.5); }

.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  max-width: 500px;
  position: relative;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 22px;
  position: relative;
}

.hero-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.hero-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* --- SIDEBAR CARDS --- */

.side-card {
  background: rgba(26,27,46,0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
}

.side-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-card-header .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.side-ad-sticky {
  position: sticky;
  top: 106px;
}

.ad-slot {
  padding: 18px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* Top Mods list */
.top-mod {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.top-mod:last-of-type { border-bottom: none; }
.top-mod:hover { background: rgba(255,255,255,0.02); }

.top-rank {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
}

.top-rank.r1 { background: linear-gradient(135deg, #f59e0b, #d97706); color: #000; }
.top-rank.r2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #000; }
.top-rank.r3 { background: linear-gradient(135deg, #c2956a, #a3784e); color: #000; }

.top-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface);
}

.top-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.top-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-meta {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.top-game-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}

.top-cat-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--glass-strong);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Activity feed */
.act-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--transition);
}
.act-row:last-of-type { border-bottom: none; }
.act-row:hover { background: rgba(255,255,255,0.025); }

.act-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.act-icon-upload { background: rgba(52,214,115,0.12); color: #34d673; }
.act-icon-update { background: rgba(99,102,241,0.12); color: #818cf8; }
.act-icon-version { background: rgba(34,211,238,0.12); color: #22d3ee; }
.act-icon-tier_up { background: rgba(251,146,60,0.12); color: #fb923c; }

.act-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.act-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.act-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.act-label { color: var(--text-dim); }
.act-detail {
  color: var(--accent);
  font-weight: 500;
  font-size: 11px;
  background: rgba(99,102,241,0.1);
  padding: 1px 5px;
  border-radius: 4px;
}

.act-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.5;
  font-weight: 500;
}

/* Tags cloud */
.tags-cloud {
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}

.tag-pill:hover {
  background: var(--accent-glow);
  border-color: rgba(129,140,248,0.25);
  color: var(--accent);
}

.tag-pill-count {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
}

.tag-pill:hover .tag-pill-count {
  color: var(--accent);
  opacity: 0.7;
}

/* Tags index page */
.tags-index-inner {
  width: 100%;
}

.tags-letter-group .side-card-header {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tags-cloud-index {
  padding: 12px 18px 16px;
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* --- MOD CARD (cover style: info overlaid on image) --- */

.mod-card {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.mod-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.18);
}

.mod-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.mod-card:hover .mod-thumb-img { transform: scale(1.05); }
.mod-card:hover .mod-name-text { text-decoration: underline; text-underline-offset: 3px; }

.mod-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: linear-gradient(135deg, #1a1b2e, #12131f);
}

/* Dual gradient: darkens top and bottom for readability */
.mod-grad {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(8,9,20,0.65) 0%, transparent 38%),
    linear-gradient(to top,    rgba(8,9,20,0.82) 0%, transparent 48%);
  pointer-events: none;
}

/* Top row: game name (left) + badge or category (right) */
.mod-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 10px 10px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  z-index: 2;
}

.mod-game-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.80);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
  text-decoration: none;
  cursor: pointer;
}
.mod-game-tag:hover { color: #fff; text-decoration: underline; }

.mod-cat-pill {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.80);
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 2px 9px;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
}
.mod-cat-pill:hover { background: rgba(255,255,255,0.22); color: #fff; }

/* Bottom area: category (small) + title */
.mod-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0 44px 12px 12px;
  z-index: 2;
}

.mod-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-date {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  margin-top: 3px;
}

/* Badge — inline at start of mod title */
.mod-badge {
  display: inline;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 4px;
  position: relative;
  top: -1px;
}

/* Download icon — bottom right corner */
.mod-dl-icon {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  background: rgba(99,102,241,0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 3;
  transition: all .25s ease;
}
.mod-dl-icon svg { width: 18px; height: 18px; }
.mod-card:hover .mod-dl-icon {
  background: rgba(99,102,241,0.55);
  border-color: rgba(129,140,248,0.7);
  transform: scale(1.1);
}

/* Tier badge colors */
.mod-badge.tier-new {
  background: var(--green);
  color: #000;
}

.mod-badge.tier-medium {
  background: var(--accent3);
  color: #000;
}

.mod-badge.tier-hot {
  background: var(--red);
  color: #fff;
}

/* Tier dots indicator (3 dots like signal bars) */
.tier-dots {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
  vertical-align: middle;
  margin-right: 3px;
}

.tier-dots span {
  display: block;
  width: 4px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.25;
}

.tier-dots span:nth-child(1) { height: 4px; }
.tier-dots span:nth-child(2) { height: 7px; }
.tier-dots span:nth-child(3) { height: 10px; }

/* Light up dots based on tier */
.tier-new .tier-dots span:nth-child(1) { opacity: 1; }

.tier-medium .tier-dots span:nth-child(1),
.tier-medium .tier-dots span:nth-child(2) { opacity: 1; }

.tier-hot .tier-dots span:nth-child(1),
.tier-hot .tier-dots span:nth-child(2),
.tier-hot .tier-dots span:nth-child(3) { opacity: 1; }

/* Tier in mod-stats row */
.mod-tier-dot {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mod-tier-dot.tier-new { color: var(--green); }
.mod-tier-dot.tier-medium { color: var(--accent3); }
.mod-tier-dot.tier-hot { color: var(--red); }

/* Tier in list view inline badge */
.mod-badge-inline.tier-new { background: var(--green); color: #000; }
.mod-badge-inline.tier-medium { background: var(--accent3); color: #000; }
.mod-badge-inline.tier-hot { background: var(--red); color: #fff; }

/* Tier in detail page stats */
.dstat-tier.tier-new .dstat-tier-badge { color: var(--green); }
.dstat-tier.tier-medium .dstat-tier-badge { color: var(--accent3); }
.dstat-tier.tier-hot .dstat-tier-badge { color: var(--red); }

.dstat-tier-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tier in top mods sidebar */
.top-tier {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.top-tier.tier-new { color: var(--green); }
.top-tier.tier-medium { color: var(--accent3); }
.top-tier.tier-hot { color: var(--red); }

/* Tier in download block */
.dl-block-tier {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dl-block-tier.tier-new { color: var(--green); }
.dl-block-tier.tier-medium { color: var(--accent3); }
.dl-block-tier.tier-hot { color: var(--red); }

.mod-info { display: none; }

/* --- SKELETON LOADING --- */

.skeleton {
  background: linear-gradient(90deg, #1a1a24 25%, #22222e 50%, #1a1a24 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- PAGINATION --- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 28px;
}

.page-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.7);
  color: #5a6072;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(99,102,241,0.3); }
.page-btn.dots { border: none; background: none; cursor: default; box-shadow: none; color: #8e94a8; }

/* ================================================
   5. Pages (home, game, category, mod-detail)
   ================================================ */

/* --- SECTION TITLE --- */

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1b2e;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* --- GAME PAGE --- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.category-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(26,27,46,0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text-bright);
  transition: all var(--transition);
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.category-name {
  font-size: 13.5px;
  font-weight: 500;
}

.category-count {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

/* --- MOD DETAIL PAGE --- */

.detail-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px;
}

.detail-frame {
  background: #f4f6fa;
  border: 1px solid #e2e5ed;
  border-radius: var(--radius);
  padding: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.detail-content {
  min-width: 0;
}

.detail-sidebar {
  align-self: stretch;
}

.detail-ad-sticky {
  position: sticky;
  top: 106px;
  min-height: 600px;
  background: rgba(0,0,0,0.03);
  border: 1px dashed #d0d5e0;
  border-radius: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #5a6072;
  text-decoration: none;
  margin-bottom: 16px;
  transition: color var(--transition);
  cursor: pointer;
}

.back-link:hover { color: var(--accent); }

.detail-hero {
  position: relative;
  background: #fff;
  border: 1px solid #e2e5ed;
  padding: 28px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.detail-info-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.detail-info-right {
  flex-shrink: 0;
}

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

.detail-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #ebeef4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}

.img-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.detail-img:hover .img-zoom-hint { opacity: 1; }

/* --- LIGHTBOX --- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
  cursor: zoom-out;
  backdrop-filter: blur(4px);
}

.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.lightbox.active .lightbox-img { transform: scale(1); }

.lightbox-video {
  display: none;
  width: min(880px, 92vw);
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.lightbox-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  line-height: 1;
}

.lightbox-close:hover { background: rgba(255,255,255,0.22); }

.detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
}

.gallery { display: flex; flex-direction: column; gap: 10px; }

.gallery-thumbs-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-nav {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ebeef4;
  border: 1px solid #d0d5e0;
  border-radius: 6px;
  color: #5a5f7d;
  cursor: pointer;
  transition: all var(--transition);
}
.gallery-nav:hover { background: #d0d5e0; color: #1e2139; }

.gallery-thumbs {
  display: flex;
  flex: 1;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb {
  width: 92px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.55;
  transition: all var(--transition);
  flex-shrink: 0;
}
.gallery-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}
.gallery-thumb:hover {
  opacity: 1;
  border-color: var(--accent);
}

.gallery-counter {
  text-align: center;
  font-size: 11px;
  color: #8b90a8;
  margin-top: -4px;
}

.detail-title {
  font-size: 26px;
  font-weight: 700;
  color: #1e2139;
  line-height: 1.3;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-game-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 1;
}
.detail-cat-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ebeef4;
  color: #5a5f7d;
  border: 1px solid #d0d5e0;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 1;
}
.detail-crown {
  display: inline-flex;
  align-items: center;
  color: #f5c400;
  flex-shrink: 0;
  cursor: help;
  filter: drop-shadow(0 1px 4px rgba(245,196,0,0.6));
  transition: transform 0.15s;
}
.detail-crown:hover { transform: scale(1.2); }

/* Hero action buttons (Share + Report) */
.hero-actions {
  position: absolute;
  top: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f4f6fa;
  border: 1px solid #d0d5e0;
  border-radius: var(--radius-sm);
  color: #8b90a8;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.report-btn:hover { border-color: #ef4444; color: #ef4444; }

/* Share button */
.share-wrap {
  position: relative;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #f4f6fa;
  border: 1px solid #d0d5e0;
  border-radius: var(--radius-sm);
  color: #3a3f5c;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.share-btn:hover { border-color: #6366f1; color: #1e2139; }
.share-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid #e2e5ed;
  border-radius: var(--radius-sm);
  padding: 12px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.share-dropdown.share-open { display: block; }
.share-url-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.share-url-input {
  flex: 1;
  padding: 7px 10px;
  background: #f4f6fa;
  border: 1px solid #d0d5e0;
  border-radius: 6px;
  color: #3a3f5c;
  font-size: 12px;
  font-family: monospace;
  outline: none;
  min-width: 0;
  cursor: text;
}
.share-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f4f6fa;
  border: 1px solid #d0d5e0;
  border-radius: 6px;
  color: #3a3f5c;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.share-copy-btn:hover { border-color: #6366f1; color: #6366f1; }
.share-copy-btn.share-copied { border-color: #059669; color: #059669; }
.share-socials {
  display: flex;
  gap: 8px;
}
.share-social {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.share-social:hover { opacity: 0.85; }
.share-fb  { background: #1877f2; color: #fff; }
.share-x   { background: #000; color: #fff; }
.share-vk  { background: #0077ff; color: #fff; }

/* Report mod page */
.report-hero-icon { background: #ef4444 !important; box-shadow: 0 4px 16px rgba(239,68,68,0.35) !important; }
.report-mod-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 20px;
}
.report-mod-thumb {
  width: 80px; height: 50px; object-fit: cover; border-radius: 8px; flex-shrink: 0;
}
.report-mod-thumb-empty {
  width: 80px; height: 50px; background: #f3f4f6; border-radius: 8px; flex-shrink: 0;
}
.report-mod-info { flex: 1; min-width: 0; }
.report-mod-game { font-size: 11px; color: #9ca3af; margin-bottom: 3px; }
.report-mod-title a { font-size: 14px; font-weight: 600; color: #111827; text-decoration: none; }
.report-mod-title a:hover { color: var(--accent); }
.report-reasons { display: flex; flex-direction: column; gap: 6px; }
.report-reason-opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 8px; cursor: pointer; font-size: 13px; color: #374151;
  transition: border-color 0.15s, background 0.15s;
}
.report-reason-opt:hover { border-color: #ef4444; background: #fef2f2; }
.report-reason-opt input[type="radio"] { accent-color: #ef4444; width: 16px; height: 16px; flex-shrink: 0; }
.report-reason-opt input[type="radio"]:checked + span { color: #111827; font-weight: 500; }
.btn-submit-danger {
  background: #ef4444 !important;
  box-shadow: 0 4px 14px rgba(239,68,68,0.30);
}
.btn-submit-danger:hover {
  background: #dc2626 !important;
  box-shadow: 0 8px 24px rgba(239,68,68,0.38);
}

/* Credits block (bottom of description) */
.mod-credits {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e5ed;
}
.mod-credits-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7194;
  white-space: nowrap;
  padding-top: 5px;
  flex-shrink: 0;
}
.mod-credits-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mod-credit-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 6px;
  background: #ebeef4;
  border: 1px solid #d0d5e0;
  border-radius: 20px;
  font-size: 13px;
  color: #1e2139;
  font-weight: 500;
}
.mod-credit-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Tags block (bottom of mod page) */
.detail-tags-block {
  background: #fff;
  border: 1px solid #e2e5ed;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 24px;
}
.detail-tags-block h3 {
  font-size: 13px;
  font-weight: 600;
  color: #6b7194;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dtag {
  display: inline-block;
  padding: 5px 12px;
  background: #f4f6fa;
  border: 1px solid #d0d5e0;
  border-radius: 6px;
  font-size: 12px;
  color: #5a5f7d;
  text-decoration: none;
  transition: all var(--transition);
}
.dtag:hover {
  background: #eef2ff;
  border-color: rgba(99,102,241,0.4);
  color: #6366f1;
}

/* Related mods (overlay cards) */
.related-section {
  margin-top: 28px;
}
.related-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e2139;
  margin-bottom: 14px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.related-card {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  aspect-ratio: 16 / 10;
  background: var(--bg-card);
}
.related-img {
  position: absolute;
  inset: 0;
}
.related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.related-card:hover .related-img img {
  transform: scale(1.06);
}
.related-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,12,28,0.92) 0%, rgba(10,12,28,0.35) 50%, rgba(10,12,28,0.05) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
  transition: background 0.3s;
}
.related-card:hover .related-overlay {
  background: linear-gradient(0deg, rgba(10,12,28,0.95) 0%, rgba(10,12,28,0.45) 55%, rgba(10,12,28,0.1) 100%);
}
.related-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.related-badge.tier-new { background: rgba(52,214,115,0.2); color: #34d673; }
.related-badge.tier-medium { background: rgba(251,191,36,0.2); color: #fbbf24; }
.related-badge.tier-hot { background: rgba(239,68,68,0.2); color: #ef4444; }
.related-bottom {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.related-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}

/* Category latest mods (main content) */
.cat-latest-section { margin-top: 28px; }
.cat-latest-section h3 {
  font-size: 16px; font-weight: 600; color: #1e2139; margin-bottom: 14px;
}
.cat-latest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Sidebar related mods (compact list) */
.sidebar-related {
  background: #fff;
  border: 1px solid #e2e5ed;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}
.sidebar-related-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e2139;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.sidebar-rel-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid #eef0f5;
  transition: opacity var(--transition);
}
.sidebar-rel-item:last-child { border-bottom: none; }
.sidebar-rel-item:hover { opacity: 0.8; }
.sidebar-rel-thumb {
  width: 56px;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #ebeef4;
}
.sidebar-rel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sidebar-rel-info { flex: 1; min-width: 0; }
.sidebar-rel-name {
  font-size: 12px;
  font-weight: 600;
  color: #1e2139;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-rel-meta {
  font-size: 10px;
  color: #8b90a8;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-latest-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .related-grid { grid-template-columns: 1fr; }
  .cat-latest-grid { grid-template-columns: repeat(2, 1fr); }
  .top-mods-detail-list { grid-template-columns: 1fr; }
}

.detail-stats-row {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dstat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dstat-label {
  font-size: 12px;
  color: #6b7194;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.dstat-value {
  font-size: 17px;
  font-weight: 600;
  color: #1e2139;
}

.btn-download {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(129,140,248,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-download:hover { background: linear-gradient(135deg, var(--accent-hover), var(--accent)); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(129,140,248,0.35), inset 0 1px 0 rgba(255,255,255,0.2); }

.download-external {
  font-size: 12px;
  color: #6b7194;
  margin-top: 8px;
  letter-spacing: 0.3px;
}

.top-mods-detail {
  margin-top: 28px;
  margin-bottom: 16px;
}

.top-mods-detail-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.top-mods-detail .top-mod {
  min-width: 0;
}

.top-mods-detail .top-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Download block */
.download-block {
  background: #eef2ff;
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 16px;
}

.download-block-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.download-block-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1e2139;
  margin-bottom: 4px;
}

.download-block-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #5a5f7d;
}

.btn-download-main {
  font-size: 17px;
  padding: 16px 44px;
  flex-shrink: 0;
}

.download-block .download-external {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(99,102,241,0.15);
}

.mod-age-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  line-height: 1.5;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #6b7280;
}

.mod-age-warning svg {
  flex-shrink: 0;
  align-self: center;
  color: #9ca3af;
}

.mod-age-warning strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.mod-age-warning p {
  font-size: 12px;
  margin: 0;
}

.detail-img-video { cursor: pointer; }

.gallery-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 0.2s;
}
.detail-img:hover .gallery-play-btn { opacity: 0.85; }

.gallery-thumb-wrap {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.gallery-thumb-wrap.active .gallery-thumb { border-color: var(--accent); }

.thumb-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.detail-video {
  margin-bottom: 16px;
}
.detail-video-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.detail-video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.detail-body {
  background: #fff;
  border: 1px solid #e2e5ed;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 16px;
}

.detail-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1e2139;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e5ed;
}

.detail-body p {
  font-size: 15px;
  line-height: 1.75;
  color: #3a3f5c;
}

.desc-content {
  font-size: 15px;
  line-height: 1.75;
  color: #3a3f5c;
}

.desc-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}

.desc-wrap.desc-collapsed {
  max-height: 200px;
  overflow: hidden;
  position: relative;
}

.desc-wrap.desc-collapsed::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70px;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
}

.desc-toggle {
  background: none;
  border: none;
  color: #6366f1;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  transition: opacity var(--transition);
}

.desc-toggle:hover { opacity: 0.8; }

.changelog-entry {
  padding: 12px 0;
  border-bottom: 1px solid #e2e5ed;
}

.changelog-entry:last-child { border-bottom: none; }

.changelog-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13.5px;
  color: #1e2139;
}

.changelog-date {
  font-size: 11px;
  color: #8b90a8;
}

.changelog-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: #3a3f5c;
}

.changelog-hidden { display: none; }

.versions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.versions-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 0;
  border-bottom: 2px solid var(--border);
}

.versions-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.versions-table td:last-child a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.versions-table td:last-child a:hover { text-decoration: underline; }

/* --- 404 PAGE --- */

.not-found {
  text-align: center;
  padding: 80px 24px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.not-found-code {
  font-size: clamp(88px, 16vw, 144px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -4px;
  color: var(--accent);
  opacity: 0.18;
  margin-bottom: -16px;
  user-select: none;
}

.not-found h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1e2139;
}

.not-found p {
  color: #6b7280;
  margin-bottom: 32px;
  font-size: 15px;
  max-width: 360px;
}

.not-found-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.not-found-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.not-found-btn-primary:hover { background: var(--accent-hover); }

.not-found-btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.10);
  color: #374151;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}
.not-found-btn-secondary:hover { background: rgba(255,255,255,0.95); color: #1e2139; }

/* --- SEARCH PAGE --- */

.search-page-form { margin-bottom: 24px; }

.search-page-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(22,23,40,0.92);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius);
  padding: 10px 16px;
  transition: var(--transition);
}

.search-page-input:focus-within { border-color: var(--accent); }

.search-page-input svg { color: var(--text-dim); flex-shrink: 0; }

.search-page-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-bright);
  font-size: 15px;
  font-family: var(--font);
}

.search-page-input input::placeholder { color: var(--text-dim); }

.search-page-input button {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
}

.search-page-input button:hover { background: var(--accent-hover); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-size: 15px;
}

/* --- FOOTER --- */

footer {
  background: rgba(26,27,46,0.95);
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 48px;
  position: relative;
}

/* Glow line above footer */
footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
  opacity: 0.25;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: var(--transition);
}

.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-note { opacity: 0.6; }

/* --- SUBMIT MOD PAGE --- */

.submit-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 40px;
}

/* Hero */
.submit-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 32px 24px 28px;
  max-width: 720px;
  margin: 0 auto;
}

.submit-hero-icon {
  width: 52px;
  height: 52px;
  background: var(--accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(129,140,248,0.35);
}

.submit-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}

.submit-hero-sub {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.submit-container {
  max-width: 720px;
  margin: 0 auto;
}

/* Section */
.submit-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.submit-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.submit-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.submit-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
}

.submit-section-desc {
  font-size: 13px;
  color: #6b7280;
}

.submit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.submit-field {
  margin-bottom: 14px;
}

.submit-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

.submit-field label .required {
  color: #ef4444;
}

.submit-field input[type="text"],
.submit-field input[type="email"],
.submit-field input[type="url"],
.submit-field select,
.submit-field textarea {
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 9px;
  color: #111827;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-sizing: border-box;
}

.submit-field input:focus,
.submit-field select:focus,
.submit-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(129,140,248,0.15);
}

.submit-field textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.55;
}

.submit-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.submit-input-wrap {
  position: relative;
}

.submit-input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.submit-input-wrap input {
  padding-left: 38px !important;
}

.submit-field-hint {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 5px;
}
.submit-field-hint-inline {
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
}

/* Dropzone */
.submit-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 32px 24px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.submit-dropzone:hover,
.submit-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(129,140,248,0.04);
}

.submit-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
}

.submit-dropzone-text {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.submit-dropzone-hint {
  font-size: 12px;
  color: #9ca3af;
}

.submit-thumb-preview {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
}

.submit-thumb-preview img {
  width: 100px;
  height: 60px;
  object-fit: cover;
  border-radius: 7px;
}

.submit-thumb-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: #374151;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Quill editor */
#editor-container {
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 0 0 9px 9px;
  min-height: 180px;
  font-size: 14px;
  font-family: var(--font);
  line-height: 1.6;
  resize: vertical;
  overflow: auto;
}
#editor-container .ql-editor {
  min-height: 180px;
  padding: 12px 14px;
  color: #1e2139;
}
#editor-container .ql-editor.ql-blank::before {
  font-style: normal;
  color: #9ca3af;
}
.submit-field .ql-toolbar.ql-snow {
  border: 1.5px solid #d1d5db;
  border-bottom: none;
  border-radius: 9px 9px 0 0;
  background: #f9fafb;
}
.submit-field .ql-container.ql-snow {
  border: none;
}

/* Multi-image upload */
.submit-images-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.submit-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.submit-img-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
  aspect-ratio: 16/9;
  background: #f3f4f6;
}
.submit-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.submit-img-card.is-main {
  border-color: var(--accent);
}
.submit-img-card .img-main-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: none;
}
.submit-img-card.is-main .img-main-badge {
  display: block;
}
.submit-img-card .img-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.submit-img-card:hover .img-remove {
  opacity: 1;
}
.submit-images-hint {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
}
.submit-add-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f3f4f6;
  border: 1.5px dashed #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  font-family: var(--font);
  width: fit-content;
}
.submit-add-more:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Turnstile */
.submit-turnstile {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

/* Actions */
.submit-actions {
  text-align: center;
  padding: 10px 0 20px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 40px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(129,140,248,0.30);
}

.btn-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(129,140,248,0.38);
}

.submit-note {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 12px;
}

/* Success */
.submit-success {
  text-align: center;
  padding: 56px 32px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.submit-success-icon {
  color: #22c55e;
  margin-bottom: 18px;
}

.submit-success h2 {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}

.submit-success p {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.btn-submit-back {
  display: inline-block;
  padding: 10px 26px;
  background: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  border-radius: 9px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.18s;
}

.btn-submit-back:hover {
  background: #e5e7eb;
  border-color: var(--accent);
  color: var(--accent);
}

/* Errors */
.submit-errors {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
  color: #dc2626;
}

.submit-errors-icon { flex-shrink: 0; margin-top: 1px; }

.submit-error-item {
  font-size: 13px;
  padding: 2px 0;
}

@media (max-width: 600px) {
  .submit-row { grid-template-columns: 1fr; }
  .submit-section { padding: 18px; }
  .submit-hero { padding: 24px 0 20px; }
  .submit-hero-title { font-size: 22px; }
}

/* ================================================
   6. Admin
   ================================================ */

.admin-body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-login {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.admin-login-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
  text-align: center;
  margin-bottom: 4px;
}

.admin-login-sub {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 28px;
}

.admin-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.admin-alert-error {
  background: rgba(239,68,68,0.12);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.25);
}

.admin-alert-success {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.25);
}

.admin-field { margin-bottom: 16px; }

.admin-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-bright);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-field textarea { min-height: 140px; resize: vertical; }

.admin-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-btn:hover { background: var(--accent-hover); }

.admin-btn-sm { width: auto; padding: 7px 16px; font-size: 12px; }

.admin-btn-danger { background: var(--red); color: #fff; }
.admin-btn-danger:hover { background: #dc2626; }

.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.admin-gallery-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-surface);
}

.admin-gallery-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.admin-gallery-item-actions {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-gallery-item-actions input[type="number"] {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-bright);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
}

.admin-btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.admin-btn-ghost:hover { color: var(--text-bright); border-color: var(--border-hover); background: rgba(255,255,255,0.04); }

.admin-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.admin-header h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-bright);
}

.admin-header-actions { display: flex; gap: 8px; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.admin-stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.admin-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-bright);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.admin-table td a { color: var(--accent); text-decoration: none; font-weight: 500; }
.admin-table td a:hover { text-decoration: underline; }

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 16px;
}

.admin-card h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.admin-form-actions { display: flex; gap: 10px; margin-top: 24px; }

/* ================================================
   7. Responsive (breakpoints: 1100 / 900 / 600 / 400)
   ================================================ */

@media (max-width: 1100px) {
  .page {
    grid-template-columns: 190px 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr 260px;
    gap: 20px;
  }

  .detail-hero {
    padding: 24px;
  }
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
  }

  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    position: static;
  }

  .game-link {
    padding: 8px 12px;
    font-size: 12.5px;
  }

  .nav-count { display: none; }

  .sidebar { display: none; }

  .mod-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .mod-grid-home {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-hero {
    padding: 20px;
  }

  .detail-img { max-width: 100%; }

  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }

  .top-mods-detail-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .hero-card { padding: 32px 24px; }
  .hero-stats { gap: 20px; }
  .hero-deco { width: 180px; height: 140px; right: 10px; opacity: 0.5; }
}

@media (max-width: 600px) {
  .mod-grid, .mod-grid-home {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .header-top {
    gap: 12px;
    padding: 0 16px;
  }

  .game-nav-inner { display: none; }

  .search-wrap input { width: 160px; }
  .search-wrap input:focus { width: 200px; }

  .btn-upload span { display: none; }
  .lang-btn span:not(.lang-flag) { display: none; }
  .lang-btn { padding: 6px 8px; }
  .lang-dropdown { min-width: 130px; }

  .page, .page-full, .detail-page { padding: 16px; }
  .detail-frame { padding: 16px; border-radius: var(--radius-sm); }

  .detail-hero {
    padding: 16px;
    border-radius: var(--radius-sm);
  }

  .detail-stats-row { gap: 16px; }
  .detail-body { padding: 20px; border-radius: var(--radius-sm); }
  .detail-title { font-size: 20px; }

  .detail-info-bar {
    flex-direction: column;
    gap: 16px;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }

  .download-block { padding: 20px; }
  .download-block-inner { flex-direction: column; align-items: stretch; }
  .btn-download-main { text-align: center; justify-content: center; }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .hero-title { font-size: 20px; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .hero-stat-value { font-size: 18px; }
  .hero-deco { display: none; }
  .header-tagline { display: none; }
  .flying-tagline { display: none; }

  .mh-header { flex-direction: column; gap: 8px; }
  .mh-weeks { flex-wrap: wrap; }
  .mh-slide { grid-template-columns: repeat(3, 1fr); }
  .mh-slides { min-height: 140px; }
}

@media (max-width: 400px) {
  .mod-grid, .mod-grid-home {
    grid-template-columns: 1fr;
  }

  .search-wrap input, .search-wrap input:focus {
    width: 120px;
  }

  .detail-title { font-size: 18px; }
  .category-grid { grid-template-columns: 1fr; }

  .mh-slide { grid-template-columns: 1fr; }
  .mh-card { aspect-ratio: 16 / 8; }
  .mh-slides { min-height: auto; }
}

/* ================================================
   8. Uploader Area
   ================================================ */

.uploader-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  background: #f4f6fa;
  border-radius: var(--radius);
  margin-top: 20px;
  margin-bottom: 20px;
  color: #3a3f5c;
}

.uploader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.uploader-header h1 {
  font-size: 22px;
  color: #1e2139;
  font-weight: 600;
}
.uploader-header-sub {
  font-size: 13px;
  color: #6b7194;
  margin-top: 2px;
}
.uploader-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Buttons */
.uploader-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #d0d5e0;
  background: #fff;
  color: #3a3f5c;
  transition: var(--transition);
}
.uploader-btn:hover {
  background: #ebeef4;
  color: #1e2139;
}
.uploader-btn svg { flex-shrink: 0; }
.uploader-btn-primary {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}
.uploader-btn-primary:hover {
  background: #4f46e5;
  color: #fff;
}
.uploader-btn-ghost {
  background: transparent;
  border-color: #c5cad8;
  color: #6b7194;
}
.uploader-btn-ghost:hover {
  background: #ebeef4;
  color: #1e2139;
}
.uploader-btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
.uploader-btn-full {
  width: 100%;
  justify-content: center;
}
.uploader-btn-danger {
  color: #dc2626;
  border-color: rgba(220,38,38,0.3);
}
.uploader-btn-danger:hover {
  background: rgba(220,38,38,0.08);
}

/* Alerts */
.uploader-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}
.uploader-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}

/* Stats row */
.uploader-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.uploader-stat {
  flex: 1;
  min-width: 120px;
  background: #fff;
  border: 1px solid #e2e5ed;
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.uploader-stat-val {
  font-size: 24px;
  font-weight: 700;
  color: #1e2139;
}
.uploader-stat-label {
  font-size: 12px;
  color: #6b7194;
  margin-top: 4px;
}

/* Table */
.uploader-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e2e5ed;
  border-radius: var(--radius-sm);
}
.uploader-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.uploader-table th {
  text-align: left;
  padding: 10px 12px;
  color: #6b7194;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #e2e5ed;
  white-space: nowrap;
  background: #f8f9fc;
}
.uploader-table td {
  padding: 10px 12px;
  color: #3a3f5c;
  border-bottom: 1px solid #eef0f5;
  white-space: nowrap;
}
.uploader-table tr:last-child td { border-bottom: none; }
.uploader-table tr:hover td { background: #f8f9fc; }
.uploader-table a { color: #6366f1; text-decoration: none; }
.uploader-table a:hover { text-decoration: underline; }

.uploader-td-mod {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: normal;
  max-width: 300px;
}
.uploader-td-thumb {
  width: 48px;
  height: 27px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.uploader-td-date {
  color: #6b7194;
  font-size: 12px;
}

.uploader-status-active {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #ecfdf5;
  color: #059669;
}
.uploader-status-inactive {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #fef2f2;
  color: #dc2626;
}

/* Empty state */
.uploader-empty {
  text-align: center;
  padding: 48px 16px;
  color: #6b7194;
  font-size: 14px;
}
.uploader-empty .uploader-btn {
  margin-top: 16px;
}

/* Form layout */
.uploader-form-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 800px) {
  .uploader-form-grid { grid-template-columns: 1fr; }
}
.uploader-form-main { min-width: 0; }
.uploader-form-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cards */
.uploader-card {
  background: #fff;
  border: 1px solid #e2e5ed;
  border-radius: var(--radius-sm);
  padding: 20px;
}
.uploader-card h2 {
  font-size: 14px;
  font-weight: 600;
  color: #1e2139;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e5ed;
}

/* Fields */
.uploader-field {
  margin-bottom: 14px;
}
.uploader-field:last-child { margin-bottom: 0; }
.uploader-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #5a5f7d;
  margin-bottom: 6px;
}
.uploader-field .req { color: #dc2626; }
.uploader-field input[type="text"],
.uploader-field input[type="url"],
.uploader-field input[type="email"],
.uploader-field input[type="password"],
.uploader-field input[type="number"],
.uploader-field select,
.uploader-field textarea {
  width: 100%;
  padding: 8px 12px;
  background: #f8f9fc;
  border: 1px solid #d0d5e0;
  border-radius: 8px;
  color: #1e2139;
  font-size: 13px;
  font-family: var(--font);
  transition: var(--transition);
}
.uploader-field input:focus,
.uploader-field select:focus,
.uploader-field textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.uploader-field small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #8b90a8;
}
.uploader-field input[type="file"] {
  font-size: 12px;
  color: #5a5f7d;
}

.uploader-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .uploader-field-row { grid-template-columns: 1fr; }
}

.uploader-publish-note {
  font-size: 11px;
  color: #8b90a8;
  text-align: center;
  margin-top: 8px;
}

/* Edit page specific */
.uploader-thumb-preview {
  margin-bottom: 12px;
}
.uploader-thumb-preview img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.uploader-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 600px) {
  .uploader-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
.uploader-gallery-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.uploader-gallery-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: #5a5f7d;
}
.uploader-gallery-item-actions input {
  background: #f8f9fc;
  border: 1px solid #d0d5e0;
  border-radius: 4px;
  color: #1e2139;
  padding: 2px 6px;
  font-size: 11px;
  font-family: var(--font);
}

.uploader-info-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 12px;
}
.uploader-info-row span:first-child { color: #6b7194; }
.uploader-info-row span:last-child { color: #1e2139; font-weight: 500; }

.uploader-ver-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.uploader-ver-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
  font-size: 12px;
  color: #3a3f5c;
  border-radius: 4px;
}
.uploader-ver-current {
  background: #eef2ff;
  color: #6366f1;
  font-weight: 500;
}
.uploader-ver-date { color: #8b90a8; }

/* Login page */
.uploader-login-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 40px 16px;
}
.uploader-login-card {
  background: #fff;
  border: 1px solid #e2e5ed;
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.uploader-login-icon {
  color: #6366f1;
  margin-bottom: 16px;
}
.uploader-login-card h1 {
  font-size: 20px;
  color: #1e2139;
  font-weight: 600;
  margin-bottom: 4px;
}
.uploader-login-sub {
  font-size: 13px;
  color: #6b7194;
  margin-bottom: 24px;
}
.uploader-login-card .uploader-field {
  text-align: left;
}
.uploader-login-card .uploader-alert-error {
  text-align: left;
  margin-bottom: 16px;
}
.uploader-submit {
  width: 100%;
  padding: 10px 16px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}
.uploader-submit:hover {
  background: #4f46e5;
}

/* Submit page uploader link */
.submit-uploader-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}
.submit-uploader-link:hover {
  background: var(--glass-strong);
  color: var(--accent-hover);
}

/* Uploader edit page — two-column layout */
.uploader-edit-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: start;
}
.uploader-edit-main { min-width: 0; }
.uploader-edit-side {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: 20px;
}
.uploader-edit-info {
  padding: 16px 20px;
}
.uploader-edit-info-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7194;
  margin-bottom: 10px;
}

/* Success inline banner */
.submit-success-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
}

/* File input styled label */
.submit-file-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.submit-file-label:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* Checkbox label */
.submit-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}
.submit-checkbox-label input { cursor: pointer; }

/* Status badges */
.badge-active {
  display: inline-block;
  padding: 2px 8px;
  background: #dcfce7;
  color: #166534;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-inactive {
  display: inline-block;
  padding: 2px 8px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* Current thumbnail preview in edit form */
.uploader-edit-thumb {
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  max-width: 320px;
}
.uploader-edit-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* Screenshot gallery in edit form */
.uploader-edit-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 6px;
}
.uploader-edit-ss {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #f9fafb;
}
.uploader-edit-ss img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.uploader-edit-ss-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  gap: 6px;
}
.uploader-edit-ss-order {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #6b7280;
}
.uploader-edit-ss-order input {
  width: 36px;
  padding: 2px 4px;
  font-size: 11px;
  font-family: var(--font);
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #374151;
  text-align: center;
}
.uploader-edit-ss-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  color: #ef4444;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.uploader-edit-ss-remove:hover { background: #fee2e2; }

@media (max-width: 860px) {
  .uploader-edit-layout {
    grid-template-columns: 1fr;
  }
  .uploader-edit-side {
    position: static;
    order: -1;
  }
}

/* ============================================================
   8. NEWS & ARTICLES
   ============================================================ */

/* News list page */
.news-page { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
.news-layout { display: grid; grid-template-columns: 1fr 280px; gap: 32px; align-items: start; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 16px; }

.news-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow 0.18s, transform 0.18s; }
.news-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.28); transform: translateY(-2px); }
.news-card-img-wrap { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-surface); }
.news-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.news-card:hover .news-card-img-wrap img { transform: scale(1.04); }
.news-card-img-placeholder { background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 100%); }
.news-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.news-card-tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--accent-glow); color: var(--accent); width: fit-content; }
.news-card-title { font-size: 15px; font-weight: 700; color: var(--text-bright); line-height: 1.4; flex: 1; }
.news-card-excerpt { font-size: 13px; color: var(--text-dim); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-meta { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; }
.news-meta-sep { opacity: 0.4; }
.news-empty { padding: 60px 20px; text-align: center; color: var(--text-dim); font-size: 14px; }

/* News sidebar */
.news-sidebar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.news-sidebar-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.news-sidebar-list li:last-child { border-bottom: none; }
.news-sidebar-list li.current-article a { color: var(--accent); }
.news-sidebar-list a { font-size: 13px; font-weight: 600; color: var(--text-bright); text-decoration: none; display: block; line-height: 1.4; margin-bottom: 3px; }
.news-sidebar-list a:hover { color: var(--accent); }
.news-sidebar-date { font-size: 11px; color: var(--text-dim); }
.news-sidebar-all { display: block; text-align: center; padding: 10px; font-size: 12px; color: var(--accent); font-weight: 600; text-decoration: none; margin-top: 8px; }
.news-sidebar-all:hover { text-decoration: underline; }

/* Sidebar box (shared) */
.sidebar-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.sidebar-box-title { font-size: 12px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }

/* Single article page */
.article-page { max-width: 1060px; margin: 0 auto; padding: 24px 16px; }

.article-main { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 48px 56px; min-width: 0; margin-top: 16px; }
.article-hero-img { border-radius: 10px; overflow: hidden; margin-bottom: 28px; aspect-ratio: 16/9; }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }

.article-header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article-meta-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.article-game-tag { display: inline-block; padding: 3px 12px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--accent-glow); color: var(--accent); text-decoration: none; }
.article-game-tag:hover { opacity: 0.8; }
.article-date, .article-author { font-size: 13px; color: var(--text-dim); }
.article-title { font-size: 28px; font-weight: 800; color: var(--text-bright); line-height: 1.3; margin-bottom: 12px; }
.article-excerpt { font-size: 16px; color: var(--text-dim); line-height: 1.6; border-left: 3px solid var(--accent); padding-left: 14px; }

/* Article body (Quill output) */
.article-body { font-size: 15px; line-height: 1.75; color: var(--text); }
.article-body h2 { font-size: 22px; font-weight: 700; color: var(--text-bright); margin: 32px 0 12px; }
.article-body h3 { font-size: 18px; font-weight: 700; color: var(--text-bright); margin: 24px 0 10px; }
.article-body p { margin: 0 0 16px; }
.article-body ul, .article-body ol { padding-left: 24px; margin: 0 0 16px; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body a:hover { opacity: 0.8; }
.article-body blockquote { border-left: 4px solid var(--accent); margin: 20px 0; padding: 12px 18px; background: var(--bg-surface); border-radius: 0 8px 8px 0; color: var(--text-dim); font-style: italic; }
.article-body pre { background: rgba(0,0,0,0.35); color: #e2e8f0; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 13px; line-height: 1.6; margin: 0 0 16px; }
.article-body code { background: var(--bg-surface); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.article-body pre code { background: none; padding: 0; }
.article-body img { max-width: 100%; border-radius: 10px; margin: 8px 0; }
.article-body strong { color: var(--text-bright); }

/* Prev/Next nav */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-nav-item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; transition: border-color 0.15s; }
.article-nav-item:hover { border-color: var(--accent); }
.article-nav-label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.article-nav-title { font-size: 13px; font-weight: 600; color: var(--text-bright); line-height: 1.4; }
.article-nav-next { text-align: right; }

/* More articles (bottom) */
.article-more { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.article-more-title { font-size: 13px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.article-more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.article-more-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; transition: border-color 0.15s; }
.article-more-card:hover { border-color: var(--accent); }
.article-more-card-title { font-size: 13px; font-weight: 600; color: var(--text-bright); line-height: 1.4; }
.article-more-card-date { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.article-more-all { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--accent); font-weight: 600; text-decoration: none; }
.article-more-all:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
  .news-layout { grid-template-columns: 1fr; }
  .news-sidebar { display: none; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .article-title { font-size: 22px; }
  .article-main { padding: 24px; }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .article-more-grid { grid-template-columns: 1fr; }
}
