:root {
  --bg: #0b0c12;
  --panel: #14161f;
  --card: #1b1e29;
  --line: #272b3a;
  --accent: #ffb100;      /* marquee amber */
  --accent-dim: #b57e00;
  --accent2: #ff3e7f;     /* neon magenta, used sparingly */
  --text: #f2f1ee;
  --muted: #8b8ea3;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
}

::selection { background: var(--accent); color: #17140a; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Header / Marquee --- */
header {
  position: relative;
  padding: 30px 24px 24px;
  text-align: center;
  background: linear-gradient(180deg, #171a24 0%, #0e0f16 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background-image: radial-gradient(circle, rgba(255,177,0,.65) 0 2px, transparent 3px);
  background-size: 16px 4px;
  background-repeat: repeat-x;
  opacity: .8;
}
header h1 {
  display: inline-block;
  font-family: 'Bungee', 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(26px, 5vw, 38px);
  letter-spacing: .5px;
  color: var(--accent);
  text-shadow:
    0 0 8px rgba(255, 177, 0, .55),
    0 0 24px rgba(255, 177, 0, .22),
    0 2px 0 rgba(0,0,0,.6);
}
header p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 13.5px;
}

/* --- Reklam alanları --- */
.ad-slot {
  max-width: 970px;
  margin: 18px auto;
  min-height: 90px;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
}
.ad-slot:empty::before { content: "Reklam Alanı"; }

.ad-slot-inline {
  grid-column: 1 / -1;
  min-height: 100px;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
}
.ad-slot-inline:empty::before { content: "Reklam Alanı"; }

.ad-slot-player {
  min-height: 90px;
  background: #0e0f16;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
}
.ad-slot-player:empty::before { content: "Reklam Alanı"; }

/* --- Arama --- */
.search-bar {
  position: relative;
  max-width: 480px;
  margin: 26px auto 10px;
  padding: 0 16px;
}
.search-bar::before {
  content: "🔍";
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  opacity: .45;
  pointer-events: none;
}
.search-bar input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-bar input::placeholder { color: var(--muted); }
.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 177, 0, .15);
}

/* --- Oyun grid --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 24px auto 40px;
  padding: 0 20px;
}

.game-card {
  position: relative;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--accent-dim);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(255, 177, 0, .35),
    0 0 22px rgba(255, 177, 0, .18);
}
.game-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: #232636;
}
.game-card::after {
  content: "▶";
  position: absolute;
  inset: 0 0 58px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: rgba(10, 11, 18, .38);
  opacity: 0;
  transition: opacity .16s ease;
  pointer-events: none;
}
.game-card:hover::after,
.game-card:focus-visible::after { opacity: 1; }

.game-card .info { padding: 11px 13px 13px; }
.game-card .info h3 {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 7px;
}
.game-card .info span {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  color: #17140a;
  background: var(--accent);
  padding: 2px 9px;
  border-radius: 999px;
}

/* --- Oyun Oynatıcı Modal (arcade dolabı bezeli) --- */
.player-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 10, .88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}
.player-overlay.active { display: flex; }

.player-box {
  width: 100%;
  max-width: 900px;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  background: linear-gradient(180deg, #191c27, #121420);
  border-bottom: 1px solid var(--line);
}
.player-header h3 {
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color .15s ease, background .15s ease;
}
.close-btn:hover { color: var(--text); background: rgba(255,255,255,.06); }

.player-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 62.5%;
  background: #000;
}
.player-frame-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* --- Zorunlu Interstitial Reklam --- */
.interstitial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 7, .94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
}
.interstitial-overlay.active { display: flex; }

.interstitial-box {
  width: 100%;
  max-width: 500px;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent2);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
.interstitial-ad {
  min-height: 300px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12.5px;
}
.interstitial-ad:empty::before { content: "Reklam Alanı (Interstitial)"; }

.interstitial-close {
  width: 100%;
  padding: 14px;
  background: var(--accent2);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.interstitial-close:hover:not(:disabled) { background: #e02f6c; }
.interstitial-close:disabled {
  background: var(--panel);
  color: var(--muted);
  cursor: not-allowed;
}

footer {
  text-align: center;
  padding: 26px 20px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}