/* =====================================================================
   Ulu Hoca Games — koyu neumorphism, tek ekran
   Yüzeyler zeminle aynı renkte; biçimi gölgeler verir (sol üst ışık,
   sağ alt gölge). Renk yalnızca altın/çelik küreler ve köz kırmızısından gelir.
   Sayfa kaymaz: her şey görünür alana sığar, yalnızca oyun ızgarası
   (oyun çoğalırsa) kendi içinde kayar.
   ===================================================================== */

:root {
  color-scheme: dark;

  /* zemin + mürekkep */
  --bg: #24272e;
  --bg-hi: #2a2d35;
  --bg-lo: #1e2126;
  --ink: #eceef3;
  --ink-2: #a8aebb;
  --ink-3: #8b91a1;

  /* neumorphism: ışık / gölge */
  --sd: rgba(0, 0, 0, .46);
  --sl: rgba(255, 255, 255, .062);
  --edge: rgba(255, 255, 255, .04);
  --surface: linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(0, 0, 0, .075));
  --well: linear-gradient(145deg, rgba(0, 0, 0, .15), rgba(255, 255, 255, .012));
  --raise-1: 5px 5px 12px var(--sd), -4px -4px 10px var(--sl);
  --raise-2: 10px 10px 24px var(--sd), -8px -8px 20px var(--sl);
  --raise-3: 20px 20px 46px var(--sd), -14px -14px 38px var(--sl);
  --inset-1: inset 3px 3px 7px var(--sd), inset -3px -3px 6px var(--sl);
  --inset-2: inset 7px 7px 16px var(--sd), inset -6px -6px 14px var(--sl);

  /* palet: logo közü + altın (Ulu Coin) + çelik mavisi */
  --gold-hi: #f9d27e;
  --cream: #f6ead2;
  --steel: #8fa5bf;
  --amber: #f3b545;
  --ember: #ff4b3a;
  --on-accent: #22190d;

  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* ızgaranın gölgeleri kırpılmasın diye bıraktığı pay */
  --bleed: 24px;
}

/* ---------- temel ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  display: grid;
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden; /* tek ekran: sayfada kaydırma çubuğu yok */
  background: var(--bg);
  color: var(--ink);
  font: 500 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* çok hafif ışımalar (altın, çelik, köz): yüzeyler yarı saydam olduğu için altlarından akar */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(62vw 52vw at 88% -8%, rgba(243, 181, 69, .07), transparent 62%),
    radial-gradient(52vw 46vw at -8% 34%, rgba(143, 165, 191, .07), transparent 62%),
    radial-gradient(60vw 50vw at 62% 112%, rgba(255, 75, 58, .04), transparent 62%);
}

/* mat plastik hissi için ince gren */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
i { font-style: normal; }
[hidden] { display: none !important; }

::selection { background: var(--amber); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon {
  display: block;
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* köz: logodaki kırmızı ucun arayüzdeki karşılığı (durum ışığı) */
.ember {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 75, 58, .16), 0 0 12px var(--ember);
}

/* ---------- düğmeler ---------- */
.rbtn {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--raise-1);
  color: var(--ink-2);
  text-decoration: none;
  transition: color .2s, box-shadow .25s var(--ease), transform .25s var(--ease);
}
.rbtn:hover { color: var(--ink); }
.rbtn:active { box-shadow: var(--inset-1); transform: scale(.97); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--raise-1);
  color: var(--ink);
  font-weight: 700;
  font-size: .94rem;
  white-space: nowrap;
  text-decoration: none;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 8px 9px 18px var(--sd), -5px -5px 12px var(--sl); }
.btn:active { transform: none; box-shadow: var(--inset-1); }

/* ---------- logo madalyonu ---------- */
.medal {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, #fffaf0 10%, #efdcc7 90%);
}
.medal__mark { position: relative; width: 70%; translate: -3% 2%; }
.medal__mark img { width: 100%; height: auto; }

.medal--sm {
  width: 44px;
  box-shadow:
    3px 3px 8px rgba(0, 0, 0, .5), -2px -2px 6px rgba(255, 255, 255, .06),
    inset -2px -2px 4px rgba(170, 120, 90, .28), inset 2px 2px 3px #fff;
}
.medal--lg {
  width: clamp(88px, 12vw, 128px);
  box-shadow:
    9px 11px 24px rgba(0, 0, 0, .5), -6px -6px 16px rgba(255, 255, 255, .06),
    inset -4px -5px 10px rgba(170, 120, 90, .28), inset 3px 3px 6px #fff;
}

/* =====================================================================
   DÜZEN — tek ekran, iki sütun
   ===================================================================== */
/* Tüm pencereyi kaplar: genişlik/yükseklik sınırı yok */
.app {
  display: grid;
  grid-template-columns: clamp(290px, 24vw, 520px) minmax(0, 1fr);
  gap: clamp(28px, 3vw, 72px);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: clamp(18px, 3.4vh, 48px) clamp(18px, 3vw, 64px);
}

/* ---------- sol sütun: marka + öne çıkan kart ---------- */
.side {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.8vh, 28px);
  min-width: 0;
  min-height: 0;
}

.brandline { display: flex; align-items: center; gap: 12px; flex: none; }
.brandline .medal { display: none; }

.title {
  font: 800 clamp(2rem, min(4.2vw, 8.4vh), 3.8rem)/1 var(--display);
  letter-spacing: -.035em;
}
.title span { display: block; }
.title__a { text-shadow: 0 1px 0 rgba(255, 255, 255, .12), 8px 10px 22px rgba(0, 0, 0, .45); }
.title__b {
  width: fit-content;
  padding-bottom: .1em;
  background: linear-gradient(100deg, var(--ember) 0%, var(--amber) 48%, var(--cream) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(8px 10px 16px rgba(0, 0, 0, .4));
}

/* sahne: konsol kartı + etrafında süzülen küreler; kalan yüksekliği doldurur */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.ball {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%,
    #fff 0,
    color-mix(in srgb, var(--ball) 50%, #fff) 16%,
    var(--ball) 54%,
    color-mix(in srgb, var(--ball) 70%, #1c1a18) 100%);
}

.orb {
  z-index: 2;
  box-shadow: 10px 14px 26px rgba(0, 0, 0, .5), inset -5px -7px 14px rgba(90, 50, 40, .22);
  translate: calc(var(--px, 0) * var(--depth, 10) * 1px) calc(var(--py, 0) * var(--depth, 10) * 1px);
  transition: translate .8s var(--ease);
}
.orb--amber { --ball: var(--amber); --depth: 14; width: clamp(56px, 9vh, 84px); right: -24px; top: 12%; }
.orb--steel { --ball: var(--steel); --depth: -10; width: clamp(30px, 5vh, 44px); left: -14px; bottom: 20%; }
.orb--ember { --ball: var(--ember); --depth: 8; width: 20px; left: 34px; top: -8px; }

.console {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--edge);
  border-radius: 40px;
  background: var(--surface);
  box-shadow: var(--raise-3);
}
.console__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 6px 12px 12px;
}
.leds { display: flex; gap: 7px; }
.leds i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-lo); box-shadow: var(--inset-1); }
.leds i:first-child { background: var(--ember); box-shadow: 0 0 10px rgba(255, 75, 58, .7); }

/* pastel "ekran": referanstaki açık kartın koyu kabuk içindeki hâli */
.art {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  container-type: size; /* madalyon hem ene hem boya göre ölçeklensin */
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(85% 75% at 12% 8%, #f4e2bd 0, transparent 62%),
    radial-gradient(80% 90% at 100% 30%, #ece7de 0, transparent 60%),
    radial-gradient(90% 70% at 40% 112%, #cdd6e1 0, transparent 62%),
    #e6e2da;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), inset 0 -24px 44px rgba(120, 110, 95, .22);
}
.art__cover { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; object-fit: cover; }

.blob { position: absolute; aspect-ratio: 1; border-radius: 50%; }
.blob--a { width: 64%; left: -14%; top: -12%; background: radial-gradient(circle at 38% 34%, #fffaf0, #f2dfba 70%); opacity: .9; }
.blob--b { width: 74%; right: -26%; bottom: -14%; background: radial-gradient(circle at 36% 30%, #f1f2f4, #cbd4df 75%); opacity: .8; }

.art__ball { box-shadow: 8px 12px 22px rgba(50, 45, 40, .34), inset -4px -6px 12px rgba(40, 35, 30, .16); }
.art__ball--steel { --ball: var(--steel); width: 15%; left: 8%; bottom: 20%; }
.art__ball--gold { --ball: var(--amber); width: 20%; right: 7%; top: 8%; }
.art__ball--white { --ball: #fbf3ea; width: 8%; left: 27%; bottom: 8%; }

.medal--xl {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56%; /* kapsayıcı birimlerini tanımayan tarayıcılar için */
  width: min(58cqw, 68cqh);
  translate: -50% -50%;
  box-shadow:
    16px 20px 38px rgba(165, 105, 120, .42), -10px -10px 26px rgba(255, 255, 255, .9),
    inset -6px -8px 16px rgba(196, 150, 120, .24), inset 4px 4px 9px #fff;
}

/* puronun ucundaki köz */
.glow {
  position: absolute;
  left: 3.75%;
  top: 81.9%;
  width: 17%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 96, 64, .9) 0, rgba(255, 70, 50, .4) 38%, transparent 70%);
  opacity: .6;
}

/* kartın altı: oyun adı + oynat düğmesi */
.launch {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  margin-top: 14px;
  padding: 7px 7px 7px 20px;
  border-radius: 999px;
  background: var(--well);
  box-shadow: var(--inset-1);
}
.launch__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font: 600 .92rem/1.3 var(--display);
  letter-spacing: -.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.launch__btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: var(--bg-hi);
  box-shadow: var(--raise-1);
  color: var(--ink-3);
  text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.launch__btn[aria-disabled="true"] { pointer-events: none; }
.console.is-live .launch__btn {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-hi), var(--amber));
  color: var(--on-accent);
}
.console.is-live .launch__btn:hover { transform: scale(1.06); }
.console.is-live .launch__btn:active { transform: scale(.97); box-shadow: inset 3px 4px 8px rgba(120, 75, 20, .5); }

/* ---------- Kick hesabı ---------- */
.account { flex: none; min-width: 0; }

.kick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 54px;
  padding: 0 22px 0 14px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--raise-1);
  color: var(--ink);
  font-weight: 700;
  font-size: .94rem;
  white-space: nowrap;
  text-decoration: none;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.kick-btn:hover { transform: translateY(-2px); box-shadow: 8px 9px 18px var(--sd), -5px -5px 12px var(--sl); }
.kick-btn:active { transform: none; box-shadow: var(--inset-1); }

/* Kick'in resmi "K" simgesi, marka yeşili zemin üzerinde */
.kick-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #53fc19;
  color: #0b0e0f;
  box-shadow: 0 0 16px rgba(83, 252, 25, .32), inset -2px -2px 4px rgba(0, 0, 0, .18), inset 1px 1px 2px rgba(255, 255, 255, .6);
}
.kick-mark svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- giriş sayfası (/giris) ---------- */
.gate {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 24px 20px;
}
.gate__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(22px, 4.2vh, 36px);
  width: min(420px, 100%);
  padding: clamp(32px, 6vh, 54px) clamp(24px, 5vw, 44px);
  border: 1px solid var(--edge);
  border-radius: 48px;
  background: var(--surface);
  box-shadow: var(--raise-3);
  text-align: center;
}
.gate .title { font-size: clamp(2rem, min(9vw, 7vh), 3rem); }
.gate .title__b { margin-inline: auto; }
.gate .kick-btn { height: 58px; font-size: .98rem; }

.medal--gate {
  width: clamp(116px, 22vh, 168px);
  box-shadow:
    12px 14px 30px rgba(0, 0, 0, .5), -8px -8px 20px rgba(255, 255, 255, .06),
    inset -5px -6px 12px rgba(170, 120, 90, .28), inset 3px 3px 7px #fff;
}

.gate .orb--amber { right: -30px; top: 14%; }
.gate .orb--steel { left: -20px; top: auto; bottom: 24%; }
.gate .orb--ember { left: 44px; top: -10px; }

.user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 6px;
  border-radius: 999px;
  background: var(--well);
  box-shadow: var(--inset-1);
}
.user__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold-hi), var(--amber));
  box-shadow: 3px 3px 7px var(--sd), -2px -2px 5px var(--sl);
  color: var(--on-accent);
  font: 800 .95rem/1 var(--display);
}
.user__avatar img { width: 100%; height: 100%; object-fit: cover; }
.user__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  font-size: .94rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.user .rbtn { width: 42px; height: 42px; }
.user .rbtn .icon { width: 18px; height: 18px; }

/* giriş hatası bildirimi */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 14px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(36, 39, 46, .94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--raise-2);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  translate: -50% 0;
  transition: opacity .4s, translate .4s var(--ease);
}
.toast.is-out { opacity: 0; translate: -50% 12px; }

/* ---------- sağ sütun: kütüphane ---------- */
.lib {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex: none;
}

/* dolgu + eksi kenar boşluğu: yatay kaydırma gölgeleri kırpmasın */
.chips {
  display: flex;
  flex: 1 1 auto;
  gap: 12px;
  min-width: 0;
  margin: -14px;
  padding: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  height: 44px;
  padding: 0 18px 0 15px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--raise-1);
  color: var(--ink-2);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  transition: box-shadow .25s var(--ease), color .2s;
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .28;
  transition: opacity .2s, background .2s, box-shadow .2s;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { border-color: transparent; box-shadow: var(--inset-1); color: var(--cream); }
.chip[aria-pressed="true"]::before { background: var(--ember); opacity: 1; box-shadow: 0 0 8px var(--ember); }

.toolbar__right { display: flex; align-items: center; gap: 16px; flex: none; min-width: 0; }

/* Ulu Coin sayacı */
.wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 48px;
  padding: 0 18px 0 6px;
  border-radius: 999px;
  background: var(--well);
  box-shadow: var(--inset-1);
  white-space: nowrap;
}
.coin {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #fff6d8 0, #f7d27a 22%, #f3b545 58%, #c98a1e 100%);
  box-shadow:
    3px 4px 8px rgba(0, 0, 0, .45),
    inset -2px -3px 5px rgba(120, 70, 10, .35),
    inset 0 0 0 3px rgba(255, 236, 180, .35);
}
.coin img { width: 62%; height: auto; translate: -3% 2%; opacity: .85; }
.wallet__amount {
  color: var(--cream);
  font: 600 1rem/1 var(--display);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.wallet__unit { color: var(--ink-3); font-size: .78rem; font-weight: 700; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 280px;
  min-width: 200px;
  height: 48px;
  border-radius: 999px;
  background: var(--well);
  box-shadow: var(--inset-1);
  color: var(--ink-3);
  transition: box-shadow .25s var(--ease);
}
.search .icon { position: absolute; left: 16px; width: 19px; height: 19px; pointer-events: none; }
.search input {
  width: 100%;
  height: 100%;
  padding: 0 46px;
  border: 0;
  border-radius: inherit;
  outline: none;
  background: none;
  color: var(--ink);
  font: 600 .94rem var(--body);
}
.search input::placeholder { color: var(--ink-3); opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.search:focus-within { box-shadow: var(--inset-2), 0 0 0 2px rgba(189, 216, 239, .6); }
.search kbd {
  position: absolute;
  right: 12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 2px 2px 5px var(--sd), -2px -2px 4px var(--sl);
  font: 700 .74rem var(--body);
  pointer-events: none;
}
.search:focus-within kbd { opacity: 0; }

/* ---------- oyun ızgarası ----------
   Kalan yüksekliği doldurur. Sığmayan oyunlar bu alanın içinde kayar;
   kaydırma çubuğu gizlidir. Eksi kenar boşluğu + dolgu, kayan alanın
   kart gölgelerini kırpmasını önler. */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: clamp(18px, 2vw, 28px);
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 calc(var(--bleed) * -1) calc(var(--bleed) * -1);
  padding: 22px var(--bleed) var(--bleed);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.grid::-webkit-scrollbar { display: none; }

/* boş kütüphane: yuvalar alanı tam doldurur, kayma olmaz */
.grid--bare {
  grid-auto-rows: minmax(0, 1fr);
  align-content: stretch;
  overflow: hidden;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--edge);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--raise-2);
  color: inherit;
  text-decoration: none;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: 16px 18px 36px var(--sd), -10px -10px 26px var(--sl); }
.card:active { transform: none; box-shadow: var(--inset-1); transition-duration: .12s; }

.cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  background: #e6e2da;
}
.cover > img { width: 100%; height: 100%; object-fit: cover; }

/* kapak görseli olmayan oyunlar için üretilen yedek kapak */
.gen {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 80% at 12% 8%, var(--c1) 0, transparent 62%),
    radial-gradient(80% 90% at 100% 34%, var(--c2) 0, transparent 60%),
    radial-gradient(90% 70% at 46% 112%, var(--c3) 0, transparent 62%),
    #e6e2da;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.gen__disc {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, rgba(255, 255, 255, .9), rgba(255, 255, 255, .3) 72%);
}
.gen .ball {
  box-shadow: 6px 9px 16px rgba(50, 45, 40, .32), inset -3px -5px 9px rgba(40, 35, 30, .16);
  transition: translate .6s var(--ease);
}
.card:hover .gen .ball:nth-of-type(2) { translate: -4px -5px; }
.card:hover .gen .ball:nth-of-type(3) { translate: 5px 3px; }

.tag {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #3a2c33;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.card__body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px 4px 8px;
}
.card__text { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font: 600 .9rem/1.3 var(--display);
  letter-spacing: -.02em;
}
.card__desc {
  overflow: hidden;
  color: var(--ink-3);
  font-size: .82rem;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.play {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--raise-1);
  color: var(--ink-2);
  transition: color .25s, background .25s, border-color .25s;
}
.play .icon { width: 20px; height: 20px; }
.card:hover .play, .card:focus-visible .play {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-hi), var(--amber));
  color: var(--on-accent);
}

/* boş raf yuvası */
.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  border-radius: 30px;
  background: var(--well);
  box-shadow: var(--inset-2);
  color: var(--ink-3);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.slot .icon { width: 40px; height: 40px; stroke-width: 1.4; opacity: .7; }

/* arama sonucu yok */
.empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 48px 24px;
  border-radius: 30px;
  background: var(--well);
  box-shadow: var(--inset-2);
  color: var(--ink-2);
  text-align: center;
}
.empty strong { color: var(--ink); font: 600 1.1rem/1.3 var(--display); letter-spacing: -.02em; }

/* ---------- oyun penceresi: pencereli tam ekran (tarayıcı penceresini doldurur) ---------- */
.player {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #15171b;
  color: inherit;
  overflow: hidden;
}
.player::backdrop { background: #15171b; }
.player__panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.player__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 10px;
  flex: none;
  border-bottom: 1px solid var(--edge);
  background: linear-gradient(180deg, #24272e, #1d2026);
}
.player__bar .rbtn { width: 38px; height: 38px; }
.player__bar .eyebrow { display: none; }
.player__brand { display: flex; align-items: center; gap: 9px; flex: none; padding-right: 14px; border-right: 1px solid var(--edge); }
.medal--xs { width: 32px; box-shadow: 2px 2px 6px rgba(0, 0, 0, .5), inset -2px -2px 3px rgba(170, 120, 90, .28), inset 1px 1px 2px #fff; }
.player__brandname { font: 600 .9rem/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.player__brandname b { color: var(--amber); font-weight: 600; }
.player__meta { flex: 1 1 auto; min-width: 0; }
.wallet--bar { height: 38px; padding: 0 14px 0 4px; gap: 8px; }
.wallet--bar .coin { width: 30px; height: 30px; }
.wallet--bar .wallet__amount { font-size: .92rem; }
.player__title {
  overflow: hidden;
  font: 600 .95rem/1.3 var(--display);
  letter-spacing: -.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.player__screen {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background: #15171b;
}
.player__screen:fullscreen { border-radius: 0; }
.player__screen iframe { display: block; width: 100%; height: 100%; border: 0; }
.player__blank {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  color: var(--ink-2);
  text-align: center;
}
.player__blank strong { color: var(--ink); font: 600 1.1rem/1.3 var(--display); letter-spacing: -.02em; }

/* ---------- önizleme (demo) etiketi ---------- */
.demo-flag {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 14px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(36, 39, 46, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--raise-2);
  color: var(--ink-2);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}
.demo-flag a { color: var(--cream); font-weight: 700; text-underline-offset: 3px; }

/* ---------- hareket ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .9s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms); }
  .grid > * { animation: rise .55s var(--ease) backwards; animation-delay: calc(min(var(--i, 0), 11) * 40ms); }

  .orb--amber { animation: float 7s ease-in-out infinite alternate; }
  .orb--steel { animation: float 9s ease-in-out -3s infinite alternate; }
  .orb--ember { animation: float 6s ease-in-out -1.5s infinite alternate; }

  .ember { animation: ember 3.2s ease-in-out infinite; }
  .glow { animation: glow 3.2s ease-in-out infinite; }

  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes float { from { transform: translateY(-7px); } to { transform: translateY(8px); } }
  @keyframes ember { 50% { opacity: .55; box-shadow: 0 0 0 3px rgba(255, 75, 58, .08), 0 0 5px var(--ember); } }
  @keyframes glow { 0%, 100% { opacity: .3; scale: .8; } 50% { opacity: .95; scale: 1.2; } }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}

/* =====================================================================
   DUYARLI DÜZEN — her boyutta tek ekran
   ===================================================================== */

/* orta genişlik: 3 sütun kart */
@media (max-width: 1240px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* geniş ekran: yazılar ve ölçüler bir tık büyür (kareler büyük kalsın diye sütun sayısı az) */
@media (min-width: 1700px) {
  .title { font-size: clamp(3.4rem, min(3.6vw, 8.4vh), 5rem); }
}
@media (min-width: 2200px) {
  html { font-size: 18px; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .chip { height: 50px; padding: 0 22px 0 18px; }
  .search { height: 54px; flex-basis: 340px; }
  .kick-btn, .user .rbtn { height: 58px; }
  .user__avatar, .user .rbtn { width: 48px; height: 48px; }
}

/* basık ekran (küçük dizüstü): kartın üst şeridini at, payları kıs */
@media (max-height: 640px) and (min-width: 901px) {
  .console { padding: 12px; border-radius: 34px; }
  .console__top { display: none; }
  .art { border-radius: 24px; }
  .launch { margin-top: 12px; }
}

/* dar ekran / telefon: marka tek satır, altında kütüphane.
   Öne çıkan kart yer kaplamasın diye gizlenir; ızgara kendi içinde kayar. */
@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 18px;
    height: 100vh;
    height: 100dvh;
    padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  }
  .side { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .brandline { min-width: 0; }
  .stage { display: none; }
  .user { padding: 4px; gap: 8px; }
  .user__avatar, .user .rbtn { width: 38px; height: 38px; }
  .user__name { max-width: 22vw; font-size: .86rem; }
  .brandline .medal { display: grid; }
  .title { font-size: clamp(1.15rem, 5.4vw, 1.7rem); }
  .title span { display: inline; }
  .title__a { text-shadow: none; }
  .title__b { padding-bottom: 0; filter: none; }

  .toolbar { flex-direction: column-reverse; align-items: stretch; gap: 18px; }
  .toolbar__right { gap: 12px; }
  .search { flex: 1 1 auto; min-width: 0; }
  .search kbd { display: none; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; --bleed: 16px; padding-top: 20px; }
  .demo-flag { right: 50%; translate: 50% 0; }
}

@media (max-width: 520px) {
  .title { font-size: clamp(1rem, 4.6vw, 1.3rem); }
  .user__name, .wallet__unit { display: none; }
  .player__brandname { display: none; }
  .player__brand { padding-right: 10px; }
  .wallet { padding-right: 14px; }
  .grid { gap: 14px; }
  .card { padding: 8px; border-radius: 24px; }
  .cover { border-radius: 17px; }
  .tag { left: 7px; top: 7px; padding: 4px 9px; font-size: .62rem; }
  .card__body { gap: 8px; padding: 10px 2px 3px 6px; }
  .card__title { font-size: .74rem; }
  .card__desc { display: none; }
  .play { width: 34px; height: 34px; }
  .play .icon { width: 16px; height: 16px; }
  .slot { border-radius: 24px; }

}
