:root {
  --bg: #0d0b1e;
  --bg-2: #15122c;
  --surface: #1a1735;
  --surface-2: #231f45;
  --line: #2e2a55;
  --text: #f3f1ff;
  --muted: #a9a3cf;
  --accent: #ffcf3f;
  --accent-2: #ff5f7e;
  --accent-3: #4fd1ff;
  --radius: 20px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, #3a1f7a55, transparent 60%),
    radial-gradient(900px 500px at -10% 30%, #0f4d6a40, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* Üst bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  grid-template-columns: repeat(2, 11px);
  gap: 3px;
  transform: rotate(-8deg);
}
.logo-mark i { width: 11px; height: 11px; border-radius: 3px; display: block; }
.logo-mark i:nth-child(1) { background: var(--accent); }
.logo-mark i:nth-child(2) { background: var(--accent-2); }
.logo-mark i:nth-child(3) { background: var(--accent-3); }
.logo-mark i:nth-child(4) { background: #8b5cff; }

.topnav { display: flex; gap: 22px; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.topnav a:hover { color: var(--text); }

main { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 72px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
}

.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 55%, #8b5cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { color: var(--muted); font-size: 1.15rem; max-width: 34em; margin: 0 0 30px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #1b1300; }
.btn-primary:hover { background: #ffd95f; }
.btn-ghost { border: 1px solid var(--line); background: #ffffff08; }
.btn-ghost:hover { border-color: var(--muted); }

.featured {
  position: relative;
  display: block;
  aspect-ratio: 2 / 1;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -30px #000, 0 0 0 8px #ffffff06;
  transform: rotate(1.5deg);
  transition: transform 0.3s ease;
  text-decoration: none;
}
.featured:hover { transform: rotate(0deg) scale(1.01); }
.featured .banner-art { width: 100%; height: 100%; display: block; }

.featured-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 60px 24px 20px;
  background: linear-gradient(transparent, #000c);
}
.featured-overlay strong { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: -0.02em; }
.featured-overlay span:last-child { color: #d7d3f5; font-size: 0.95rem; }
.featured-overlay .badge { position: static; align-self: flex-start; }

/* Oyunlar */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* 5 oyun: üstte 2 geniş, altta 3 kart. Filtre açıkken eşit sütunlara döner. */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
}
.grid > .card { grid-column: span 2; }
.grid > .card:nth-child(-n + 2) { grid-column: span 3; }
.grid.is-filtered > .card { grid-column: span 2; }

.card {
  --card-accent: var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card[hidden] { display: none; }
.card:hover {
  transform: translateY(-6px);
  border-color: var(--card-accent);
  box-shadow: 0 24px 50px -24px var(--card-accent);
}
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card-link:focus-visible { outline: 3px solid var(--card-accent); outline-offset: -3px; border-radius: var(--radius); }

.theme-block-defense { --card-accent: #4fd1ff; }
.theme-okey { --card-accent: #3ed28a; }
.theme-tetris { --card-accent: #9bbc0f; }
.theme-tavla { --card-accent: #e0904f; }
.theme-numblr { --card-accent: #8b6bff; }

.banner { position: relative; aspect-ratio: 2 / 1; overflow: hidden; }
.banner-art { width: 100%; height: 100%; display: block; transition: transform 0.4s ease; }
.card:hover .banner-art { transform: scale(1.04); }

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: #1b1300;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card h3 { font-family: var(--font-display); font-size: 1.55rem; letter-spacing: -0.02em; margin: 0; }
.play { color: var(--card-accent); font-weight: 600; white-space: nowrap; transition: transform 0.2s ease; }
.card:hover .play { transform: translateX(4px); }
.tagline { margin: 4px 0 10px; color: var(--card-accent); font-weight: 600; }
.desc { margin: 0 0 16px; color: var(--muted); font-size: 0.95rem; flex: 1; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.tags li {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: #d7d3f5;
}

/* Hakkında */
.about {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 96px 0 72px;
}
.about-item {
  padding: 26px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
}
.about-icon { font-size: 1.6rem; }
.about-item h3 { font-family: var(--font-display); margin: 10px 0 6px; font-size: 1.25rem; }
.about-item p { margin: 0; color: var(--muted); }

.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-games { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-games a { text-decoration: none; }
.footer-games a:hover { color: var(--text); }

/* Banner animasyonları */
.fall { animation: fall 6s linear infinite; }
.fall-b { animation-duration: 7.5s; animation-delay: -2s; }
.fall-c { animation-duration: 5.5s; animation-delay: -4s; }
.fall-d { animation-duration: 8s; animation-delay: -1s; }
@keyframes fall { from { translate: 0 -160px; } to { translate: 0 120px; } }
.flash { animation: flash 2.4s ease-in-out infinite; opacity: 0; }
@keyframes flash { 0%, 70%, 100% { opacity: 0; } 80%, 90% { opacity: 0.9; } }

.float-a, .float-b { animation: float 4s ease-in-out infinite; }
.float-b { animation-delay: -2s; }
@keyframes float { 50% { translate: 0 -8px; } }

.row-a, .row-b, .row-c { animation: reveal 6s ease infinite both; }
.row-b { animation-delay: 0.4s; }
.row-c { animation-delay: 0.8s; }
@keyframes reveal { 0% { opacity: 0; translate: -14px 0; } 12%, 88% { opacity: 1; translate: 0 0; } 100% { opacity: 0; } }

.flow { animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -18; } }
.pulse { animation: pulse 2.4s ease-in-out infinite; transform-origin: 580px 160px; }
@keyframes pulse { 50% { opacity: 0.55; } }
.beam { animation: beam 0.9s steps(2) infinite; }
.beam-b { animation-delay: 0.45s; }
@keyframes beam { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .flash { opacity: 0; }
}

/* Mobil */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 24px 0 56px; }
  .featured { transform: none; }
  .about { grid-template-columns: 1fr; margin-top: 64px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid > .card, .grid > .card:nth-child(-n + 2), .grid.is-filtered > .card { grid-column: span 1; }
  .grid:not(.is-filtered) > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .topbar { padding: 16px; }
  main { padding: 0 16px; }
  .footer { padding: 24px 16px 32px; }
  .topnav { gap: 14px; font-size: 0.95rem; }
  .grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .btn { justify-content: center; }
  .featured { aspect-ratio: 16 / 10; }
  .featured-overlay { padding: 40px 18px 16px; }
  .featured-overlay strong { font-size: 1.4rem; }
  .featured-overlay span:last-child { font-size: 0.85rem; }
}

/* Reklam alanları: slot tanımlı değilse ads.js gizler */
.ad-slot { margin: 0 auto 56px; max-width: 970px; min-height: 90px; text-align: center; }
.ad-slot[data-oyunmatik-ad-state="empty"] { display: none; }
