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

:root {
  --gold: #C4A35A;
  --gold-light: #E2C57D;
  --gold-glow: rgba(196, 163, 90, 0.15);
  --bg: #0A0C10;
  --bg2: #0F1218;
  --bg3: #141820;
  --surface: #1A1F2A;
  --surface2: #202530;
  --text: #EDE8DC;
  --text2: #A89F8C;
  --text3: #6A6258;
  --win: #4CAF87;
  --lose: #C0443A;
  --border: rgba(196, 163, 90, 0.2);
  --border2: rgba(196, 163, 90, 0.08);
}

small {
  font-size: 0.7em;
}

html,
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: clamp(18px, 1.05vw + 0.55rem, 21px);
  line-height: 1.7;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 10%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 35%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 20% 80%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 15%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
    radial-gradient(2px 2px at 25% 5%, rgba(196, 163, 90, 0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 75% 60%, rgba(196, 163, 90, 0.3) 0%, transparent 100%),
    radial-gradient(600px 400px at 50% 0%, rgba(196, 163, 90, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 50px 28px 100px;
}

/* HEADER */
.header {
  text-align: center;
  margin-bottom: 44px;
  animation: fadeDown 0.8s ease both;
}

.moon-sigil {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 14px rgba(196, 163, 90, 0.6));
  animation: moonFloat 4s ease-in-out infinite;
}

@keyframes moonFloat {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-7px)
  }
}

.header-kana {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--gold);
  opacity: .7;
  margin-bottom: 10px;
}

.header-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(36px, 2vw + 1.5rem, 52px);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 3px;
  text-shadow: 0 0 30px rgba(196, 163, 90, 0.3);
  margin-bottom: 10px;
}

.header-subtitle {
  font-size: 19px;
  color: var(--text);
  font-style: italic;
  margin-bottom: 22px;
}

.prize-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  border: 1px solid var(--gold);
  border-radius: 40px;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--gold);
  background: var(--gold-glow);
  letter-spacing: 1px;
}

/* WARNING */
.warning-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(226, 75, 74, 0.3);
  border-radius: 12px;
  background: rgba(192, 68, 58, 0.06);
  margin-bottom: 30px;
  font-size: 18px;
  color: var(--text);
  animation: fadeUp 0.7s 0.05s ease both;
}

.warning-box strong {
  color: #E07070;
}

/* SCOREBOARD */
.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  animation: fadeUp 0.7s 0.1s ease both;
}

.rounds-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.round-orb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: var(--text3);
  transition: all 0.4s;
  background: var(--bg3);
}

.round-orb.active {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 14px rgba(196, 163, 90, 0.2), inset 0 0 10px rgba(196, 163, 90, 0.05);
}

.round-orb.won {
  border-color: var(--win);
  background: rgba(76, 175, 135, 0.1);
  box-shadow: 0 0 12px rgba(76, 175, 135, 0.2);
}

.round-orb.lost {
  border-color: var(--lose);
  background: rgba(192, 68, 58, 0.1);
  box-shadow: 0 0 12px rgba(192, 68, 58, 0.2);
}

.orb-icon {
  font-size: 18px;
  line-height: 1;
}

.orb-label {
  font-size: 9px;
  letter-spacing: 1px;
  margin-top: 2px;
}

.score-center {
  text-align: center;
}

.score-nums {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
}

.score-caption {
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 2px;
  margin-top: 2px;
}

.score-needed {
  font-size: 12px;
  color: var(--text);
  text-align: center;
  margin-top: 6px;
  font-style: italic;
}

/* CONTROLS */
.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  animation: fadeUp 0.7s 0.2s ease both;
}

.select-wrap {
  flex: 1;
  min-width: 160px;
}

select {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Crimson Text', serif;
  font-size: 18px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C4A35A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

select:focus {
  outline: none;
  border-color: var(--gold);
}

select:disabled,
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn {
  padding: 14px 24px;
  border-radius: 12px;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-gold {
  background: var(--gold-glow);
  border: 1px solid var(--gold);
  color: var(--gold);
}

.btn-gold:hover {
  background: rgba(196, 163, 90, 0.22);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text3);
  color: var(--text);
}

/* ROULETTE */
.roulette-panel {
  margin-bottom: 24px;
  padding: 18px 20px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(26, 31, 42, 0.96) 0%, rgba(20, 24, 32, 0.96) 100%);
  animation: fadeUp 0.7s 0.24s ease both;
}

.roulette-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 14px;
}

.roulette-title {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--gold);
}

.roulette-subtitle {
  color: var(--text2);
  font-size: 15px;
}

.roulette-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 14px;
}

.roulette-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 28px;
  color: var(--gold-light);
  text-shadow: 0 0 12px rgba(196, 163, 90, 0.45);
}

.roulette-wheel-shell {
  width: min(360px, 84vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 10px;
  background: radial-gradient(circle at center, rgba(196, 163, 90, 0.18) 0%, rgba(10, 12, 16, 0.1) 45%, transparent 70%);
  box-shadow: inset 0 0 18px rgba(196, 163, 90, 0.08), 0 0 28px rgba(0, 0, 0, 0.3);
}

.roulette-wheel {
  --roulette-radius: clamp(102px, 15vw, 132px);
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(196, 163, 90, 0.38);
  box-shadow: inset 0 0 22px rgba(10, 12, 16, 0.45), 0 0 24px rgba(196, 163, 90, 0.08);
}

.roulette-label {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
}

.roulette-emoji {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(237, 232, 220, 0.2);
  background: rgba(10, 12, 16, 0.72);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.22);
  font-size: 22px;
  transform-origin: center center;
}

.roulette-label.is-selected .roulette-emoji {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(196, 163, 90, 0.5);
  transform: scale(1.12);
}

.roulette-wheel.is-celebrating {
  box-shadow: inset 0 0 22px rgba(10, 12, 16, 0.45), 0 0 30px rgba(196, 163, 90, 0.3);
}

.roulette-wheel.is-celebrating .roulette-label.is-selected .roulette-emoji {
  animation: winnerPulse 0.9s ease-in-out 2;
}

@keyframes winnerPulse {
  0%,
  100% {
    transform: scale(1.12);
    box-shadow: 0 0 18px rgba(196, 163, 90, 0.5);
  }

  50% {
    transform: scale(1.28);
    box-shadow: 0 0 28px rgba(226, 197, 125, 0.9);
  }
}

.roulette-center {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: var(--gold-light);
  border: 2px solid rgba(196, 163, 90, 0.5);
  background: radial-gradient(circle at center, rgba(20, 24, 32, 0.98) 0%, rgba(10, 12, 16, 0.96) 100%);
  box-shadow: 0 0 16px rgba(196, 163, 90, 0.14);
  z-index: 3;
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.roulette-center.winner-reveal {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 0 24px rgba(226, 197, 125, 0.6);
  color: #fff3c4;
}

/* CHALLENGE CARD */
.challenge-wrap {
  animation: fadeUp 0.7s 0.3s ease both;
}

.challenge-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow 0.3s;
}

.challenge-card:hover {
  box-shadow: 0 0 30px rgba(196, 163, 90, 0.07);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border2);
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface) 100%);
  flex-wrap: wrap;
}

.round-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.type-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
}

.tag-combat {
  background: rgba(192, 68, 58, 0.12);
  color: #E07070;
  border: 1px solid rgba(192, 68, 58, 0.3);
}

.tag-nohit {
  background: rgba(56, 133, 221, 0.12);
  color: #7AAEEE;
  border: 1px solid rgba(56, 133, 221, 0.3);
}

.tag-restriction {
  background: rgba(196, 163, 90, 0.12);
  color: var(--gold-light);
  border: 1px solid rgba(196, 163, 90, 0.3);
}

.tag-speedrun {
  background: rgba(76, 175, 135, 0.12);
  color: #72C9A0;
  border: 1px solid rgba(76, 175, 135, 0.25);
}

.diff-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
}

.diff-medio {
  background: rgba(196, 163, 90, 0.1);
  color: var(--gold);
  border: 1px solid rgba(196, 163, 90, 0.3);
}

.diff-dificil {
  background: rgba(226, 75, 74, 0.12);
  color: #E07070;
  border: 1px solid rgba(226, 75, 74, 0.3);
}

.diff-extremo {
  background: rgba(255, 50, 50, 0.14);
  color: #FF7070;
  border: 1px solid rgba(255, 50, 50, 0.4);
}

.edit-btn {
  margin-left: auto;
  padding: 4px 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text3);
  font-family: 'Crimson Text', serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.edit-btn:hover {
  color: var(--text2);
  border-color: var(--text3);
}

.card-body {
  padding: 24px;
}

.enemy-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(226, 75, 74, 0.2);
  border-radius: 10px;
  background: rgba(192, 68, 58, 0.06);
  margin-bottom: 14px;
}

.enemy-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.enemy-name {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  color: #E07070;
  line-height: 1.2;
  margin-bottom: 2px;
}

.enemy-region {
  font-size: 12px;
  color: var(--text3);
  letter-spacing: 1px;
}

.challenge-name {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.25;
}

.challenge-desc {
  font-size: 19px;
  color: var(--text);
  font-style: italic;
  margin-bottom: 18px;
  line-height: 1.65;
}

.mechanic-tip {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(122, 174, 238, 0.06);
  border: 1px solid rgba(122, 174, 238, 0.15);
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.conditions {
  margin-bottom: 24px;
  padding: 14px 18px;
  border-left: 2px solid var(--border);
  background: var(--bg3);
  border-radius: 0 8px 8px 0;
}

.conditions-title {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 8px;
}

.conditions li {
  list-style: none;
  font-size: 17px;
  color: var(--text);
  padding: 5px 0 5px 20px;
  position: relative;
  line-height: 1.65;
}

.conditions li::before {
  content: '◆';
  position: absolute;
  left: 0;
  font-size: 6px;
  color: var(--gold);
  top: 8px;
}

.result-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-win,
.btn-lose {
  padding: 14px;
  border-radius: 12px;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-win {
  background: rgba(76, 175, 135, 0.08);
  border: 1.5px solid var(--win);
  color: var(--win);
}

.btn-win:hover {
  background: rgba(76, 175, 135, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(76, 175, 135, 0.15);
}

.btn-lose {
  background: rgba(192, 68, 58, 0.08);
  border: 1.5px solid var(--lose);
  color: var(--lose);
}

.btn-lose:hover {
  background: rgba(192, 68, 58, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(192, 68, 58, 0.15);
}

.btn-win:disabled,
.btn-lose:disabled {
  opacity: .3;
  pointer-events: none;
}

.progress-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  transition: all 0.35s;
}

.dot.active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 6px rgba(196, 163, 90, 0.5);
}

.dot.won {
  background: var(--win);
  border-color: var(--win);
}

.dot.lost {
  background: var(--lose);
  border-color: var(--lose);
}

/* RESULT BANNER */
.result-banner {
  display: none;
  text-align: center;
  padding: 40px 24px;
  border-radius: 16px;
  margin-bottom: 28px;
  border: 1.5px solid;
  animation: bannerReveal 0.6s ease;
}

@keyframes bannerReveal {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px)
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0)
  }
}

.result-banner.show {
  display: block;
}

.result-banner.victory {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(196, 163, 90, 0.06) 0%, rgba(196, 163, 90, 0.02) 100%);
  box-shadow: 0 0 40px rgba(196, 163, 90, 0.1);
}

.result-banner.defeat {
  border-color: var(--lose);
  background: rgba(192, 68, 58, 0.06);
}

.banner-icon {
  font-size: 52px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(196, 163, 90, 0.5));
}

.defeat .banner-icon {
  filter: none;
}

.banner-title {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.defeat .banner-title {
  color: var(--lose);
}

.banner-sub {
  font-size: 16px;
  color: var(--text);
  font-style: italic;
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto;
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 28px;
  width: 90%;
  max-width: 480px;
  animation: bannerReveal 0.3s ease;
}

.modal-title {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.form-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text3);
  display: block;
  margin-bottom: 5px;
  margin-top: 14px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Crimson Text', serif;
  font-size: 16px;
  transition: border-color 0.2s;
  resize: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text3);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.divider-ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0;
  color: var(--text3);
  font-size: 12px;
  letter-spacing: 2px;
}

.divider-ornament::before,
.divider-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.footer {
  text-align: center;
  margin-top: 48px;
  font-size: 12px;
  color: var(--text3);
  letter-spacing: 2px;
  font-family: 'Cinzel', serif;
}

@media (max-width:500px) {
  .header-title {
    font-size: 28px;
  }

  .scoreboard {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .result-btns {
    grid-template-columns: 1fr;
  }

  .controls {
    flex-direction: column;
  }
}

/* Ajustes de estructura tras refactor */
.warning-symbol {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.status-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.status-title {
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 1px;
  font-family: 'Cinzel', serif;
}

.status-label {
  font-size: 18px;
  color: var(--text);
  font-style: italic;
}

.tip-symbol {
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 1px;
}

.timer-box {
  margin-bottom: 0;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(8, 14, 28, 0.98) 0%, rgba(10, 18, 34, 0.96) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 0 24px rgba(196, 163, 90, 0.04);
}

.timer-label {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 14px;
  text-align: center;
}

.timer-display {
  font-family: 'Cinzel', serif;
  font-size: clamp(48px, 3vw + 1rem, 68px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 3px;
  margin-bottom: 18px;
  text-align: center;
  line-height: 1;
}

.timer-display.danger {
  color: #ff8a8a;
  text-shadow: 0 0 12px rgba(255, 120, 120, 0.25);
}

.timer-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.global-rules-box {
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(196, 163, 90, 0.06) 0%, rgba(196, 163, 90, 0.02) 100%);
  box-shadow: 0 0 20px rgba(196, 163, 90, 0.05);
  animation: fadeUp 0.7s 0.08s ease both;
}

.global-rules-title {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 12px;
}

.global-rules-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.global-rules-list li {
  position: relative;
  padding-left: 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.global-rules-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 8px;
  color: var(--gold);
}

.time-limit-box {
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(196, 163, 90, 0.28);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  background: rgba(196, 163, 90, 0.06);
}

.time-limit-title {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 6px;
}

.time-limit-value {
  font-family: 'Cinzel', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 1px;
  line-height: 1.1;
}

@media (max-width: 560px) {
  .global-rules-list {
    grid-template-columns: 1fr;
  }
}

.time-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.time-limit-box,
.timer-box {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .time-section {
    grid-template-columns: 1fr;
  }
}

.timer-ornament {
  font-size: 26px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 10px;
  opacity: 0.9;
  animation: timerSpin 8s linear infinite;
  transform-origin: center;
}

/* Grupo de elementos con estilos uniformes */
.header-kana,
.score-caption,
.conditions-title,
.timer-label,
.time-limit-title,
.global-rules-title,
.panel-title,
.round-title,
.champion-title,
.modal-title {
  font-family: 'Cinzel', serif;
  letter-spacing: 2px;
}

.header-kana {
  font-size: 11px;
  color: var(--gold);
  opacity: .7;
}

.score-caption,
.conditions-title,
.timer-label,
.time-limit-title,
.global-rules-title {
  font-size: 10px;
  color: var(--gold);
}

.panel-title {
  font-size: 17px;
  color: var(--gold);
}

.round-title,
.champion-title {
  font-size: 13px;
  color: var(--gold);
}

.modal-title {
  font-size: 16px;
  color: var(--gold);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.75) 0%, transparent 100%),
    radial-gradient(2px 2px at 25% 70%, rgba(255, 255, 255, 0.55) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 35%, rgba(196, 163, 90, 0.65) 0%, transparent 100%),
    radial-gradient(2px 2px at 55% 15%, rgba(255, 255, 255, 0.65) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 70% 60%, rgba(196, 163, 90, 0.55) 0%, transparent 100%),
    radial-gradient(2px 2px at 85% 30%, rgba(255, 255, 255, 0.7) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 78% 82%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
    radial-gradient(2px 2px at 18% 88%, rgba(196, 163, 90, 0.45) 0%, transparent 100%);
  animation:
    starsFloat 10s ease-in-out infinite alternate,
    starsTwinkle 4.2s ease-in-out infinite;
}

@keyframes starsFloat {
  0% {
    transform: translateY(0px) translateX(0px) scale(1);
    opacity: 0.65;
  }

  50% {
    transform: translateY(-6px) translateX(4px) scale(1.03);
    opacity: 0.9;
  }

  100% {
    transform: translateY(4px) translateX(-3px) scale(0.98);
    opacity: 0.7;
  }
}

@keyframes starsTwinkle {
  0% {
    opacity: 0.45;
    filter: brightness(0.9);
  }

  25% {
    opacity: 0.72;
    filter: brightness(1.1);
  }

  50% {
    opacity: 0.95;
    filter: brightness(1.25);
  }

  75% {
    opacity: 0.65;
    filter: brightness(1.05);
  }

  100% {
    opacity: 0.5;
    filter: brightness(0.95);
  }
}

@keyframes timerSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.tournament-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.panel-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(26, 31, 42, 0.96) 0%, rgba(20, 24, 32, 0.96) 100%);
  padding: 24px;
  box-shadow: 0 0 28px rgba(196, 163, 90, 0.04);
}

.panel-title {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.participant-form {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.participant-form .form-input {
  flex: 1;
}

.participant-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.players-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.players-list li {
  border: 1px solid var(--border2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 14px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-remove {
  background: none;
  border: none;
  color: #c97c7c;
  cursor: pointer;
  font-size: 14px;
}

.bracket-container {
  display: flex;
  gap: 34px;
  overflow-x: auto;
  padding: 10px 10px 18px;
  align-items: flex-start;
}

.round-column {
  min-width: 270px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  padding-right: 24px;
}

.round-column::after {
  content: '';
  position: absolute;
  top: 44px;
  right: 0;
  width: 2px;
  height: calc(100% - 44px);
  background: linear-gradient(180deg,
      transparent 0%,
      rgba(196, 163, 90, 0.10) 12%,
      rgba(196, 163, 90, 0.18) 50%,
      rgba(196, 163, 90, 0.10) 88%,
      transparent 100%);
}

.round-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(196, 163, 90, 0.14);
  text-align: center;
  margin-bottom: 4px;
}

.match-card {
  border: 1px solid rgba(196, 163, 90, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(10, 16, 28, 0.95) 0%, rgba(15, 20, 32, 0.96) 100%);
  padding: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.18);
  position: relative;
}

.match-card::before {
  content: 'VS';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(196, 163, 90, 0.22);
  pointer-events: none;
}

.match-card::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -24px;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg,
      rgba(196, 163, 90, 0.18),
      rgba(196, 163, 90, 0.30));
  transform: translateY(-50%);
}

.round-column:last-of-type .match-card::after {
  display: none;
}

.match-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  min-height: 58px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.match-player+.match-player {
  margin-top: 10px;
}

.match-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.match-player.winner {
  border-color: rgba(76, 175, 135, 0.40);
  background: linear-gradient(135deg, rgba(76, 175, 135, 0.12) 0%, rgba(76, 175, 135, 0.06) 100%);
  box-shadow: 0 0 16px rgba(76, 175, 135, 0.08);
}

.match-player.bye {
  border-color: rgba(196, 163, 90, 0.28);
  background: rgba(196, 163, 90, 0.08);
}

.match-player.disqualified {
  opacity: 0.65;
}

.match-status {
  color: var(--lose);
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.match-name {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.match-player.winner .match-name {
  color: #c8f1df;
}

.match-btn {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.match-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.match-btn-dq {
  border-color: var(--lose);
  color: var(--lose);
}

.match-btn-dq:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
}

.match-actions-all {
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.empty-state {
  color: var(--text);
  font-style: italic;
  font-size: 16px;
}

.champion-box {
  border: 1px solid var(--gold);
  border-radius: 18px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(196, 163, 90, 0.10) 0%, rgba(196, 163, 90, 0.04) 100%);
  text-align: center;
  min-width: 300px;
  box-shadow: 0 0 32px rgba(196, 163, 90, 0.10);
  align-self: center;
  margin-left: 6px;
  position: relative;
}

.champion-box::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 50%;
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg,
      rgba(196, 163, 90, 0.20),
      rgba(196, 163, 90, 0.38));
  transform: translateY(-50%);
}

.champion-title {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.champion-name {
  font-family: 'Cinzel', serif;
  font-size: 30px;
  color: var(--gold-light);
  line-height: 1.25;
  text-shadow: 0 0 18px rgba(196, 163, 90, 0.12);
}

.champion-crown {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--gold);
  filter: drop-shadow(0 0 10px rgba(196, 163, 90, 0.22));
}

.floating-nav-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 24px;
  color: var(--gold);
  background: rgba(10, 16, 28, 0.92);
  border: 1px solid var(--gold);
  box-shadow: 0 0 18px rgba(196, 163, 90, 0.18);
  z-index: 20;
  transition: transform 0.2s ease, background 0.2s ease;
}

.floating-nav-btn:hover {
  transform: translateY(-2px) scale(1.03);
  background: rgba(196, 163, 90, 0.10);
}

.match-card.match-complete {
  border-color: rgba(196, 163, 90, 0.22);
  box-shadow: 0 0 18px rgba(196, 163, 90, 0.05);
}

.round-column:nth-child(2) {
  padding-top: 36px;
}

.round-column:nth-child(3) {
  padding-top: 84px;
}

.round-column:nth-child(4) {
  padding-top: 140px;
}

.mode-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 14px;
  padding: 6px 14px;
  border: 1px solid rgba(196, 163, 90, 0.24);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(196, 163, 90, 0.08);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 1px;
}

.floating-nav-group {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 20;
}

.floating-nav-group .floating-nav-btn {
  position: static;
}

.floating-nav-btn-secondary {
  border-color: rgba(196, 163, 90, 0.3);
  color: var(--gold);
}

.mode-selector-grid,
.selector-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.mode-selector-grid {
  margin-bottom: 24px;
}

.mode-selector-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  background: linear-gradient(160deg, rgba(23, 28, 38, 0.98) 0%, rgba(14, 18, 26, 0.96) 100%);
  box-shadow: 0 0 26px rgba(196, 163, 90, 0.05);
}

.mode-selector-card-alt {
  background: linear-gradient(160deg, rgba(21, 27, 36, 0.98) 0%, rgba(12, 19, 27, 0.96) 100%);
}

.mode-selector-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.mode-selector-label {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold);
}

.mode-selector-title {
  font-family: 'Cinzel', serif;
  font-size: 30px;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--text);
}

.mode-selector-copy {
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
}

.mode-selector-list {
  list-style: none;
  margin: 18px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mode-selector-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text);
}

.mode-selector-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--gold);
}

.mode-selector-btn,
.selector-secondary-btn {
  display: inline-flex;
  text-decoration: none;
}

.selector-actions-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.selector-rules-list {
  grid-template-columns: 1fr;
}

.supervisor-note-card {
  margin-bottom: 28px;
}

.warning-box-supervised {
  border-color: rgba(56, 133, 221, 0.25);
  background: rgba(56, 133, 221, 0.07);
}

@media (max-width: 860px) {
  .mode-selector-grid,
  .selector-support-grid {
    grid-template-columns: 1fr;
  }
}
