/*
Theme Name: Bestbetapks
Theme URI: https://bestbetapk.abacusai.app
Author: Bestbetapks
Author URI: https://bestbetapk.abacusai.app
Description: Premium dark navy + gold APK/game download directory theme. Games are normal posts (URL: domain.com/game-name), categories at /category/apps, /category/games etc. SEO-friendly with schema markup, customizable logos, download meta fields, screenshots gallery and rating stars.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bestbetapks
Tags: dark, custom-logo, custom-menu, featured-images, one-column, blog
*/

:root {
  --bg: #070b13;
  --bg-soft: #0b1220;
  --card: #0d1524;
  --card-2: #101a2c;
  --border: rgba(148, 163, 184, 0.16);
  --text: #e8edf6;
  --muted: #93a0b4;
  --gold: #f4b41a;
  --gold-2: #ffd166;
  --gold-dark: #0a0f1a;
  --red: #dc2626;
  --green: #059669;
  --radius: 14px;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 19, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img.custom-logo, .brand .brand-logo img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.brand-name .gold { background: linear-gradient(90deg, var(--gold), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.main-nav ul { list-style: none; display: flex; gap: 4px; }
.main-nav a {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-size: 13.5px; font-weight: 500; transition: all .2s;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--text); background: rgba(148,163,184,.1); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 16px; }

/* ===== Hero ===== */
.hero {
  position: relative; text-align: center; padding: 72px 0 60px; overflow: hidden;
  background:
    radial-gradient(600px 300px at 50% -40px, rgba(244, 180, 26, 0.14), transparent 70%),
    linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(244,180,26,.35); border-radius: 999px; padding: 6px 16px;
  background: rgba(244,180,26,.07);
}
.hero h1 { font-size: clamp(30px, 5.4vw, 52px); margin: 22px auto 12px; max-width: 760px; line-height: 1.12; }
.hero h1 .gold { background: linear-gradient(90deg, var(--gold), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 16px; }

.hero-search {
  display: flex; align-items: center; gap: 8px; max-width: 560px; margin: 30px auto 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 6px 6px 6px 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.hero-search input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--text); font-size: 14px; font-family: var(--font-body);
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search button {
  background: var(--gold); color: var(--gold-dark); border: 0; border-radius: 999px;
  padding: 10px 24px; font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: var(--font-body);
}
.hero-search button:hover { background: var(--gold-2); }

.hero-stats { display: flex; justify-content: center; margin-top: 44px; }
.hero-stats .stat { padding: 0 34px; text-align: center; }
.hero-stats .stat + .stat { border-left: 1px solid var(--border); }
.hero-stats b { display: block; font-family: var(--font-display); font-size: 26px; color: var(--gold); }
.hero-stats span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* ===== Sections ===== */
.section { padding: 52px 0; }
.section-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.section-eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(22px, 3vw, 30px); margin-top: 8px; }
.section-head .view-all { font-size: 13.5px; font-weight: 600; }

/* ===== Category pills ===== */
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.cat-pills a {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--card); color: var(--muted); border: 1px solid var(--border); transition: all .2s;
}
.cat-pills a:hover { color: var(--text); border-color: rgba(244,180,26,.4); }
.cat-pills a.active { background: var(--gold); color: var(--gold-dark); border-color: var(--gold); }

/* ===== Game grid & cards ===== */
.game-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1024px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 820px)  { .game-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .game-grid { grid-template-columns: repeat(2, 1fr); } }

.game-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 14px 16px; overflow: hidden; color: var(--text); transition: all .25s;
}
.game-card:hover {
  transform: translateY(-4px); border-color: rgba(244,180,26,.4); color: var(--text);
  box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 24px rgba(244,180,26,.08);
}
.game-card .icon {
  width: 80px; height: 80px; border-radius: 20px; overflow: hidden; background: var(--card-2);
  box-shadow: 0 6px 18px rgba(0,0,0,.4); border: 1px solid var(--border); transition: box-shadow .25s;
}
.game-card:hover .icon { box-shadow: 0 0 20px rgba(244,180,26,.3); }
.game-card .icon img { width: 100%; height: 100%; object-fit: cover; }
.game-card h3 { font-size: 14px; margin-top: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.game-card .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.game-card .stars { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.game-card .dl-pill {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(244,180,26,.12); color: var(--gold); font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 6px 16px; transition: all .2s;
}
.game-card:hover .dl-pill { background: var(--gold); color: var(--gold-dark); }

.ribbon {
  position: absolute; top: 12px; left: -34px; transform: rotate(-45deg); width: 120px;
  text-align: center; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; padding: 3px 0; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.ribbon.new { background: var(--red); }
.ribbon.updated { background: var(--green); }

/* Stars */
.star-row { display: inline-flex; gap: 1px; }
.star { position: relative; width: 12px; height: 12px; display: inline-block; }
.star svg { position: absolute; inset: 0; width: 12px; height: 12px; }
.star .fill { overflow: hidden; position: absolute; inset: 0; }
.star-lg .star, .star-lg .star svg { width: 16px; height: 16px; }

/* ===== Single game (detail) ===== */
.single-wrap { max-width: 960px; margin: 0 auto; padding: 36px 20px 60px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.back-link:hover { color: var(--text); }

.game-hero { background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 14px 44px rgba(0,0,0,.4); }
.game-hero-top { display: flex; gap: 22px; align-items: center; padding: 30px; flex-wrap: wrap; }
.game-hero .icon { width: 120px; height: 120px; border-radius: 26px; overflow: hidden; background: var(--card-2); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.45); flex-shrink: 0; }
.game-hero .icon img { width: 100%; height: 100%; object-fit: cover; }
.game-hero-info { flex: 1; min-width: 220px; }
.game-hero h1 { font-size: clamp(24px, 4vw, 32px); display: inline; margin-right: 10px; }
.game-hero .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.game-hero .row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.chip { display: inline-block; background: rgba(148,163,184,.12); color: var(--text); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.badge-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; padding: 3px 10px; border-radius: 6px; color: #fff; vertical-align: middle; }
.badge-tag.new { background: var(--red); } .badge-tag.updated { background: var(--green); }
.version-txt { font-size: 12.5px; color: var(--muted); font-weight: 600; }

.btn-download {
  display: inline-flex; align-items: center; gap: 9px; background: var(--gold); color: var(--gold-dark);
  font-weight: 800; font-size: 15px; padding: 14px 34px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(244,180,26,.25); transition: all .2s; font-family: var(--font-body);
}
.btn-download:hover { background: var(--gold-2); color: var(--gold-dark); transform: translateY(-1px); }

.info-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 22px 30px 28px; border-top: 1px solid var(--border); background: rgba(148,163,184,.03); }
@media (max-width: 760px) { .info-tiles { grid-template-columns: repeat(2, 1fr); } .game-hero-top { padding: 22px; } }
.info-tile { background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; text-align: center; padding: 14px 8px; }
.info-tile .lbl { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-top: 4px; }
.info-tile .val { display: block; font-size: 12.5px; font-weight: 700; margin-top: 2px; }
.info-tile .ic { color: var(--gold); font-size: 15px; }

.shots-strip { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 14px; }
.shots-strip img { height: 290px; width: auto; border-radius: 14px; border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.4); flex-shrink: 0; }

.content-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 30px; margin-top: 26px; }
.content-card h2 { font-size: 20px; display: flex; align-items: center; gap: 9px; }
.content-card h2 .ic { color: var(--gold); }
.entry-content { color: var(--muted); margin-top: 16px; font-size: 14.5px; }
.entry-content p { margin-bottom: 14px; }
.entry-content h2, .entry-content h3 { color: var(--text); margin: 22px 0 10px; }
.entry-content ul, .entry-content ol { margin: 0 0 14px 22px; }
.entry-content a { text-decoration: underline; }
.entry-content img { border-radius: 12px; margin: 10px 0; }
.whats-new-card { border-color: rgba(244,180,26,.3); background: rgba(244,180,26,.05); }

.bottom-cta { text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 40px 24px; margin-top: 26px; }
.bottom-cta h3 { font-size: 19px; }
.bottom-cta p { color: var(--muted); font-size: 13.5px; margin: 6px 0 20px; }

/* ===== Archive header ===== */
.archive-head { padding: 46px 0 8px; }
.archive-head h1 { font-size: clamp(24px, 4vw, 34px); margin-top: 8px; }
.archive-head p { color: var(--muted); margin-top: 6px; max-width: 640px; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 40px 0 10px; flex-wrap: wrap; }
.pagination .page-numbers {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--border);
  color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--gold); color: var(--gold-dark); border-color: var(--gold); }
.pagination a.page-numbers:hover { color: var(--text); border-color: rgba(244,180,26,.4); }

/* ===== Why us ===== */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .why-grid { grid-template-columns: 1fr; } }
.why-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: all .25s; }
.why-card:hover { border-color: rgba(244,180,26,.35); transform: translateY(-3px); }
.why-card .ic { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: rgba(244,180,26,.12); color: var(--gold); border-radius: 12px; font-size: 19px; }
.why-card h3 { font-size: 16px; margin-top: 14px; }
.why-card p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 60px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 44px 20px 30px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.footer-tagline { color: var(--muted); font-size: 12.5px; max-width: 420px; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.footer-nav a { color: var(--muted); font-size: 12.5px; }
.footer-nav a:hover { color: var(--text); }
.footer-email { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; }
.footer-email:hover { color: var(--gold); }
.footer-copy { color: rgba(147,160,180,.6); font-size: 11px; margin-top: 6px; }

/* ===== 404 / misc ===== */
.notfound { text-align: center; padding: 90px 20px; }
.notfound h1 { font-size: 66px; color: var(--gold); }
.notfound p { color: var(--muted); margin: 10px 0 24px; }

/* ===== Mobile nav ===== */
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 10px 16px 16px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { display: block; }
  .hero { padding: 52px 0 46px; }
  .hero-stats .stat { padding: 0 18px; }
  .single-wrap { padding-top: 24px; }
}
