/* =========================================================
   Duck OS — tek başına açılan sayfalar (oyun sayfaları, mağaza)
   Masaüstüyle aynı görünüm: mavi başlık çubuklu bir pencere,
   araç çubuğu, adres satırı, bej yüz ve beyaz belge alanı.
   Masaüstündeki Ördek Gezgini'nin içinde açılınca (html.in-frame)
   pencere çerçevesi gizlenir, sadece belge kalır.
   ========================================================= */
:root {
  --ui: Tahoma, "Segoe UI", Verdana, "DejaVu Sans", sans-serif;
  --cap-font: "Trebuchet MS", Tahoma, "Segoe UI", sans-serif;
  --face: #ece9d8;
  --hi: #ffffff;
  --shade: #aca899;
  --ink: #111;
  --muted: #5f5d52;
  --link: #0b4fd0;
  --sel: #316ac5;
  --frame: #0a3fb0;
  --head: #0a3fb0;
  --cap: linear-gradient(180deg, #0b5ef0 0%, #3e92ff 7%, #2a7cf9 14%, #136af0 30%, #0b5ee6 58%, #0a59de 82%, #0a52cf 92%, #0644b5 100%);
  --c: #2f74e0;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  padding: 28px 20px 40px;
  background: linear-gradient(180deg, #1d5fd6 0%, #4f93ee 45%, #a9d0fb 78%, #e3f0ff 100%) fixed;
  color: var(--ink);
  font: 14px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--cap-font); }
::selection { background: var(--sel); color: #fff; }
:focus-visible { outline: 1px dotted #000; outline-offset: 2px; }
.ic { width: 16px; height: 16px; flex: none; }

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 6px 10px; background: #fff; border: 1px solid var(--frame); }
.skip-link:focus { top: 8px; }

/* ===== Pencere ===== */
.dp-win {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 3px 3px;
  border-radius: 8px 8px 0 0;
  background: var(--frame);
  box-shadow: 0 18px 44px -14px rgba(0, 20, 70, .7);
}
.dp-title {
  position: sticky; top: 0; z-index: 5;
  height: 30px; display: flex; align-items: center; gap: 6px;
  margin: 0 -3px; padding: 0 4px 0 8px;
  border-radius: 7px 7px 0 0;
  background: var(--cap); color: #fff;
}
.dp-title .ic { width: 16px; height: 16px; }
.dp-title strong {
  flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: 700 13.5px/1 var(--cap-font); text-shadow: 1px 1px #0a2b7a;
}
.dp-close {
  width: 22px; height: 22px; display: grid; place-items: center;
  border: 1px solid #fff; border-radius: 3px;
  background: linear-gradient(180deg, #f08c6c 0%, #e2552f 45%, #c8391a 100%);
  box-shadow: inset 0 -1px 2px rgba(0, 0, 60, .35);
  color: #fff; text-decoration: none; font: 700 14px/1 var(--ui);
}
.dp-close:hover { filter: brightness(1.15); }

.dp-bar {
  display: flex; align-items: stretch; gap: 2px; padding: 3px 4px;
  overflow-x: auto; scrollbar-width: none;
  background: var(--face); box-shadow: inset 0 -1px #d8d2bd, inset 0 1px var(--hi);
}
.dp-bar::-webkit-scrollbar { display: none; }
.dp-bar a, .dp-bar button {
  flex: none; min-width: 58px; padding: 3px 8px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid transparent; border-radius: 3px; background: none;
  color: #000; text-decoration: none; font: 11.5px/1.25 var(--ui); cursor: pointer;
}
.dp-bar a:hover, .dp-bar button:hover { border-color: #cecebf; background: linear-gradient(180deg, #fff, #ecebe4); }
.dp-bar a[aria-current] { border-color: #b9b6a6; background: #e3e1d6; box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .12); }
.dp-bar .ic { width: 24px; height: 24px; }
.dp-bar .sep { flex: none; width: 1px; margin: 3px 4px; background: #d8d2bd; box-shadow: 1px 0 var(--hi); }
.dp-bar .push { margin-left: auto; }
.dp-bar .lang { justify-content: center; font-weight: 700; font-size: 12px; }

.dp-addr {
  display: flex; align-items: center; gap: 6px; padding: 3px 4px 4px;
  background: var(--face); color: var(--muted); font-size: 12px;
  box-shadow: inset 0 -1px #d8d2bd;
}
.dp-addr .field {
  flex: 1; min-width: 0; height: 22px; display: flex; align-items: center; gap: 5px; padding: 0 5px;
  border: 1px solid #7f9db9; background: #fff; color: #000; white-space: nowrap; overflow: hidden;
}

.dp-body {
  padding: 26px clamp(16px, 4vw, 40px) 34px;
  background: #fff;
  box-shadow: inset 1px 1px var(--shade);
}

.dp-status {
  display: flex; margin-top: 2px; background: var(--face); font-size: 12px; box-shadow: inset 0 1px var(--hi);
}
.dp-status > * { flex: 1; min-width: 0; padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset -1px 0 #d8d2bd; }
.dp-status > :first-child { flex: 0 0 auto; }
.dp-status > :last-child { box-shadow: none; text-align: right; }
.dp-status a { color: var(--link); margin-left: 10px; }

/* Ördek Gezgini'nin içinde: çerçevesiz */
html.in-frame body { padding: 0; background: #fff; }
html.in-frame .dp-win { max-width: none; padding: 0; border-radius: 0; background: none; box-shadow: none; }
html.in-frame :is(.dp-title, .dp-bar, .dp-addr, .dp-status) { display: none; }
html.in-frame .dp-body { box-shadow: none; }

/* ===== Düğmeler ===== */
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; padding: 4px 14px;
  border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #f3f2ec 60%, #e2dfd2 100%);
  box-shadow: inset -1px -1px #d6d0c5, inset 1px 1px #fff;
  color: #000; text-decoration: none; font: 13px/1.2 var(--ui); cursor: pointer; white-space: nowrap;
}
.btn:hover { box-shadow: inset 0 0 0 2px #f8b636, inset -1px -1px #d6d0c5; }
.btn:active { background: linear-gradient(180deg, #e2dfd2, #f3f2ec); box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .2); }
.btn-primary { font-weight: 700; box-shadow: inset 0 0 0 2px #8fb5f2, inset -1px -1px #d6d0c5; }
.btn svg { width: 15px; height: 15px; }

/* ===== Üst kısım ===== */
.game-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 4vw, 48px); align-items: center; }
.game-hero-grid.wide-shot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.breadcrumb {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px;
  color: var(--link); text-decoration: none; font-size: 12.5px;
}
.breadcrumb:hover { text-decoration: underline; }
.breadcrumb svg { width: 14px; height: 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  padding: 2px 10px; border: 1px solid #b8d6a8; border-radius: 10px;
  background: #effae6; color: #2a6a1e; font-size: 12px;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3cbf2f; box-shadow: 0 0 0 2px rgba(60, 191, 47, .25); }
.badge.dev { border-color: #ecd08f; background: #fff7e0; color: #7a5208; }
.badge.dev::before { background: #f0a020; box-shadow: 0 0 0 2px rgba(240, 160, 32, .25); }
.badge.test { border-color: #a8c3ee; background: #eaf1fd; color: #123f9a; }
.badge.test::before { background: #2f74e0; box-shadow: 0 0 0 2px rgba(47, 116, 224, .25); }
.intro h1 { margin: 10px 0 6px; font-size: clamp(34px, 5vw, 46px); line-height: 1.05; letter-spacing: -.01em; }
.intro h1::after { content: ""; display: block; width: 64px; height: 5px; margin-top: 10px; border-radius: 3px; background: var(--c); }
.tagline { margin: 0; max-width: 560px; font-size: 15.5px; color: #333; }
.meta-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin: 18px 0 0; padding: 0; list-style: none;
  border: 1px solid #d0d0bf; border-radius: 4px; overflow: hidden;
}
.meta-list li { display: grid; padding: 7px 12px; background: linear-gradient(180deg, #fbfbf7, #f1efe6); box-shadow: inset -1px 0 #e1dfd3; }
.meta-list small { color: var(--muted); font-size: 11.5px; }
.meta-list strong { font-size: 13px; }

/* Telefon ve yatay ekran çerçeveleri */
.device {
  padding: 10px; border-radius: 26px;
  background: linear-gradient(160deg, #3b3f48, #15171c);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 2px #50555f, 0 18px 34px -16px color-mix(in srgb, var(--c) 70%, #000);
}
.device img { border-radius: 17px; }
.device.phone { width: clamp(210px, 24vw, 270px); }
.device.phone img { width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; }
.device.landscape { width: 100%; border-radius: 22px; }
.device.landscape img { width: 100%; aspect-ratio: 20 / 9; object-fit: cover; border-radius: 13px; }

/* ===== Bölümler ===== */
.section { margin-top: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 6px 28px; margin-bottom: 16px; }
.section-head > div { min-width: 0; }
.eyebrow { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.section-title { margin: 2px 0 0; font-size: clamp(21px, 3vw, 26px); line-height: 1.25; color: var(--head); }
.section-lead { flex: 1 1 340px; max-width: 520px; margin: 0; color: #444; }
.section > .rule, .rule { margin: 0; border: 0; border-top: 1px solid var(--shade); box-shadow: 0 1px #fff; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 10px; }
.feature {
  padding: 12px 14px 14px;
  border: 1px solid #c6d3ee; border-radius: 4px;
  background: linear-gradient(180deg, #f2f6fe, #fff 70%);
}
.feature .ico { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; border: 1px solid #c6d3ee; border-radius: 6px; background: #fff; font-size: 19px; }
.feature h3 { margin: 0 0 4px; font-size: 14.5px; color: var(--head); }
.feature p { margin: 0; font-size: 13px; color: #333; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 40px); align-items: start; }
.steps { counter-reset: s; margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.steps li { counter-increment: s; position: relative; padding: 8px 12px 8px 46px; border: 1px solid #e1dfd3; border-radius: 4px; background: #fbfbf7; }
.steps li::before {
  content: counter(s); position: absolute; left: 10px; top: 8px;
  width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8fe07a, #2f9a2a); color: #fff; font: 700 12px/1 var(--ui);
}

/* Liste görünümü tablo */
.score-table { width: 100%; border-collapse: collapse; border: 1px solid #7f9db9; background: #fff; font-size: 13px; }
.score-table th {
  padding: 4px 10px; text-align: left; font-weight: 400;
  background: linear-gradient(180deg, #fff, #ecebe4); border-bottom: 1px solid #d8d2bd; box-shadow: inset -1px 0 #d8d2bd;
}
.score-table td { padding: 6px 10px; border-bottom: 1px solid #efeee6; vertical-align: top; }
.score-table tr:nth-child(even) td { background: #f7f9fd; }
.score-table td:last-child { width: 1%; text-align: right; white-space: nowrap; font-weight: 700; }
.score-bar { display: block; height: 8px; margin-top: 5px; border: 1px solid #a5b6d4; border-radius: 2px; background: #fff; overflow: hidden; }
.score-bar i { display: block; width: var(--w); height: 100%; background: repeating-linear-gradient(90deg, currentColor 0 7px, transparent 7px 9px); }
.pts-hi { color: #1f8a23; }
.pts-mid { color: #2a6ce3; }
.pts-lo { color: #b07a10; }
.pts-zero { color: var(--muted); }
.pts-neg { color: #c8391a; }
.trap-table td:first-child { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; }
.trap-table td:first-child small { grid-column: 2; color: var(--muted); font-size: 12px; }
.dot { width: 10px; height: 10px; margin-top: 5px; border: 1px solid rgba(0, 0, 0, .25); border-radius: 2px; }

/* Ekran görüntüleri: küçük resim görünümü */
.shots { display: grid; gap: 12px; }
.shots.portrait { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.shots.landscape { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.shot { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px solid transparent; border-radius: 2px; color: #000; text-decoration: none; text-align: center; cursor: zoom-in; }
.shot img { width: 100%; object-fit: cover; border: 1px solid var(--shade); box-shadow: 2px 2px 0 #e3e1d6; }
.shots.portrait .shot img { aspect-ratio: 9 / 19.5; }
.shots.landscape .shot img { aspect-ratio: 20 / 9; }
.shot .cap { font-size: 12px; }
.shot:hover { border-color: #c8d8f4; background: #eef3fd; }
.shot:hover .cap { color: var(--link); }

/* Son kutu */
.cta-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px;
  padding: 16px 18px; border: 1px solid #e3d48f; border-radius: 4px; background: #fffbe2;
}
.cta-box > div:first-child { flex: 1 1 360px; }
.cta-box h2 { margin: 0 0 4px; font-size: 19px; color: #5d4a0a; }
.cta-box p { margin: 0; color: #5d5321; }
.cta-box .btn-row { margin: 0; }

.game-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-nav a {
  display: grid; padding: 8px 14px; border: 1px solid #d0d0bf; border-radius: 4px;
  background: linear-gradient(180deg, #fff, #f1efe6); color: #000; text-decoration: none;
}
.game-nav a:last-child { text-align: right; }
.game-nav a:hover { border-color: #8fb5f2; background: #eef3fd; }
.game-nav small { color: var(--muted); font-size: 12px; }
.game-nav strong { color: var(--link); font-family: var(--cap-font); font-size: 15px; }

/* Oyunlara göre vurgu rengi */
.komparsita { --c: #e8a317; }
.mindfield { --c: #ff4d6d; }
.togy { --c: #36b6e8; }
.brrr { --c: #ff8a1f; }
.fulldepo { --c: #0b6b74; }

/* ===== Resim görüntüleyici ===== */
.viewer {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 30, 80, .45);
}
.viewer[hidden] { display: none; }
.viewer-win {
  width: min(100%, 760px); max-height: 100%; display: flex; flex-direction: column;
  padding: 0 3px 3px; border-radius: 8px 8px 0 0; background: var(--frame);
  box-shadow: 0 18px 44px -10px rgba(0, 0, 0, .6);
}
.viewer-win .dp-title { position: static; }
.viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 10px; background: #fff; box-shadow: inset 1px 1px var(--shade); }
.viewer-stage img { max-height: calc(100vh - 150px); width: auto; border: 1px solid var(--shade); }
.viewer-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 5px; background: var(--face); font-size: 12px; }
.viewer-bar span { min-width: 70px; text-align: center; }

/* ===== Telefon ===== */
@media (max-width: 760px) {
  body { padding: 0; background: #fff; }
  .dp-win { padding: 0; border-radius: 0; }
  .dp-title { border-radius: 0; margin: 0; }
  .dp-addr { display: none; }
  .game-hero-grid, .game-hero-grid.wide-shot, .two-col { grid-template-columns: minmax(0, 1fr); }
  .device-wrap { justify-self: center; }
  .shots.portrait { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .shots.portrait .shot { flex: 0 0 42%; scroll-snap-align: start; }
  .game-nav { grid-template-columns: 1fr; }
  .game-nav a:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
