/*
Theme Name: All Yono New Games
Theme URI: https://allyononewgames.com/
Author: Custom
Description: A fast, SEO-friendly, game-listing theme inspired by allyononewgames.com with optimized UX and performance.
Version: 1.0.0
Text Domain: all-yono-new-games
*/

:root {
  --bg: #0a0f1f;
  --card: #121a2f;
  --muted: #b2b8c6;
  --text: #f4f6fb;
  --brand: #ff9f1c;
  --brand-2: #1f9eff;
  --accent: #22c55e;
  --warning: #fbbf24;
  --border: #1e2a44;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  z-index: 999;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 20, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.site-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.site-title span {
  color: var(--brand);
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.primary-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.primary-nav a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  gap: 4px;
  flex-direction: column;
}

.nav-toggle-bar {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

.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;
}

.hero {
  padding: 64px 0 48px;
  background: radial-gradient(circle at top, rgba(255, 159, 28, 0.2), transparent 45%),
    radial-gradient(circle at right, rgba(31, 158, 255, 0.22), transparent 35%);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  margin: 0 0 16px;
}

.hero p {
  color: var(--muted);
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-primary {
  background: var(--brand);
  color: #1a0f00;
}

.button-secondary {
  border-color: var(--border);
  color: var(--text);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.section {
  padding: 36px 0;
}

.section h2 {
  font-size: clamp(24px, 4vw, 36px);
  margin: 0 0 12px;
}

.section p.lead {
  color: var(--muted);
  margin: 0 0 20px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.feature-card h3 {
  margin: 0 0 8px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.related-item[hidden] {
  display: none !important;
}

.featured-item[hidden] {
  display: none !important;
}

.featured-item {
  position: relative;
}

.featured-item::before {
  content: attr(data-index);
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #facc15;
  color: #1a1200;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: var(--shadow);
}

.featured-item[data-index="1"]::before {
  background: #ef4444;
  color: #fff;
}

.featured-item[data-index="2"]::before {
  background: #fca5a5;
  color: #4c0d0d;
}

.featured-item[data-index="3"]::before {
  background: #fb923c;
  color: #3b1400;
}

.archive-item[hidden] {
  display: none !important;
}

.related-actions {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 20px;
}

.related-actions .related-load-more {
  background: #22c55e;
  color: #04120a;
  border-color: transparent;
}

.related-actions .related-load-more:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.related-end {
  color: var(--muted);
  font-size: 14px;
}

.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 30px;
  max-width: 220px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0f1624;
  display: grid;
  place-items: center;
}

.game-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card h3 {
  margin: 0;
  font-size: 18px;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.game-meta .meta-bonus {
  color: #ff6b6b;
  font-weight: 600;
}

.game-meta .meta-withdraw {
  color: #22c55e;
  font-weight: 600;
}

.game-tagline {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.8em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 159, 28, 0.16);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.notice {
  background: rgba(255, 159, 28, 0.08);
  border: 1px solid rgba(255, 159, 28, 0.35);
  padding: 20px;
  border-radius: var(--radius);
  color: #ffe3b3;
}

.faq {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.faq-accordion {
  margin-top: 12px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 18px;
  color: var(--brand-2);
}

.faq-item[open] summary::after {
  content: '–';
}

.faq-item p {
  margin: 12px 0 0;
  color: var(--muted);
}

.cta {
  background: linear-gradient(135deg, rgba(255, 159, 28, 0.18), rgba(31, 158, 255, 0.18));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 12px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 14px;
}

.game-hero {
  padding-top: 48px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--muted);
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.post-nav-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.post-nav-item a {
  color: var(--text);
  font-weight: 600;
}

.post-nav-empty {
  color: var(--muted);
  font-size: 13px;
}

.post-related {
  padding-top: 12px;
}

.game-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}

.game-hero-media-inner {
  width: 240px;
  height: 240px;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #0f1624;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.game-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.stat-card strong {
  color: var(--text);
  font-size: 18px;
}

.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.content-area h2 {
  margin-top: 0;
}

.content-body p {
  color: var(--muted);
  margin: 0 0 16px;
}

.content-body h2,
.content-body h3,
.content-body h4 {
  color: var(--text);
  margin: 24px 0 12px;
  line-height: 1.3;
}

.content-body h2 {
  font-size: clamp(22px, 3vw, 28px);
}

.content-body h3 {
  font-size: clamp(18px, 2.5vw, 22px);
}

.content-body h4 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.content-body ul,
.content-body ol {
  margin: 0 0 18px 20px;
  padding: 0;
  color: var(--muted);
}

.content-body li {
  margin: 8px 0;
}

.content-body blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--brand);
  background: rgba(34, 197, 94, 0.08);
  color: var(--text);
  border-radius: 12px;
}

.content-full {
  width: 100%;
  padding-left: clamp(16px, 4vw, 48px);
  padding-right: clamp(16px, 4vw, 48px);
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}

.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.detail-list strong {
  color: var(--text);
}

.sidebar-card .button {
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.footer-grid h4 {
  margin: 0 0 8px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 6px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .primary-nav ul {
    gap: 10px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    width: 100%;
    display: none;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    width: 100%;
    padding: 10px 0;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .game-hero-media-inner {
    width: min(80vw, 240px);
    height: min(80vw, 240px);
  }
}
