/* Skillver 高校 AI 能力挑战赛 — 规则页 & 天梯榜 */

.challenge-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.challenge-subnav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid #e7e5e4;
  background: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4e4e4e;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.challenge-subnav-link:hover,
.challenge-subnav-link.is-active {
  border-color: #0c0a09;
  color: #0c0a09;
}

.challenge-subnav-link.is-active {
  background: #fafafa;
}

.challenge-rules-prose {
  max-width: none;
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .challenge-rules-prose {
    padding: 2rem;
  }
}

.challenge-rules-prose > * + * {
  margin-top: 1rem;
}

.challenge-rules-prose h2 {
  margin-top: 2.5rem;
  scroll-margin-top: 6rem;
  font-size: 1.25rem;
  font-weight: 500;
  color: #0c0a09;
}

.challenge-rules-prose h2:first-child {
  margin-top: 0;
}

.challenge-rules-prose p,
.challenge-rules-prose li {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #4e4e4e;
}

.challenge-rules-prose ol {
  list-style: decimal;
  padding-left: 1.25rem;
}

.challenge-rules-prose ol > li + li {
  margin-top: 0.75rem;
}

.challenge-rules-prose .rules-lead {
  font-size: 1rem;
  line-height: 1.625;
  color: #0c0a09;
}

.challenge-qr-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  background: #fafafa;
  padding: 1.25rem;
}

.challenge-qr-box img,
.challenge-qr-box svg {
  display: block;
  width: auto;
  max-width: 11rem;
  height: auto;
  border-radius: 0.5rem;
  background: #fff;
}

.challenge-register {
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
}

.challenge-register__panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  border-radius: 1rem;
  border: 2px solid #0c0a09;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  .challenge-register__panel {
    grid-template-columns: auto 1fr;
    gap: 2rem;
    padding: 2rem;
    align-items: start;
  }
}

.challenge-register__panel .challenge-qr-box {
  border: none;
  background: transparent;
  padding: 0;
}

.challenge-register__panel .challenge-qr-box img {
  max-width: 11rem;
  width: auto;
  height: auto;
}

.challenge-register__title {
  font-size: 1.5rem;
  font-weight: 500;
  color: #0c0a09;
  letter-spacing: -0.01em;
}

.challenge-register__steps {
  margin-top: 1rem;
  list-style: decimal;
  padding-left: 1.25rem;
}

.challenge-register__steps li {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #4e4e4e;
}

.challenge-register__steps li + li {
  margin-top: 0.5rem;
}

.challenge-register__contact {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #777169;
}

.challenge-register__actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.challenge-section-head {
  margin-bottom: 1.5rem;
}

.challenge-section-head .label {
  margin-bottom: 0.5rem;
}

/* 天梯榜 — 赛事状态栏 */
.lb-status-bar {
  position: sticky;
  top: 4rem;
  z-index: 40;
  border-bottom: 1px solid #e7e5e4;
  background: linear-gradient(135deg, #0c0a09 0%, #292524 100%);
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.lb-status-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lb-status-bar__pool {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
}

.lb-status-bar__pool-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a8a29e;
}

.lb-status-bar__amount {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .lb-status-bar__amount {
    font-size: 1.875rem;
  }
}

.lb-status-bar__divider {
  color: #57534e;
}

.lb-status-bar__countdown {
  text-align: right;
}

.lb-status-bar__countdown-label {
  font-size: 0.75rem;
  color: #a8a29e;
}

.lb-status-bar__countdown-value {
  margin-top: 0.25rem;
  font-size: 1.125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* 天梯榜表格 */
.lb-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  background: #fff;
}

.lb-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.lb-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 500;
  color: #777169;
  background: #fafafa;
  border-bottom: 1px solid #e7e5e4;
  white-space: nowrap;
}

.lb-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f0efed;
  vertical-align: middle;
}

.lb-table tbody tr:last-child td {
  border-bottom: none;
}

.lb-table tbody tr:hover {
  background: #fafafa;
}

.lb-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  font-weight: 500;
  color: #0c0a09;
}

.lb-rank--top {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #0c0a09;
  color: #fff;
  font-size: 0.8125rem;
}

.lb-rank--top.lb-rank--2 {
  background: #44403c;
}

.lb-rank--top.lb-rank--3 {
  background: #78716c;
}

.lb-score {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #0c0a09;
}

.lb-radar-cell {
  position: relative;
}

.lb-radar-thumb {
  display: inline-flex;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.lb-radar-thumb svg {
  display: block;
  width: 3rem;
  height: 3rem;
}

.lb-radar-popover {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 30;
  margin-top: 0.5rem;
  width: 14rem;
  border-radius: 0.75rem;
  border: 1px solid #e7e5e4;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.lb-radar-cell.is-open .lb-radar-popover,
.lb-radar-thumb:hover + .lb-radar-popover,
.lb-radar-popover:hover {
  display: block;
}

.lb-radar-popover svg {
  width: 100%;
  height: auto;
}

.lb-radar-popover__dims {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: #4e4e4e;
}

.lb-radar-popover__dims dt {
  color: #777169;
}

.lb-radar-popover__dims dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: #0c0a09;
}

.lb-my-rank {
  display: none;
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  background: linear-gradient(135deg, #fafafa 0%, #fff 100%);
  padding: 1rem 1.25rem;
}

.lb-my-rank.is-visible {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.lb-my-rank__score {
  font-size: 1.125rem;
  font-weight: 500;
  color: #0c0a09;
}

/* 战报与信任区 */
.lb-trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .lb-trust-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.lb-daily-card {
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  background: #fff;
  padding: 1.25rem;
}

.lb-daily-card__title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777169;
}

.lb-daily-stats {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .lb-daily-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.lb-daily-stat__value {
  font-size: 1.25rem;
  font-weight: 500;
  color: #0c0a09;
  font-variant-numeric: tabular-nums;
}

.lb-daily-stat__label {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #777169;
}

.lb-payout-ticker {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #e7e5e4;
  background: #fff;
}

.lb-payout-ticker__head {
  padding: 1rem 1.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777169;
}

.lb-payout-ticker__track {
  overflow: hidden;
  padding: 0.75rem 0 1rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.lb-payout-ticker__list {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: lb-ticker-scroll 40s linear infinite;
  padding-left: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .lb-payout-ticker__list {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    padding: 0 1.25rem 0.75rem;
  }
}

@keyframes lb-ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.lb-payout-item {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: #4e4e4e;
  white-space: nowrap;
}

.lb-payout-item strong {
  color: #0c0a09;
  font-weight: 500;
}

.lb-trust-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.875rem;
}

.lb-privacy-note {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #e7e5e4;
  background: #fafafa;
  font-size: 0.8125rem;
  line-height: 1.625;
  color: #777169;
}

.lb-updated {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #a8a29e;
}
