/* =================================================================
   Playzo - oyun portali
   Tek stil dosyasi. Tema degiskenleri :root icinde.
   ================================================================= */

:root {
  /* marka */
  --brand:        #6c4df6;
  --brand-2:      #ff5c9d;
  --brand-ink:    #ffffff;

  /* zemin ve metin */
  --bg:           #c9f4ec;
  --surface:      #ffffff;
  --surface-2:    #f3f5fb;
  --ink:          #0b2a44;
  --ink-soft:     #5b7389;
  --line:         #e4e9f2;

  /* grid matematigi (Poki tarzi sabit hucre) */
  --cell:         94px;
  --gap:          16px;
  --radius:       16px;
  --radius-lg:    24px;

  /* olculer */
  --rail:         94px;   /* sol sidebar genisligi */
  --rail-open:    248px;  /* hover'da acilan genislik */
  --shadow:       0 2px 0 rgba(11,42,68,.08);
  --shadow-pop:   0 12px 28px rgba(11,42,68,.22);

  --font: "Nunito", "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"],
:root:not([data-theme="light"]) {
  /* varsayilan acik tema; koyu tema asagida acikca secilir */
}

:root[data-theme="dark"] {
  --bg:        #10131f;
  --surface:   #1a1f30;
  --surface-2: #232940;
  --ink:       #eaf1ff;
  --ink-soft:  #9aa8c4;
  --line:      #2c3449;
  --shadow:    0 2px 0 rgba(0,0,0,.4);
  --shadow-pop:0 12px 28px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

/* -----------------------------------------------------------------
   SOL SIDEBAR
   ----------------------------------------------------------------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  padding: 16px 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 60;
  overflow: visible;
}

.rail__panel {
  width: calc(var(--rail) - 16px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: width .18s ease;
}

.rail__logo {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 18px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: var(--brand-ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -1px;
  box-shadow: 0 4px 0 rgba(11,42,68,.15);
}

.rail__iconbtn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: var(--ink-soft);
  transition: background .15s ease, color .15s ease;
}
.rail__iconbtn:hover { background: var(--surface-2); color: var(--brand); }

.rail__divider { width: 40px; height: 2px; background: var(--line); border-radius: 2px; }

/* kategori listesi: dar halde sadece ikon, hover'da isim acilir */
.rail__nav {
  flex: 1;
  width: calc(var(--rail) - 16px);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 10px 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  transition: width .18s ease;
}
.rail__nav::-webkit-scrollbar { display: none; }
.rail:hover .rail__nav { width: var(--rail-open); }

.rail__item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 17px;
  white-space: nowrap;
  color: var(--ink-soft);
  border-radius: 14px;
  margin: 2px 8px;
  transition: background .15s ease, color .15s ease;
}
.rail__item:hover { background: var(--surface-2); color: var(--ink); }
.rail__item.is-active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.rail__item span.ico { font-size: 22px; line-height: 1; width: 26px; text-align: center; }
.rail__item span.txt {
  font-size: 14px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .15s ease, transform .15s ease;
}
.rail:hover .rail__item span.txt { opacity: 1; transform: none; }

/* -----------------------------------------------------------------
   ANA ALAN
   ----------------------------------------------------------------- */
.shell {
  margin-left: var(--rail);
  padding: 16px 16px 48px;
  min-height: 100%;
}

.wrap { max-width: 1312px; margin: 0 auto; }

/* ust arama cubugu */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.search {
  flex: 1;
  position: relative;
  max-width: 560px;
}
.search input {
  width: 100%;
  height: 52px;
  border-radius: 18px;
  border: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 0 18px 0 48px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.search input::placeholder { color: var(--ink-soft); font-weight: 700; }
.search input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }
.search__ico {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--ink-soft); pointer-events: none;
}

.topbar__spacer { flex: 1; }

.pillbtn {
  height: 52px;
  padding: 0 20px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px;
  transition: transform .12s ease;
}
.pillbtn:hover { transform: translateY(-2px); }
.pillbtn--brand { background: var(--brand); color: var(--brand-ink); }

/* bolum basligi */
.section { margin: 28px 0; }
.section__head {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 14px;
}
.section__title { font-size: 20px; font-weight: 900; margin: 0; }
.section__more { font-size: 13px; color: var(--brand); }

/* -----------------------------------------------------------------
   OYUN GRID (sabit hucre + dense akis)
   ----------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--cell));
  grid-auto-rows: var(--cell);
  gap: var(--gap);
  grid-auto-flow: row dense;
  justify-content: center;
}

.tile {
  position: relative;
  grid-column: span 1;
  grid-row: span 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  transition: transform .16s cubic-bezier(.3,.8,.4,1.2), box-shadow .16s ease;
  will-change: transform;
}
.tile[data-size="2"] { grid-column: span 2; grid-row: span 2; }
.tile[data-size="3"] { grid-column: span 3; grid-row: span 3; }

.tile:hover { transform: scale(1.06); box-shadow: var(--shadow-pop); z-index: 5; }
.tile img, .tile .thumb { width: 100%; height: 100%; object-fit: cover; }

.tile__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 10px 8px;
  font-size: 12px;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
  opacity: 0;
  transition: opacity .16s ease;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile:hover .tile__label { opacity: 1; }
.tile[data-size="2"] .tile__label,
.tile[data-size="3"] .tile__label { font-size: 14px; padding: 24px 12px 12px; }

.tile__badge {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

/* kategori pill seridi */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  height: 44px; padding: 0 18px;
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
  transition: transform .12s ease;
}
.pill:hover { transform: translateY(-2px); }
.pill .dot { width: 10px; height: 10px; border-radius: 99px; }

/* -----------------------------------------------------------------
   OYUN SAYFASI
   ----------------------------------------------------------------- */
.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.player {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, var(--brand), var(--brand-2));
  display: grid;
  place-items: center;
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.splash { text-align: center; color: #fff; padding: 24px; }
.splash__icon {
  width: 104px; height: 104px; margin: 0 auto 16px;
  border-radius: 28px; overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  background: #fff;
}
.splash h1 { font-size: 26px; margin: 0 0 4px; font-weight: 900; }
.splash p { margin: 0 0 20px; opacity: .85; font-size: 14px; }
.playbtn {
  height: 56px; padding: 0 44px;
  border-radius: 18px;
  background: #fff; color: var(--brand);
  font-size: 18px; font-weight: 900;
  box-shadow: 0 6px 0 rgba(0,0,0,.18);
  transition: transform .12s ease;
}
.playbtn:hover { transform: translateY(-2px); }
.playbtn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }

.gamebar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
}
.gamebar__icon { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; flex: none; }
.gamebar__meta { min-width: 0; }
.gamebar__title { font-size: 16px; font-weight: 900; }
.gamebar__dev { font-size: 12px; color: var(--ink-soft); }
.gamebar__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.iconbtn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 10px;
  border-radius: 12px;
  color: var(--ink-soft); font-size: 12px;
  transition: background .15s ease, color .15s ease;
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.iconbtn.is-on { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }

.rail-ad {
  background: var(--surface);
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  min-height: 600px;
  display: grid; place-items: center;
  color: var(--ink-soft); font-size: 12px; letter-spacing: 2px;
}

/* icerik makalesi */
.article {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--ink);
}
.article h1 { font-size: 26px; font-weight: 900; margin: 0 0 6px; }
.article h2 { font-size: 18px; font-weight: 900; margin: 24px 0 8px; }
.article p { margin: 0 0 12px; color: var(--ink-soft); }
.article ul { margin: 0 0 12px; padding-left: 20px; color: var(--ink-soft); }

.crumbs { display: flex; gap: 8px; font-size: 12px; color: var(--ink-soft); margin-bottom: 12px; text-transform: uppercase; }
.crumbs a:hover { color: var(--brand); }

/* kategori banner */
.cat-hero {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: 20px;
}
.cat-hero__icon { font-size: 40px; }
.cat-hero h1 { margin: 0; font-size: 24px; font-weight: 900; }
.cat-hero p { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); font-weight: 600; }

/* bos durum */
.empty {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-soft);
  font-weight: 700;
}
.empty code {
  background: var(--surface-2); padding: 2px 8px; border-radius: 8px;
  font-family: ui-monospace, Menlo, monospace; color: var(--ink);
}

.notice {
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 16px;
}

/* -----------------------------------------------------------------
   FOOTER
   ----------------------------------------------------------------- */
.footer {
  margin-top: 40px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}
.footer__top { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 24px;
}
.footer h4 { margin: 0 0 10px; font-size: 11px; letter-spacing: 1.5px; color: var(--ink-soft); text-transform: uppercase; }
.footer a { display: block; padding: 4px 0; font-size: 13px; color: var(--ink); font-weight: 700; }
.footer a:hover { color: var(--brand); }
.footer__legal { margin-top: 24px; padding-top: 16px; border-top: 2px solid var(--line); font-size: 12px; color: var(--ink-soft); font-weight: 600; }

/* -----------------------------------------------------------------
   MOBIL
   ----------------------------------------------------------------- */
@media (max-width: 1100px) {
  .player-layout { grid-template-columns: minmax(0, 1fr); }
  .rail-ad { display: none; }
}

@media (max-width: 760px) {
  :root { --cell: 74px; --gap: 10px; --rail: 0px; }

  .rail {
    inset: auto 0 0 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    padding: 0;
  }
  .rail__panel {
    width: 100%;
    height: 64px;
    flex-direction: row;
    justify-content: space-around;
    border-radius: 20px 20px 0 0;
    padding: 0 8px;
  }
  .rail__logo { width: 40px; height: 40px; border-radius: 14px; font-size: 18px; }
  .rail__divider { display: none; }
  .rail__nav { display: none; }

  .shell { margin-left: 0; padding: 12px 12px 88px; }
  .topbar { flex-wrap: wrap; }
  .search { max-width: none; flex-basis: 100%; }
  .article { padding: 18px; }
  .footer { padding: 20px; }
}

/* mobil: yatay kaydirilan kategori seridi */
.catstrip {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none;
}
.catstrip::-webkit-scrollbar { display: none; }
.catstrip .pill { flex: none; }

@media (min-width: 761px) { .catstrip { display: none; } }

@media (max-width: 760px) {
  .topbar__spacer { display: none; }
  .topbar .pillbtn { flex: 1; justify-content: center; height: 44px; }
}
