/* Extracted from style.css — results / rewards foundation */

/* ============================
   Global Results Panel (Universal Minigame Results)
   ============================ */
#global-results-panel {
  background: rgba(13, 27, 42, 0.95);
  border: 2px solid #415a77;
  border-radius: 12px;
  padding: 0;
  color: #fff;
  text-align: center;
  z-index: 999999 !important;
}

/* ============================
   Mini-Game Log Panel (Mirror of Global, scroll fixed)
   ============================ */
#minigame-log-panel {
  width: 420px;
  height: 400px;
  background: rgba(13, 27, 42, 0.9);
  border: 2px solid #415a77;
  border-radius: 12px;
  color: #fff;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1500 !important;
}

#minigame-log-panel .panel-title {
  color: #ffd60a;
}

#minigame-log-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(0,0,0,0.4);
  border: 1px solid #415a77;
  border-radius: 6px;
  padding: 6px;
  font-size: 13px;
  line-height: 1.3em;
  font-family: monospace;
}

#clear-minigame-log {
  background: #415a77;
  border: 2px solid #ffd60a;
  border-radius: 6px;
  color: #fff;
  padding: 4px 10px;
  font-weight: bold;
}

#clear-minigame-log:hover {
  background: #5b63ff;
}

/* Global Results */
#global-results-panel > .panel-body.global-results-panel-body {
  background:
    radial-gradient(circle at top center, rgba(69, 108, 148, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(16, 24, 38, 0.94), rgba(10, 15, 24, 0.97));
}

#global-results-banner {
  border-radius: 18px 18px 0 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.28);
}

#global-results-title {
  margin: 0;
  padding: 14px 18px 10px;
  color: #f0f7ff;
  font-size: 28px;
  letter-spacing: 0.35px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}


#global-results-list {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(112, 151, 193, 0.18);
  background: linear-gradient(180deg, rgba(18, 29, 44, 0.9), rgba(10, 17, 28, 0.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.result-chao-card {
  width: 148px;
  min-height: 178px;
  padding: 12px 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(117, 156, 198, 0.22);
  background: linear-gradient(180deg, rgba(21, 33, 50, 0.94), rgba(10, 17, 27, 0.96));
  box-shadow: 0 10px 22px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.05);
}

.result-chao-card .chao-wrap {
  width: 108px;
  height: 108px;
  margin-bottom: 8px;
}

.result-chao-card .placement {
  margin-top: 0;
  font-size: 18px;
  font-weight: 900;
  color: #eef6ff;
}

.result-chao-card .chao-name {
  color: #dceafb;
}

#global-results-footer {
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

#global-results-finish {
  min-width: 220px;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(180, 211, 244, 0.45);
  background: linear-gradient(180deg, rgba(88, 131, 179, 0.98), rgba(33, 55, 84, 0.98));
  color: #f7fbff;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}

#global-results-finish:hover {
  background: linear-gradient(180deg, rgba(105, 151, 202, 0.98), rgba(40, 66, 98, 0.98));
}

/* ============================
   Global Results Refactor
   ============================ */
#global-results-page-indicator {
  text-align: center;
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.9;
}
.results-page {
  width: min(100%, 1120px);
  max-width: 1120px;
  margin: 0 auto;
  flex: 0 1 auto;
  min-height: 0;
}
.results-page.hidden,
.legacy-results-hidden {
  display: none !important;
}
#results-page-overview {
  display: grid;
  justify-content: center;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 14px;
  min-height: 0;
  width: min(100%, 1120px);
  margin: auto;
  align-content: center;
}
#results-overview-stage,
#results-overview-sidebar,
#results-reward-stage,
#results-reward-feed,
#results-summary-list {
  border-radius: 14px;
  background: rgba(0,0,0,0.34);
  box-sizing: border-box;
}
#results-overview-stage {
  min-height: 360px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}
.results-stage-row,
.results-stage-podium,
.results-stage-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.results-stage-podium {
  align-items: flex-end;
}
.results-stage-group-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}
#results-overview-sidebar {
  min-height: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
}
#results-overview-headline {
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}
#results-overview-stats,
#results-overview-notes,
#results-summary-list,
#results-reward-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  min-height: 0;
}
.results-stat-line,
.results-note-line,
.results-summary-line,

.results-reward-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.results-reward-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
  flex: 0 0 auto;
}
.results-reward-label {
  display: block;
  min-width: 0;
}
.results-reward-line {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
}
#results-page-chao-rewards {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  justify-content: center;
}
#results-reward-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
#results-reward-content {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  width: min(100%, 980px);
  margin: 0 auto;
  align-content: center;
}
#results-reward-stage {
  min-height: 360px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#results-reward-feed,
#results-summary-list {
  padding: 14px;
}
#results-page-summary {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#results-page-overview {
  width: min(100%, 1120px);
  margin: 0 auto;
}
#results-page-chao-rewards {
  width: min(100%, 980px);
  margin: 0 auto;
}
#results-page-summary {
  width: min(100%, 920px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
#results-page-summary > #results-summary-list {
  flex: 0 1 auto;
  width: 100%;
  margin: 0 auto;
}

.result-actor-card {
  min-width: 132px;
  max-width: 180px;
  padding: 10px 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.result-actor-card.podium-1,
.result-actor-card.podium-gold,
.result-actor-card.podium_gold { min-height: 220px; }
.result-actor-card.podium-2,
.result-actor-card.podium-3,
.result-actor-card.podium-silver,
.result-actor-card.podium_silver,
.result-actor-card.podium-bronze,
.result-actor-card.podium_bronze { min-height: 190px; }
.result-actor-card.podium-gold,
.result-actor-card.podium_gold,
.result-actor-card.karate-champion,
.result-actor-card.team-winner,
.result-actor-card.trail-survivor {
  background: linear-gradient(180deg, rgba(255,225,120,0.18), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,220,120,0.55);
}
.result-actor-card.podium-silver,
.result-actor-card.podium_silver {
  background: linear-gradient(180deg, rgba(210,220,235,0.18), rgba(255,255,255,0.08));
  border: 1px solid rgba(210,220,235,0.5);
}
.result-actor-card.podium-bronze,
.result-actor-card.podium_bronze {
  background: linear-gradient(180deg, rgba(214,154,92,0.18), rgba(255,255,255,0.08));
  border: 1px solid rgba(214,154,92,0.5);
}
.result-actor-card.class-student {
  min-width: 148px;
  min-height: 200px;
}
.result-actor-card.trail-fainted,
.result-actor-card.karate-defeated {
  background: linear-gradient(180deg, rgba(120,120,120,0.14), rgba(255,255,255,0.06));
  border: 1px solid rgba(180,180,180,0.28);
}
.result-actor-card.team-card {
  min-width: 170px;
  min-height: 200px;
}
.result-actor-wrap {
  width: 88px;
  height: 88px;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-actor-wrap .chao,
.result-actor-wrap > * {
  pointer-events: none !important;
}
.result-actor-placement {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}
.result-actor-name,
.result-actor-owner {
  text-align: center;
  line-height: 1.15;
}
.result-actor-owner {
  font-size: 12px;
  opacity: 0.85;
}
#global-results-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
}
#global-results-footer button,
#results-reward-nav button {
  min-width: 96px;
}

.results-stage-karate-focus .result-actor-card.karate-champion {
  min-height: 240px;
  min-width: 170px;
}
.results-stage-karate-focus .result-actor-card.karate-focus,
.result-actor-card.karate-defeated {
  min-height: 190px;
}
.results-stage-class .result-actor-card {
  min-width: 148px;
}
.results-stage-chaoregon .result-actor-card {
  min-width: 150px;
}
.results-stage-team .result-actor-card {
  min-width: 170px;
}
.results-stage-team {
  justify-content: center;
}
.results-layout-class_complete #results-overview-stage,
.results-layout-chaoregon #results-overview-stage,
.results-layout-team_ranked #results-overview-stage,
.results-layout-ffa_ranked #results-overview-stage {
  gap: 14px;
}
.result-reward-focus .result-actor-wrap {
  width: 140px;
  height: 140px;
}

.results-reward-line {
  opacity: 0;
  transform: translateX(16px) scale(0.98);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.results-reward-line.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.results-reward-line.is-live {
  background: rgba(255, 214, 10, 0.18);
  border-color: rgba(255, 214, 10, 0.65);
}
.results-reward-line.is-complete {
  opacity: 1;
}
.result-reward-focus {
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}
.result-reward-focus.reaction-xp .result-actor-wrap,
.result-reward-focus.reaction-stat .result-actor-wrap,
.result-reward-focus.reaction-level-up .result-actor-wrap,
.result-reward-focus.reaction-unlock .result-actor-wrap,
.result-reward-focus.reaction-victory .result-actor-wrap,
.result-reward-focus.reaction-generic .result-actor-wrap {
  animation: resultsRewardPulse 320ms ease;
}
.result-reward-focus.reaction-level-up .result-actor-wrap,
.result-reward-focus.reaction-unlock .result-actor-wrap {
  filter: drop-shadow(0 0 12px rgba(255, 214, 10, 0.55));
}
.result-reward-focus.reaction-xp .result-actor-wrap,
.result-reward-focus.reaction-stat .result-actor-wrap {
  filter: drop-shadow(0 0 10px rgba(109, 213, 237, 0.45));
}
.result-reward-focus.reaction-victory .result-actor-wrap {
  filter: drop-shadow(0 0 12px rgba(255, 140, 66, 0.5));
}
@keyframes resultsRewardPulse {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-4px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}


/* extracted from 03-panel-contract.css — pass27 results spill */
/* ============================
   Global Results Panel (Universal Minigame Results)
   ============================ */

/* Top banner strip */
#global-results-banner {
  width: 100%;
  height: 90px;
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid #415a77;
  border-radius: 10px 10px 0 0;
}

/* Title text */
#global-results-title {
  font-size: 22px;
  font-weight: bold;
  margin: 10px 0;
  color: #ffd60a;
  text-shadow: 2px 2px 0 #000;
}

/* Body / content zone */
#global-results-body {
  width: 100%;
  box-sizing: border-box;
}

/* Reward / summary list */
#global-results-list {
  text-align: left;
  font-size: 14px;
}

.reward-block h4 {
  text-align: center;
  color: #ffd60a;
  margin-bottom: 4px;
  text-shadow: 1px 1px 2px #000;
}
.reward-block p {
  margin: 2px 0;
  text-align: center;
}

/* Chao result cards */
.result-chao-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 120px;
  text-align: center;
  color: white;
}
.result-chao-card .chao-wrap {
  width: 96px;
  height: 96px;
  position: relative;
}
.result-chao-card .placement {
  margin-top: 6px;
  font-weight: bold;
}

/* Footer / Finish button */
#global-results-footer {
  width: 100%;
  text-align: center;
  padding: 10px 0 16px 0;
  border-top: 2px solid #415a77;
}
#global-results-finish {
  background: #ffd60a;
  border: none;
  border-radius: 8px;
  padding: 8px 30px;
  font-weight: bold;
  font-size: 16px;
  transition: background 0.2s;
}
#global-results-finish:hover {
  background: #ffea55;
}

/* ============================
   Karate Results — Fixed Layout
   ============================ */
#global-results-panel.karate-results #global-results-list {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 100px;
  margin-top: 20px;
  text-align: center;
  position: relative;
}

#global-results-panel.karate-results .result-chao-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 150px;
  position: relative;
  transform: none;
}

#global-results-panel.karate-results .result-chao-card img,
#global-results-panel.karate-results .result-chao-card div[data-chaoid],
#global-results-panel.karate-results .result-chao-card .chao-sprite {
  transform: scale(1.8);
  margin-bottom: 8px;
}

#global-results-panel.karate-results .placement {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 15px;
  color: #ffea00;
  text-shadow: 1px 1px 2px #000;
}

#global-results-panel.karate-results .chao-name {
  font-size: 14px;
  color: #ffffff;
  text-shadow: 1px 1px 2px #000;
  margin-top: 6px;
}

/* ============================
   Race Results — Tiered Grid Layout
   ============================ */
#global-results-panel.race-results #global-results-list,
#global-results-panel.race3-results #global-results-list,
#global-results-panel.race4-results #global-results-list,
#global-results-panel.race3-league-results #global-results-list, 
#global-results-panel.race4-league-results #global-results-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
}

/* First-place row (single centered) */
.tier-first {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

/* Remaining rows (3 per row) */
.tier-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-content: center;
  align-items: start;
  gap: 36px;
  width: 90%;
  max-width: 640px;
  margin: 0 auto;
}

.tier-row .result-chao-card,
.tier-first .result-chao-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

#global-results-panel.race-results .placement {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 15px;
  color: #ffd60a;
  text-shadow: 1px 1px 2px #000;
}

#global-results-panel.race-results .chao-name {
  font-size: 13px;
  color: #ffffff;
  text-shadow: 1px 1px 2px #000;
  margin-top: 6px;
}
/* ============================
   Class Results — Centered Title Only
   ============================ */
#global-results-panel.class-results #global-results-title {
  font-size: 26px;
  color: #ffea00;
  margin-top: 14px;
  text-shadow: 2px 2px 4px #000;
}

#global-results-panel.class-results #global-results-list {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 50px;
  margin-top: 40px;
  text-align: center;
}

#global-results-panel.class-results .result-chao-card {
  width: 120px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

#global-results-panel.class-results .placement {
  display: none; /* no ranks or winner labels */
}

#global-results-panel.class-results .chao-name {
  font-size: 14px;
  margin-top: 6px;
  color: #ffffff;
  text-shadow: 1px 1px 2px #000;
}

/* ============================
   Result Chao Visual Layers (Dot + Name + Title + Equip)
   ============================ */
.result-chao-card .chao-wrap .dot {
  position: absolute;
  top: -12px; /* slightly closer to head for scaled 1.5x Chao */
  left: 22%;
  transform: translateX(-50%) scale(1.8);
  z-index: 3;
  pointer-events: none;
}

.result-chao-card .chao-wrap .equip,
.result-chao-card .chao-wrap .equip-slot img {
  position: absolute;
  bottom: 0;
  left: 0;
  transform: scale(1.5);
  transform-origin: center bottom;
  pointer-events: none;
  z-index: 4;
}

.result-chao-card .chao-name {
  font-size: 13px;
  margin-top: 4px;
  color: #ffffff;
  text-shadow: 1px 1px 2px #000;
}

.result-chao-card .chao-title {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #ffd60a;
  text-shadow: 1px 1px 2px #000;
  pointer-events: none;
  z-index: 5;
}
