*,
*::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;
  width: 100%;
  margin: 0 auto;
  padding: 10px 12px 12px;
}

.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);
  grid-auto-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(8px, 2vw, 14px);
  padding: 4px 2px 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.pod {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  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: box-shadow 0.2s ease, filter 0.2s ease;
}

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

.pod:hover {
  z-index: 2;
  filter: brightness(1.07);
}

.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__hero {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: clamp(112px, 22vh, 136px);
  margin: 2px 0;
}

.pod__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(108px, 24vw, 124px);
  height: clamp(108px, 24vw, 124px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.72);
  animation: pod-spin 14s linear infinite;
  z-index: 0;
  pointer-events: none;
}

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

.pod__logo-shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: clamp(78px, 18vw, 94px);
  height: clamp(78px, 18vw, 94px);
  aspect-ratio: 1;
  margin: 0;
  padding: clamp(8px, 1.6vh, 12px);
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.92);
  background: #fff;
  overflow: hidden;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.28),
    inset 0 -3px 0 rgba(0, 0, 0, 0.06);
}

.pod__logo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.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);
}

.pod--gliq {
  background: linear-gradient(180deg, #0284c7 0%, #1e3a8a 100%);
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.45);
}

.pod--gliq:hover {
  box-shadow: 0 16px 40px rgba(2, 132, 199, 0.65);
}

.pod--gluae {
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.45);
}

.pod--gluae:hover {
  box-shadow: 0 16px 40px rgba(5, 150, 105, 0.65);
}

.pod--flexgpt {
  background: linear-gradient(180deg, #6366f1 0%, #4338ca 100%);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.45);
}

.pod--flexgpt:hover {
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.65);
}

.pod--gamezroid {
  background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.45);
}

.pod--gamezroid:hover {
  box-shadow: 0 16px 40px rgba(217, 119, 6, 0.65);
}

.pod--ludodzo {
  background: linear-gradient(180deg, #e11d48 0%, #be123c 100%);
  box-shadow: 0 10px 30px rgba(225, 29, 72, 0.45);
}

.pod--ludodzo:hover {
  box-shadow: 0 16px 40px rgba(225, 29, 72, 0.65);
}

.pod--ludokw {
  background: linear-gradient(180deg, #2e758b 0%, #274052 100%);
  box-shadow: 0 10px 30px rgba(46, 117, 139, 0.45);
}

.pod--ludokw:hover {
  box-shadow: 0 16px 40px rgba(46, 117, 139, 0.65);
}

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

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

  .pod__hero {
    flex: 0 0 auto;
    width: 84px;
    min-height: 84px;
    margin: 0;
  }

  .pod__ring {
    width: 84px;
    height: 84px;
  }

  .pod__logo-shell {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    max-height: none;
    margin: 0;
    padding: 8px;
    border-width: 3px;
  }

  .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;
  }
}
