:root {
  --zemin: #1f2a1a; --panel: rgba(28, 34, 24, 0.92); --kenar: #6b5636; --yazi: #f3ead6; --soluk: #bfb39a;
  --altin: #d6a64a; --yesil: #7dff6a; --kirmizi: #e0473a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--zemin); color: var(--yazi);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; user-select: none; -webkit-user-select: none; }
#sahne { position: fixed; inset: 0; display: block; touch-action: none; cursor: default; }
button { font: inherit; color: var(--yazi); background: #4a3c26; border: 1px solid var(--kenar); border-radius: 6px; padding: 6px 10px; cursor: pointer; touch-action: manipulation; }
button:hover { background: #5c4a2e; }
button:active { transform: translateY(1px); }
button:disabled, button.pasif { opacity: 0.45; }
.panel { position: fixed; background: var(--panel); border: 1px solid var(--kenar); z-index: 5; }

#ust { top: 0; left: 0; right: 0; height: 38px; display: flex; align-items: center; gap: 14px; padding: 0 10px; border-width: 0 0 1px 0; font-size: 15px; }
.kaynak { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ik { display: inline-block; width: 16px; height: 16px; border-radius: 3px; }
.ik.odun { background: radial-gradient(circle at 35% 50%, #c9a26b 0 30%, #7a5230 32%); border-radius: 50%; }
.ik.tas { background: linear-gradient(135deg, #b4b1a6, #76736a); clip-path: polygon(20% 0, 85% 10%, 100% 60%, 70% 100%, 10% 90%, 0 35%); }
.ik.nufus { background: radial-gradient(circle at 50% 30%, #e2b48c 0 22%, transparent 24%), radial-gradient(ellipse at 50% 90%, #2f6fb5 0 45%, transparent 47%); }
.kucuk { padding: 3px 8px; font-size: 13px; }
.bosluk { flex: 1; }
#saat { font-variant-numeric: tabular-nums; color: var(--soluk); }
#fps { font-size: 11px; color: var(--soluk); min-width: 40px; }

#alt { left: 0; right: 0; bottom: 0; height: 112px; display: flex; gap: 10px; padding: 8px 146px 8px 10px; border-width: 1px 0 0 0; }
#secimBilgi { width: 210px; flex: none; }
#secimAd { font-weight: 600; font-size: 16px; color: var(--altin); }
#secimAlt { font-size: 13px; color: var(--soluk); margin-top: 4px; line-height: 1.35; }
#kuyruk { display: flex; gap: 4px; align-items: flex-start; flex-wrap: wrap; width: 170px; flex: none; }
#kuyruk .ky { width: 34px; height: 34px; border-radius: 5px; background: #33402a; border: 1px solid var(--kenar); font-size: 11px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; cursor: pointer; }
#kuyruk .ky i { position: absolute; left: 0; bottom: 0; height: 3px; background: #8fd0ff; }
#komutlar { display: flex; gap: 6px; flex-wrap: wrap; align-content: flex-start; flex: 1; }
#komutlar button { min-width: 92px; height: 44px; padding: 3px 8px; text-align: left; line-height: 1.15; font-size: 13px; position: relative; }
#komutlar button small { display: block; color: var(--soluk); font-size: 11px; }
#komutlar button .tus { position: absolute; right: 4px; top: 2px; font-size: 10px; color: var(--altin); }
#komutlar button.acik { outline: 2px solid var(--yesil); }
#mini { position: fixed; right: 6px; bottom: 6px; width: 128px; height: 128px; border: 2px solid var(--kenar); background: #000; z-index: 6; touch-action: none; image-rendering: pixelated; }

.dokunAraclar { position: fixed; left: 6px; top: 48px; display: none; flex-direction: column; gap: 6px; z-index: 5; }
.dokunAraclar button { width: 58px; height: 52px; font-size: 20px; padding: 2px; background: rgba(40, 32, 20, 0.85); line-height: 1; }
.dokunAraclar button small { display: block; font-size: 10px; margin-top: 3px; color: var(--soluk); }
.dokunAraclar button.acik { outline: 2px solid var(--yesil); }
body.dokunmatik .dokunAraclar { display: flex; }

#mesajlar { position: fixed; top: 46px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
#mesajlar div { background: rgba(20, 20, 14, 0.85); border: 1px solid var(--kenar); padding: 5px 12px; border-radius: 6px; font-size: 14px; transition: opacity 0.4s; }
#mesajlar div.uyari { border-color: var(--kirmizi); color: #ffd0c8; }

.ortu { position: fixed; inset: 0; z-index: 20; background: radial-gradient(ellipse at center, rgba(40, 52, 30, 0.88), rgba(14, 18, 10, 0.96)); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ortu.gizli { display: none; }
.kart { max-width: 560px; width: 100%; max-height: 100%; overflow: auto; text-align: center; background: rgba(36, 30, 20, 0.9); border: 1px solid var(--kenar); border-radius: 12px; padding: 18px 22px; }
.kart h1 { margin: 0 0 6px; font-size: 34px; letter-spacing: 1px; color: var(--altin); font-weight: 700; }
.kart .alt { color: var(--soluk); margin: 0 0 14px; }
.zorluk { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.zorluk button { min-width: 110px; }
.zorluk button.sec { outline: 2px solid var(--altin); background: #6a5430; }
.buyuk { font-size: 18px; padding: 10px 30px; background: #7a5a28; margin: 4px; }
details { text-align: left; margin-top: 12px; font-size: 14px; color: var(--soluk); }
details summary { cursor: pointer; color: var(--yazi); }
details li { margin: 4px 0; }
.surum { font-size: 11px; color: #8a7e66; margin: 10px 0 0; }
#sonTablo { margin: 10px auto; border-collapse: collapse; font-size: 14px; }
#sonTablo td, #sonTablo th { padding: 3px 12px; border-bottom: 1px solid #4a3c26; }
#dondur { display: none; }

/* Küçük yatay ekran (telefon) */
@media (max-height: 480px) {
  #ust { height: 32px; font-size: 13px; gap: 10px; }
  #alt { height: 86px; padding: 5px 112px 5px 70px; gap: 6px; }
  #secimBilgi { width: 140px; }
  #secimAd { font-size: 14px; }
  #secimAlt { font-size: 11px; }
  #kuyruk { width: 112px; }
  #kuyruk .ky { width: 28px; height: 28px; }
  #komutlar button { min-width: 78px; height: 38px; font-size: 12px; }
  #mini { width: 100px; height: 100px; }
  .dokunAraclar { top: 38px; }
  .dokunAraclar button { width: 54px; height: 46px; }
  .kart h1 { font-size: 26px; }
}
@media (orientation: portrait) and (max-width: 700px) {
  #dondur { display: flex; }
}
