:root {
  --bg: #07080d;
  --bg-soft: #0e111a;
  --card: #121622;
  --border: #1f2433;
  --text: #f1f3f9;
  --muted: #8a90a6;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --danger: #f43f5e;
  --ok: #34d399;
  --radius: 16px;
  --topbar-h: 68px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

/* ---------- üst bar ---------- */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background .25s, border-color .25s, backdrop-filter .25s;
}
.topbar.solid {
  background: rgba(7, 8, 13, .8);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.topbar .container { display: flex; align-items: center; gap: 8px; height: var(--topbar-h); }

/* Kahraman alanı olmayan sayfalarda içerik sabit üst barın altından başlar. */
body.page main { padding-top: var(--topbar-h); }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.08rem; letter-spacing: .2px; }
.brand-mark {
  flex: none; width: 34px; height: 34px;
  background: url("../favicon.svg") center / contain no-repeat;
}
.spacer { flex: 1; }

.nav-link { padding: 8px 12px; border-radius: 8px; color: #c9cede; font-size: .93rem; font-weight: 600; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255, 255, 255, .07); }

.lang { display: inline-flex; padding: 3px; margin-left: 6px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(7, 8, 13, .4); }
.lang button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: .76rem; font-weight: 700; letter-spacing: .6px;
  padding: 4px 10px; border-radius: 999px;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: #fff; color: #07080d; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06); color: var(--text); backdrop-filter: blur(8px);
  font: inherit; font-weight: 650; font-size: .97rem; cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
}
.btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { border-color: transparent; background: #fff; color: #07080d; }
.btn-primary:hover { background: #fff; border-color: transparent; box-shadow: 0 10px 34px rgba(139, 92, 246, .45); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-sm { padding: 7px 14px; font-size: .86rem; border-radius: 10px; }
.btn .tri { width: 10px; height: 11px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }

/* ---------- başlık etiketi (grafik bölümü) ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-size: .78rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-2);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

/* ---------- oyun listesi ---------- */

.section { padding-top: 72px; padding-bottom: 96px; scroll-margin-top: var(--topbar-h); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.grid { display: grid; gap: 34px 26px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

.card { display: flex; flex-direction: column; gap: 14px; }
.card .cover { border-radius: var(--radius); transition: transform .25s, box-shadow .25s; }
.card .cover img { transition: transform .5s; }
.card:hover .cover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .22); }
.card:hover .cover img { transform: scale(1.05); }
.card:focus-visible { outline: none; }
.card:focus-visible .cover { box-shadow: 0 0 0 3px var(--accent); }

.cover { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: var(--bg-soft); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover > span { font-size: 3.4rem; font-weight: 800; color: rgba(255, 255, 255, .85); }

.cover-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(7, 8, 13, .35); opacity: 0; transition: opacity .2s;
}
.card:hover .cover-play { opacity: 1; }
.cover-play i { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.cover-play i::after { content: ""; width: 16px; height: 18px; margin-left: 4px; background: #07080d; clip-path: polygon(0 0, 100% 50%, 0 100%); }

.card-body { display: flex; flex-direction: column; gap: 3px; }
.card-body h3 { margin: 0; font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.card-meta { color: var(--muted); font-size: .86rem; }
.card-body p {
  margin: 4px 0 0; color: #a6acbf; font-size: .92rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .76rem; font-weight: 600; color: #c9cede; background: rgba(255, 255, 255, .07); padding: 3px 10px; border-radius: 999px; }

.empty { grid-column: 1 / -1; text-align: center; padding: 72px 16px; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty strong { display: block; color: var(--text); font-size: 1.15rem; margin-bottom: 4px; }

/* ---------- oyun sayfası ---------- */

.backdrop {
  position: absolute; top: 0; left: 0; right: 0; height: 620px; z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}
.backdrop div { position: absolute; inset: -80px; background-size: cover; background-position: center; filter: blur(60px) saturate(1.3) brightness(.5); }

.game-head { padding: 34px 0 22px; }
.back { color: var(--muted); font-size: .92rem; font-weight: 600; }
.back:hover { color: var(--text); }
.game-head h1 { margin: 10px 0 12px; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }

.player {
  position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden;
  background: #000; border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .1);
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player .cover { position: absolute; inset: 0; aspect-ratio: auto; }
.player-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(5, 6, 10, .5); border: 0; cursor: pointer; color: #fff; font: inherit;
}
.play-circle { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: #fff; transition: transform .15s, box-shadow .15s; }
.play-circle::after { content: ""; width: 26px; height: 30px; margin-left: 7px; background: #07080d; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.player-overlay:hover .play-circle { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(255, 255, 255, .14); }

.game-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.extra-links { display: contents; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin: 28px 0 72px; }
.panel h2 { margin: 0 0 10px; font-size: 1.15rem; }
.description { white-space: pre-wrap; color: #c9cdda; margin: 0; max-width: 75ch; }
.meta { color: var(--muted); font-size: .88rem; margin-top: 16px; }

/* ---------- yönetim paneli ---------- */

.admin-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; padding: 28px 0 56px; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-grid .panel { margin: 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-weight: 600; font-size: .92rem; }
.field small { color: var(--muted); font-size: .82rem; }
.field input[type="text"], .field input[type="url"], .field textarea {
  padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font: inherit; width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input[type="file"] { color: var(--muted); font: inherit; font-size: .9rem; }
.field input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font: inherit; cursor: pointer;
}

.type-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.type-choice label {
  display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-soft); cursor: pointer; font-weight: 600;
}
.type-choice label small { display: block; font-weight: 400; }
.type-choice input { position: absolute; opacity: 0; }
.type-choice label:has(input:checked) { border-color: var(--accent); background: rgba(139, 92, 246, .12); }
.type-choice label:has(input:focus-visible) { outline: 2px solid var(--accent); }

.progress { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin: 4px 0 12px; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .15s; }
.status { min-height: 1.5em; font-size: .92rem; color: var(--muted); margin: 10px 0 0; }
.status.error { color: var(--danger); }
.status.ok { color: var(--ok); }

.admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.admin-list li { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); }
.admin-list .cover { width: 84px; flex: none; border-radius: 7px; }
.admin-list .cover > span { font-size: 1.4rem; }
.admin-list .info { flex: 1; min-width: 0; }
.admin-list .info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-list .info small { color: var(--muted); }

.notice { border: 1px solid var(--border); border-left: 4px solid var(--accent-2); background: var(--card); border-radius: 10px; padding: 16px 18px; margin: 28px 0; }
.notice code, .panel code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .9em; }

/* ---------- alt bilgi ---------- */

footer { margin-top: auto; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
footer .container { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; padding-top: 26px; padding-bottom: 26px; }

[hidden] { display: none !important; }

/* ---------- dar ekranlar: üst bar tek satırda kalsın ---------- */

.brand { white-space: nowrap; }
@media (max-width: 480px) {
  .topbar .container { gap: 2px; }
  .brand { font-size: 1rem; gap: 8px; }
  .nav-link { padding: 8px 8px; font-size: .86rem; }
  .lang { margin-left: 2px; }
  .lang button { padding: 4px 8px; }
}
@media (max-width: 400px) { .brand-mark { display: none; } }
