/* ROTANZA (Meirovi Studio) sayfalarının teması ve ek stili: tanıtım, gizlilik, kullanım koşulları, lisanslar, veri silme, destek.
   Oyunun görsel dili (Rotanza deposu, Docs/BOLUMLER.md §7): zemin siyah, gri, beyaz; renk yalnız anlam için: amber güç (motor,
   ana düğme, vurgu), yeşil doğru (çalışan çıkış, tamam), kırmızı hata (sıkışma, geri alınamaz işlem). Değerler oyunun
   Palette.Power / Good / Bad'i. Ortak /style.css'in değişkenleri .t-rotanza (body) içinde yeniden tanımlanır; ortak dosyaya dokunulmaz.
   Kaynağı: Rotanza deposu, Docs/Site/rotanza (yükleme: Docs/Site/README.md). */

.t-rotanza {
  --power: #ff9d28;
  --power-deep: #f07817;
  --good: #3be389;
  --bad: #ff453a;
  /* Açık zeminde simge ve yazı için koyulaştırılmış sinyal tonları (kontrast) */
  --power-icon: #d96500;
  --good-icon: #0f8a4c;
  --bad-icon: #d4302a;

  --paper: #f2f2f3;
  --paper-2: #e7e7ea;
  --card: #ffffff;
  --ink: #111113;
  --ink-2: #3a3a3f;
  --muted: #696970;
  --line: #dcdce0;
  --line-2: #c3c3c9;
  --accent: #1c1c1f;
  --accent-display: #111113;
  --accent-ink: #111113;
  --accent-soft: #e3e3e7;
  --iris: linear-gradient(100deg, var(--power-deep), var(--power));
  --rose: var(--bad);
  --amber: var(--power);
  --ok: var(--good-icon);
  --ok-soft: #dcf4e7;
  --inv: #111113;
  --inv-2: #1a1a1d;
  --inv-text: #f3f3f4;
  --inv-muted: #a0a0a7;
  --inv-line: #2a2a2e;
  --c-violet: #2f2f34;
  --c-sky: #2f2f34;
  --c-pink: #2f2f34;
  --c-sun: #2f2f34;
  --c-mint: #2f2f34;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .06);
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 18px 40px -22px rgb(0 0 0 / .32);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / .08), 0 44px 80px -40px rgb(0 0 0 / .55);

  /* Başlık bandı: oyunun makine masası (grafit), amber ana düğme ve motor ışığı */
  --g-bg: radial-gradient(120% 100% at 88% 0%, #3c3d41 0%, #1c1d20 48%, #0b0b0d 100%);
  --g-text: #f3f3f4;
  --g-muted: rgb(243 243 244 / .72);
  --g-chip: rgb(255 255 255 / .09);
  --g-line: rgb(255 255 255 / .16);
  --g-btn: var(--power);
  --g-btn-text: #1b1104;
  --g-glow: rgb(255 157 40 / .24);
}
@media (prefers-color-scheme: dark) {
  .t-rotanza {
    --power-icon: #ffa53a;
    --good-icon: #3be389;
    --bad-icon: #ff6058;
    --paper: #0b0b0c;
    --paper-2: #17171a;
    --card: #131315;
    --ink: #f3f3f4;
    --ink-2: #c9c9cd;
    --muted: #8e8e95;
    --line: #242427;
    --line-2: #35353a;
    --accent: #e9e9ec;
    --accent-display: #f3f3f4;
    --accent-ink: #f3f3f4;
    --accent-soft: #222225;
    --ok-soft: #0f2c1c;
    --inv: #131315;
    --inv-2: #1b1b1e;
    --inv-line: #2b2b2f;
    --c-violet: #d6d6da;
    --c-sky: #d6d6da;
    --c-pink: #d6d6da;
    --c-sun: #d6d6da;
    --c-mint: #d6d6da;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
    --shadow: 0 1px 2px rgb(0 0 0 / .45), 0 18px 40px -22px rgb(0 0 0 / .8);
    --shadow-lg: 0 2px 6px rgb(0 0 0 / .45), 0 44px 80px -40px rgb(0 0 0 / .9);
  }
}

/* Sinyal renkli kartlar: yalnız anlamı olan yerde (güç, doğru, hata) */
.t-rotanza .c-power { --c: var(--power-icon); }
.t-rotanza .c-good { --c: var(--good-icon); }
.t-rotanza .c-bad { --c: var(--bad-icon); }

/* ---------- Başlık bantları ---------- */

.t-rotanza .bits, .t-rotanza .deco { display: none; }
.t-rotanza .g-icon, .t-rotanza .app-icon { box-shadow: 0 0 0 1px rgb(255 255 255 / .18), 0 16px 30px -14px rgb(0 0 0 / .75); }
.t-rotanza .g-hero, .t-rotanza .hero { border: 1px solid rgb(255 255 255 / .06); }
.t-rotanza .g-hero::after, .t-rotanza .hero::before {
  /* Makine masasının ince ızgarası */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgb(255 255 255 / .075) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(120% 90% at 85% 10%, #000 20%, transparent 75%);
  mask-image: radial-gradient(120% 90% at 85% 10%, #000 20%, transparent 75%);
}

/* Birbirine değen iki çark, ters yönde döner (oyunun tek kuralı). Yalnız süs. */
.rz-gears { position: absolute; z-index: 0; pointer-events: none; }
.rz-gears i {
  position: absolute;
  display: block;
  background: url("/rotanza/cark.svg") center / contain no-repeat;
  opacity: .085;
}
.rz-gears i:nth-child(1) { width: 100%; aspect-ratio: 1; left: 0; top: 0; }
.rz-gears i:nth-child(2) { width: 62%; aspect-ratio: 1; left: 79%; top: 62%; rotate: 11.25deg; }
.g-hero .rz-gears { width: clamp(300px, 34vw, 460px); right: -6%; top: -18%; }
.hero .rz-gears { width: 300px; right: -70px; top: -120px; z-index: -1; }
@media (max-width: 899px) { .g-hero .rz-gears { width: 300px; right: -90px; top: -90px; } }
@media (prefers-reduced-motion: no-preference) {
  .rz-gears i:nth-child(1) { animation: rz-cw 48s linear infinite; }
  .rz-gears i:nth-child(2) { animation: rz-ccw 29.8s linear infinite; }
}
@keyframes rz-cw { to { transform: rotate(360deg); } }
@keyframes rz-ccw { to { transform: rotate(-360deg); } }

/* Ana düğme amber: oyundaki OYNA gibi (güç) */
.t-rotanza .store {
  background: linear-gradient(180deg, #ffb24c 0%, var(--power) 45%, var(--power-deep) 100%);
  color: #1b1104;
  box-shadow: 0 0 0 1px rgb(255 190 110 / .5) inset, 0 18px 34px -16px rgb(255 140 30 / .7);
}
.t-rotanza .store small { opacity: .8; }
.t-rotanza .g-hero .chips { margin-top: 22px; }
.t-rotanza .g-hero .chip { border: 1px solid var(--g-line); }
.t-rotanza .chip.live::before { background: var(--good); box-shadow: 0 0 0 3px rgb(59 227 137 / .25); }

/* Telefon çerçevesi: grafit, ince metal kenar */
.t-rotanza .device {
  background: linear-gradient(160deg, #2a2b2e, #0c0c0e 40%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .12) inset, 0 0 0 1px rgb(0 0 0 / .7), 0 2px 6px rgb(0 0 0 / .3), 0 60px 90px -40px rgb(0 0 0 / .85);
}
.t-rotanza .g-art::before { background: radial-gradient(closest-side, var(--g-glow), rgb(255 157 40 / .06) 60%, transparent); }

/* ---------- Tanıtım sayfası ---------- */

.t-rotanza .step-num { border-radius: 50%; background: var(--ink); color: var(--paper); box-shadow: 0 0 0 4px var(--paper-2); }

/* Kural çizimi: motor (amber), ara çark, çıkış (yeşil: doğru yön) */
.rz-kural {
  display: grid;
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--r-lg);
  background: var(--g-bg);
  color: var(--g-text);
  border: 1px solid rgb(255 255 255 / .06);
  box-shadow: var(--shadow);
  overflow: hidden;
}
@media (min-width: 900px) { .rz-kural { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
.rz-kural h2 { margin: 0 0 12px; font: 700 clamp(26px, 3.4vw, 40px)/1.05 var(--font-display); letter-spacing: -.03em; }
.rz-kural p { margin: 0 0 12px; color: var(--g-muted); }
.rz-kural p strong { color: var(--g-text); }
.rz-kural p:last-child { margin-bottom: 0; }
.rz-cizim { display: block; width: 100%; height: auto; max-width: 560px; justify-self: center; }
.rz-cizim .metal { fill: url(#rz-metal); }
.rz-cizim .nokta-iyi { fill: var(--good); }
.rz-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.rz-cizim .metal-2 { fill: #6c6d72; }
.rz-cizim .motor { fill: var(--power); }
.rz-cizim .halka-iyi { fill: none; stroke: var(--good); stroke-width: 4; }
.rz-cizim .ok { fill: none; stroke-width: 5; stroke-linecap: round; }
.rz-cizim .ok-guc { stroke: var(--power); }
.rz-cizim .ok-gri { stroke: #c9c9cd; }
.rz-cizim .ok-iyi { stroke: var(--good); }
.rz-cizim .uc-guc { fill: var(--power); }
.rz-cizim .uc-gri { fill: #c9c9cd; }
.rz-cizim .uc-iyi { fill: var(--good); }
.rz-cizim .govde { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .rz-cizim .don-cw { animation: rz-cw 9s linear infinite; }
  .rz-cizim .don-ccw { animation: rz-ccw 9s linear infinite; }
}
.rz-etiket { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 560px; margin: 10px auto 0; padding: 0; list-style: none; text-align: center; }
.rz-etiket li { font: 600 12px/1.3 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); }
.rz-etiket li:first-child { color: var(--power); }
.rz-etiket li:last-child { color: var(--good); }

/* Ekranlar: dar ekranda yana kayan şerit */
.rz-ekranlar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0 0 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  list-style: none;
}
.rz-ekranlar li { scroll-snap-align: start; }
.rz-ekranlar figure { margin: 0; }
.rz-ekranlar img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  background: #0c0c0e;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.rz-ekranlar figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.4; text-align: center; }

/* ---------- Metin sayfaları ---------- */

.item h3 { margin: 22px 0 8px; font: 600 16.5px/1.35 var(--font-display); letter-spacing: -.01em; color: var(--ink); }
.item h3:first-of-type { margin-top: 12px; }
.item code { overflow-wrap: anywhere; }
.item a { overflow-wrap: anywhere; }
.item ul + p, .item ol + p, .tablo + p { margin-top: 14px; }

/* Uzun içindekiler listesi ekrana sığsın: kendi içinde kayar */
@media (min-width: 980px) {
  .toc { max-height: calc(100vh - 108px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
}

/* Numaralı adımlar */
.item ol { list-style: none; counter-reset: adim; display: grid; gap: 8px; margin: 14px 0 0; padding: 0; }
.item ol li { counter-increment: adim; padding-left: 50px; }
.item ol li::before {
  content: counter(adim);
  left: 12px;
  top: 11px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font: 700 13px/1 var(--font);
}

/* Geri alınamaz işlem uyarısı: kırmızı (oyunda hata ve tehlike rengi) */
.uyari {
  margin: 14px 0 0;
  padding: 12px 14px 12px 16px;
  border-radius: 14px;
  border-left: 4px solid var(--bad);
  background: color-mix(in srgb, var(--bad) 9%, var(--card));
  color: var(--ink-2);
}
.uyari strong { color: var(--ink); }

/* Tablolar: dar ekranda her satır bir kart olur, sütun adı hücrenin başına yazılır */
.tablo { width: 100%; margin: 14px 0 0; border-collapse: separate; border-spacing: 0; font-size: 14.5px; line-height: 1.5; }
.tablo th, .tablo td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink-2); overflow-wrap: anywhere; }
.tablo thead th { padding-top: 4px; color: var(--muted); font: 600 12.5px/1.3 var(--font); overflow-wrap: normal; }
.tablo tbody th { color: var(--ink); font-weight: 600; }
.tablo tbody tr:last-child > * { border-bottom: 0; }
.tablo th:first-child, .tablo td:first-child { padding-left: 0; }
.tablo th:last-child, .tablo td:last-child { padding-right: 0; }
@media (max-width: 759px) {
  .tablo thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tablo, .tablo tbody, .tablo tr, .tablo tbody th, .tablo td { display: block; }
  .tablo tr { padding: 12px 14px; border-radius: 14px; background: var(--paper-2); }
  .tablo tr + tr { margin-top: 8px; }
  .tablo tbody th, .tablo td { padding: 2px 0; border: 0; }
  .tablo tbody th { padding-bottom: 5px; }
  .tablo td::before { content: attr(data-b) ": "; color: var(--muted); font-weight: 600; }
}

/* Lisans metinleri: dar ekranda da sayfayı yana taşırmaz */
.lisans-metni { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; line-height: 1.5; margin: 12px 0 0; color: var(--ink-2); }
.item details { margin-top: 12px; }
.item details > summary { cursor: pointer; font-weight: 600; color: var(--accent-ink); }
.item details > summary:hover { text-decoration: underline; }

/* Destek formu: hata kırmızı, gönderildi yeşil (ortak stilde pembe ve mor) */
.t-rotanza .df-status { background: color-mix(in srgb, var(--bad) 13%, transparent); border-left: 4px solid var(--bad); }
.t-rotanza .df-count.over { color: var(--bad-icon); }
.t-rotanza .df-ok { border-left: 4px solid var(--good); }
.t-rotanza .df-ticket strong { color: var(--ink); }

@media print {
  .top, .toc, .foot, .deco, .rz-gears, .page-links, .langs { display: none !important; }
  .item { break-inside: avoid; box-shadow: none; }
  .doc { display: block; }
}
