* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #05040c; }
body { font-family: "Pixelify Sans", ui-monospace, monospace; color: #f4f0ff; }

/* panggung 270x480 piksel game, diperbesar utuh lewat transform */
#stage { position: absolute; width: 270px; height: 480px; transform-origin: 0 0; overflow: hidden; }
#world { position: absolute; inset: 0; }
#c { position: absolute; inset: 0; width: 270px; height: 480px; image-rendering: pixelated; }

.r-common { color: #c2c8d4; } .r-uncommon { color: #7cf07a; } .r-rare { color: #5ac0ff; }
.r-epic { color: #d08aff; } .r-legendary { color: #ffd23a; }
.r-secret {
  background: linear-gradient(90deg, #ff5a5a, #ffd23a, #7cff6a, #5ad8ff, #c07aff, #ff5ad8, #ff5a5a);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rb 2s linear infinite;
}
@keyframes rb { to { background-position: 300% 0; } }

/* bar atas */
#top { position: absolute; left: 0; right: 0; top: 0; height: 17px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px;
  background: #0b0819; border-bottom: 1px solid #2c2150; }
.logo { font-family: Silkscreen, monospace; font-weight: 700; font-size: 8.5px; letter-spacing: .5px; color: #ffd23a; text-shadow: 1px 1px 0 #6a2a00; }
#conn { font-size: 5px; color: #9a8ccf; }

#feed { position: absolute; left: 4px; right: 4px; top: 19px; font-size: 5px; line-height: 6.6px; }
#feed .line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0.5px 0.5px 0 #000; transition: opacity 1s; }
#feed .line.old { opacity: .45; }
#feed i { color: #ffe9a0; font-style: normal; }
#feed small { font-size: 4.4px; }

#mapName { font-family: Silkscreen, monospace; font-size: 6px; }
#info { position: absolute; left: 0; right: 0; top: 18px; height: 11px; line-height: 11px; text-align: center; font-size: 5.6px; color: #d8ccf8; background: rgba(8, 5, 20, .72); }
#info b { color: #ffd23a; }
#info .time { color: #9a8ccf; }
#feed { top: 31px; }

/* panel bawah: papan juara / top kill */
#panel { position: absolute; left: 6px; right: 6px; top: 384px; height: 82px; padding: 3px 6px; background: rgba(8, 5, 20, .8); border: 1px solid #3a2c6a; border-radius: 2px; }
#panel .ttl { font-family: Silkscreen, monospace; font-size: 6px; color: #ffd23a; margin-bottom: 2px; }
#panel .champ { font-size: 5.4px; color: #ffd23a; margin-bottom: 1px; }
#panel .row { display: flex; gap: 3px; font-size: 5.6px; line-height: 7.6px; }
#panel .row span { width: 6px; color: #8a7cc0; }
#panel .row b { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#panel .row em { font-style: normal; color: #c8bce8; font-size: 5px; }
#panel .row.out { opacity: .45; }
#panel .row.empty { color: #8a7cc0; }
#panel .wait { font-size: 4.8px; color: #9a8ccf; margin-top: 2px; }
#panel .bar.boss { height: 6px; margin: 4px 0 2px; }
#panel .bar.boss i { background: linear-gradient(#ff6a6a, #c01a3a); }
#panel .num { font-size: 5px; color: #ffb0b8; }
.bar { height: 3.5px; background: #1a1230; border: .5px solid #000; margin-top: 1.5px; position: relative; overflow: hidden; }
.bar i { position: absolute; top: 0; bottom: 0; left: 0; transition: width .15s; }
.crown { color: #ffd23a; font-style: normal; margin-right: 1px; }
#center { position: absolute; left: 0; right: 0; top: 104px; text-align: center; text-shadow: 1px 1px 0 #000; pointer-events: none; }
#center .big { font-size: 11px; font-weight: 700; }
#center .big b { color: #ffd23a; }
#center .sm { font-size: 5.5px; color: #c8bce8; }
#center .cd { font-family: Silkscreen, monospace; font-size: 26px; color: #fff; line-height: 26px; }

/* label nama pet */
.tag { position: absolute; left: 0; top: 0; font-size: 4.2px; line-height: 5px; white-space: nowrap; text-shadow: .5px .5px 0 #000, -.5px .5px 0 #000; font-weight: 600; }
.tag.r-secret { filter: drop-shadow(.5px .5px 0 #000) drop-shadow(-.5px -.5px 0 #000); }
.tag span { color: #fff; margin-left: 1px; font-weight: 400; opacity: .8; }
.tag.dead { display: none; }
#test select { flex: 1; padding: 4px; background: #0b0819; color: #fff; border: 1px solid #3a2c6a; border-radius: 4px; }

/* teks melayang */
.float { position: absolute; transform: translate(-50%, 0); font-size: 6px; font-weight: 700; white-space: nowrap; text-shadow: .7px .7px 0 #000; animation: up 1.5s ease-out forwards; pointer-events: none; }
.float.xp { color: #9ae8ff; font-size: 5px; }
.float.lvl { color: #ffd23a; font-family: Silkscreen, monospace; font-size: 7px; }
.float.skill { color: #fff; font-size: 6.5px; }
.float.ult { color: #ffd23a; font-family: Silkscreen, monospace; font-size: 8px; text-shadow: 1px 1px 0 #7a1a00, 0 0 4px #ff8a00; }
.float.heal { color: #7cff7a; }
.float.mut { font-family: Silkscreen, monospace; font-size: 6.5px; text-shadow: .7px .7px 0 #000, 0 0 3px currentColor; }
.float.mut.r-secret { color: #ff5ad8; background: none; }
.float.buff { color: #7cff6a; font-family: Silkscreen, monospace; }
@keyframes up { 0% { opacity: 0; transform: translate(-50%, 4px) scale(.7); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -16px) scale(1); } }

/* banner tengah */
#banner { position: absolute; left: 6px; right: 6px; top: 70px; text-align: center; opacity: 0; transform: scale(.7); transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none;
  font-size: 8px; font-weight: 700; text-shadow: 1px 1px 0 #000; }
#banner.show { opacity: 1; transform: scale(1); }
#banner.big { padding: 4px 3px; background: rgba(8, 4, 20, .8); border-top: 1px solid #5a3aa0; border-bottom: 1px solid #5a3aa0; }
#banner small { display: block; font-size: 5px; font-weight: 400; color: #d8ccf8; margin-top: 1px; }
#banner .huge { font-family: Silkscreen, monospace; font-size: 11px; }
#banner .vs { display: inline-block; margin: 0 5px; font-family: Silkscreen, monospace; color: #ff5a5a; font-size: 10px; }
#banner.fight { font-family: Silkscreen, monospace; font-size: 22px; color: #ffd23a; text-shadow: 2px 2px 0 #7a1a00; background: none; border: 0; }
#banner.win { border-color: #ffd23a; }
#banner.boss { border-color: #ff3a5a; background: rgba(40, 0, 10, .85); }

#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#flash.on { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: .7; } 100% { opacity: 0; } }

/* panel uji (di luar panggung) */
#test { position: fixed; right: 8px; top: 8px; width: 250px; padding: 8px; background: #141024; border: 1px solid #3a2c6a; border-radius: 6px; font: 12px/1.3 ui-sans-serif, system-ui, sans-serif; z-index: 10; }
#test .ttl { font-weight: 600; margin-bottom: 6px; color: #ffd23a; }
#test input { width: 100%; padding: 4px 6px; margin-bottom: 6px; background: #0b0819; color: #fff; border: 1px solid #3a2c6a; border-radius: 4px; }
#test .row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
#test .row input { flex: 1; margin: 0; width: auto; }
#test button { padding: 4px 7px; background: #2a1f50; color: #f4f0ff; border: 1px solid #4a3a8a; border-radius: 4px; cursor: pointer; }
#test button:hover { background: #3a2c6a; }
@media (max-width: 700px) { #test { top: auto; bottom: 8px; right: 8px; left: 8px; width: auto; opacity: .92; } }

#help { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; line-height: 10px; text-align: center; font-size: 5px; color: #b8acdc; background: #0b0819; border-top: 1px solid #2c2150; }
#help b { color: #ffd23a; font-weight: 600; }
