*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

html,
body {
  margin: 0;
  max-height: 100vh;
  max-height: 100dvh;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-family: Consolas, "Courier New", monospace;
  background: #1a0a3e;
  color: #fff;
}

.arena-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #2d1b69 0%, #5b21b6 35%, #0e7490 70%, #db2777 100%);
  background-size: 200% 200%;
  animation: bg-shift 12s ease-in-out infinite alternate;
}

@keyframes bg-shift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.arena-bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.75;
  animation: blob-float 8s ease-in-out infinite;
}

.arena-bg__blob--1 {
  width: 55vw;
  height: 55vw;
  max-width: 420px;
  max-height: 420px;
  background: #fde047;
  top: -10%;
  right: -5%;
}

.arena-bg__blob--2 {
  width: 50vw;
  height: 50vw;
  max-width: 380px;
  max-height: 380px;
  background: #22d3ee;
  bottom: 5%;
  left: -12%;
  animation-delay: -3s;
}

.arena-bg__blob--3 {
  width: 40vw;
  height: 40vw;
  max-width: 300px;
  max-height: 300px;
  background: #f472b6;
  top: 40%;
  left: 35%;
  animation-delay: -5s;
}

@keyframes blob-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(12px, -16px) scale(1.08);
  }
}

.arena-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(400px) rotateX(58deg) scale(1.35);
  transform-origin: center top;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
}

.arena-ticker {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  overflow: hidden;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(90deg, #ec4899, #8b5cf6, #06b6d4, #eab308, #ec4899);
  background-size: 200% auto;
  animation: ticker-bar 4s linear infinite;
}

@keyframes ticker-bar {
  to {
    background-position: 200% center;
  }
}

.arena-ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 18s linear infinite;
  padding: 6px 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.arena {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 12px 12px;
  overflow: hidden;
}

.arena__head {
  flex-shrink: 0;
  text-align: center;
}

.arena__tag {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 800;
  color: #1e1b4b;
  letter-spacing: 0.12em;
  background: #fef08a;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(254, 240, 138, 0.65);
}

.arena__title {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 4.8vh, 2.55rem);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.2),
    0 0 30px rgba(255, 255, 255, 0.35);
}

.arena__title-glow {
  background: linear-gradient(90deg, #fef08a, #4ade80, #22d3ee, #f472b6, #fef08a);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-shine 3s linear infinite;
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.6));
}

@keyframes title-shine {
  to {
    background-position: 200% center;
  }
}

.arena__sub {
  margin: 0 0 10px;
  font-size: clamp(11px, 1.8vh, 14px);
  line-height: 1.4;
  color: #fef9c3;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.arena__pods {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: clamp(8px, 2vw, 14px);
  padding-top: 4px;
}

.pod {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 0;
  padding: clamp(10px, 2vh, 16px) 8px clamp(12px, 2.5vh, 18px);
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pod:focus {
  outline: 3px solid #fef08a;
  outline-offset: 2px;
}

.pod:hover {
  transform: translateY(-6px) scale(1.03);
}

.pod__badge {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  z-index: 2;
}

.pod__ring {
  position: absolute;
  top: 18%;
  left: 50%;
  width: min(78%, 120px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.65);
  animation: pod-spin 14s linear infinite;
  z-index: 0;
}

@keyframes pod-spin {
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

.pod__logo-shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(88%, 130px);
  flex: 1;
  min-height: 0;
  max-height: 42%;
  margin-top: 8%;
  padding: clamp(10px, 2vh, 16px);
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.25),
    inset 0 -4px 0 rgba(0, 0, 0, 0.06);
}

.pod__logo {
  max-width: 92%;
  max-height: clamp(32px, 8vh, 52px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.pod__logo--svg {
  max-height: clamp(28px, 6vh, 40px);
}

.pod__chip {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  color: #fef08a;
}

.pod__name {
  position: relative;
  z-index: 1;
  font-size: clamp(10px, 2vh, 13px);
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.pod--funtasy {
  background: linear-gradient(180deg, #0891b2 0%, #2563eb 100%);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.45);
}

.pod--funtasy:hover {
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.65);
}

.pod--battlex {
  background: linear-gradient(180deg, #ea580c 0%, #dc2626 100%);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.45);
}

.pod--battlex:hover {
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.65);
}

.pod--mind {
  background: linear-gradient(180deg, #9333ea 0%, #db2777 100%);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.45);
}

.pod--mind:hover {
  box-shadow: 0 16px 40px rgba(168, 85, 247, 0.65);
}

@media (max-width: 520px) {
  .arena__pods {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
  }

  .pod {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 14px;
    gap: 12px;
  }

  .pod__ring {
    display: none;
  }

  .pod__logo-shell {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    max-height: none;
    margin-top: 0;
    padding: 8px;
  }

  .pod__badge {
    top: 50%;
    transform: translateY(-50%);
    left: auto;
    right: 10px;
  }

  .pod__chip,
  .pod__name {
    margin-right: auto;
    text-align: left;
  }
}

@media (max-height: 520px) {
  .arena__sub {
    display: none;
  }

  .pod__chip {
    display: none;
  }

  .arena-bg__blob {
    opacity: 0.5;
  }
}

@media (max-width: 520px) {
  html,
  body {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
    height: auto;
    min-height: 100dvh;
  }

  .arena {
    overflow: visible;
    min-height: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 380px) {
  .arena__title {
    font-size: clamp(1.25rem, 6vw, 1.65rem);
  }

  .arena-ticker__track {
    font-size: 9px;
    letter-spacing: 0.15em;
  }
}
