/* Gözcü Kulesi: yönetim paneli. Oyunun renkleri ve yazı tipleri; taraf renkleri her yerde aynı tarafı gösterir
   (ruh yeşili: insanlar, çekirdek kızılı: yapay zekâlar). Grafik dolgularında aynı renklerin bir ton koyusu kullanılır. */
:root {
  --spirit: #6ff5e2;
  --core: #ff6a55;
  --spirit-fill: #2ba898;
  --core-fill: #e2584a;
  --gold: #d9b96a;
  --ink: #ece6da;
  --soft: #cfc7b6;
  --muted: #9a9384;
  --bronze: #8a7556;
  --surface: #10151c;
  --line: rgba(236, 230, 218, 0.1);
  --title: Cinzel, Georgia, serif;
  --lore: 'Cormorant Garamond', Georgia, serif;
  --num: Rajdhani, system-ui, sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: #070b0f; }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 14px/1.5 system-ui, sans-serif; background: radial-gradient(120% 70% at 50% 0%, #10201f 0%, #0a1014 45%, #070b0f 100%) fixed; }
[hidden] { display: none !important; }
h1, h2 { margin: 0; font-family: var(--title); font-weight: 700; }
button { font: 700 .78rem var(--title); letter-spacing: .14em; text-transform: uppercase; color: #e9dfc8; background: #1a120cc4; border: 1px solid #8a755699; border-radius: .3rem; padding: .7rem 1.2rem; cursor: pointer; }
button:hover, button:focus-visible { color: var(--spirit); border-color: var(--spirit); outline: none; }
.brand { font: 700 .8rem var(--title); letter-spacing: .34em; text-transform: uppercase; color: #d8f7f1; }

/* Kapı */
#gate { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: .5rem; padding: 2rem 1rem; text-align: center; }
#gate .seal { width: 9.5rem; height: 9.5rem; color: var(--spirit); filter: drop-shadow(0 0 .5rem #6ff5e288); overflow: visible; margin-bottom: 1rem; }
.seal g { transform-origin: 60px 60px; }
.seal .outer { animation: turn 14s linear infinite; }
.seal .inner { animation: turn 9s linear infinite reverse; }
@keyframes turn { to { transform: rotate(360deg); } }
#gate h1 { font-size: 2rem; letter-spacing: .12em; color: #e9dfc8; }
#gate .lore { margin: 0 0 1.2rem; font: italic 500 1.2rem var(--lore); color: var(--muted); }
#gate form { display: grid; gap: .9rem; width: min(21rem, 86vw); text-align: left; }
#gate label { display: grid; gap: .3rem; font: 700 .68rem var(--title); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
#gate input { font: 500 1rem system-ui, sans-serif; color: var(--ink); background: #0b1014; border: 1px solid #8a755677; border-radius: .3rem; padding: .7rem .8rem; }
#gate input:focus { outline: none; border-color: var(--spirit); box-shadow: 0 0 0 3px #6ff5e222; }
#gate-error { min-height: 1.4em; margin: 0; color: var(--core); font-size: .9rem; }

/* Kule */
#tower { max-width: 1500px; margin: 0 auto; padding: 0 1.4rem 3rem; }
header { display: flex; align-items: center; gap: 1.6rem; padding: 1.3rem 0 1.1rem; border-bottom: 1px solid #8a755644; flex-wrap: wrap; }
header .title { display: grid; gap: .1rem; margin-right: auto; }
header h1 { font-size: 1.55rem; letter-spacing: .12em; color: #e9dfc8; }
#sky { display: flex; align-items: center; gap: .7rem; }
#sky svg { width: 4.6rem; height: 2.5rem; overflow: visible; }
#sky b, #status b { display: block; font: 600 1.05rem var(--num); letter-spacing: .04em; color: var(--ink); }
#sky span, #status span { display: block; font-size: .78rem; color: var(--muted); }
#status { display: flex; align-items: center; gap: .6rem; }
.pulse { width: .6rem; height: .6rem; border-radius: 50%; background: var(--spirit); box-shadow: 0 0 0 0 #6ff5e288; animation: pulse 2s ease-out infinite; flex: none; }
.pulse.off { background: var(--core); animation: none; }
@keyframes pulse { to { box-shadow: 0 0 0 .7rem #6ff5e200; } }

main { display: grid; gap: 1.1rem; padding-top: 1.2rem; }
.grid { display: grid; gap: 1.1rem; }
.world-row { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 1.1rem; grid-template-rows: auto 1fr; min-height: 0; }
@media (max-width: 1100px) { .world-row, .three, .two { grid-template-columns: minmax(0, 1fr); } }

/* Çerçeve: ince tunç çizgi, köşelerde çentik */
.panel, .head { position: relative; background: linear-gradient(180deg, #131a22ee, #0e1319ee); border: 1px solid #8a755640; border-radius: .25rem; padding: 1rem 1.1rem 1.1rem; min-width: 0; }
.panel::before, .panel::after, .head::before, .head::after { content: ''; position: absolute; width: .7rem; height: .7rem; border: 1px solid var(--bronze); pointer-events: none; }
.panel::before, .head::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after, .head::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.panel h2 { display: flex; align-items: baseline; gap: .6rem; font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; color: #e9dfc8; margin-bottom: .9rem; }
.panel h2::before { content: ''; width: .42rem; height: .42rem; background: var(--bronze); transform: rotate(45deg) translateY(-.12rem); flex: none; }
.panel h2 small { font: 400 .78rem system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: var(--muted); }
.panel.grow { display: flex; flex-direction: column; min-height: 0; }
.scroll { overflow-y: auto; max-height: 23rem; scrollbar-width: thin; scrollbar-color: #8a755666 transparent; }
.empty { margin: .4rem 0; font: italic 500 1.05rem var(--lore); color: var(--muted); }

/* Başlık sayıları */
.heads { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.1rem; }
@media (max-width: 1100px) { .heads { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.head .label { display: flex; align-items: center; gap: .5rem; font: 700 .68rem var(--title); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.head .value { font: 700 2.9rem/1.05 var(--num); letter-spacing: .01em; font-variant-numeric: tabular-nums; margin: .25rem 0 .2rem; }
.head .sub { font-size: .82rem; color: var(--soft); display: flex; gap: .9rem; flex-wrap: wrap; }
.head .sub i { font-style: normal; color: var(--muted); }
.head.live { border-color: #6ff5e255; box-shadow: inset 0 0 2.5rem #6ff5e20d; }

/* Taraf imi: biçim de tarafı söyler (daire: insan, baklava: yapay zekâ) */
.sig { width: .72rem; height: .72rem; flex: none; vertical-align: -.06rem; }
.sig.f0 { fill: var(--spirit); }
.sig.f1 { fill: var(--core); }
.coin { display: inline-block; width: .62rem; height: .62rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f6e2a6, var(--gold) 55%, #8d6f2c); margin-right: .3rem; vertical-align: -.02rem; }
.n { font-family: var(--num); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Harita */
#world { position: relative; aspect-ratio: 1; background: radial-gradient(circle at 25% 50%, #13282655, transparent 38%), radial-gradient(circle at 75% 50%, #2a151255, transparent 38%), #0a0f13; border: 1px solid var(--line); border-radius: .2rem; overflow: hidden; }
#world svg { display: block; width: 100%; height: 100%; }
#world .gridline { stroke: #ece6da0d; stroke-width: 2; }
#world .ring { fill: none; stroke: #6ff5e2; stroke-opacity: .55; stroke-width: 4; }
#world .ring.safe { stroke-dasharray: 10 14; stroke-opacity: .25; }
#world .base { fill: none; stroke: #ff6a55; stroke-opacity: .6; stroke-width: 4; }
#world .place { font: 700 30px var(--title); letter-spacing: .16em; fill: #e9dfc8; fill-opacity: .75; text-anchor: middle; text-transform: uppercase; }
#world .mobs { fill: none; stroke-linecap: round; stroke-width: 9; }
#world .mobs.k1 { stroke: #9fb0a4; stroke-opacity: .5; }
#world .mobs.k2 { stroke: #c79a5b; stroke-opacity: .55; }
#world .who circle.dot { stroke: #0a0f13; stroke-width: 4; }
#world .who.f0 circle.dot { fill: var(--spirit); }
#world .who.f1 rect.dot { fill: var(--core); stroke: #0a0f13; stroke-width: 4; }
#world .who .halo { fill: none; stroke-width: 3; opacity: .7; transform-box: fill-box; transform-origin: center; animation: halo 2.4s ease-out infinite; }
#world .who.f0 .halo { stroke: var(--spirit); }
#world .who.f1 .halo { stroke: var(--core); }
@keyframes halo { from { transform: scale(.5); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
#world .who text { font: 600 30px var(--num); fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: #0a0f13; stroke-width: 7; stroke-linejoin: round; }
#world .who { cursor: default; }
.legend { display: flex; gap: 1.1rem; flex-wrap: wrap; list-style: none; margin: .8rem 0 0; padding: 0; font-size: .8rem; color: var(--soft); }
.legend li { display: flex; align-items: center; gap: .4rem; }
.legend .sw { width: .7rem; height: .7rem; border-radius: 2px; flex: none; }
.legend .dotk { width: .45rem; height: .45rem; border-radius: 50%; flex: none; }

/* Güç dengesi */
.tug { display: flex; gap: 2px; height: 1.1rem; margin: .2rem 0 .9rem; }
.tug i { display: block; min-width: 4px; border-radius: 4px 0 0 4px; background: var(--spirit-fill); transition: flex-grow .6s ease; }
.tug i + i { border-radius: 0 4px 4px 0; background: var(--core-fill); }
.tug.none i { background: #ece6da14; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sides > div:last-child { text-align: right; }
.sides h3 { margin: 0; font: 700 .78rem var(--title); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); display: flex; align-items: center; gap: .45rem; }
.sides > div:last-child h3 { justify-content: flex-end; }
.sides .big { font: 700 2.1rem/1.1 var(--num); font-variant-numeric: tabular-nums; }
.sides .big small { font: 500 .85rem system-ui, sans-serif; color: var(--muted); margin-left: .3rem; }
.sides p { margin: .1rem 0 0; font-size: .8rem; color: var(--soft); }
.sides p i { font-style: normal; color: var(--muted); }

/* Satırlar */
.rows { display: grid; }
.rowx { display: grid; align-items: center; gap: .7rem; padding: .42rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rowx:last-child { border-bottom: 0; }
.rowx .name { display: flex; align-items: center; gap: .45rem; min-width: 0; font-weight: 600; }
.rowx .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowx .dim { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.rowx .lv { font: 700 .8rem var(--num); letter-spacing: .04em; color: var(--soft); white-space: nowrap; }
.rowx .rank { font: 700 .95rem var(--title); color: var(--bronze); text-align: center; }
.rowx:nth-child(1) .rank { color: var(--gold); }
.rowx .on { width: .4rem; height: .4rem; border-radius: 50%; background: var(--spirit); box-shadow: 0 0 .4rem var(--spirit); flex: none; }
.r-top { grid-template-columns: 1.6rem minmax(0, 1.5fr) 3rem minmax(3rem, 1fr) 4.2rem; }
.r-roster { grid-template-columns: minmax(0, 1.4fr) 3rem minmax(3.4rem, 1fr) auto; }
.r-rich { grid-template-columns: minmax(0, 1fr) auto; }
.r-new { grid-template-columns: minmax(0, 1fr) 3rem auto; }
.r-item { grid-template-columns: minmax(0, 1.3fr) 4rem minmax(4rem, 1.4fr) 4.6rem; }
.r-item.headrow { font: 700 .64rem var(--title); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.right { text-align: right; }
.bar { height: .38rem; background: #ece6da12; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--soft); }
.bar.hp i { background: #5fbf7a; }
.bar.hp.low i { background: var(--core-fill); }
.bar.xp i { background: var(--gold); }
.chips { display: flex; gap: .3rem; justify-content: flex-end; flex-wrap: wrap; }
.chip { font-size: .7rem; padding: .08rem .4rem; border: 1px solid var(--line); border-radius: 3px; color: var(--soft); white-space: nowrap; }
.chip.hot { border-color: #ff6a5566; color: #ffb3a8; }

/* Sohbet */
.say { display: grid; grid-template-columns: 2.6rem auto minmax(0, 1fr); gap: .5rem; align-items: baseline; padding: .32rem 0; border-bottom: 1px solid var(--line); }
.say:last-child { border-bottom: 0; }
.say time { font: 400 .74rem var(--mono); color: var(--muted); }
.say b { display: flex; align-items: center; gap: .35rem; font-weight: 600; white-space: nowrap; }
.say p { margin: 0; color: var(--soft); overflow-wrap: anywhere; }

/* Grafikler */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { font: 400 10.5px var(--mono); fill: var(--muted); }
.chart .rule { stroke: #ece6da12; stroke-width: 1; }
.chart .base { stroke: #ece6da33; stroke-width: 1; }
.chart .s0 { fill: var(--spirit-fill); }
.chart .s1 { fill: var(--core-fill); }
.chart .l0 { stroke: var(--spirit-fill); }
.chart .l1 { stroke: var(--core-fill); }
.chart path.line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .slot .hit { fill: transparent; }
.chart .slot:hover .hit { fill: #ece6da0d; }
.chart .slot .guide { stroke: #ece6da55; stroke-width: 1; opacity: 0; }
.chart .slot .mark { opacity: 0; stroke: var(--surface); stroke-width: 2; }
.chart .slot:hover .guide, .chart .slot:hover .mark { opacity: 1; }

/* Sunucu göstergeleri */
.vitals { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .9rem 1.1rem; }
.vital .label { font-size: .76rem; color: var(--muted); }
.vital .value { font: 600 1.45rem/1.2 var(--num); font-variant-numeric: tabular-nums; }
.vital .value small { font: 400 .78rem system-ui, sans-serif; color: var(--muted); margin-left: .25rem; }
.vital .bar { margin-top: .3rem; }

#tip { position: fixed; z-index: 10; pointer-events: none; max-width: 18rem; padding: .45rem .6rem; background: #0b1014f2; border: 1px solid #8a755688; border-radius: .25rem; font-size: .8rem; line-height: 1.45; color: var(--ink); white-space: pre-line; box-shadow: 0 .4rem 1.2rem #000a; }

/* Gezinme */
#nav { display: flex; gap: .3rem; }
#nav a { font: 700 .74rem var(--title); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: .55rem .9rem; border: 1px solid transparent; border-radius: .3rem; }
#nav a:hover { color: var(--ink); }
#nav a.on { color: var(--spirit); border-color: #6ff5e255; background: #6ff5e20d; }
[data-player] { cursor: pointer; }
.rowx[data-player]:hover { background: #ece6da0a; }
#world .who[data-player] { cursor: pointer; }

/* Oyuncu listesi */
.filters { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .9rem; }
.filters input, .filters select { font: 500 .92rem system-ui, sans-serif; color: var(--ink); background: #0b1014; border: 1px solid #8a755677; border-radius: .3rem; padding: .55rem .7rem; }
.filters input { flex: 1 1 16rem; min-width: 0; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--spirit); }
.seg { display: flex; border: 1px solid #8a755677; border-radius: .3rem; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: none; padding: .6rem .8rem; font-size: .68rem; color: var(--muted); }
.seg button.on { color: #10201d; background: var(--spirit); }
.pick { display: flex; align-items: center; gap: .5rem; font: 700 .66rem var(--title); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.r-player { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 3.2rem minmax(3rem, .9fr) 5rem 7rem 7.5rem; padding-left: .4rem; padding-right: .4rem; }
.r-player.headrow { font: 700 .64rem var(--title); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 800px) { .r-player { grid-template-columns: minmax(0, 1.4fr) 3.2rem 5rem; } .r-player > :nth-child(2), .r-player > :nth-child(4), .r-player > :nth-child(6), .r-player > :nth-child(7) { display: none; } }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .9rem; color: var(--muted); font-size: .85rem; }
.pager div { display: flex; gap: .5rem; }
.pager button { padding: .5rem .9rem; }
.pager button:disabled { opacity: .35; cursor: default; color: #e9dfc8; border-color: #8a755699; }

/* Oyuncu detayı */
.back { display: inline-block; color: var(--muted); text-decoration: none; font: 700 .74rem var(--title); letter-spacing: .14em; text-transform: uppercase; }
.back:hover { color: var(--spirit); }
#player { display: grid; gap: 1.1rem; }
.who-head { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.who-head .crest { width: 4.2rem; height: 4.2rem; display: grid; place-items: center; border: 1px solid var(--bronze); border-radius: 50%; background: #0b1014; flex: none; }
.who-head .crest .sig { width: 1.9rem; height: 1.9rem; }
.who-head.f0 .crest { box-shadow: 0 0 1.4rem #6ff5e233; border-color: #6ff5e288; }
.who-head.f1 .crest { box-shadow: 0 0 1.4rem #ff6a5533; border-color: #ff6a5588; }
.who-head h2 { margin: 0; font-size: 1.9rem; letter-spacing: .06em; text-transform: none; color: #f2ead8; }
.who-head h2::before { display: none; }
.who-head .meta { color: var(--soft); font-size: .9rem; }
.who-head .meta i { font-style: normal; color: var(--muted); }
.who-head .state { margin-left: auto; display: flex; align-items: center; gap: .6rem; text-align: right; }
.who-head .state b { display: block; font: 600 1.05rem var(--num); }
.who-head .state span { display: block; font-size: .78rem; color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
@media (max-width: 1100px) { .detail { grid-template-columns: minmax(0, 1fr); } }
.detail > div { display: grid; gap: 1.1rem; }

/* Kuşanılanlar: oyundaki gibi gövdenin çevresine dizili yuvalar */
.doll { display: grid; grid-template-columns: repeat(3, 6.2rem); grid-template-areas: '. bas tilsim' 'sag govde sol' 'eldiven bacak .' '. ayak .'; gap: .5rem; justify-content: center; }
.slot { position: relative; aspect-ratio: 1; display: grid; place-content: center; padding: .35rem; text-align: center; background: #0b1014; border: 1px solid #8a755655; border-radius: .25rem; font-size: .74rem; line-height: 1.2; color: var(--muted); }
.slot.full { border-color: var(--bronze); background: linear-gradient(160deg, #1d1a14, #0e1014); color: var(--ink); box-shadow: inset 0 0 1rem #d9b96a14; }
.slot small { position: absolute; left: .3rem; top: .2rem; font: 700 .52rem var(--title); letter-spacing: .1em; text-transform: uppercase; color: var(--bronze); }
.slot b { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.slot .count { position: absolute; right: .3rem; bottom: .15rem; font: 700 .8rem var(--num); color: var(--gold); }
.bag { display: grid; grid-template-columns: repeat(6, minmax(0, 5.4rem)); gap: .4rem; justify-content: center; }
.bag .slot { font-size: .68rem; }

/* Bilgi satırları */
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem 1.2rem; margin: 0; }
.facts dt { color: var(--muted); font-size: .84rem; }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.facts dd small { color: var(--muted); margin-left: .3rem; }
.gauge { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; margin-bottom: .6rem; }
.gauge span { color: var(--muted); font-size: .84rem; }
.gauge .bar { height: .5rem; }
.where { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.1rem; align-items: center; margin-top: .9rem; }
.where svg { width: 100%; aspect-ratio: 1; background: #0a0f13; border: 1px solid var(--line); border-radius: .2rem; }
.pips { display: inline-flex; gap: .25rem; }
.pips i { width: .9rem; height: .42rem; border-radius: 2px; background: #ece6da18; }
.pips i.on { background: var(--gold); }
.swatch { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; border: 1px solid #ece6da33; vertical-align: -.1rem; margin-right: .4rem; }
.zero { color: var(--muted); }

/* Gömülü karakter ve envanter (oyunun kendi sayfası) */
#p-left, #p-right { display: grid; gap: 1.1rem; align-content: start; min-width: 0; }
.viewer { display: block; width: 100%; height: 38rem; border: 0; background: transparent; }
