/* ================================================================
   compu-pc.es — Main Stylesheet
   Dark Gaming Theme | CSS Grid + Flexbox | Mobile-first
   ================================================================ */

/* ================================================================
   1. CSS CUSTOM PROPERTIES
   ================================================================ */
:root {
  /* Brand colors */
  --clr-primary:     #c8001e;
  --clr-primary-dk:  #8c0015;
  --clr-primary-lt:  #ff3a5c;
  --clr-primary-glow: rgba(200, 0, 30, 0.20);

  /* Status badges */
  --clr-new:     #00c853;
  --clr-update:  #ff9800;
  --clr-top:     #ffd700;

  /* Backgrounds */
  --bg-body:     #0b0b0f;
  --bg-card:     #14141c;
  --bg-elevated: #1c1c28;
  --bg-overlay:  rgba(0, 0, 0, 0.75);

  /* Text */
  --txt-primary: #e2e2e8;
  --txt-muted:   #7a7a8c;
  --txt-faint:   #4a4a5c;
  --txt-link:    #42a5f5;
  --txt-link-hover: #fff;

  /* Borders */
  --border:      rgba(255, 255, 255, 0.07);
  --border-md:   rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.20);

  /* Navigation */
  --nav-h:       43px;        /* topbar height */
  --nav-bg:      linear-gradient(180deg, #8c0015 0%, #4b0000 100%);
  --nav-txt:     #e8e8e8;
  --nav-hover-bg: #f4f4f4;

  /* Layout */
  --max-w:       1280px;
  --sidebar-w:   300px;
  --gap:         24px;

  /* Radius */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;

  /* Shadows */
  --shadow-sm:   0 2px 8px  rgba(0,0,0,0.4);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 20px var(--clr-primary-glow);

  /* Transitions */
  --tr-fast: 0.15s ease;
  --tr-mid:  0.25s ease;
  --tr-slow: 0.4s  ease;

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-icon: 'GameIcon';
}

/* ================================================================
   2. RESET & BASE
   ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-body);
  background-image: url('/assets/img/bg-texture.jpg');
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: top center;
  color: var(--txt-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--clr-primary);
  text-decoration: none;
  transition: color var(--tr-fast);
}
a:hover { color: var(--clr-primary-lt); text-decoration: none; }

img { max-width: 100%; height: auto; }

ul, ol { list-style: none; }

button {
  cursor: pointer;
  font-family: inherit;
  background: none;
  border: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ================================================================
   3. ICON FONT
   ================================================================ */
@font-face {
  font-family: 'GameIcon';
  src: url('/assets/fonts/GameIcon.woff2') format('woff2'),
       url('/assets/fonts/GameIcon.woff')  format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: fallback;
}

[class^="icon-"],
[class*=" icon-"] {
  font-family: var(--font-icon) !important;
  speak: never;
  font-style: normal;
  font-weight: 400;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Icon Unicode mappings — replace with your IcoMoon values */
.icon-home::before        { content: '\e900'; }
.icon-gamepad::before     { content: '\e91d'; }
.icon-windows::before     { content: '\eac1'; }
.icon-spinner::before     { content: '\e97a'; }
.icon-upload::before      { content: '\e91a'; }
.icon-chat::before        { content: '\e924'; }
.icon-notice::before      { content: '\e913'; }
.icon-magnifier::before   { content: '\e922'; }
.icon-cloud::before       { content: '\e919'; }
.icon-circle-up::before   { content: '\ea41'; }
.icon-key::before         { content: '\e921'; }
.icon-folder::before      { content: '\e91c'; }
.icon-whatsapp::before    { content: '\ea93'; }
.icon-telegram::before    { content: '\e907'; }
.icon-menu::before        { content: '\e9bd'; }
.icon-checkmark::before   { content: '\e910'; }
.icon-point-up::before    { content: '\ea03'; }
.icon-point-down::before  { content: '\ea05'; }
.icon-edit::before        { content: '\e962'; }
.icon-trash::before       { content: '\e9ad'; }
.icon-eye::before         { content: '\e918'; }
.icon-bin::before         { content: '\e9ad'; }

/* ================================================================
   4. LAYOUT CONTAINERS
   ================================================================ */
#outer-wrapper {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding-top: var(--nav-h); /* push below sticky #barra */
}

/* Content wrap: two-column on inner pages, full-width on homepage */
#content-wrap {
  width: 100%;
  background: rgba(255,255,255,0.015);
  border-radius: var(--r-md);
  margin-top: 6px;
}

/* ================================================================
   5. STICKY TOPBAR (#barra)
   ================================================================ */
#barra {
  background: var(--nav-bg);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  transition: transform var(--tr-mid);
}

#barra.hide { transform: translateY(-100%); }

.barra-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

#barra-logo {
  flex-shrink: 0;
}
#barra-logo img {
  height: 32px;
  width: auto;
  display: block;
}

#barra-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

#barra-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.barra-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-txt);
  font-size: 24px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: color var(--tr-fast), background var(--tr-fast);
}
.barra-icon:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ================================================================
   6. SEARCH BAR (topbar + live search)
   ================================================================ */
.search-wrap {
  position: relative;
  display: flex;
}

.search-input {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  color: #fff;
  font-size: 14px;
  padding: 6px 12px;
  outline: none;
  width: 100%;
  transition: background var(--tr-fast), border-color var(--tr-fast);
}
.search-input::placeholder { color: rgba(255,255,255,0.5); }
.search-input:focus {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
}

.search-btn {
  background: var(--nav-bg);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--nav-txt);
  padding: 6px 12px;
  font-size: 18px;
  transition: background var(--tr-fast);
}
.search-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Live search dropdown */
.live-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  z-index: 500;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.lsd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--tr-fast);
}
.lsd-item:hover { background: var(--bg-card); }
.lsd-item:last-child { border-bottom: none; }

.lsd-img {
  width: 40px;
  height: 54px;
  object-fit: cover;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.lsd-text { flex: 1; min-width: 0; }
.lsd-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lsd-type {
  font-size: 10px;
  color: var(--txt-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lsd-empty, .lsd-loading {
  padding: 16px;
  text-align: center;
  color: var(--txt-muted);
  font-size: 13px;
}

/* ================================================================
   7. MOBILE TOPNAV
   ================================================================ */
.topnav {
  background: var(--nav-bg);
  display: none;  /* shown by CSS media query below */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--nav-h);
  overflow: hidden;
  transition: height var(--tr-mid);
}

.topnav.open {
  height: auto;
  overflow: visible;
}

.topnav-link {
  float: left;
  display: block;
  color: var(--nav-txt);
  padding: 8px 14px;
  font-size: 16px;
  transition: background var(--tr-fast);
}
.topnav-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.topnav-toggle {
  float: right;
  padding: 8px 14px;
  font-size: 22px;
  color: var(--nav-txt);
  transition: background var(--tr-fast);
}
.topnav-toggle:hover { background: rgba(255,255,255,0.1); }

.topnav-search {
  display: none;
  padding: 8px 12px;
  clear: both;
}
.topnav.open .topnav-search { display: block; }
.topnav.open .topnav-link { float: none; }

.topnav-search-input {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-sm);
  color: #fff;
  padding: 8px 12px;
  width: 100%;
  font-size: 15px;
}
.topnav-search-input::placeholder { color: rgba(255,255,255,0.5); }

/* ================================================================
   8. HEADER BANNER
   ================================================================ */
#site-header {
  margin-top: 4px;
  cursor: pointer;
}
#site-header img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  display: block;
}

/* ================================================================
   9. DESKTOP MEGA NAV (#main-nav / #menu)
   ================================================================ */
#main-nav {
  margin: 8px auto 0;
  max-width: var(--max-w);
}

#menu {
  display: flex;
  align-items: center;
  list-style: none;
  background: var(--nav-bg);
  border: 1px solid rgba(107,0,0,0.6);
  border-radius: var(--r-lg);
  padding: 0 12px;
  height: 45px;
  position: relative;
  box-shadow: inset 0 0 1px rgba(237,249,255,0.1), var(--shadow-sm);
}

#menu > li {
  position: relative;
  display: flex;
  align-items: center;
}

#menu > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--nav-txt);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  border: 1px solid transparent;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.6);
  white-space: nowrap;
  transition: color var(--tr-fast), background var(--tr-fast);
  height: 45px;
}

#menu > li:hover > a {
  color: #161616;
  text-shadow: 1px 1px 1px rgba(255,255,255,0.3);
  background: linear-gradient(180deg, #f4f4f4, #eee);
  border-color: #777;
  border-bottom-color: transparent;
}

.icon.icon-home {
  font-size: 22px;
  vertical-align: middle;
}

.nav-arrow {
  font-size: 9px;
  opacity: 0.7;
  margin-left: 2px;
}

/* Mega dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -1px;
  background: linear-gradient(180deg, #eeeeee, #bbbbbb);
  border: 1px solid #777;
  border-top: none;
  border-radius: 0 var(--r-sm) var(--r-sm);
  padding: 12px 8px;
  z-index: 300;
  min-width: 300px;
  box-shadow: var(--shadow-md);
}

.dropdown-2col {
  display: none;
  width: 300px;
}

#menu > li:hover .dropdown,
#menu > li:hover .dropdown-2col {
  display: flex;
  gap: 8px;
}

.dd-col {
  flex: 1;
  min-width: 0;
}

.dd-heading {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  padding: 2px 4px 6px;
  border-bottom: 1px solid #aaa;
  margin-bottom: 4px;
}

.dd-col ul { list-style: none; }

.dd-col ul li a {
  display: block;
  font-size: 12px;
  color: #333;
  padding: 3px 6px;
  border-radius: var(--r-sm);
  text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
  transition: color var(--tr-fast), background var(--tr-fast);
}
.dd-col ul li a:hover {
  color: var(--clr-primary);
  background: rgba(255,255,255,0.5);
}

/* ================================================================
   10. SITE CONTENT AREA
   ================================================================ */
.content-inner {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--gap);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 0 24px;
}

.content-main {
  min-width: 0; /* prevent overflow */
  background: #fff;
  border-radius: var(--r-md);
  padding: 16px 20px;
  color: #222;
}

/* ================================================================
   11. HOMEPAGE SECTIONS
   ================================================================ */

/* Top section: image rotator */
#topside {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
}

#updates2 {
  background: #e3e3e3;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 10px 14px 12px;
  margin: 14px 0 8px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  border: 1px solid #222;
  border-radius: var(--r-sm);
  text-align: center;
  padding: 3px 10px;
  margin: 0 auto 12px;
  width: fit-content;
}
.section-title .icon {
  font-size: 22px;
  color: var(--clr-primary);
  vertical-align: middle;
  margin-right: 4px;
}

.home-rotator {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  position: relative;
}

#rotator-list {
  list-style: none;
}

.rotator-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 6px;
  border-radius: var(--r-sm);
  transition: background var(--tr-fast);
  cursor: pointer;
  margin-bottom: 4px;
}
.rotator-item:hover,
.rotator-item.active {
  background: rgba(200,0,30,0.06);
}

.rotator-item-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.rotator-link {
  font-size: 13px;
  color: #222;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--tr-fast);
}
.rotator-link:hover { color: var(--clr-primary); }

.rotator-status {
  font-size: 11px;
  color: #366600;
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.status-new     .status-label { color: var(--clr-new); }
.status-updated .status-label { color: var(--clr-update); }

/* Preview image (right side) */
.rotator-preview {
  width: 140px;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
}
.rotator-preview img {
  width: 100%;
  height: auto;
  border: 2px solid rgba(200,0,30,0.4);
  border-radius: var(--r-sm);
  padding: 3px;
  transition: transform var(--tr-mid), box-shadow var(--tr-mid);
}
.rotator-preview img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-glow);
}

/* Pagination bar */
.home-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 14px;
  color: #fff;
  margin: 8px 0;
  padding: 4px 0;
}

.home-pagination .pages-info,
.home-pagination .page-current {
  background: #3d3c3c;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  color: #fff;
}
.home-pagination .page-current {
  background: var(--clr-primary-dk);
}

.home-pagination .page-link,
.home-pagination .page-next {
  background: #3d3c3c;
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background var(--tr-fast);
}
.home-pagination .page-link:hover,
.home-pagination .page-next:hover {
  background: var(--clr-primary-dk);
}
.home-pagination .page-ellipsis { color: #fff; padding: 0 4px; }

/* ================================================================
   12. HOME SEARCH BAR
   ================================================================ */
.home-search-bar {
  margin: 16px auto 0;
  max-width: var(--max-w);
}

.home-search-bar form {
  display: flex;
  gap: 0;
  max-width: 700px;
  margin: 0 auto 24px;
}

.home-search-input {
  flex: 1;
  background: #f1f1f1;
  border: 1px solid #ccc;
  border-right: none;
  padding: 9px 14px;
  font-size: 16px;
  color: #222;
}

.home-search-select {
  background: #f1f1f1;
  border: 1px solid #ccc;
  border-left: none;
  border-right: none;
  padding: 9px 10px;
  font-size: 14px;
  color: #222;
  cursor: pointer;
}

.home-search-btn {
  background: var(--nav-bg);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e2edf3;
  padding: 9px 16px;
  font-size: 18px;
  transition: opacity var(--tr-fast);
}
.home-search-btn:hover { opacity: 0.85; }

/* ================================================================
   13. COMMUNITY GRID
   ================================================================ */
.community-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: var(--max-w);
  margin: 0 auto 24px;
}

.community-panel {
  background: #e3e3e3;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  border: 1px solid #222;
  border-radius: var(--r-sm);
  text-align: center;
  padding: 2px 10px;
  margin: 10px auto 8px;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 6px;
}
.panel-title a { color: #222; text-decoration: none; }
.panel-title a:hover { color: var(--clr-primary); }
.panel-title .icon {
  font-size: 20px;
  color: var(--clr-primary);
  vertical-align: middle;
}

/* Double panels (2 mini panels side by side) */
.panel-double {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.panel-double .mini-panel {
  padding: 8px;
}
.panel-double .mini-panel:first-child {
  border-right: 1px solid rgba(0,0,0,0.1);
}

/* Mini list */
.mini-list {
  list-style: none;
  padding: 6px 10px 10px;
}
.mini-list li {
  padding: 4px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
}
.mini-list li:last-child { border-bottom: none; }
.mini-list a {
  color: #333;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--tr-fast);
}
.mini-list a:hover { color: var(--clr-primary); }
.mini-list .icon {
  color: var(--clr-primary);
  font-size: 16px;
  flex-shrink: 0;
}

/* ================================================================
   14. NEWS SLIDER
   ================================================================ */
.news-slider {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.news-slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.news-slide {
  min-width: 100%;
  padding: 8px;
}
.news-slide img {
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  margin-top: 4px;
}
.news-slide h2 {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
  padding: 6px 4px 2px;
}
.news-slide h2 a { color: #111; }
.news-slide h2 a:hover { color: var(--clr-primary); }
.news-excerpt {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  padding: 2px 4px 6px;
}

.slider-controls {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  padding: 0 4px;
}
.slider-btn {
  pointer-events: all;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--tr-fast);
}
.slider-btn:hover { background: rgba(200,0,30,0.7); }

/* ================================================================
   15. COMMUNITY TABS
   ================================================================ */
.panel-tabs {
  display: flex;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 8px 8px 0;
  gap: 4px;
  flex-wrap: wrap;
}

.panel-tab {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  border: 1px solid rgba(0,0,0,0.15);
  border-bottom: none;
  color: #555;
  background: #f0f0f0;
  cursor: pointer;
  transition: background var(--tr-fast), color var(--tr-fast);
}
.panel-tab.active,
.panel-tab:hover {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary-dk);
}

.tab-content {
  padding: 8px;
  max-height: 380px;
  overflow-y: auto;
}
.tab-content[hidden] { display: none; }

.tab-comment {
  display: flex;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 12px;
}
.tab-comment:last-child { border-bottom: none; }

.tab-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
  object-fit: cover;
}

.tab-body { flex: 1; min-width: 0; }
.tab-body strong { color: #111; font-size: 13px; }
.tab-body a { color: var(--clr-primary); font-size: 11px; }
.tab-comment-text { color: #555; margin-top: 2px; line-height: 1.4; }

.tab-empty { text-align: center; color: #888; font-size: 13px; padding: 20px 10px; }

/* Karma Leaderboard */
.karma-board-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  text-align: center;
  padding: 8px 0 10px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  margin-bottom: 6px;
}

.karma-list { list-style: none; }

.karma-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 12px;
}
.karma-item:last-child { border-bottom: none; }

.karma-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.karma-user strong { display: block; color: #111; font-size: 13px; }
.karma-stats { color: #555; }
.karma-pts { color: var(--clr-primary); font-weight: 700; }

/* ================================================================
   16. POST CARDS (archive/category grid)
   ================================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 16px 0;
}

.post-card {
  background: #fff;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--tr-mid), box-shadow var(--tr-mid);
  display: flex;
  flex-direction: column;
  position: relative;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.post-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
}
.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tr-slow);
}
.post-card:hover .post-card-img img {
  transform: scale(1.06);
}

/* Hover overlay */
.post-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--tr-mid);
}
.post-card:hover .post-card-overlay { opacity: 1; }
.post-card-overlay span {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid #fff;
  padding: 6px 16px;
  border-radius: 20px;
}

.post-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-new     { background: var(--clr-new); color: #000; }
.badge-updated { background: var(--clr-update); color: #000; }
.badge-top     { background: var(--clr-top); color: #000; }

.post-card-body {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--clr-primary); }

.post-card-meta {
  font-size: 11px;
  color: #888;
  margin-top: auto;
}

/* ================================================================
   17. BREADCRUMB
   ================================================================ */
.breadcrumb {
  padding: 10px 0 14px;
  font-size: 13px;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
}

.breadcrumb ol li a {
  color: var(--clr-primary);
  text-decoration: none;
}
.breadcrumb ol li a:hover { text-decoration: underline; }

.bc-sep {
  color: #aaa;
  font-size: 12px;
}

/* ================================================================
   18. PAGINATION
   ================================================================ */
.pagination {
  margin: 24px 0;
  text-align: center;
}

.pagination ul {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  list-style: none;
}

.pagination a,
.pagination .page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  background: #3d3c3c;
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--tr-fast);
}
.pagination a:hover { background: var(--clr-primary-dk); color: #fff; }
.pagination .active { background: var(--clr-primary-dk); }
.pagination .page-ellipsis { background: transparent; color: #aaa; }
.page-info { font-size: 12px; color: #aaa; margin-top: 6px; }

/* ================================================================
   19. SIDEBAR
   ================================================================ */
.sidebar {
  color: #3f3f3f;
  font-size: 13px;
}

.widget {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
  overflow: hidden;
}

.widget-title {
  background: #222;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  text-align: center;
  margin: 0;
}

.widget-body { padding: 10px; }

/* Sidebar search */
.sidebar-search-form { display: flex; }
.sidebar-search-input {
  flex: 1;
  border: 1px solid #bbb;
  border-right: none;
  padding: 6px 10px;
  font-size: 14px;
  background: #f8f8f8;
}
.sidebar-search-btn {
  background: var(--nav-bg);
  border: 1px solid rgba(107,0,0,0.4);
  color: #e2edf3;
  padding: 6px 10px;
  font-size: 17px;
}
.sidebar-search-btn:hover { opacity: 0.85; }

/* Sidebar list */
.widget-list { list-style: none; }
.widget-list li {
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.widget-list li:last-child { border-bottom: none; }
.widget-list a { color: #333; text-decoration: none; }
.widget-list a:hover { color: var(--clr-primary); }
.widget-list .icon {
  color: var(--clr-primary);
  font-size: 16px;
  flex-shrink: 0;
}

/* Sidebar thumbnail grid */
.sidebar-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 8px;
}
.sidebar-thumbs a { display: block; border-radius: 4px; overflow: hidden; }
.sidebar-thumbs img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 4px;
  transition: opacity var(--tr-fast), box-shadow var(--tr-fast);
}
.sidebar-thumbs img:hover {
  opacity: 0.85;
  box-shadow: 0 0 12px #fff;
}

/* ================================================================
   20. BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--tr-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--clr-primary-dk), var(--clr-primary));
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px var(--clr-primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-lt));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,0,30,0.4);
  color: #fff;
}
.btn-primary:active { transform: translateY(0); }

/* Download button */
.btn-download {
  background: linear-gradient(135deg, var(--clr-primary-dk), var(--clr-primary));
  color: #e2edf3;
  font-size: 22px;
  font-weight: 700;
  min-width: 280px;
  justify-content: center;
  height: 80px;
  border-radius: var(--r-md);
  border: none;
  box-shadow: 0 4px 20px var(--clr-primary-glow);
  animation: pulse-glow 2.5s ease-in-out infinite;
}
.btn-download:hover {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-lt));
  animation: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200,0,30,0.5);
  color: #fff;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(200,0,30,0.25); }
  50%       { box-shadow: 0 4px 28px rgba(200,0,30,0.55); }
}

/* ================================================================
   21. BADGES
   ================================================================ */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-game     { background: rgba(200,0,30,.12); color: var(--clr-primary); }
.badge-software { background: rgba(33,150,243,.12); color: #42a5f5; }
.badge-news     { background: rgba(0,200,83,.1); color: var(--clr-new); }

/* ================================================================
   22. COOKIE CONSENT BANNER (GDPR)
   ================================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-md);
  z-index: 9000;
  padding: 14px 20px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}
.cookie-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-text {
  font-size: 13px;
  color: var(--txt-muted);
  flex: 1;
}
.cookie-text strong { color: var(--txt-primary); }
.cookie-link { color: var(--txt-link); }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }
.btn-cookie {
  padding: 8px 18px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--tr-fast);
}
.btn-cookie-accept {
  background: var(--clr-primary);
  color: #fff;
  border: none;
}
.btn-cookie-accept:hover { background: var(--clr-primary-lt); }
.btn-cookie-reject {
  background: transparent;
  color: var(--txt-muted);
  border: 1px solid var(--border-md);
}
.btn-cookie-reject:hover { color: var(--txt-primary); border-color: var(--border-strong); }

/* ================================================================
   23. SCROLL TO TOP
   ================================================================ */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--clr-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  z-index: 1000;
  opacity: 0;
  transform: translateX(80px);
  transition: opacity var(--tr-mid), transform var(--tr-mid), background var(--tr-fast);
  box-shadow: var(--shadow-md);
}
.scroll-top.visible {
  opacity: 1;
  transform: translateX(0);
}
.scroll-top:hover { background: var(--clr-primary-lt); color: #fff; }

/* ================================================================
   24. FOOTER
   ================================================================ */
#site-footer { margin-top: 16px; }

#footer-bg {
  background: #222121;
  border-radius: var(--r-sm);
  float: left;
  width: 100%;
}

#footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 20px 4px;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  padding: 0;
}

.footer-col { flex: 1; min-width: 180px; }

.footer-links { list-style: none; }

.footer-col-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links li {
  padding: 2px 0;
  font-size: 13px;
}

.footer-links a {
  color: #0084ef;
  text-decoration: none;
  transition: color var(--tr-fast);
}
.footer-links a:hover { color: #4fb3ff; }

.footer-copyright {
  color: #0084ef;
  font-size: 12px;
  margin-top: 12px;
  line-height: 1.8;
}
.footer-copyright a { color: #0084ef; }

/* ================================================================
   25. 404 ERROR PAGE
   ================================================================ */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.error-inner { text-align: center; max-width: 560px; }

.error-code {
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--clr-primary-dk), var(--clr-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.error-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--txt-primary);
  margin-bottom: 12px;
}

.error-desc {
  font-size: 15px;
  color: var(--txt-muted);
  margin-bottom: 24px;
}

.error-search {
  display: flex;
  gap: 0;
  max-width: 420px;
  margin: 0 auto 24px;
}

.error-search-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  border-right: none;
  color: var(--txt-primary);
  padding: 10px 14px;
  font-size: 14px;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
}

.error-search-btn {
  background: var(--clr-primary);
  border: none;
  color: #fff;
  padding: 10px 16px;
  font-size: 18px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  transition: background var(--tr-fast);
}
.error-search-btn:hover { background: var(--clr-primary-lt); }

.error-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-error {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  color: var(--txt-primary);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--tr-fast);
}
.btn-error:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}

/* ================================================================
   26. UTILITY
   ================================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-muted   { color: var(--txt-muted); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.mt-4         { margin-top: 16px; }
.mb-4         { margin-bottom: 16px; }

/* Spinner animation */
.spin { animation: spin-anim 0.8s linear infinite; display: inline-block; }
@keyframes spin-anim { to { transform: rotate(360deg); } }

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg, #1c1c28 25%, #252535 50%, #1c1c28 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ================================================================
   27. RESPONSIVE BREAKPOINTS
   ================================================================ */
@media (max-width: 990px) {
  /* Show mobile nav, hide desktop nav */
  .topnav     { display: block; }
  #barra      { display: none; }
  #main-nav   { display: none; }

  /* Adjust outer wrapper top padding for mobile nav */
  #outer-wrapper { padding-top: var(--nav-h); }

  /* Community grid: 1 column */
  .community-grid { grid-template-columns: 1fr; }

  /* Content inner: remove sidebar on mobile */
  .content-inner {
    grid-template-columns: 1fr;
  }
  .sidebar { display: none; }

  /* Pagination: hide extended pages */
  .home-pagination .page-link:not(:first-of-type):not(:last-of-type) { display: none; }

  /* Rotator: hide preview image */
  .rotator-preview { display: none; }
  .home-rotator { grid-template-columns: 1fr; }

  /* Mini lists: normal whitespace */
  .mini-list li { white-space: normal; }
}

@media (max-width: 768px) {
  /* Footer: stack columns */
  .footer-cols { flex-direction: column; }

  /* Panel double: single column */
  .panel-double { grid-template-columns: 1fr; }
  .panel-double .mini-panel:first-child { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.1); }

  /* Posts grid: 2 columns */
  .posts-grid { grid-template-columns: repeat(2, 1fr); }

  /* Scroll top: smaller */
  .scroll-top { bottom: 16px; right: 16px; width: 38px; height: 38px; font-size: 22px; }

  /* Cookie banner: vertical */
  .cookie-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  :root { --gap: 12px; }

  /* Posts grid: 1 column on very small screens */
  .posts-grid { grid-template-columns: 1fr; }

  /* Home search: stack */
  .home-search-bar form { flex-direction: column; }
  .home-search-input { border-right: 1px solid #ccc; border-bottom: none; }
  .home-search-select { border: 1px solid #ccc; border-bottom: none; }

  /* Error code smaller */
  .error-code { font-size: 80px; }
}

/* ================================================================
   28. REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-top { transition: none; }
  html { scroll-behavior: auto; }
}
