/* ===== Result ===== */
#view-result {
  background:
    repeating-conic-gradient(from 0deg at 50% 35%, rgba(255,170,51,0.03) 0deg 10deg, transparent 10deg 20deg),
    radial-gradient(circle at 50% 35%, rgba(255,170,51,0.12) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(102,204,255,0.06) 0%, transparent 35%),
    var(--bg);
}

.result-screen {
  position: relative;
  background: linear-gradient(180deg, #1e2338 0%, #15182a 100%);
  border: 2px solid #4a3f5a;
  border-radius: 18px;
  padding: 38px 32px;
  max-width: 480px;
  margin: 36px auto;
  box-shadow: 0 16px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
  text-align: center;
}

.result-screen::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,170,51,0.4) 0%, transparent 30%, transparent 70%, rgba(102,204,255,0.35) 100%);
  z-index: -1;
  opacity: 0.5;
}

.result-screen h2 {
  color: #ffeebb;
  margin: 0 0 18px;
  font-size: 22px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.score-display {
  margin: 20px 0;
}

.score-num {
  font-size: 90px;
  font-weight: 800;
  background: linear-gradient(180deg, #ffeebb 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(255,170,51,0.45));
  line-height: 1;
}

.score-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a4a5a 0%, #2a2a38 50%, #1a1a24 100%);
  border: 3px solid transparent;
  background-clip: padding-box;
  color: #f0f0f5;
  font-size: 30px;
  font-weight: 800;
  margin: 12px auto 0;
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.2),
    0 0 0 2px rgba(255,170,51,0.4),
    0 8px 20px rgba(0,0,0,0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.score-grade.grade-pop {
  animation: grade-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes grade-pop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.reward-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 24px 0 18px;
}

.reward-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 110px;
  background: linear-gradient(180deg, #1f2438 0%, #161a2a 100%);
  border: 1px solid #2a3048;
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.reward-icon { font-size: 20px; }

.reward-label {
  font-size: 12px;
  color: var(--muted);
}

.reward-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.breakdown {
  background: rgba(13,16,28,0.85);
  border: 1px solid #2a3048;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 auto 18px;
  max-width: 320px;
  text-align: left;
}

#result-extra {
  color: #ffeebb;
  font-weight: 500;
  margin-bottom: 22px;
}

#result-extra p {
  margin: 6px 0;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(85,204,136,0.1);
  border: 1px solid rgba(85,204,136,0.25);
  display: inline-block;
  animation: extra-banner 0.6s ease both;
}

#result-extra p:first-child {
  background: rgba(255,170,51,0.1);
  border-color: rgba(255,170,51,0.3);
}

@keyframes extra-banner {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#result-continue {
  min-width: 160px;
}

.competition-summary {
  background: rgba(13,16,28,0.85);
  border: 1px solid #2a3048;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 auto 14px;
  max-width: 320px;
  text-align: center;
}

.competition-summary strong {
  display: block;
  color: #ffeebb;
  font-size: 15px;
  margin-bottom: 8px;
}

.competition-rounds {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.competition-round {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
}

.tournament-bracket {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #1f2438 0%, #161a2a 100%);
  border: 1px solid #2a3048;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.bracket-round.won {
  border-color: #55cc88;
  box-shadow: 0 0 12px rgba(85,204,136,0.25);
}

.bracket-round.lost {
  border-color: #ff5555;
  box-shadow: 0 0 12px rgba(255,85,85,0.25);
}

.bracket-round.eliminated {
  opacity: 0.45;
  border-style: dashed;
}

.bracket-name {
  font-size: 11px;
  color: #ffeebb;
  margin-bottom: 4px;
}

.bracket-score {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.bracket-result {
  font-size: 11px;
  margin-top: 2px;
}

.bracket-round.won .bracket-result { color: #55cc88; }
.bracket-round.lost .bracket-result { color: #ff5555; }

.bracket-connector {
  width: 14px;
  height: 2px;
  background: linear-gradient(90deg, #2a3048, #4a3f5a, #2a3048);
  border-radius: 1px;
}

.round-advance {
  border-color: #55cc88;
  box-shadow: 0 0 18px rgba(85,204,136,0.25);
}

.round-advance strong {
  color: #55cc88;
  font-size: 18px;
}

.round-score {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 8px 0;
}

.remaining-track {
  font-size: 13px;
  color: #ffeebb;
}

