.titan-arena-v2-page {
  display: grid;
  gap: 18px;
  min-width: 0;
  overflow-x: clip;
}

.titan-arena-v2-overview {
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
}

.titan-arena-v2-overview .boss-cinematic {
  margin: 0;
}

.titan-arena-v2-header,
.titan-arena-v2-layout {
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
}

.titan-arena-v2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.titan-arena-v2-header > *,
.titan-arena-v2-layout > *,
.titan-arena-v2-stage,
.titan-arena-v2-panel,
.titan-arena-v2-game-shell,
.titan-arena-v2-game {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.titan-arena-v2-header h1 {
  margin: 0;
  color: #f8fafc;
}

.titan-arena-v2-header p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.titan-arena-v2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.titan-arena-v2-stage,
.titan-arena-v2-panel {
  border-radius: 14px;
}

.titan-arena-v2-stage {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.titan-arena-v2-status {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 10px;
  background: rgba(8, 20, 38, 0.58);
}

.titan-arena-v2-status > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 900;
}

.titan-arena-v2-status strong {
  color: #d7fbff;
}

.titan-arena-v2-status p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.titan-arena-v2-hp-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.titan-arena-v2-hp-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #7dd3fc, #fef3c7);
  box-shadow: 0 0 18px rgba(125, 211, 252, 0.35);
}

.titan-arena-v2-game {
  min-height: 420px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 14px;
  background: radial-gradient(circle at center, rgba(125, 211, 252, 0.12), rgba(5, 12, 24, 0.96));
}

.titan-arena-v2-game-shell {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.titan-arena-v2-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  color: #d7fbff;
  background: rgba(5, 12, 24, 0.92);
  text-align: center;
}

.titan-arena-v2-loading[hidden] {
  display: none;
}

.titan-arena-v2-loading > span {
  overflow: hidden;
  width: min(280px, 80%);
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.titan-arena-v2-loading i {
  display: block;
  width: 5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34f5c5, #7dd3fc, #fef3c7);
  box-shadow: 0 0 14px rgba(125, 211, 252, 0.6);
  transition: width 160ms ease;
}

.titan-arena-v2-game canvas {
  display: block;
}

.titan-arena-v2-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-weight: 900;
}

.titan-arena-v2-fallback[hidden] {
  display: none;
}

.titan-arena-v2-fallback p {
  margin: 0;
}

.titan-arena-v2-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.titan-arena-v2-player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.titan-arena-v2-player img,
.titan-arena-v2-player > span {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border: 2px solid rgba(125, 211, 252, 0.5);
  border-radius: 999px;
}

.titan-arena-v2-player img {
  object-fit: cover;
}

.titan-arena-v2-player > span {
  display: inline-grid;
  place-items: center;
  color: #d7fbff;
  background: rgba(125, 211, 252, 0.12);
  font-size: 1.25rem;
  font-weight: 1000;
}

.titan-arena-v2-player strong {
  display: block;
  color: #f8fafc;
}

.titan-arena-v2-player small {
  color: var(--muted);
  font-weight: 800;
}

.titan-arena-v2-attacks {
  padding: 10px 12px;
  border: 1px solid rgba(37, 242, 166, 0.28);
  border-radius: 10px;
  color: #bbf7d0;
  background: rgba(37, 242, 166, 0.1);
  font-weight: 900;
}

.titan-arena-v2-attacks.is-empty,
.titan-arena-v2-attacks.is-blocked {
  border-color: rgba(248, 113, 113, 0.32);
  color: #fecdd3;
  background: rgba(248, 113, 113, 0.1);
}

.titan-arena-v2-attacks.is-test {
  border-color: rgba(251, 191, 36, 0.32);
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
}

.titan-arena-v2-primary-action {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  padding: 4px 0 2px;
}

.titan-arena-v2-primary-action .titan-arena-v2-attacks,
.titan-arena-v2-primary-action .titan-arena-v2-attack {
  width: min(100%, 460px);
  margin: 0;
  text-align: center;
}

.titan-arena-v2-primary-action .titan-arena-v2-attack {
  min-height: 60px;
  font-size: 1.15rem;
}

.titan-arena-v2-controls,
.titan-arena-v2-troops,
.titan-arena-v2-result,
.titan-arena-v2-dev {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.titan-arena-v2-weakpoints {
  display: grid;
  gap: 8px;
}

.titan-arena-v2-weakpoints button,
.titan-arena-v2-dev button {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 10px;
  background: rgba(8, 20, 38, 0.72);
  color: #dbeafe;
  font-weight: 900;
}

.titan-arena-v2-weakpoints button.is-selected {
  border-color: rgba(84, 242, 178, 0.58);
  background: rgba(84, 242, 178, 0.13);
  color: #bbf7d0;
}

.titan-arena-v2-troops > div {
  display: grid;
  gap: 2px;
}

.titan-arena-v2-troops strong {
  color: #f8fafc;
}

.titan-arena-v2-troops span,
.titan-arena-v2-result p {
  color: var(--muted);
  font-weight: 800;
}

.titan-arena-v2-attack {
  display: inline-grid;
  place-items: center;
  min-height: 54px;
  border-radius: 12px;
  font-size: 1.08rem;
  font-weight: 1000;
}

.titan-arena-v2-progress {
  padding: 12px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.titan-arena-v2-progress dl {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
}

.titan-arena-v2-progress dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.titan-arena-v2-progress dt {
  color: var(--muted);
  font-weight: 800;
}

.titan-arena-v2-progress dd {
  margin: 0;
  color: #d7fbff;
  font-weight: 1000;
}

.titan-arena-v2-ranking {
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 18px;
  border-radius: 14px;
}

.titan-arena-v2-ranking h2 {
  margin: 2px 0 14px;
  color: #f8fafc;
}

.titan-arena-v2-ranking ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.titan-arena-v2-ranking li {
  display: grid;
  grid-template-columns: 36px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.titan-arena-v2-ranking li > strong,
.titan-arena-v2-ranking li > b {
  color: #d7fbff;
}

.titan-arena-v2-ranking li > img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.titan-arena-v2-ranking .avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(125, 211, 252, 0.1);
}

.titan-arena-v2-ranking li > span {
  min-width: 0;
  overflow: hidden;
  color: #f8fafc;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.titan-arena-v2-ranking li small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.titan-arena-v2-ranking li.is-empty {
  display: block;
  color: var(--muted);
}

.titan-arena-v2-attack:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.titan-arena-v2-result h2 {
  margin: 0;
  color: #f8fafc;
}

.titan-arena-v2-result dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  margin: 0;
}

.titan-arena-v2-result dt {
  color: var(--muted);
  font-weight: 800;
}

.titan-arena-v2-result dd {
  margin: 0;
  color: #d7fbff;
  font-weight: 1000;
  text-align: right;
}

.titan-arena-v2-dev div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 980px) {
  .titan-arena-v2-header,
  .titan-arena-v2-layout,
  .titan-arena-v2-ranking,
  .titan-arena-v2-overview {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .titan-arena-v2-header,
  .titan-arena-v2-layout {
    grid-template-columns: 1fr;
  }

  .titan-arena-v2-header {
    display: grid;
  }

  .titan-arena-v2-panel {
    order: 2;
  }
}

@media (max-width: 640px) {
  .titan-arena-v2-overview {
    padding: 0;
  }

  .titan-arena-v2-overview .boss-cinematic {
    width: 100%;
    min-width: 0;
    padding: 10px;
  }

  .titan-arena-v2-overview .boss-art-stage,
  .titan-arena-v2-overview .world-boss-copy,
  .titan-arena-v2-overview .world-boss-hp,
  .titan-arena-v2-overview .boss-info-grid,
  .titan-arena-v2-overview .boss-stat-grid,
  .titan-arena-v2-overview .reward-row,
  .titan-arena-v2-overview .boss-cinematic-cta {
    min-width: 0;
    max-width: 100%;
  }

  .titan-arena-v2-overview .ice-boss-hero-image {
    width: 100%;
    max-width: 100%;
    height: clamp(300px, 96vw, 390px);
  }

  .titan-arena-v2-overview .world-boss-copy {
    width: 100%;
    margin-top: -2.2rem;
    padding-inline: 8px;
    overflow: hidden;
  }

  .titan-arena-v2-overview .ice-boss-title {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    font-size: 2.15rem;
    line-height: 1;
    letter-spacing: 0;
    white-space: normal;
    overflow-wrap: normal;
  }

  .titan-arena-v2-overview .world-boss-copy p {
    width: calc(100vw - 64px);
    max-width: calc(100vw - 64px);
    margin-inline: auto;
    font-size: 0.88rem;
  }

  .titan-arena-v2-overview .world-boss-copy p,
  .titan-arena-v2-overview .world-boss-hp .hp-total,
  .titan-arena-v2-overview .boss-info-card strong {
    overflow-wrap: anywhere;
  }

  .titan-arena-v2-overview .world-boss-hp .hp-total {
    font-size: 0.92rem;
  }

  .titan-arena-v2-stage,
  .titan-arena-v2-panel {
    padding: 10px;
  }

  .titan-arena-v2-primary-action .titan-arena-v2-attacks,
  .titan-arena-v2-primary-action .titan-arena-v2-attack {
    width: 100%;
  }

  .titan-arena-v2-game {
    min-height: 300px;
    width: 100%;
  }

  .titan-arena-v2-weakpoints button,
  .titan-arena-v2-attack,
  .titan-arena-v2-dev button {
    min-height: 44px;
    touch-action: manipulation;
  }

  .titan-arena-v2-fallback {
    align-items: stretch;
    flex-direction: column;
  }

  .titan-arena-v2-ranking li {
    grid-template-columns: 30px 36px minmax(0, 1fr) auto;
    gap: 7px;
    padding-inline: 7px;
  }

  .titan-arena-v2-ranking li > img {
    width: 34px;
    height: 34px;
  }

  .titan-arena-v2-ranking .avatar-placeholder {
    width: 34px;
    height: 34px;
  }

  .titan-arena-v2-dev div {
    grid-template-columns: 1fr;
  }
}
