@import "./detail-benchmark-store-readable.css";

/* Make prize ranks easier to scan while keeping lower ranks compact. */
.prize-overview-head h2 {
  font-size: 22px;
}

.prize-overview-head p {
  font-size: 12px;
}

.benchmark-prize-table {
  width: min(100%, 450px);
}

.benchmark-prize-table th,
.benchmark-prize-table td {
  padding-inline: 6px;
}

.benchmark-prize-table th {
  height: 42px;
  font-size: 12px;
}

.benchmark-prize-table th:first-child,
.benchmark-prize-table td:first-child {
  width: 29%;
}

.benchmark-prize-table th:nth-child(2),
.benchmark-prize-table td:nth-child(2) {
  width: 23%;
}

.benchmark-prize-table th:last-child,
.benchmark-prize-table td:last-child {
  width: 48%;
}

.benchmark-prize-table td {
  height: 47px;
  font-size: 12px;
}

.benchmark-prize-table td:last-child {
  font-size: 13px;
}

.benchmark-prize-table tbody tr:nth-child(-n + 3) td {
  height: 55px;
  font-size: 13px;
  font-weight: 750;
}

.benchmark-prize-table tbody tr:first-child td {
  height: 60px;
  background: #fffaf0;
  font-size: 14px;
}

.benchmark-prize-table tbody tr:nth-child(2) td {
  background: #fafbfd;
}

.benchmark-prize-table tbody tr:nth-child(3) td {
  background: #fff8f4;
}

.benchmark-prize-table tbody tr:nth-child(-n + 3) td:last-child {
  font-size: 14px;
  font-weight: 900;
}

.benchmark-prize-table tbody tr:first-child td:last-child {
  font-size: 15px;
}

.benchmark-prize-table .rank-cell {
  gap: 6px;
}

.benchmark-prize-table tbody tr:nth-child(-n + 3) .rank-dot {
  width: 25px;
  height: 25px;
  font-size: 11px;
}

.benchmark-prize-table tbody tr:first-child .rank-dot {
  width: 28px;
  height: 28px;
  font-size: 12px;
  box-shadow: 0 4px 10px rgba(240, 175, 26, .28);
}

/* Round numbers panel (reference layout): full-width row above the prize card. */
.detail-top-grid {
  grid-template-columns: 1fr;
}

.prize-overview-card {
  min-height: 0;
}

.round-numbers-panel {
  padding: 8px 0 6px;
}

.round-numbers-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.round-numbers-top h2 {
  margin: 0;
  color: #000;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.round-numbers-card {
  border: 1px solid #ddd;
  border-radius: 22px;
  padding: 60px 24px 62px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 42, 55, .045);
}

.round-numbers-inner {
  width: 600px;
  max-width: 100%;
  margin: 0 auto;
}

.round-numbers-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 32px;
  border-bottom: 1px solid #ddd;
}

.round-numbers-title {
  display: grid;
  gap: 18px;
  text-align: center;
}

.round-numbers-title strong {
  color: #111;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -.03em;
}

.round-numbers-title strong em {
  color: #0a9a7e;
  font-style: normal;
}

.round-numbers-title span {
  color: #666;
  font-size: 16px;
}

.round-arrow {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid #222;
  border-radius: 50%;
  background: #fff;
}

.round-arrow::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 23px;
  width: 24px;
  height: 1px;
  background: #222;
}

.round-arrow::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 14px;
  height: 1px;
  background: #222;
}



.round-arrow-prev::after { left: 12px; top: 22px; transform: rotate(-25deg); transform-origin: left center; }
.round-arrow-next::after { right: 12px; top: 22px; transform: rotate(-25deg); transform-origin: right center; }

.round-arrow.is-disabled {
  border-color: #bbb;
}

.round-arrow.is-disabled::before,
.round-arrow.is-disabled::after {
  background: #bbb;
}

.round-numbers-balls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
}

.round-numbers-group {
  display: flex;
  gap: 18px;
}

.round-numbers-balls > i {
  color: #999;
  font-size: 28px;
  font-style: normal;
}

.round-ball {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.round-ball-1 { background: #e09000; }
.round-ball-2 { background: #0062cc; }
.round-ball-3 { background: #d92e4d; }
.round-ball-4 { background: #6e7382; }
.round-ball-5 { background: #2b9f41; }

.round-numbers-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  color: #666;
  font-size: 16px;
}

.round-numbers-labels span {
  display: flex;
  align-items: center;
  gap: 12px;
}

.round-numbers-labels span::before,
.round-numbers-labels span::after {
  content: "";
  height: 1px;
  background: #ddd;
}

.round-numbers-labels .label-main { flex: 0 0 450px; }
.round-numbers-labels .label-bonus { flex: 0 0 100px; }
.round-numbers-labels .label-main::before { flex: 1; }
.round-numbers-labels .label-main::after { flex: 1; }
.round-numbers-labels .label-bonus::before { flex: 1; }
.round-numbers-labels .label-bonus::after { display: none; }

/* Prize table (reference style): 순위 / 당첨게임 수 / 1게임당 당첨금 */
.prize-ref-table {
  width: 100%;
  margin-top: 22px;
  border-collapse: collapse;
  border-top: 2px solid #333;
  table-layout: fixed;
}

.prize-ref-table th,
.prize-ref-table td {
  border: 1px solid #e3e3e3;
  border-top: 0;
  padding: 0 28px;
  font-size: 18px;
  text-align: center;
}

.prize-ref-table th:first-child,
.prize-ref-table td:first-child { border-left: 0; }
.prize-ref-table th:last-child,
.prize-ref-table td:last-child { border-right: 0; }

.prize-ref-table th {
  height: 70px;
  border-bottom: 1px solid #999;
  color: #111;
  font-weight: 500;
}

.prize-ref-table td { height: 70px; color: #111; }
.prize-ref-table td:last-child { text-align: right; }
.prize-ref-table th:first-child,
.prize-ref-table td:first-child { width: 20%; }

.prize-ref-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
}

.prize-ref-foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #666;
  font-size: 15px;
  line-height: 1.9;
}

.prize-ref-foot li::before { content: "· "; }
.prize-ref-foot li strong { color: #0a9a7e; font-weight: 500; }

.prize-ref-table th:first-child,
.prize-ref-table td:first-child { width: 14%; }
.prize-ref-table td:nth-child(2) { text-align: right; color: #0a9a7e; }

.prize-ref-actions {
  display: flex;
  gap: 12px;
}

.prize-ref-actions a {
  min-height: 52px;
  padding: 0 32px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
}

.prize-ref-actions .prize-stores-link {
  display: inline-flex;
  align-items: center;
  background: #e4eeee;
  color: #111;
  text-decoration: none;
}

.prize-ref-actions .prize-stores-link:hover { background: #d6e5e5; }

.prize-ref-actions .prize-stores-link {
  background: #ffe6e2;
  color: #e0402f;
}

.prize-ref-actions .prize-stores-link:hover { background: #ffd8d2; }

.prize-ref-actions .prize-calculator-link {
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
}

.prize-ref-actions .prize-calculator-link:hover {
  border-color: #c5c5c5;
  background: #f7f7f7;
}

/* Combination analysis: 3 x 2 tiles */
.combination-analysis-card > h2 { font-size: 22px; }

.analysis-card-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.analysis-metric-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  border: 1px solid #e6eaf0;
  border-radius: 16px;
  padding: 22px 24px;
  background: #f7f9fc;
}

.analysis-metric-card > span {
  color: #4b5666;
  font-size: 15px;
  font-weight: 800;
}

.analysis-metric-card > strong,
.analysis-word-card > strong {
  margin-top: 16px;
  font-size: 36px;
  color: #202936;
}

.analysis-metric-card > b {
  margin-top: 14px;
  color: #3976d4;
  font-size: 14px;
}

.analysis-metric-card > p {
  margin: 8px 0 0;
  color: #707b8b;
  font-size: 13px;
}

.analysis-metric-card .ratio-ring {
  width: 88px;
  height: 88px;
  margin: 12px auto 8px;
}

.analysis-metric-card .ratio-ring::before { inset: 14px; background: #f7f9fc; }
.analysis-metric-card .ratio-ring strong { margin: 0; font-size: 16px; }
.analysis-metric-card .ratio-caption { font-size: 13px; }

.analysis-metric-card .range-distribution {
  gap: 9px;
  margin-top: 14px;
}

.analysis-metric-card .range-distribution > div {
  grid-template-columns: 10px 52px minmax(20px, 1fr) 30px;
  gap: 8px;
  font-size: 13px;
}

.analysis-metric-card .range-distribution i { width: 10px; height: 10px; }
.analysis-metric-card .range-distribution em { height: 8px; }
.analysis-metric-card .range-distribution strong {
  margin: 0;
  font-size: 13px;
}

/* Analysis animations (triggered by .is-animated from AnalysisGrid) */
@property --ring-progress {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

.analysis-metric-card .ratio-ring {
  background: conic-gradient(#5c6675 0 calc(var(--odd-percent) * var(--ring-progress) * 1%), #d8dde4 calc(var(--odd-percent) * var(--ring-progress) * 1%) 100%);
}

.analysis-card-grid:not(.is-animated) .ratio-ring { --ring-progress: 0; }
.analysis-card-grid.is-animated .ratio-ring {
  --ring-progress: 1;
  transition: --ring-progress 1.1s cubic-bezier(.22, .8, .3, 1);
}

.analysis-metric-card .range-distribution em::after {
  transition: width .9s cubic-bezier(.22, .8, .3, 1);
}

.analysis-card-grid:not(.is-animated) .range-distribution em::after { width: 0; }
.range-distribution > div:nth-child(2) em::after { transition-delay: .08s; }
.range-distribution > div:nth-child(3) em::after { transition-delay: .16s; }
.range-distribution > div:nth-child(4) em::after { transition-delay: .24s; }
.range-distribution > div:nth-child(5) em::after { transition-delay: .32s; }

.analysis-metric-card {
  transition: opacity .5s ease, transform .5s ease;
}

.analysis-card-grid:not(.is-animated) .analysis-metric-card {
  opacity: 0;
  transform: translateY(12px);
}

@media (prefers-reduced-motion: reduce) {
  .analysis-metric-card, .range-distribution em::after, .ratio-ring { transition: none !important; }
}

button.round-arrow { padding: 0; cursor: pointer; }
button.round-arrow:hover { background: #f5f8f7; }

/* .round-numbers-title, .round-numbers-balls {
  animation: round-swap .35s ease;
} */

@keyframes round-swap {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
