/* ═══════════════════════════════════════════════
   MALIK3D ARCADE — KÜTÜPHANE ARAYÜZÜ
   ═══════════════════════════════════════════════ */

/* ── TASARIM TOKENLARI (portfolyo ile aynı dil) ── */
:root {
  --bg:      #0c0c0e;
  --paper:   #111115;
  --card:    #18181e;
  --card-2:  #1e1e26;
  --border:  #242430;
  --border-2:#32323f;
  --accent:  #e8c97a;
  --accent2: #5b8fff;
  --ok:      #4ade80;
  --text:    #dddde8;
  --muted:   #686878;
  --dim:     #3a3a4a;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Syne', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;

  --pad: clamp(1.15rem, 4.5vw, 3.5rem);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Toony yuvarlaklık — keskin köşe fazla teknik duruyordu */
  --r-card: 16px;
  --r-med:  12px;
  --r-sm:   9px;
  --r-pill: 999px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100svh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
img, iframe { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
::selection { background: var(--accent); color: #0c0c0e; }

/* Gren dokusu */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
}

/* Boot sırasında sayfa kaymasın */
body.is-booting { overflow: hidden; }
body.is-playing { overflow: hidden; }

/* ── ÖZEL İMLEÇ (sadece fare olan cihazlarda) ── */
.cursor, .cursor-ring { display: none; }

@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, input { cursor: none; }

  .cursor {
    display: block;
    position: fixed; top: 0; left: 0;
    width: 9px; height: 9px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width .2s, height .2s;
    mix-blend-mode: difference;
  }
  .cursor.big { width: 14px; height: 14px; }

  .cursor-ring {
    display: block;
    position: fixed; top: 0; left: 0;
    width: 34px; height: 34px;
    border: 1px solid rgba(232,201,122,.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99997;
    transform: translate(-50%, -50%);
    transition: width .32s var(--ease), height .32s var(--ease), border-color .32s;
  }
  .cursor-ring.big { width: 54px; height: 54px; border-color: rgba(232,201,122,.7); }

  /* Oyun oynanırken sistem imlecine dön */
  body.is-playing { cursor: auto; }
  body.is-playing .cursor,
  body.is-playing .cursor-ring { opacity: 0; }
}

/* ═══════════════════════════════════════════════
   BOOT EKRANI
   ═══════════════════════════════════════════════ */
.boot {
  position: fixed; inset: 0;
  z-index: 9000;
  background: #08080a;
  display: grid;
  place-items: center;
  padding: calc(2rem + var(--safe-t)) 1.25rem calc(2rem + var(--safe-b));
  overflow: hidden;
}
.boot.is-done {
  animation: boot-out .7s var(--ease) forwards;
  pointer-events: none;
}
@keyframes boot-out {
  to { opacity: 0; transform: scale(1.06); filter: blur(14px); visibility: hidden; }
}

/* Tarayıcı çizgileri + vinyet */
.boot-scan {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.028) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 45%, rgba(232,201,122,.07), transparent 62%);
  animation: flicker 4.5s steps(30) infinite;
}
@keyframes flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: .82; }
  98% { opacity: 1; }
  99% { opacity: .9; }
}

.boot-inner {
  position: relative;
  width: min(620px, 100%);
  text-align: center;
}

/* Marka mührü */
.boot-mark {
  position: relative;
  width: 74px; height: 74px;
  margin: 0 auto 1.6rem;
  display: grid; place-items: center;
  border: 1px solid rgba(232,201,122,.35);
  border-radius: var(--r-med);
  background: linear-gradient(160deg, rgba(232,201,122,.1), transparent 70%);
  animation: mark-in .9s var(--ease) both;
}
@keyframes mark-in {
  from { opacity: 0; transform: translateY(14px) scale(.9); }
}
.boot-mark-glyph {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  color: var(--accent);
  letter-spacing: .02em;
}
.boot-mark-ring {
  position: absolute; inset: -9px;
  border: 1px solid rgba(232,201,122,.16);
  border-radius: 5px;
  animation: ring-pulse 2.2s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: .9;  transform: scale(1.05); }
}

.boot-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.5rem, 6.5vw, 2.5rem);
  letter-spacing: .12em;
  line-height: 1.1;
  animation: fade-up .8s .12s var(--ease) both;
}
.boot-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0;
}
.boot-sub {
  margin-top: .7rem;
  font-family: var(--mono);
  font-size: clamp(.56rem, 2.4vw, .68rem);
  letter-spacing: .2em;
  color: var(--muted);
  animation: fade-up .8s .22s var(--ease) both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
}

/* Terminal kaydı */
.boot-log {
  margin: 1.9rem auto 1.3rem;
  min-height: 8.5em;
  max-height: 8.5em;
  overflow: hidden;
  text-align: left;
  font-family: var(--mono);
  font-size: clamp(.6rem, 2.6vw, .72rem);
  line-height: 1.7;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: .9rem;
}
.boot-line { display: flex; gap: .55rem; animation: line-in .3s var(--ease) both; }
@keyframes line-in { from { opacity: 0; transform: translateX(-6px); } }
.boot-line b {
  font-weight: 500;
  color: var(--ok);
  flex: none;
}
.boot-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.boot-line.is-pending b { color: var(--accent); }

/* İlerleme çubuğu */
.boot-bar {
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.boot-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  transition: width .35s var(--ease);
}
.boot-meta {
  display: flex; justify-content: space-between;
  margin-top: .6rem;
  font-family: var(--mono);
  font-size: clamp(.55rem, 2.3vw, .65rem);
  letter-spacing: .14em;
  color: var(--dim);
}
#boot-pct { color: var(--accent); }

.boot-skip {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .6rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  transition: color .25s, border-color .25s, background .25s;
  min-height: 40px;
}
.boot-skip:hover, .boot-skip:focus-visible {
  color: var(--accent);
  border-color: rgba(232,201,122,.45);
  background: rgba(232,201,122,.05);
}

/* Güç verme parlaması */
.boot-flash {
  position: absolute; inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.boot-flash.fire { animation: flash .5s ease-out forwards; }
@keyframes flash {
  0%   { opacity: 0; }
  12%  { opacity: .82; }
  100% { opacity: 0; }
}

/* ═══════════════════════════════════════════════
   İŞLETİM SİSTEMİ KABUĞU
   ═══════════════════════════════════════════════ */
.os {
  opacity: 0;
  transform: scale(.985);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.os.is-on { opacity: 1; transform: none; }

/* Açılışta bölümler sırayla gelsin */
.os.is-on .masthead { animation: fade-up .7s .05s var(--ease) both; }
.os.is-on .toolbar  { animation: fade-up .7s .16s var(--ease) both; }
.os.is-on #shelves  { animation: fade-up .7s .26s var(--ease) both; }

/* ── MENÜ ÇUBUĞU ── */
.menubar {
  position: sticky; top: 0; z-index: 500;
  display: flex; align-items: center; gap: 1rem;
  padding: calc(.75rem + var(--safe-t)) var(--pad) .75rem;
  background: rgba(12,12,14,.82);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}
.mb-logo {
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none;
  flex: none;
}
.mb-logo-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  animation: ring-pulse 4s ease-in-out infinite;
  flex: none;
}
.mb-logo-text {
  font-family: var(--sans);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .01em;
  white-space: nowrap;
}
.mb-logo-text em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.mb-nav {
  display: flex; gap: 1.5rem;
  margin-left: auto;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.mb-nav a {
  text-decoration: none;
  transition: color .22s;
  padding: .3rem 0;
}
.mb-nav a:hover { color: var(--accent); }

.mb-status { display: flex; gap: .5rem; flex: none; }
.mb-pill {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .1em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: .34rem .6rem;
  white-space: nowrap;
}
.mb-clock { color: var(--accent); min-width: 4.6em; text-align: center; }

.os-body { padding: 0 var(--pad) calc(2rem + var(--safe-b)); }

/* ═══════════════════════════════════════════════
   KÜNYE
   ═══════════════════════════════════════════════ */
.masthead {
  padding: clamp(2.6rem, 7vw, 4.5rem) 0 clamp(1.6rem, 4vw, 2.4rem);
  max-width: 52ch;
}
.mh-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: .9rem 0 .9rem;
}
.mh-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0;
}
.mh-desc {
  color: var(--muted);
  font-size: clamp(.9rem, 2.6vw, 1rem);
  line-height: 1.75;
}
.mh-meta {
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ═══════════════════════════════════════════════
   RAFLAR
   ═══════════════════════════════════════════════ */
.shelf { padding-bottom: clamp(2.2rem, 5.5vw, 3.4rem); }

.shelf-head {
  display: flex; align-items: center; gap: .9rem;
  margin-bottom: 1.15rem;
}
.shelf-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .04em;
  flex: none;
}
/* Rafın kenarına uzanan ince çizgi — katalog hissi */
.shelf-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.shelf-note {
  flex: none;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── Öne çıkan ── */
.featured {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(1.1rem, 3vw, 2.2rem);
  align-items: center;
  width: 100%;
  text-align: left;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  transition: border-color .3s, background .3s;
}
.featured:hover, .featured:focus-visible {
  border-color: var(--border-2);
  background: var(--card-2);
  outline: none;
}
.featured:focus-visible { border-color: var(--accent); }

.featured .cover,
.featured-cover {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-med);
}
.featured-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.featured-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.25rem, 3.6vw, 1.75rem);
  letter-spacing: -.015em;
  margin-bottom: .55rem;
}
.featured-desc {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 52ch;
}
.featured-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.2rem; }
.featured-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #0c0c0e;
  background: var(--accent);
  padding: .8rem 1.4rem;
  border-radius: var(--r-pill);
  min-height: 44px;
  transition: transform .25s var(--ease);
}
.featured:hover .featured-cta { transform: translateY(-2px); }

/* ═══════════════════════════════════════════════
   ARAÇ ÇUBUĞU
   ═══════════════════════════════════════════════ */
.eyebrow {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.toolbar {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  padding: 0 0 clamp(1.8rem, 4.5vw, 2.6rem);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.search {
  position: relative;
  display: flex; align-items: center;
  flex: 1 1 240px;
  max-width: 340px;
  border: 1px solid var(--border);
  border-radius: var(--r-med);
  background: var(--paper);
  transition: border-color .22s;
}
.search:focus-within { border-color: rgba(232,201,122,.5); }
.search-icon { padding: 0 .3rem 0 .8rem; color: var(--muted); font-size: 1rem; }
.search input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  padding: .8rem .5rem;
  /* 16px: iOS'ta odaklanınca zoom yapmasın */
  font-size: 16px;
  font-family: var(--sans);
}
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
  padding: 0 .85rem;
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1;
  align-self: stretch;
}
.search-clear:hover { color: var(--accent); }

.chips {
  display: flex; gap: .45rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-left: auto;
  max-width: 100%;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .6rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  white-space: nowrap;
  min-height: 42px;
  transition: color .2s, border-color .2s, background .2s;
}
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip.is-active {
  color: #0c0c0e;
  background: var(--accent);
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════════
   OYUN IZGARASI
   ═══════════════════════════════════════════════ */
.grid {
  display: grid;
  /* auto-fill: boş sütunlar korunur, böylece 2 oyunlu rafla 5 oyunlu rafın
     kartları aynı genişlikte olur. auto-fit kullanınca az oyunlu raflarda
     kartlar şişip kütüphane dağınık görünüyordu. */
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(.9rem, 2.2vw, 1.4rem);
}

/* Tek oyun kaldığında kart tüm satırı kaplamasın */
.grid > .card { max-width: 420px; width: 100%; }

.card {
  position: relative;
  display: flex; flex-direction: column;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  animation: fade-up .5s var(--ease) both;
}
.card:hover, .card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-2);
  box-shadow: 0 14px 28px rgba(0,0,0,.3);
  outline: none;
}
.card:focus-visible { border-color: var(--accent); }
.card:active { transform: translateY(-1px) scale(.995); }
.card.is-soon { opacity: .62; }
.card.is-soon:hover { transform: none; box-shadow: none; }

/* Kapak görseli — tamamen CSS, asset yok */
.cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  /* Kapak, sayfadan daha aydınlık ve renkli bir panel olsun — koyu
     zeminde duran çizim sert görünüyordu, oyun kapağı gibi durmuyordu */
  background:
    radial-gradient(circle at 28% 20%, var(--g1) 0%, transparent 64%),
    radial-gradient(circle at 76% 84%, var(--g2) 0%, transparent 62%),
    linear-gradient(155deg, #2a2a35, #191922);
  border-bottom: 1px solid var(--border);
  display: grid; place-items: center;
  border-radius: 0;
}
.cover::before {
  content: '';
  position: absolute; inset: 0;
  /* Izgara teknik duruyordu; yerine yumuşak bir ışık lekesi */
  background: radial-gradient(ellipse at 50% 36%, rgba(255,255,255,.06), transparent 60%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 20%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 20%, transparent 76%);
}
.cover::after {
  content: '';
  position: absolute; inset: 0;
  /* Rozetlerin okunması için hafif bir koyulaştırma yeter; daha fazlası
     kapak çizimlerinin alt yarısını yutuyordu */
  background: linear-gradient(to top, rgba(8,8,10,.22), transparent 38%);
}
/* Oyunun sahnesi — kapağın ortasında, kartla birlikte ölçeklenir */
.cover-art {
  position: relative;
  display: block;
  width: 68%;
  max-width: 230px;
  transition: transform .45s var(--ease);
}
.cover-art svg { display: block; width: 100%; height: auto; }
.featured-cover .cover-art { width: 82%; }
.card:hover .cover-art,
.featured:hover .cover-art { transform: scale(1.04); }

.cover-glyph {
  position: relative;
  font-size: clamp(2.6rem, 9vw, 3.6rem);
  color: #fff;
  opacity: .92;
  text-shadow: none;
  transition: transform .45s var(--ease);
}
.card:hover .cover-glyph { transform: scale(1.06); }

.cover-badge {
  position: absolute; top: .7rem; left: .7rem;
  z-index: 2;
  font-family: var(--mono);
  font-size: .56rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .3rem .55rem;
  border-radius: var(--r-pill);
  background: rgba(8,8,10,.75);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
}
.cover-badge.is-soon { color: var(--accent); border-color: rgba(232,201,122,.4); }

/* Oynat rozeti */
.cover-play {
  position: absolute; bottom: .7rem; right: .7rem;
  z-index: 2;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #0c0c0e;
  font-size: .8rem;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.card:hover .cover-play { opacity: 1; transform: none; }

.card-body { padding: 1rem 1.05rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.card-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -.01em;
  margin-bottom: .35rem;
}
.card-tagline {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: .85rem;
  flex: 1;
}
.card-tags { display: flex; flex-wrap: wrap; gap: .35rem; }

.tag {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: .28rem .5rem;
}
.tag-accent { color: var(--accent); border-color: rgba(232,201,122,.32); }

.empty {
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  padding: 3rem 0 4rem;
}

/* ── ALT BİLGİ ── */
.os-footer {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: .74rem;
  color: var(--muted);
}
.os-footer-links { display: flex; gap: 1.2rem; }
.os-footer a { text-decoration: none; transition: color .22s; }
.os-footer a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════
   OYUN PENCERESİ
   ═══════════════════════════════════════════════ */
.player {
  position: fixed; inset: 0;
  z-index: 8000;
  display: grid; place-items: center;
  padding: clamp(.75rem, 3vw, 2.5rem);
  padding-top: calc(clamp(.75rem, 3vw, 2.5rem) + var(--safe-t));
  padding-bottom: calc(clamp(.75rem, 3vw, 2.5rem) + var(--safe-b));
}
.player[hidden] { display: none; }

.player-backdrop {
  position: absolute; inset: 0;
  background: rgba(6,6,8,.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade-in .3s ease both;
}
@keyframes fade-in { from { opacity: 0; } }

.player-window {
  position: relative;
  display: flex; flex-direction: column;
  width: min(1120px, 100%);
  height: min(760px, 100%);
  background: var(--paper);
  border: 1px solid var(--border-2);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,.5);
  animation: win-in .42s var(--ease) both;
}
@keyframes win-in {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
}
.player.is-closing .player-window { animation: win-out .22s ease forwards; }
.player.is-closing .player-backdrop { animation: fade-out .22s ease forwards; }
@keyframes win-out { to { opacity: 0; transform: scale(.97); } }
@keyframes fade-out { to { opacity: 0; } }

/* Pencere başlığı */
.pw-chrome {
  display: flex; align-items: center; gap: .9rem;
  padding: .6rem .8rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex: none;
}
.pw-dots { display: flex; gap: .4rem; flex: none; }
.pw-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--dim);
}
.pw-dot-close { background: #ff5f57; cursor: pointer; }
.pw-title {
  flex: 1; min-width: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pw-actions { display: flex; gap: .3rem; flex: none; }
.pw-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: .9rem;
  transition: background .2s, color .2s;
}
.pw-btn:hover { background: var(--card-2); color: var(--accent); }
.pw-btn-close:hover { background: rgba(255,95,87,.16); color: #ff5f57; }

/* Sahne */
.pw-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #08080a;
}
.pw-stage iframe {
  width: 100%; height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity .35s ease;
}
.pw-stage iframe.is-ready { opacity: 1; }

.pw-loading {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  align-content: center;
  gap: 1rem;
  pointer-events: none;
  transition: opacity .3s ease;
}
.pw-loading.is-hidden { opacity: 0; }
.pw-loading-bar {
  width: 150px; height: 2px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}
.pw-loading-bar::after {
  content: '';
  position: absolute; inset: 0;
  width: 42%;
  background: var(--accent);
  animation: slide 1.1s var(--ease) infinite;
}
@keyframes slide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(280%); }
}
.pw-loading-text {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Yatay çevir ipucu */
.pw-hint {
  flex: none;
  padding: .6rem .9rem;
  text-align: center;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--accent);
  background: rgba(232,201,122,.07);
  border-top: 1px solid var(--border);
}
.pw-hint[hidden] { display: none; }

/* ═══════════════════════════════════════════════
   DUYARLI YERLEŞİM
   ═══════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
  .featured {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .featured .cover,
.featured-cover { max-width: 420px; }
  .mb-nav { gap: 1.1rem; font-size: .68rem; }
}

/* Telefon */
@media (max-width: 640px) {
  .menubar { gap: .6rem; padding-left: 1.15rem; padding-right: 1.15rem; }
  .mb-logo-text { font-size: .82rem; }
  /* Menü linklerini gizle, sistem durumu kalsın */
  .mb-nav { display: none; }
  .mb-status { margin-left: auto; }
  #mb-count { display: none; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cover { aspect-ratio: 4 / 3; }
  .card-body { padding: .8rem .8rem .95rem; }
  .card-title { font-size: .92rem; }
  .card-tagline { font-size: .74rem; margin-bottom: .7rem; }
  /* Dar kartta etiket ortadan kesilmeyip tamamen gizlensin */
  .card-tags { flex-wrap: wrap; max-height: 1.65rem; overflow: hidden; }
  .card-tags .tag { flex: none; }

  .toolbar { gap: .7rem; }
  .search { max-width: none; flex: 1 1 100%; }
  .chips {
    margin-left: 0;
    /* Kenardan kenara kaydırılabilir şerit */
    width: calc(100% + 2 * var(--pad));
    margin-inline: calc(-1 * var(--pad));
    padding-inline: var(--pad);
  }

  .masthead { padding-top: 2rem; }
  .featured { padding: .85rem; }
  .featured .cover,
.featured-cover { max-width: none; }
  .featured-cta { width: 100%; justify-content: center; }
  .shelf-head { gap: .7rem; }

  /* Oyun penceresi tam ekran kaplasın */
  .player { padding: 0; }
  .player-window {
    width: 100%; height: 100%;
    max-height: none;
    border: 0; border-radius: 0;
    padding-top: var(--safe-t);
    padding-bottom: var(--safe-b);
  }
  .pw-dots { display: none; }
  .pw-title { text-align: left; }
  .pw-btn { width: 42px; height: 42px; }

  .os-footer { flex-direction: column; align-items: flex-start; gap: .8rem; }
}

/* Çok dar telefonlar */
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
  .cover { aspect-ratio: 16 / 10; }
  .card-tags { max-height: none; }
}

/* Yatay tutulan telefon — pencere kromu yer kaplamasın */
@media (max-height: 480px) and (orientation: landscape) {
  .pw-chrome { padding: .3rem .5rem; }
  .pw-btn { width: 32px; height: 32px; }
  .pw-hint { display: none; }
  .boot-log { min-height: 4.5em; max-height: 4.5em; }
  .boot-mark { width: 52px; height: 52px; margin-bottom: .9rem; }
  .boot-skip { margin-top: 1rem; }
}

/* ── HAREKET AZALTMA ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .boot-scan { display: none; }
}

/* Yapışkan menü çubuğu başlığı örtmesin */
#kutuphane { scroll-margin-top: 5.5rem; }

/* Dokunma hedefleri en az 44px.
   Ölçüt ekran genişliği değil işaretçi türü: 820px'lik bir tablet de
   parmakla kullanılıyor, orada da hedefler büyük kalmalı. */
.mb-logo { min-height: 44px; }
.mb-nav a,
.os-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (pointer: fine) {
  /* Fareyle kullanılan cihazda satırlar şişmesin */
  .mb-nav a { min-height: 0; padding: .3rem 0; }
  .os-footer a { min-height: 0; }
}

/* Dokunmatik cihazda hover yok — oynat rozeti hep görünsün.
   Hem kartın oynanabilir olduğunu söylüyor hem de kütüphane hissini veriyor. */
@media (hover: none) {
  .cover-play { opacity: 1; transform: none; }
}
