@import url('./assets/fonts/fonts.css');

:root {
  color-scheme: dark;
  --bg: #080c15;
  --panel: #101622;
  --field: #171e2d;
  --line: #252c3c;
  --muted: #929bb0;
  --text: #f1f3f9;
  --accent: #9686ff;
  --accent-solid: #7862ee;
  --mint: #7ceac7;
  --amber: #f6bb63;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

button, input, select {
  font: inherit;
}

button, select {
  cursor: pointer;
}

button {
  color: inherit;
  border: 0;
  background: none;
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

button:not(:disabled), a {
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  background: #0b101a;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-light {
  font-weight: 500;
  color: #b5bed0;
  font-size: 15px;
  letter-spacing: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, #a893ff, #6d52dc);
  color: #fff;
  box-shadow: 0 3px 20px #7662ef20;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.header-caption {
  font-size: 14px;
  color: var(--muted);
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.topbar > .icon-button {
  margin-left: auto;
}

.icon-button {
  height: 38px;
  width: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #a6afc2;
}

.icon-button:hover {
  background: #ffffff0a;
  color: white;
}

.layout {
  display: grid;
  grid-template-columns: 266px minmax(0, 1fr) 224px;
  gap: 30px;
  max-width: 1680px;
  margin: auto;
  padding: 32px 36px 26px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  margin: 3px 0 17px;
}

.panel-heading svg {
  width: 16px;
  height: 16px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 1.5px;
}

.setup-panel h1 {
  font-family: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  font-size: 42px;
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0 0 25px;
}

.setup-panel h1 span {
  color: #a49bcb;
}

.mode-tabs {
  display: flex;
  gap: 3px;
  background: #131a28;
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: 11px;
  margin-bottom: 24px;
}

.mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 1;
  min-height: 40px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.mode-tab svg {
  width: 17px;
  height: 17px;
}

.mode-tab.active {
  background: #2b2549;
  color: #c4b9ff;
  box-shadow: 0 1px 3px #0002;
}

.mode-tab:hover:not(.active) {
  color: #ddd;
}

.field {
  margin: 18px 0;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #b9c1d1;
  margin-bottom: 9px;
}

.select-wrap {
  position: relative;
}

.select-wrap:after {
  content: "";
  position: absolute;
  right: 15px;
  top: 16px;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border-right: 1.5px solid #99a3b7;
  border-bottom: 1.5px solid #99a3b7;
  pointer-events: none;
}

select {
  appearance: none;
  width: 100%;
  background: var(--field);
  color: #e1e5ee;
  border: 1px solid #2b3345;
  border-radius: 8px;
  font-size: 14px;
  padding: 12px 30px 12px 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

select:hover {
  border-color: #54516c;
}

select option {
  background: #171e2d;
  color: white;
}

.participants-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #101623;
  margin: 19px 0 22px;
  text-align: left;
}

.participants-button:hover {
  border-color: #65558e;
}

.participant-icons {
  display: flex;
  padding-left: 0;
  flex-shrink: 0;
  max-width: 73px;
  overflow: hidden;
}

.participant-icons img, .participant-icons .badge-fallback {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  object-fit: cover;
  outline: 3px solid #101623;
  background: #f5f5f5;
}

.participant-icons img + img {
  margin-left: -9px;
}

.participants-button strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.participants-button small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.participants-button > svg {
  margin-left: auto;
  width: 16px;
  height: 16px;
}

.openings-field {
  margin-top: 0;
  margin-bottom: 22px;
}

.primary-button {
  min-height: 45px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  background: var(--accent-solid);
  color: white;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 3px 14px #7862ee20;
  transition: background 0.15s, transform 0.15s;
}

.primary-button:hover:not(:disabled) {
  background: #8973fa;
  transform: translateY(-1px);
}

.primary-button svg {
  width: 17px;
  height: 17px;
}

.primary-button svg use[href="#i-play"] {
  fill: currentColor;
  stroke: none;
}

#new-battle {
  width: 100%;
}

.setup-message {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  min-height: 18px;
  margin: 10px 0 22px;
}

.auto-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.auto-setting strong {
  font-size: 14px;
  font-weight: 550;
  display: block;
}

.auto-setting small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
  line-height: 1.45;
}

.switch {
  display: block;
  position: relative;
  width: 35px;
  height: 20px;
  flex-shrink: 0;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 35px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.switch > span {
  display: block;
  width: 35px;
  height: 20px;
  background: #353d50;
  border-radius: 12px;
  transition: background 0.2s;
}

.switch > span:before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 3px;
  left: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.switch input:checked + span {
  background: var(--accent-solid);
}

.switch input:checked + span:before {
  transform: translateX(15px);
}

.switch input:focus-visible + span {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

.how-it-works {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding: 15px 0;
  color: #7d879b;
}

.tiny-rings {
  font-size: 32px;
  line-height: 1;
  margin-top: 2px;
  color: #7b70a6;
}

.how-it-works p {
  font-size: 12px;
  line-height: 1.85;
  margin: 0;
}

.how-it-works strong {
  font-weight: 450;
  color: #a9b1c1;
}

.text-button {
  padding: 4px 0;
  font-size: 12px;
  color: #a39abd;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.text-button:hover {
  color: #d5c8ff;
}

.text-button svg {
  width: 14px;
  height: 14px;
}

.collection-info {
  margin-top: 5px;
  color: #939aac;
}

.game-column {
  min-width: 0;
}

.battle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 77px;
  padding: 0 0 20px;
  gap: 14px;
}

.battle-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #a5adbf;
  letter-spacing: 1px;
  font-size: 12px;
  flex-wrap: wrap;
}

.live-dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px #7ceac755;
}

.live-dot.paused {
  background: var(--amber);
  box-shadow: none;
}

.round-label {
  padding-left: 11px;
  margin-left: 4px;
  border-left: 1px solid #394053;
  color: #798399;
}

.battle-header h2 {
  font-size: 24px;
  letter-spacing: -0.6px;
  font-weight: 600;
  margin: 10px 0 0;
}

.battle-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #b9b4d2;
  background: #171527;
  padding: 7px 9px;
  border: 1px solid #2b2840;
  border-radius: 6px;
}

.battle-tag svg {
  width: 14px;
  height: 14px;
}

.arena-shell {
  position: relative;
  background: #0d1320;
  border: 1px solid #2a3042;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 60px #0000001a;
}

.arena-shell canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.arena-hud {
  position: absolute;
  z-index: 2;
  top: 23px;
  left: 26px;
  right: 26px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.arena-hud span {
  display: block;
  font-size: 12px;
  color: #8b95ab;
  letter-spacing: 1px;
  font-weight: 550;
}

.arena-hud strong {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 600;
  margin-top: 6px;
  display: block;
  font-variant-numeric: tabular-nums;
}

.arena-hud strong small {
  font-size: 16px;
  color: #798299;
  font-weight: 400;
  letter-spacing: 0;
}

.arena-timer {
  text-align: right;
}

.arena-timer strong {
  font-size: 21px;
  color: #a9b3c8;
  letter-spacing: 1px;
  margin-top: 9px;
}

.arena-caption {
  position: absolute;
  bottom: 81px;
  left: 25px;
  right: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.7px;
  font-weight: 500;
  color: #717e98;
  pointer-events: none;
}

.arena-caption > span:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.opening-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
}

.playback-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  background: #121927;
  border-top: 1px solid var(--line);
  min-height: 67px;
  position: relative;
  z-index: 4;
}

.playback-left, .playback-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.playback-right {
  gap: 4px;
}

.play-button {
  height: 38px;
  width: 40px;
  background: #2b2645;
  color: #c4b7ff;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.play-button:hover {
  background: #41335e;
}

.play-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.control-divider {
  height: 21px;
  border-left: 1px solid #303749;
  margin: 0 5px;
}

.speed-control {
  display: flex;
  gap: 3px;
}

.speed-control button {
  font-size: 12px;
  color: #8f9ab1;
  padding: 7px 8px;
  border-radius: 5px;
  min-width: 32px;
  font-variant-numeric: tabular-nums;
}

.speed-control button.active {
  background: #2a3345;
  color: #edf0f8;
}

.speed-control button:hover {
  color: white;
}

.below-arena {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
  color: #8992a8;
  font-size: 12px;
}

.below-arena > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.below-arena svg {
  width: 13px;
  height: 13px;
  color: #a899e3;
}

.keyboard-hint {
  color: #758096;
}

.keyboard-hint kbd {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.6px;
  background: #151c2a;
  border: 1px solid #2d3445;
  border-radius: 3px;
  padding: 3px 5px;
}

.results-panel {
  padding-top: 10px;
  min-width: 0;
}

.results-title, .elimination-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-title h2, .elimination-heading h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.results-title > span, .elimination-heading > span {
  display: grid;
  place-items: center;
  min-width: 29px;
  height: 24px;
  border-radius: 6px;
  background: #21283a;
  font-size: 12px;
  color: #a3abc0;
  padding: 0 6px;
}

.survivor-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 7px;
  margin: 22px 0 16px;
  min-height: 79px;
  align-content: start;
}

.survivor-icon {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.survivor-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #161e2c;
  border: 1px solid #4b53654a;
}

.survivor-icon.club img {
  border-radius: 6px;
  object-fit: contain;
  padding: 2px;
  background: #e6e9ed;
}

.survivor-more {
  font-size: 12px;
  letter-spacing: -0.5px;
  border: 1px dashed #46516a;
  border-radius: 50%;
  color: #a0abc1;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}

.elimination-heading {
  border-top: 1px solid var(--line);
  margin-top: 27px;
  padding-top: 23px;
  margin-bottom: 13px;
}

.elimination-list {
  min-height: 270px;
  max-height: 450px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #32394c transparent;
}

.elimination-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  border-bottom: 1px solid #222a3a88;
  animation: slide-in 0.25s ease-out;
}

.elimination-item .entry-icon {
  width: 26px;
  height: 26px;
}

.elimination-item .entry-name {
  flex: 1;
  font-size: 12px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #a8b1c4;
}

.elimination-item .place {
  font-size: 12px;
  color: #63708a;
  width: 25px;
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.elimination-item time {
  font-size: 12px;
  color: #6f7c97;
  font-variant-numeric: tabular-nums;
}

.empty-eliminations {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  color: #6b7790;
  text-align: center;
}

.empty-eliminations > span {
  font-size: 38px;
  color: #343f58;
}

.empty-eliminations p {
  font-size: 12px;
  margin: 13px 0 6px;
}

.empty-eliminations small {
  font-size: 12px;
  color: #7c879f;
  line-height: 1.5;
}

.ranking-link {
  margin-top: 16px;
}

.entry-icon {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  object-fit: cover;
  background: #172131;
  flex-shrink: 0;
}

.entry-icon.club {
  border-radius: 5px;
  object-fit: contain;
  padding: 3px;
  background: #e7eaf1;
}

.badge-fallback {
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  color: #fff;
  background: #545177;
  border-radius: 50%;
  width: 31px;
  height: 31px;
  flex-shrink: 0;
}

footer {
  display: flex;
  max-width: 1680px;
  gap: 20px;
  margin: 0 auto;
  padding: 25px 36px 28px;
  border-top: 1px solid #1b2230;
  color: #5f6b83;
  font-size: 12px;
  align-items: center;
}

footer > span:first-child {
  letter-spacing: 1px;
  font-size: 12px;
  font-weight: 600;
}

footer p {
  margin: 0;
}

footer > span:last-child {
  margin-left: auto;
}

.loading-overlay, .countdown-overlay, .winner-overlay {
  position: absolute;
  inset: 0 0 67px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0d1320dd;
  gap: 15px;
  padding: 20px;
}

.loading-overlay > strong {
  font-size: 18px;
}

.loading-overlay > span:not(.loader) {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  max-width: 340px;
  line-height: 1.6;
}

.loader {
  width: 38px;
  height: 38px;
  border: 2px solid #292744;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.countdown-overlay {
  background: #0d13203f;
  pointer-events: none;
  gap: 0;
}

.countdown-overlay > span {
  font-size: 12px;
  letter-spacing: 2px;
  color: #a8a0c7;
}

.countdown-overlay > strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 140px;
  line-height: 1.15;
  color: white;
  text-shadow: 0 0 80px #9686ff80;
}

.winner-overlay {
  background: #0d1320ba;
  backdrop-filter: blur(7px);
  z-index: 3;
}

.winner-card {
  text-align: center;
  max-width: 460px;
  width: 100%;
  animation: winner-in 0.5s ease-out;
}

.winner-kicker {
  color: var(--amber);
  letter-spacing: 1.6px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.winner-kicker svg {
  width: 18px;
  height: 18px;
}

.winner-image {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  margin: 19px auto 12px;
  padding: 4px;
  border: 1px solid #f6bb6380;
  box-shadow: 0 0 36px #f6bb6325;
  background: #131a2d;
}

.winner-image img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.winner-image img.club {
  border-radius: 50%;
  object-fit: contain;
  background: #e7e9ee;
  padding: 7px;
}

.winner-card h3 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: 0.2px;
  margin: 8px 0 8px;
  text-transform: uppercase;
}

.winner-card > p {
  font-size: 14px;
  color: #a0abc0;
  margin: 0 0 22px;
}

.podium {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 8px 0 24px;
}

.podium-item {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #a5afc3;
  min-width: 0;
}

.podium-item .entry-icon {
  width: 24px;
  height: 24px;
}

.podium-item strong {
  font-size: 14px;
  color: #d5dbe6;
}

.podium-item > span:last-child {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.winner-card > small {
  display: block;
  font-size: 12px;
  color: #929db5;
  margin-top: 16px;
  min-height: 16px;
}

.secondary-button {
  min-height: 37px;
  padding: 9px 12px;
  border: 1px solid #384155;
  border-radius: 7px;
  background: #1a2133;
  font-size: 12px;
  color: #c4cbd9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.secondary-button:hover {
  border-color: #85759d;
  background: #252c43;
}

.secondary-button svg {
  width: 14px;
  height: 14px;
}

dialog {
  background: #111725;
  color: var(--text);
  border: 1px solid #3b4056;
  border-radius: 17px;
  width: min(760px, calc(100vw - 28px));
  max-height: 88dvh;
  padding: 0;
  box-shadow: 0 30px 120px #0009;
}

dialog::backdrop {
  background: #03050cb5;
  backdrop-filter: blur(6px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 27px 20px;
  gap: 20px;
}

.dialog-header .eyebrow {
  color: var(--accent);
  font-size: 12px;
}

.dialog-header h2 {
  margin: 6px 0 0;
  font-size: 24px;
  letter-spacing: -0.5px;
  font-weight: 600;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1b2233;
  border: 1px solid #333d50;
  margin: 0 27px 15px;
  border-radius: 9px;
  padding: 0 13px;
  color: #8e9ab1;
}

.search-field input {
  background: none;
  border: 0;
  min-width: 0;
  flex: 1;
  height: 43px;
  color: white;
  outline: none;
  font-size: 14px;
}

.search-field input::placeholder {
  color: #848fa5;
}

.selection-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 27px 17px;
}

.selection-actions > .text-button {
  padding: 10px 4px;
}

.selection-actions > span {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.participant-list {
  padding: 4px 27px 22px;
  overflow: auto;
  max-height: 46dvh;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  scrollbar-width: thin;
}

.participant-option {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #2a3346;
  border-radius: 8px;
  padding: 10px 8px;
  min-height: 54px;
  cursor: pointer;
  min-width: 0;
  background: #141c2b;
}

.participant-option:hover {
  border-color: #74679c;
}

.participant-option.selected {
  border-color: #645196;
  background: #262039;
}

.participant-option input {
  appearance: none;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 1px solid #69718a;
  border-radius: 4px;
  margin: 0 0 0 auto;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.participant-option input:checked {
  background: var(--accent-solid);
  border-color: var(--accent-solid);
}

.participant-option input:checked:after {
  content: "✓";
  font-size: 12px;
  line-height: 1;
  color: white;
}

.participant-option .entry-icon {
  width: 25px;
  height: 25px;
}

.participant-option > span {
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 19px 27px;
}

.dialog-footer > span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.ranking-list {
  padding: 0 27px 25px;
  max-height: 67dvh;
  overflow: auto;
}

.ranking-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 55px;
  border-bottom: 1px solid #293043;
  font-size: 14px;
}

.ranking-row .position {
  width: 36px;
  color: #8e9aaf;
  font-size: 14px;
}

.ranking-row.champion .position, .ranking-row.champion .ranking-name {
  color: var(--amber);
}

.ranking-row .ranking-name {
  flex: 1;
}

.ranking-row time {
  color: #8390aa;
  font-size: 12px;
}

.ranking-status {
  font-size: 12px;
  color: var(--mint);
}

.ranking-divider {
  font-size: 12px;
  color: #8996af;
  letter-spacing: 1px;
  padding: 22px 0 9px;
}

.help-dialog {
  width: min(610px, calc(100vw - 28px));
  padding-bottom: 22px;
}

.help-dialog > p, .help-dialog > ol, .info-note {
  margin: 0 27px 18px;
  font-size: 16px;
  line-height: 1.7;
  color: #afb9cd;
}

.help-dialog > ol {
  padding-left: 22px;
}

.help-dialog > ol li {
  padding-bottom: 7px;
}

.info-note {
  background: #192030;
  border: 1px solid #2c3448;
  border-radius: 10px;
  padding: 17px;
  margin-top: 25px;
  font-size: 14px;
  line-height: 1.65;
}

.info-note strong {
  color: #d3d9e5;
}

.info-note p {
  margin: 8px 0;
}

.source-links a {
  color: #b5a5ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 13px 20px;
  background: #302844;
  border: 1px solid #716083;
  border-radius: 9px;
  color: #e6def0;
  font-size: 14px;
  box-shadow: 0 8px 30px #0005;
}

.no-results {
  padding: 35px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  grid-column: 1 / -1;
}

.arena-shell:fullscreen, .arena-shell.theater-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #080c15;
  border: 0;
  border-radius: 0;
  height: 100dvh;
  width: 100vw;
}

.arena-shell:fullscreen canvas, .arena-shell.theater-mode canvas {
  height: calc(100dvh - 67px);
  width: 100%;
  max-width: calc((100dvh - 67px) * 900 / 790);
  aspect-ratio: 900 / 790;
}

.arena-shell:fullscreen .playback-bar, .arena-shell.theater-mode .playback-bar {
  width: 100%;
  margin-top: auto;
}

.arena-shell:fullscreen .arena-hud, .arena-shell.theater-mode .arena-hud {
  left: 32px;
  right: 32px;
}

.arena-shell.theater-mode {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.arena-shell:fullscreen .winner-overlay, .arena-shell.theater-mode .winner-overlay {
  background: #0d1320a8;
}

.arena-shell:fullscreen .winner-card, .arena-shell.theater-mode .winner-card {
  max-width: 550px;
}

.arena-shell:fullscreen .winner-card h3, .arena-shell.theater-mode .winner-card h3 {
  font-size: 64px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes winner-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@media (min-width: 1550px) {
  .layout {
    grid-template-columns: 285px minmax(0, 1fr) 250px;
    gap: 38px;
  }
  .setup-panel h1 {
    font-size: 48px;
  }
  .survivor-grid {
    gap: 12px;
  }
  .elimination-list {
    max-height: 510px;
  }
}

@media (max-width: 1250px) {
  .layout {
    grid-template-columns: 240px minmax(0, 1fr) 180px;
    gap: 22px;
    padding: 26px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .survivor-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }
  .battle-header h2 {
    font-size: 22px;
  }
  .battle-tag {
    display: none;
  }
  .arena-hud {
    top: 18px;
    left: 19px;
    right: 19px;
  }
  .arena-hud strong {
    font-size: 25px;
  }
  .arena-hud span {
    font-size: 12px;
    letter-spacing: 0.4px;
  }
  .arena-timer strong {
    font-size: 18px;
  }
  .arena-caption {
    left: 19px;
    right: 19px;
  }
  .arena-caption > span:last-child {
    display: none;
  }
  .playback-bar {
    padding: 12px 10px;
  }
  .playback-left {
    gap: 4px;
  }
  .control-divider {
    margin: 0 3px;
  }
  .speed-control button {
    padding: 7px 5px;
    min-width: 29px;
  }
  .winner-card h3 {
    font-size: 37px;
  }
  .winner-image {
    width: 61px;
    height: 61px;
    margin-top: 13px;
  }
  .winner-card > p {
    font-size: 12px;
    margin-bottom: 15px;
  }
  .winner-overlay {
    padding: 15px;
  }
  .podium {
    gap: 11px;
    margin-bottom: 16px;
  }
  .podium-item {
    gap: 5px;
  }
  .podium-item > span:last-child {
    max-width: 80px;
  }
  .winner-actions .primary-button {
    min-height: 39px;
    font-size: 12px;
  }
  .winner-actions .secondary-button {
    min-height: 39px;
  }
  .winner-card > small {
    margin-top: 10px;
  }
  .keyboard-hint {
    display: none !important;
  }
  .elimination-item {
    gap: 6px;
  }
  .elimination-item time {
    display: none;
  }
  footer {
    padding: 23px 24px;
  }
  footer p {
    display: none;
  }
}

@media (max-width: 1030px) {
  .layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 24px;
  }
  .results-panel {
    grid-column: 2;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    column-gap: 24px;
    align-items: start;
    padding-top: 0;
  }
  .results-title {
    grid-column: 1;
    grid-row: 1;
  }
  .survivor-grid {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 14px 0 10px;
  }
  .results-panel > #view-all-button {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
  }
  .elimination-heading {
    grid-column: 2;
    grid-row: 1;
    border: 0;
    padding: 0;
    margin: 0;
  }
  .elimination-list {
    grid-column: 2;
    grid-row: 2 / 4;
    min-height: 100px;
    max-height: 188px;
    margin-top: 5px;
  }
  .ranking-link {
    grid-column: 2;
    grid-row: 4;
    margin-top: 10px;
  }
  .empty-eliminations {
    min-height: 140px;
  }
  .elimination-item {
    min-height: 44px;
  }
  .elimination-item time {
    display: block;
  }
  .setup-panel {
    grid-row: 1 / 3;
  }
  .battle-header h2 {
    font-size: 24px;
  }
  .header-caption {
    margin-left: auto;
    border: 0;
    padding: 0;
  }
  .topbar > .icon-button {
    margin-left: 0;
  }
  .winner-image {
    width: 70px;
    height: 70px;
  }
  .winner-card h3 {
    font-size: 42px;
  }
  .winner-card > p {
    margin-bottom: 18px;
  }
  .podium {
    margin-bottom: 20px;
  }
  .winner-actions .primary-button {
    min-height: 43px;
  }
  .arena-caption > span:last-child {
    display: flex;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 66px;
    padding: 0 17px;
    gap: 12px;
  }
  .brand {
    font-size: 17px;
    gap: 10px;
  }
  .brand-light {
    font-size: 12px;
  }
  .brand-mark {
    width: 33px;
    height: 33px;
    border-radius: 10px;
  }
  .header-caption {
    display: none;
  }
  .topbar > .icon-button {
    margin-left: auto;
  }
  .layout {
    display: flex;
    flex-direction: column;
    padding: 17px 14px 25px;
    gap: 23px;
  }
  .game-column {
    order: 0;
  }
  .setup-panel {
    order: 1;
    background: #101624;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 15px;
  }
  .results-panel {
    order: 2;
    padding: 0 7px;
    column-gap: 22px;
  }
  .panel-heading {
    grid-column: 1 / -1;
    margin: 0 0 16px;
  }
  .setup-panel h1 {
    display: none;
  }
  .mode-tabs {
    grid-column: 1 / -1;
    margin: 0 0 5px;
  }
  .field {
    margin: 13px 0 5px;
    min-width: 0;
  }
  .participants-button {
    margin: 13px 0 5px;
    grid-column: 1 / -1;
    min-height: 62px;
    gap: 16px;
  }
  .participant-icons {
    max-width: none;
  }
  .participant-icons img {
    width: 30px;
    height: 30px;
  }
  .openings-field {
    grid-column: 1 / -1;
    margin: 13px 0 19px;
  }
  #new-battle {
    grid-column: 1 / -1;
  }
  .setup-message {
    grid-column: 1 / -1;
    margin: 9px 0 15px;
  }
  .auto-setting {
    grid-column: 1 / -1;
    padding-top: 16px;
  }
  .how-it-works {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding-bottom: 0;
  }
  .collection-info {
    grid-column: 1 / -1;
    margin-top: 8px;
  }
  .battle-header {
    min-height: 64px;
    padding-bottom: 15px;
  }
  .battle-header h2 {
    font-size: 22px;
    margin-top: 8px;
  }
  .battle-label {
    font-size: 12px;
  }
  .battle-tag {
    display: flex;
  }
  .round-label {
    margin-left: 2px;
    padding-left: 8px;
  }
  .arena-shell {
    border-radius: 12px;
  }
  .arena-hud {
    top: 16px;
    left: 18px;
    right: 18px;
  }
  .arena-hud span {
    font-size: 12px;
  }
  .arena-hud strong {
    font-size: 26px;
    margin-top: 4px;
  }
  .arena-hud strong small {
    font-size: 13px;
  }
  .arena-timer strong {
    font-size: 18px;
    margin-top: 8px;
  }
  .arena-caption {
    font-size: 12px;
    bottom: 77px;
    left: 17px;
    right: 17px;
    letter-spacing: 0;
  }
  .arena-caption > span:last-child {
    font-size: 12px;
    letter-spacing: 0;
  }
  .playback-bar {
    min-height: 63px;
    padding: 11px 14px;
  }
  .playback-left {
    gap: 5px;
  }
  .speed-control button {
    min-width: 28px;
  }
  .playback-right {
    gap: 1px;
  }
  .control-divider {
    margin: 0 4px;
  }
  .below-arena {
    margin-top: 12px;
    justify-content: center;
    font-size: 12px;
  }
  .loading-overlay, .countdown-overlay, .winner-overlay {
    bottom: 63px;
  }
  .winner-image {
    width: 57px;
    height: 57px;
    margin: 12px auto 8px;
  }
  .winner-card h3 {
    font-size: 34px;
  }
  .winner-kicker {
    font-size: 12px;
    letter-spacing: 1px;
  }
  .winner-card > p {
    font-size: 12px;
    margin-bottom: 12px;
  }
  .podium {
    margin: 5px 0 15px;
    gap: 16px;
  }
  .podium-item > span:last-child {
    max-width: 95px;
  }
  .winner-actions .primary-button, .winner-actions .secondary-button {
    min-height: 36px;
    padding: 9px 12px;
  }
  .winner-card > small {
    font-size: 12px;
    margin-top: 9px;
  }
  .countdown-overlay > strong {
    font-size: 105px;
  }
  .results-panel {
    grid-template-columns: 1fr 1.2fr;
  }
  .survivor-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .elimination-item .place {
    width: 21px;
  }
  .elimination-item time {
    display: none;
  }
  .elimination-list {
    max-height: 195px;
  }
  .text-button {
    font-size: 12px;
  }
  footer {
    padding: 20px 17px;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
  }
  footer > span:last-child {
    margin-left: 0;
    font-size: 12px;
    flex-basis: 100%;
  }
  .dialog-header {
    padding: 20px 18px 18px;
  }
  .dialog-header h2 {
    font-size: 21px;
  }
  .search-field {
    margin: 0 18px 14px;
  }
  .selection-actions {
    padding: 0 18px 14px;
    gap: 6px;
  }
  .selection-actions > span {
    flex-basis: 100%;
    margin-top: 5px;
  }
  .participant-list {
    padding: 2px 18px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    max-height: 44dvh;
  }
  .dialog-footer {
    padding: 16px 18px;
    gap: 10px;
  }
  .dialog-footer > span {
    max-width: 45%;
  }
  .dialog-footer .primary-button {
    padding: 12px 15px;
    font-size: 14px;
  }
  .ranking-list {
    padding: 0 18px 20px;
  }
  .help-dialog > p, .help-dialog > ol, .info-note {
    margin-left: 18px;
    margin-right: 18px;
  }
  .info-note {
    padding: 14px;
  }
  .toast {
    font-size: 12px;
    width: max-content;
    text-align: center;
  }
  .ranking-row {
    gap: 10px;
  }
}

@media (max-width: 375px) {
  .brand-light {
    font-size: 12px;
  }
  .arena-caption > span:last-child {
    display: none;
  }
  .playback-bar {
    padding: 10px 8px;
  }
  .playback-left {
    gap: 2px;
  }
  .speed-control {
    gap: 0;
  }
  .speed-control button {
    min-width: 25px;
    padding: 7px 4px;
  }
  .control-divider {
    margin: 0 3px;
  }
  .icon-button {
    width: 33px;
  }
  .battle-tag {
    display: none;
  }
  .winner-card h3 {
    font-size: 29px;
  }
  .winner-image {
    width: 48px;
    height: 48px;
    margin-top: 8px;
  }
  .winner-card > p {
    margin-bottom: 8px;
  }
  .podium {
    margin-bottom: 10px;
  }
  .winner-kicker {
    font-size: 12px;
    letter-spacing: 0;
  }
  .results-panel {
    column-gap: 14px;
  }
  .survivor-grid {
    gap: 7px;
  }
  .survivor-more {
    font-size: 12px;
  }
  .setup-panel {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   MODO VERTICAL 9:16 (STREAM / REELS / TIKTOK LIVE)
   ========================================================================== */
.stream-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 6, 14, 0.96);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: hidden;
}

.stream-inner {
  width: 100%;
  max-width: 440px;
  height: min(98dvh, 920px);
  aspect-ratio: 9 / 16;
  background: #060914;
  border: 2.5px solid #2d4586;
  box-shadow: 0 0 35px rgba(45, 69, 134, 0.45), inset 0 0 30px rgba(10, 18, 38, 0.85);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.stream-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  flex-shrink: 0;
  height: 28px;
}

.stream-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 17px;
  letter-spacing: 1px;
  color: #f6bb63;
  font-weight: 700;
  text-transform: uppercase;
}

.stream-dot {
  color: #ffffff44;
  font-size: 14px;
}

.stream-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stream-icon-btn {
  background: #151e32;
  border: 1px solid #2a3a5e;
  color: #c2d0eb;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stream-icon-btn svg {
  width: 16px;
  height: 16px;
}

.stream-icon-btn:hover {
  background: #25355a;
  color: #ffffff;
  border-color: #48649e;
  transform: scale(1.06);
}

.stream-sound-btn.sound-active {
  background: linear-gradient(135deg, #123826, #0a2519);
  border-color: #00e676;
  color: #00e676;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.45);
}

.stream-desktop-btn:hover {
  border-color: #f6bb63;
  color: #f6bb63;
}

.stream-close-btn {
  background: #171f33;
  border: 1px solid #334366;
  color: #aab4cc;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.stream-close-btn:hover {
  background: #2b395c;
  color: white;
}

.stream-qualify-card {
  width: 100%;
  background: rgba(14, 21, 38, 0.92);
  border: 1px solid #2b3e69;
  border-radius: 10px;
  padding: 4px 8px;
  min-height: 48px;
  max-height: 60px;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.stream-qualify-title {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 11.5px;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: #e2e8f5;
  text-align: center;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.stream-qualify-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 5px;
  align-content: flex-start;
  overflow-y: auto;
  scrollbar-width: none;
}

.stream-qualify-badge {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  background: #19233c;
  border: 1px solid #3b4e7a;
  border-radius: 10px;
  padding: 1.5px 6px 1.5px 3px;
  font-size: 10px;
  color: #d8e1f5;
  animation: slide-in 0.2s ease-out;
}

.stream-qualify-badge img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}

.stream-canvas-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 0;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.stream-canvas-wrap canvas {
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(114, 92, 240, 0.28));
  border-radius: 14px;
}

/* Overlays dentro do modo 9:16 mobile */
.stream-canvas-wrap .loading-overlay,
.stream-canvas-wrap .countdown-overlay,
.stream-canvas-wrap .winner-overlay {
  position: absolute;
  inset: 0 !important;
  border-radius: 16px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stream-canvas-wrap .countdown-overlay {
  background: rgba(6, 9, 20, 0.65);
  pointer-events: none;
}

.stream-canvas-wrap .countdown-overlay > span {
  font-size: 13px;
  letter-spacing: 2.5px;
  color: #f6bb63;
  font-weight: 700;
  font-family: "Barlow Condensed", Impact, sans-serif;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.stream-canvas-wrap .countdown-overlay > strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 110px;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 60px rgba(150, 134, 255, 0.9), 0 0 20px rgba(246, 187, 99, 0.8);
}

.stream-canvas-wrap .winner-overlay {
  background: rgba(6, 9, 20, 0.95);
  backdrop-filter: blur(12px);
  padding: 14px 12px;
  animation: fadeIn 0.35s ease-out;
}

.stream-canvas-wrap .winner-card {
  width: 100%;
  max-width: 320px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stream-canvas-wrap .winner-kicker {
  color: #f6bb63;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 700;
  font-family: "Barlow Condensed", Impact, sans-serif;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  text-transform: uppercase;
}

.stream-canvas-wrap .winner-kicker svg {
  width: 16px;
  height: 16px;
}

.stream-canvas-wrap .winner-image {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 6px auto;
  padding: 4px;
  border: 2.5px solid #f6bb63;
  box-shadow: 0 0 32px rgba(246, 187, 99, 0.55);
  background: #111827;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.stream-canvas-wrap .winner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.stream-canvas-wrap .winner-card h3 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0 2px;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.stream-canvas-wrap .winner-card p {
  font-size: 12px;
  color: #a1b2d8;
  margin: 0 0 6px;
  line-height: 1.3;
}

.stream-canvas-wrap .podium {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
}

.stream-canvas-wrap .podium-item {
  background: #12192a;
  border: 1px solid #283a5e;
  border-radius: 8px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #dbe4f8;
}

.stream-canvas-wrap .podium-item strong {
  color: #f6bb63;
}

.stream-canvas-wrap .podium-item img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.stream-canvas-wrap .winner-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.stream-canvas-wrap .winner-actions .primary-button {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 10px;
}

.stream-canvas-wrap .winner-actions .secondary-button {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 10px;
}

.stream-canvas-wrap #next-round-label {
  font-size: 11px;
  color: #f6bb63;
  margin-top: 5px;
}

/* Barra de Controles Rápidos do Stream */
.stream-controls-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(14, 21, 38, 0.85);
  border: 1px solid #25375c;
  border-radius: 10px;
  padding: 3px 6px;
  margin-top: 1px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.stream-playback-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stream-ctrl-btn {
  background: #19243d;
  border: 1px solid #2d426d;
  color: #d0dcf5;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
}

.stream-ctrl-btn svg {
  width: 13px;
  height: 13px;
}

.stream-ctrl-btn:hover {
  background: #2b3d68;
  color: white;
}

.stream-speed-btns {
  display: flex;
  background: #0f1626;
  border-radius: 6px;
  padding: 1.5px;
  border: 1px solid #243555;
}

.stream-speed-btns button {
  background: none;
  border: none;
  color: #8c9cb8;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.stream-speed-btns button.active {
  background: #2d426d;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.stream-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #19243d;
  border: 1px solid #2d426d;
  color: #d0dcf5;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
}

.stream-action-pill svg {
  width: 11px;
  height: 11px;
}

.stream-action-pill:hover {
  background: #2b3d68;
  color: #ffffff;
  border-color: #4a66a3;
}

.stream-progress-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 1px;
  flex-shrink: 0;
}

.stream-progress-bar {
  width: 100%;
  max-width: 250px;
  height: 5px;
  background: #151e30;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #2f3e61;
}

.stream-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f6bb63, #ffdc8b);
  border-radius: 4px;
  transition: width 0.25s ease-out;
  box-shadow: 0 0 8px #f6bb63bb;
}

.stream-progress-text {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 12.5px;
  letter-spacing: 1px;
  color: #b0bcd6;
  display: flex;
  gap: 5px;
}

.stream-progress-text strong {
  color: #f1f4fb;
}

.stream-flags-matrix {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 1.5px 1px;
  padding: 3px 2px;
  background: rgba(10, 15, 27, 0.75);
  border: 1px solid #1c2740;
  border-radius: 6px;
  max-height: 54px;
  overflow: hidden;
  flex-shrink: 0;
}

.matrix-flag {
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  background: #1a2233;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s, filter 0.3s;
}

.matrix-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.matrix-flag.eliminated {
  opacity: 0.12;
  filter: grayscale(1);
}

.stream-brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px 14px;
  border-radius: 18px;
  border: 1.5px solid #f6bb63;
  background: rgba(246, 187, 99, 0.08);
  box-shadow: 0 0 12px rgba(246, 187, 99, 0.3);
  margin-top: 2px;
  flex-shrink: 0;
}

.stream-brand-badge span {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 14px;
  letter-spacing: 1.8px;
  color: #f6bb63;
  font-weight: 700;
  text-transform: uppercase;
}

/* Responsividade Mobile para Tela Cheia no Smartphone */
@media (max-width: 500px) {
  .stream-shell {
    padding: 0;
  }
  .stream-inner {
    max-width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 8px 6px 6px;
  }
  .stream-qualify-card {
    min-height: 70px;
    max-height: 85px;
    padding: 6px 8px;
  }
  .stream-flags-matrix {
    max-height: 75px;
  }
  .stream-brand-badge {
    padding: 4px 14px;
    margin-top: 2px;
  }
  .stream-brand-badge span {
    font-size: 12px;
  }
}

/* ==========================================================================
   VIP TOPBAR & LICENSE MODAL
   ========================================================================== */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #f6bb63, #e29b3b);
  color: #0b0f1a !important;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.8px;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 0 15px rgba(246, 187, 99, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.vip-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 25px rgba(246, 187, 99, 0.7);
}

.vip-btn.is-active {
  background: rgba(82, 229, 183, 0.15);
  border: 1px solid #52e5b7;
  color: #52e5b7 !important;
  box-shadow: 0 0 15px rgba(82, 229, 183, 0.25);
  cursor: default;
}

.license-dialog {
  width: min(92vw, 440px);
}

/* Modal de Estilos de Trilha Sonora */
.music-dialog {
  width: min(92vw, 480px);
}

.music-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.music-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #141c30;
  border: 1px solid #283759;
  border-radius: 12px;
  color: #f1f4fb;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.music-option-btn:hover {
  background: #1c2742;
  border-color: #52e5b7;
  transform: translateY(-1px);
}

.music-option-btn.active {
  background: rgba(246, 187, 99, 0.12);
  border-color: #f6bb63;
  box-shadow: 0 0 18px rgba(246, 187, 99, 0.25);
}

.music-opt-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.music-opt-info strong {
  display: block;
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 17px;
  letter-spacing: 0.8px;
  color: #ffffff;
}

.music-opt-info small {
  display: block;
  font-size: 12px;
  color: #9cb0d6;
  line-height: 1.35;
  margin-top: 2px;
}

/* Duelo Final Pulse */
.arena-shell.final-duel {
  border-color: #ff416c !important;
  box-shadow: 0 0 45px rgba(255, 65, 108, 0.45) !important;
  animation: final-pulse 0.7s infinite alternate ease-in-out;
}

@keyframes final-pulse {
  from {
    border-color: #ff416c;
    box-shadow: 0 0 30px rgba(255, 65, 108, 0.35);
  }
  to {
    border-color: #f6bb63;
    box-shadow: 0 0 55px rgba(246, 187, 99, 0.7);
  }
}



