/* Guerra estilo Tibia. Lienzo 1920x1080: cabecera (0-72), mapa en canvas (0-1440 x 72-1032),
   panel derecho con FRAGS y SERVER LOG, pie con avisos. Marcos cafe/dorado como el cliente de Tibia. */
.gw { position: absolute; inset: 0; overflow: hidden; background: #0c0a08; font-family: Verdana, Tahoma, sans-serif; color: #e8d8b0; }
.gw canvas { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; image-rendering: pixelated; }

.gw-head { position: absolute; left: 0; top: 0; right: 0; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  background: linear-gradient(180deg, #4a3a26, #2a2014); border-bottom: 3px solid #6b5a3a; box-shadow: 0 4px 12px rgba(0, 0, 0, .6); }
.gw-head .t b { display: block; font: 900 30px/1 Verdana, Tahoma, sans-serif; letter-spacing: .06em; color: #f0e0b8; text-shadow: 0 2px 0 #000; }
.gw-head .t small { display: block; margin-top: 6px; font: 700 15px/1 Verdana, Tahoma, sans-serif; letter-spacing: .18em; color: #c8b890; }
.gw-head .n { padding: 8px 20px; border: 2px solid #8a7450; border-radius: 4px; background: rgba(0, 0, 0, .35); font: 900 20px/1 Verdana, Tahoma, sans-serif; letter-spacing: .1em; color: #c8b890; }
.gw-head .n b { font-size: 30px; color: #fff; margin-right: 6px; }

.gw-panel { position: absolute; left: 1440px; top: 72px; width: 480px; height: 960px; padding: 14px; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, #2a2014, #1a140c); border-left: 3px solid #6b5a3a; }
.gw-box { border: 2px solid #6b5a3a; border-radius: 4px; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px #000; }
.gw-box h3 { margin: 0; padding: 8px 12px; font: 900 16px/1 Verdana, Tahoma, sans-serif; letter-spacing: .2em; color: #f0e0b8;
  background: linear-gradient(180deg, #4a3a26, #33281a); border-bottom: 2px solid #6b5a3a; }
.frags ol { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 8px; min-height: 40px; }
.frags li { display: flex; align-items: center; gap: 10px; font: 700 22px/1.1 Verdana, Tahoma, sans-serif; }
.frags li i { flex: none; width: 18px; height: 18px; background: #f0f0f0;
  clip-path: polygon(15% 0, 85% 0, 100% 20%, 100% 65%, 80% 80%, 80% 100%, 20% 100%, 20% 80%, 0 65%, 0 20%); }
.frags li.red i { background: #e02020; }
.frags li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.frags li span { font-size: 26px; color: #f0c040; }
.log { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.gw-log { flex: 1; overflow: hidden; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.le { font: 700 19px/1.3 Verdana, Tahoma, sans-serif; color: #e8e8e8; overflow-wrap: anywhere; animation: gwIn .3s ease-out; }
.le s { color: #ff6060; text-decoration-thickness: 2px; }
.le b { color: #f0c040; }
.le:first-child { color: #fff; }
.le:nth-child(n+7) { opacity: .55; }
.le:nth-child(n+10) { opacity: .3; }
@keyframes gwIn { from { transform: translateX(30px); } to { transform: none; } }

.gw-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #2a2014, #1a140c); border-top: 3px solid #6b5a3a; }
.gw-foot span { font: 700 18px/1 Verdana, Tahoma, sans-serif; letter-spacing: .06em; color: #e8d8b0; }

/* avisos al centro del mapa (texto de Tibia con contorno) */
.gw-center { position: absolute; left: 720px; top: 500px; z-index: 5; display: none; transform: translate(-50%, -50%); max-width: 1300px; text-align: center; pointer-events: none;
  font: 900 64px/1.15 Verdana, Tahoma, sans-serif; color: #fff;
  text-shadow: -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000, 0 0 18px rgba(0, 0, 0, .8); }
.gw-center.show { display: block; animation: gwPop .35s cubic-bezier(.2, 1.4, .4, 1); }
.gw-center.big { font-size: 130px; color: #f0e0b8; }
.gw-center.fire { color: #ff8a30; }
.gw-center.tibia { font-size: 40px; }
.gw-center b { color: #f0c040; }
.gw-center .warnred { color: #ff3030; }
.gw-center.box { padding: 14px 44px; font-size: 52px; letter-spacing: .08em; color: #f0e0b8; text-shadow: 0 3px 0 #000;
  background: linear-gradient(180deg, #5a1a14, #2a0a08); border: 3px solid #b0443a; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .7); }
@keyframes gwPop { from { transform: translate(-50%, -50%) scale(.6); } to { transform: translate(-50%, -50%) scale(1); } }

/* ganador */
.gw-win { position: absolute; left: 0; top: 72px; width: 1440px; height: 960px; z-index: 8; display: none; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .62); text-align: center; }
.gw-win.show { display: flex; }
.gw-win .sk svg { width: 120px; height: 120px; filter: drop-shadow(0 0 22px rgba(224, 32, 32, .8)); animation: gwBeat 1s ease-in-out infinite; }
.gw-win small { margin-top: 16px; font: 900 40px/1 Verdana, Tahoma, sans-serif; letter-spacing: .3em; color: #f0e0b8; text-shadow: 0 3px 0 #000; }
.gw-win strong { margin-top: 12px; max-width: 1380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 900 120px/1.15 Verdana, Tahoma, sans-serif; color: #fff;
  text-shadow: -4px -4px 0 #000, 4px -4px 0 #000, -4px 4px 0 #000, 4px 4px 0 #000, 0 0 40px rgba(240, 192, 64, .6); animation: gwPop2 .6s cubic-bezier(.2, 1.4, .4, 1); }
.gw-win em { margin-top: 12px; font: 700 32px/1 Verdana, Tahoma, sans-serif; font-style: normal; color: #f0c040; text-shadow: 0 2px 0 #000; }
@keyframes gwBeat { 50% { transform: scale(1.1); } }
@keyframes gwPop2 { from { transform: scale(.4); } to { transform: scale(1); } }
.gw-center .gw-cd { display: block; margin-top: 10px; font-size: 30px; letter-spacing: .12em; color: #c8b890; }
.gw-center .gw-cd b { font-size: 44px; color: #fff; }

/* cuadro de los que siguen vivos (entre rondas), encima del panel derecho */
.gw-alive { position: absolute; left: 1440px; top: 72px; width: 480px; height: 960px; z-index: 4; display: none; flex-direction: column; padding: 14px;
  background: linear-gradient(180deg, #2a2014, #1a140c); border-left: 3px solid #6b5a3a; }
.gw-alive.show { display: flex; }
.gw-alive h3 { margin: 0 0 10px; padding: 10px 12px; font: 900 22px/1 Verdana, Tahoma, sans-serif; letter-spacing: .14em; color: #f0e0b8;
  background: linear-gradient(180deg, #5a1a14, #2a0a08); border: 2px solid #b0443a; border-radius: 4px; text-align: center; }
.gw-alive ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; }
.gw-alive ol.two { grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.gw-alive li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 8px; border: 1px solid #4a3a26; border-radius: 4px; background: rgba(0, 0, 0, .4);
  font: 700 18px/1.1 Verdana, Tahoma, sans-serif; color: #fff; }
.gw-alive ol.two li { font-size: 14px; padding: 4px 6px; }
.gw-alive li b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-alive li i { flex: none; width: 58px; font: 700 10px/1 Verdana, Tahoma, sans-serif; font-style: normal; text-align: center; padding: 3px 0; border-radius: 3px; color: #111; }
.gw-alive ol.two li i { width: 16px; overflow: hidden; color: transparent; }
.gw-alive .v-EK { background: #d0d0d0; }
.gw-alive .v-RP { background: #f0c040; }
.gw-alive .v-MS { background: #ff8a50; }
.gw-alive .v-ED { background: #60d080; }

/* sala de espera: el log ocupa todo el panel */
.gw-panel.lobby .log h3 { color: #f0c040; }
.gw-foot span b { color: #f0c040; }

/* reclamo del premio */
.gw-claim { display: none; margin-top: 26px; padding: 14px 36px; border: 3px solid #8a7450; border-radius: 6px; background: rgba(0, 0, 0, .6);
  font: 700 34px/1.2 Verdana, Tahoma, sans-serif; color: #f0e0b8; text-shadow: 0 2px 0 #000; }
.gw-claim.show { display: block; }
.gw-claim b { display: inline-block; min-width: 60px; margin-left: 12px; color: #fff; font-size: 44px; }
.gw-claim span { display: block; font-size: 46px; letter-spacing: .1em; }
.gw-claim q { display: block; margin-top: 10px; max-width: 1200px; font-size: 40px; color: #f0f000; overflow-wrap: anywhere; }
.gw-claim.ok { border-color: #40c060; }
.gw-claim.ok span { color: #60e080; }
.gw-claim.no { border-color: #b0443a; }
.gw-claim.no span { color: #ff5050; }
.frags.rank li { font-size: 20px; }
.frags.rank li span { font-size: 22px; white-space: nowrap; }
.frags.rank li span small { font-size: 13px; margin: 0 4px 0 2px; color: #c8b890; }
.frags.rank li.red i { background: #f0c040; }
.frags.rank li.champ { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 6px; padding: 6px 8px;
  border: 2px solid #f0c040; border-radius: 4px; background: rgba(240, 192, 64, .12); }
.frags.rank li.champ small { font: 900 12px/1 Verdana, Tahoma, sans-serif; letter-spacing: .08em; color: #f0c040; }
.frags.rank li.champ b { color: #fff; }
/* carteles de corte arriba del mapa para no tapar a los personajes; avisos de Tibia con fondo */
.gw-center.top { top: 128px; padding: 8px 32px; font-size: 38px; }
.gw-center.top .gw-cd { margin-top: 4px; font-size: 22px; }
.gw-center.top .gw-cd b { font-size: 32px; }
.gw-center.tibia { top: 210px; padding: 10px 28px; border-radius: 8px; background: rgba(0, 0, 0, .6); }
/* ganador: la camara lo acerca y queda dentro de un circulo de luz dorada; nombre arriba, vocacion y reclamo abajo */
.gw-win { justify-content: space-between; padding: 30px 0 40px;
  background: radial-gradient(circle at var(--wx, 720px) var(--wy, 480px), rgba(0, 0, 0, 0) 0 110px, rgba(0, 0, 0, .45) 190px, rgba(0, 0, 0, .8) 430px);
  animation: gwFade .7s ease-out; }
.gw-win .top, .gw-win .bot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.gw-win .sk svg { width: 72px; height: 72px; }
.gw-win small { margin-top: 6px; font-size: 30px; }
.gw-win strong { margin-top: 4px; font-size: 96px; }
.gw-win em { margin-top: 0; display: flex; align-items: center; gap: 14px; }
.gw-win em i { font: 900 22px/1 Verdana, Tahoma, sans-serif; font-style: normal; letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border-radius: 4px; color: #1a1208; text-shadow: none; }
.gw-win em i.v-EK { background: #d0d0d0; }
.gw-win em i.v-RP { background: #f0c040; }
.gw-win em i.v-MS { background: #ff8a50; }
.gw-win em i.v-ED { background: #60d080; }
.gw-win .ring { position: absolute; left: var(--wx, 720px); top: var(--wy, 480px); width: 220px; height: 220px; border-radius: 50%; pointer-events: none;
  transform: translate(-50%, -50%); border: 4px solid rgba(255, 208, 64, .85);
  box-shadow: 0 0 40px rgba(255, 196, 40, .8), inset 0 0 40px rgba(255, 196, 40, .45); animation: gwRing 1.6s ease-in-out infinite; }
.gw-win .ring::before { content: ''; position: absolute; inset: -150px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 214, 90, .2) 0 7deg, rgba(0, 0, 0, 0) 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%);
  animation: gwSpin 14s linear infinite; }
@keyframes gwRing { 50% { transform: translate(-50%, -50%) scale(1.07); border-color: rgba(255, 240, 160, 1); } }
@keyframes gwSpin { to { transform: rotate(360deg); } }
@keyframes gwFade { from { opacity: 0; } to { opacity: 1; } }
/* premios secundarios bajo el ganador: ultimo en caer y mas frags */
.gw-awards { display: none; gap: 28px; margin-top: 18px; }
.gw-awards.show { display: flex; }
.gw-awards .aw { display: flex; flex-direction: column; align-items: center; min-width: 300px; max-width: 520px; padding: 10px 28px 12px;
  border: 3px solid #8a7450; border-radius: 6px; background: linear-gradient(#2a2016, #140e08); box-shadow: 0 6px 18px rgba(0, 0, 0, .6);
  opacity: 0; animation: gwAw .5s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.gw-awards .aw small { margin: 0; font: 900 18px/1 Verdana, Tahoma, sans-serif; letter-spacing: .16em; color: #c0c0c0; text-shadow: 0 2px 0 #000; }
.gw-awards .aw b { max-width: 460px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 900 36px/1.15 Verdana, Tahoma, sans-serif; color: #fff; text-shadow: 0 3px 0 #000; }
.gw-awards .aw span { margin-top: 4px; font: 700 20px/1 Verdana, Tahoma, sans-serif; color: #f0c040; text-shadow: 0 2px 0 #000; }
.gw-awards .aw:first-child { border-color: #a8a8b8; }
.gw-awards .aw:nth-child(2) { border-color: #b0443a; }
.gw-awards .aw:nth-child(2) small { color: #ff7060; }
@keyframes gwAw { from { opacity: 0; transform: translateY(24px) scale(.8); } to { opacity: 1; transform: none; } }
/* sala de espera: contador que brinca al entrar alguien; con entradas abiertas la barra de abajo invita a escribir */
.gw-head .n b { display: inline-block; }
.gw-head .n b.bump { animation: gwBump .45s cubic-bezier(.2, 1.6, .4, 1); color: #60e080; }
@keyframes gwBump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.gw-foot.invite span { font-size: 26px; color: #f0e0b8; animation: gwInvite 1.8s ease-in-out infinite; }
.gw-foot.invite span b { font-size: 30px; }
@keyframes gwInvite { 50% { color: #fff; text-shadow: 0 0 16px rgba(240, 192, 64, .9); } }
/* corte de ronda: barrido de luz dorada sobre el mapa */
.gw-wipe { position: absolute; left: 0; top: 72px; width: 1440px; height: 960px; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, rgba(0, 0, 0, 0) 30%, rgba(255, 220, 120, .55) 48%, rgba(255, 255, 255, .8) 50%, rgba(255, 220, 120, .55) 52%, rgba(0, 0, 0, 0) 70%);
  background-size: 300% 100%; }
.gw-wipe.go { animation: gwWipe .9s ease-in-out; }
@keyframes gwWipe { 0% { opacity: 1; background-position: 100% 0; } 100% { opacity: 1; background-position: 0 0; } }
/* corte de ronda mas notorio: la pantalla se sacude, el barrido es mas fuerte y el cartel cae desde arriba */
.gw.shake canvas { animation: gwShake .5s ease-out; }
@keyframes gwShake { 10% { transform: translate(-10px, 4px); } 25% { transform: translate(9px, -6px); } 40% { transform: translate(-7px, 5px); } 55% { transform: translate(5px, -3px); } 75% { transform: translate(-2px, 2px); } 100% { transform: none; } }
.gw-wipe.go { animation: gwWipe 1.1s ease-in-out; }
.gw-wipe { background: linear-gradient(100deg, rgba(0, 0, 0, 0) 25%, rgba(255, 200, 80, .75) 46%, #fff 50%, rgba(255, 200, 80, .75) 54%, rgba(0, 0, 0, 0) 75%); background-size: 300% 100%; }
.gw-center.top.show { animation: gwDrop .5s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes gwDrop { from { transform: translate(-50%, -160%); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
