/* ============================================================
   TheHorde – Main Stylesheet
   Custom design – all original
   ============================================================ */
:root {
  --bg:       #0e0e16;
  --bg2:      #13131e;
  --card:     #1a1a28;
  --border:   #2a2a3e;
  --text:     #e2e4f0;
  --muted:    #7a7d9a;
  --accent:   #ff4d6d;
  --accent2:  #ff9a3c;
  --green:    #22c55e;
  --radius:   14px;
  --shadow:   0 4px 24px rgba(0,0,0,.45);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4 { line-height: 1.25; margin: 0 0 .5em; color: #fff; }

/* ---------- layout ---------- */
.wrap  { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 860px; }
.center { text-align: center; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14,14,22,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.bar {
  display: flex; align-items: center; gap: 16px;
  min-height: 66px;
}
/* brand */
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 800; font-size: 22px; flex: none;
  letter-spacing: -.3px;
}
.brand:hover { text-decoration: none; }
.brand img { max-height: 40px; width: auto; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-size: 18px;
}
.brand-name { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* nav */
.main-nav { display: flex; gap: 2px; flex: 1; }
.main-nav a {
  color: #9a9db8; padding: 8px 14px;
  border-radius: 9px; font-size: 14px; font-weight: 600;
  transition: .15s;
}
.main-nav a:hover { background: var(--card); color: #fff; text-decoration: none; }

/* search */
.search input {
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: 9px 16px; font-size: 14px; outline: none; width: 230px;
  transition: border-color .2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); }
.nav-toggle {
  display: none;
  background: var(--card); border: 1px solid var(--border);
  color: #fff; border-radius: 9px;
  font-size: 20px; line-height: 1; padding: 8px 13px;
  margin-left: auto; cursor: pointer;
}

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--bg2);
  padding: 72px 0 60px;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 700px 300px at 20% 50%, rgba(255,77,109,.18), transparent),
    radial-gradient(ellipse 600px 280px at 80% 50%, rgba(255,154,60,.14), transparent);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(32px, 6vw, 58px);
  font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(90deg, #fff 40%, var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}
.hero p { color: #9a9db8; font-size: 18px; max-width: 560px; margin: 0 auto 30px; }

.search.big { display: flex; gap: 10px; max-width: 580px; margin: 0 auto; }
.search.big input {
  flex: 1; width: auto; padding: 15px 20px; font-size: 16px;
  border-radius: 12px; background: var(--card); color: var(--text);
  border: 1px solid var(--border);
}
.search.big button, .btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border: 0; border-radius: 12px;
  padding: 13px 26px; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit; display: inline-block;
  transition: filter .2s, transform .15s;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); text-decoration: none; }
.btn.disabled { opacity: .45; pointer-events: none; transform: none; }

/* category chips */
.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 26px; }
.chips a {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: #c8cae0; padding: 7px 17px; border-radius: 999px; font-size: 13.5px;
  transition: .15s;
}
.chips a:hover { background: rgba(255,77,109,.18); border-color: var(--accent); color: #fff; text-decoration: none; }

/* ---------- SECTIONS / CARDS ---------- */
.box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 26px; margin: 22px 0;
  box-shadow: var(--shadow);
}
.box-head {
  display: flex; justify-content: space-between;
  align-items: flex-end; gap: 12px; margin-bottom: 20px;
}
.box-head h2, .box-head .h2 { font-size: 22px; margin: 0; }
.box-head p { color: var(--muted); margin: 3px 0 0; font-size: 13.5px; }
.more {
  font-size: 13px; font-weight: 700; white-space: nowrap;
  color: var(--text); border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 999px; transition: .15s;
}
.more:hover { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }

.card {
  display: flex; gap: 14px; align-items: center;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px;
  color: var(--text); transition: .2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(255,77,109,.18);
  text-decoration: none;
}
.card img {
  width: 70px; height: 70px; border-radius: 16px;
  object-fit: cover; flex: none; background: var(--border);
}
.card-body { min-width: 0; }
.card h3 { font-size: 15px; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.card .cat {
  display: inline-block; font-size: 11.5px;
  color: var(--accent); background: rgba(255,77,109,.12);
  border-radius: 6px; padding: 1px 8px; margin-right: 5px;
}
.card .meta { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.empty { color: var(--muted); text-align: center; padding: 24px; }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 10px; background: var(--bg2);
}
.faq summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between;
  gap: 10px; color: #fff; font-size: 15px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details div { padding: 0 20px 16px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* ---------- breadcrumbs / notice ---------- */
.crumbs { font-size: 13px; color: var(--muted); padding: 18px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.notice {
  background: rgba(255,154,60,.1); border: 1px solid rgba(255,154,60,.3);
  border-radius: 10px; padding: 10px 16px; margin-top: 12px;
  color: var(--accent2); font-size: 14px;
}

/* ---------- GAME PAGE ---------- */
.game {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 22px; padding: 30px; margin: 16px 0;
  box-shadow: var(--shadow);
}
.game-head { display: flex; gap: 28px; align-items: center; }
.game-head > img {
  width: 130px; height: 130px; border-radius: 28px;
  object-fit: cover; flex: none;
  box-shadow: 0 10px 36px rgba(255,77,109,.25);
  background: var(--border);
}
.game-title { min-width: 0; }
.game-title h1 { font-size: clamp(22px, 4vw, 34px); margin: 0 0 5px; }
.dev { color: var(--accent); margin: 0 0 12px; font-weight: 600; font-size: 14px; }

.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.badge {
  background: rgba(255,255,255,.07); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 13px; font-size: 13px; color: var(--text);
}
.badge.type { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }

.btn.dl {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  padding: 14px 34px; font-size: 17px;
  box-shadow: 0 8px 24px rgba(34,197,94,.3);
}

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr));
  gap: 10px; margin: 28px 0;
}
.facts div {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 15px;
}
.facts dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.facts dd { margin: 4px 0 0; font-weight: 700; color: #fff; font-size: 15px; }

.game h2 { font-size: 20px; margin-top: 32px; color: #fff; }
.shots {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 10px; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.shots img {
  height: 270px; width: auto; border-radius: 14px;
  border: 1px solid var(--border); scroll-snap-align: start; flex: none;
}

.prose { color: #b8bce0; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1em; }
.prose h3 { font-size: 17px; margin: 1.5em 0 .5em; color: #fff; }
.prose h2 { font-size: 20px; margin-top: 1.5em; color: #fff; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin: .35em 0; }
.prose.page h1 { font-size: 28px; }

.desc { position: relative; }
.desc.collapsed { max-height: 320px; overflow: hidden; }
.desc.collapsed::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(transparent, var(--card));
}
.readmore {
  display: block; margin: 12px auto 0;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); font-weight: 600;
  padding: 10px 26px; border-radius: 999px;
  cursor: pointer; font-family: inherit; font-size: 14px;
  transition: .15s;
}
.readmore:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.prose.extra { margin-top: 20px; padding-top: 8px; border-top: 1px dashed var(--border); }
.game > .center { margin-top: 28px; }

/* ---------- PAGINATION ---------- */
.pager {
  display: flex; gap: 7px; justify-content: center;
  flex-wrap: wrap; margin: 28px 0 6px;
}
.pager a, .pager span {
  min-width: 40px; text-align: center;
  padding: 8px 14px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; transition: .15s;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pager .cur { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  margin-top: 56px; padding-top: 48px;
  color: var(--muted);
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 8px 0; }
.site-footer a { color: var(--muted); font-size: 14px; transition: color .15s; }
.site-footer a:hover { color: var(--accent); text-decoration: none; }
.foot-brand { font-size: 22px; font-weight: 900; margin-bottom: 10px; }
.foot-brand span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.copy {
  border-top: 1px solid var(--border);
  margin-top: 36px; padding: 22px 20px 28px;
  text-align: center; font-size: 13px; color: var(--muted);
}
.copy p { margin: 0; }

/* ---------- MOBILE ---------- */
@media(max-width:900px){ .search input{ width:160px; } }
@media(max-width:820px){
  .nav-toggle { display: block; }
  .bar { flex-wrap: wrap; gap: 10px; padding: 10px 20px; }
  .main-nav { display: none; order: 5; flex-basis: 100%; flex-direction: column; padding-bottom: 8px; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 10px; font-size: 15px; }
  .search { order: 4; flex-basis: 100%; }
  .search input { width: 100%; padding: 11px 16px; }
  .hero { padding: 44px 0 38px; }
  .hero p { font-size: 16px; }
  .box { padding: 16px; border-radius: 16px; margin: 14px 0; }
  .grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .card { flex-direction: column; text-align: center; padding: 14px 10px; gap: 8px; }
  .card img { width: 72px; height: 72px; }
  .card h3 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; min-height: 2.4em; }
  .game { padding: 18px; }
  .game-head { flex-direction: column; text-align: center; gap: 16px; }
  .game-head > img { width: 110px; height: 110px; }
  .badges { justify-content: center; }
  .btn.dl { display: block; width: 100%; text-align: center; }
  .facts { grid-template-columns: repeat(2,1fr); }
  .shots img { height: 210px; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media(max-width:380px){
  .grid { grid-template-columns: 1fr; }
  .card { flex-direction: row; text-align: left; }
  .card h3 { min-height: 0; }
}
