:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef1f7;
  --text: #111827;
  --muted: #5f6b7a;
  --line: #d9dfeb;
  --brand: #6c63ff;
  --brand-dark: #5148ea;
  --accent: #20c997;
  --danger: #e25555;
  --warning: #f4b740;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(26, 33, 56, 0.09);
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
img { max-width: 100%; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 32px), var(--max-width)); margin-inline: auto; }
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 1000;
}
.skip-link:focus { top: 16px; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217,223,235,.9);
}
.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { width: 170px; height: auto; display: block; }
.main-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.main-nav a {
  color: var(--text);
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 10px;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { background: var(--surface-soft); text-decoration: none; }
.hero { padding: 88px 0 54px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 42px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
  background: #eceaff;
  border: 1px solid #d9d5ff;
  padding: 7px 11px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .01em;
  font-size: .9rem;
}
.hero h1, .page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  margin: 18px 0 20px;
}
.hero p, .page-hero p { color: var(--muted); font-size: 1.15rem; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.hero-card {
  background: linear-gradient(145deg, #151a30, #282d55);
  color: #fff;
  padding: 28px;
  min-height: 340px;
  border-radius: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(108,99,255,.28);
}
.hero-card::before { width: 180px; height: 180px; right: -45px; top: -55px; }
.hero-card::after { width: 120px; height: 120px; left: -28px; bottom: -40px; background: rgba(32,201,151,.18); }
.mini-game-preview { position: relative; z-index: 1; }
.preview-bricks { display: grid; grid-template-columns: repeat(6,1fr); gap: 7px; margin: 20px 0 72px; }
.preview-bricks span { height: 20px; border-radius: 6px; background: #6c63ff; }
.preview-bricks span:nth-child(3n) { background: #20c997; }
.preview-bricks span:nth-child(4n) { background: #f4b740; }
.preview-ball { width: 18px; height: 18px; border-radius: 50%; background: white; margin: 0 auto 45px; }
.preview-paddle { width: 42%; height: 14px; border-radius: 999px; background: #fff; margin: 0 auto; }
.section { padding: 58px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0; letter-spacing: -.03em; }
.section-heading p { color: var(--muted); max-width: 620px; margin: 0; }
.game-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.game-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(26,33,56,.05);
  display: flex;
  flex-direction: column;
}
.game-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.game-card h3 { margin: 8px 0 8px; font-size: 1.35rem; }
.game-card p { color: var(--muted); margin-top: 0; }
.game-card .btn { margin-top: auto; align-self: flex-start; }
.game-thumb {
  min-height: 190px;
  background: linear-gradient(145deg, #171b32, #292f58);
  display: grid;
  place-items: center;
}
.game-thumb-art { width: 78%; }
.game-thumb-bricks { display: grid; grid-template-columns: repeat(6,1fr); gap: 6px; }
.game-thumb-bricks i { display: block; height: 18px; border-radius: 4px; background: #6c63ff; }
.game-thumb-bricks i:nth-child(2n) { background: #20c997; }
.game-thumb-bricks i:nth-child(3n) { background: #f4b740; }
.game-thumb-paddle { width: 42%; height: 12px; border-radius: 999px; background: #fff; margin: 54px auto 0; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: .8rem; font-weight: 800; background: #eceaff; color: var(--brand-dark); }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .9rem; }
.feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature-card h3 { margin: 12px 0 6px; }
.feature-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: #eceaff; color: var(--brand-dark); font-weight: 900; }
.page-hero { padding: 66px 0 28px; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
.content-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px,4vw,42px); box-shadow: 0 10px 26px rgba(26,33,56,.05); }
.content-card h2 { margin-top: 2rem; }
.content-card h2:first-child { margin-top: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .95rem; margin-top: 22px; }
.breadcrumbs span { color: #9aa4b2; }
.notice { border-left: 4px solid var(--brand); background: #f0efff; padding: 16px 18px; border-radius: 10px; }
.form-grid { display: grid; gap: 18px; }
.form-field { display: grid; gap: 7px; }
.form-field label { font-weight: 800; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
}
.form-field textarea { min-height: 180px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(108,99,255,.35);
  outline-offset: 2px;
}
.site-footer { margin-top: 70px; padding: 46px 0 28px; background: #111827; color: #e5e7eb; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 32px; }
.site-footer a { color: #e5e7eb; }
.site-footer h2, .site-footer h3 { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 20px; color: #9ca3af; font-size: .93rem; }
.empty-card { opacity: .74; position: relative; }
.empty-card::after { content: "Coming Soon"; position: absolute; top: 14px; right: 14px; background: #111827; color: #fff; border-radius: 999px; padding: 5px 9px; font-size: .75rem; font-weight: 800; }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .hero-grid, .footer-grid { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: repeat(2,1fr); }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
  .hero-card { min-height: 300px; }
}
@media (max-width: 640px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: 14px 0; gap: 10px; }
  .main-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .hero { padding-top: 48px; }
  .hero-grid, .game-grid, .feature-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .brand img { width: 146px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Automatic game catalog */
.catalog-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.catalog-search { display: grid; gap: 7px; width: min(100%, 520px); font-weight: 800; }
.catalog-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--surface);
  color: var(--text);
}
.catalog-count { color: var(--muted); white-space: nowrap; }
.filter-row { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }
.filter-chip {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}
.filter-chip:hover, .filter-chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.catalog-card h3 a { color: var(--text); }
.catalog-card h3 a:hover { color: var(--brand-dark); }
.catalog-thumb {
  min-height: 190px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}
.catalog-thumb::before, .catalog-thumb::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  z-index: -1;
}
.catalog-thumb::before { width: 180px; height: 180px; right: -42px; top: -55px; }
.catalog-thumb::after { width: 100px; height: 100px; left: -25px; bottom: -35px; }
.catalog-thumb:hover { text-decoration: none; }
.catalog-icon { font-size: 4rem; line-height: 1; font-weight: 900; transform: translateY(-4px); }
.catalog-play {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.94);
  color: #111827;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.accent-violet { background: linear-gradient(145deg, #171b32, #6c63ff); }
.accent-teal { background: linear-gradient(145deg, #14323a, #20c997); }
.accent-amber { background: linear-gradient(145deg, #3d2d10, #f4b740); }
.accent-blue { background: linear-gradient(145deg, #13243b, #4a8cff); }
.accent-rose { background: linear-gradient(145deg, #39172a, #ec5d91); }
.accent-lime { background: linear-gradient(145deg, #233315, #8bc34a); }
.catalog-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .8rem;
  font-weight: 800;
  background: #e7fbf4;
  color: #08775b;
}
.catalog-loading, .catalog-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
  color: var(--muted);
}
.catalog-empty h3 { color: var(--text); margin: 0 0 6px; }
.catalog-empty p { margin: 0; }
.section-action { display: flex; justify-content: center; margin-top: 24px; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.category-card {
  display: grid;
  gap: 6px;
  min-height: 145px;
  align-content: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 10px 26px rgba(26,33,56,.04);
}
.category-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.category-card > span { font-size: 1.7rem; color: var(--brand-dark); }
.category-card strong { font-size: 1.15rem; }
.category-card small { color: var(--muted); font-size: .92rem; }
.related-games-section { padding-top: 10px; }

@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .catalog-count { white-space: normal; }
  .category-grid { grid-template-columns: 1fr; }
}

/* Reserved AdSense banner areas */
.site-ad-section { padding-top: 36px; padding-bottom: 36px; }
.site-ad-slot {
  width: min(100%, 970px);
  min-height: 100px;
  margin-inline: auto;
  border: 1px dashed #b9c2d2;
  border-radius: 12px;
  background: #f2f4f8;
  color: #687386;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 12px;
  font-size: .82rem;
}
.site-ad-label { display:block; text-transform:uppercase; letter-spacing:.12em; font-weight:800; font-size:.72rem; margin-bottom:4px; }

.preview-flight { position: relative; height: 210px; margin: 18px 0 12px; overflow: hidden; border-radius: 18px; background: radial-gradient(circle at 70% 30%, #ffb18a 0 5%, transparent 22%), linear-gradient(#111a49, #31205d 58%, #091c3b 59%); }
.preview-flight:after { content: ""; position: absolute; left: 50%; bottom: -22px; width: 44%; height: 165px; transform: translateX(-50%) perspective(160px) rotateX(62deg); background: linear-gradient(90deg, transparent 47%, rgba(141,121,255,.75) 49% 51%, transparent 53%); }
.preview-city { position: absolute; bottom: 0; width: 38%; height: 65%; background: repeating-linear-gradient(90deg,#182957 0 17%,#283b72 18% 31%,#101d46 32% 45%); clip-path: polygon(0 100%,0 25%,14% 25%,14% 55%,28% 55%,28% 12%,45% 12%,45% 42%,58% 42%,58% 0,77% 0,77% 50%,100% 50%,100% 100%); opacity:.92; }
.preview-city.left { left: 0; } .preview-city.right { right: 0; transform: scaleX(-1); }
.preview-plane { position: absolute; z-index: 3; left: 50%; top: 42%; transform: translate(-50%,-50%) rotate(-8deg); font-size: 4.2rem; color: #d8d5ff; filter: drop-shadow(0 0 14px rgba(113,235,255,.75)); }
.preview-trail { position: absolute; z-index: 2; left: 50%; top: 52%; width: 4px; height: 74px; transform: translateX(-50%); background: linear-gradient(rgba(108,235,255,.85), transparent); }
