/* ═══════════════════════════════════════════
   Page: Tokenomics
   ═══════════════════════════════════════════ */

.tokenomics {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.supply {
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 800;
  color: var(--color-heading);
  text-align: center;
  font-family: "Geist", "Trebuchet MS", "Segoe UI", sans-serif;
}

.chart-wrap {
  width: min(1280px, 100%);
  aspect-ratio: 5 / 4;
  overflow: visible;
}

#tokenomicsChart {
  width: 100%;
  height: 100%;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#tokenomicsChart * {
  -webkit-tap-highlight-color: transparent;
}

.slice {
  cursor: pointer;
  transition: transform 0.2s ease;
  transform-origin: 450px 350px;
  outline: none;
}

.slice:hover {
  transform: scale(1.04);
}

.slice:focus,
.slice:focus-visible {
  outline: none;
}

.slice-outline {
  stroke: var(--chart-slice-outline);
  stroke-width: 2;
}

.label-group text {
  font-size: 12px;
  fill: var(--chart-label-color);
  font-weight: 900;
}

.label-name {
  font-weight: 900;
  stroke: var(--chart-label-color);
  stroke-width: 0.6px;
  paint-order: stroke fill;
}

.label-value {
  font-size: 12px;
  font-weight: 800;
  fill: var(--color-dark, #1b1207);
}

.label-percent {
  fill: var(--chart-label-percent);
}

.label-group.active .label-value {
  font-size: 14px;
}

.label-group.active text {
  font-size: 14px;
}

.label-line {
  fill: none;
  stroke: var(--chart-line-color);
  stroke-width: 2;
}

/* Whale stage */
.whale-stage {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.whale-flow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  display: flex;
  align-items: center;
}

.whale-flow-track {
  position: absolute;
  left: 0;
  width: max-content;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  animation: whaleFlow 4.25s linear infinite;
  will-change: transform;
}

.whale-flow-row {
  display: flex;
  align-items: center;
  gap: 48px;
  height: 100%;
  flex: 0 0 auto;
}

.whale-float {
  height: auto;
  max-height: 90%;
  width: auto;
}

@keyframes whaleFlow {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Whale calculator */
.whale-calc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(820px, 96vw);
  padding: 18px 22px;
  background: var(--whale-bg);
  border: 2px solid rgba(119, 61, 0, 0.2);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.whale-title {
  font-size: clamp(20px, 3.2vw, 26px);
  font-weight: 800;
  color: var(--color-heading);
  font-family: "Geist", "Trebuchet MS", "Segoe UI", sans-serif;
}

.whale-fields {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  width: 100%;
  align-items: center;
}

.whale-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.whale-label {
  font-weight: 800;
  color: var(--chart-label-color);
  font-size: 18px;
}

.whale-input {
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--whale-input-border);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark, #1b1207);
  background: var(--whale-input-bg);
}

.whale-input:focus {
  outline: none;
  border-color: var(--whale-input-focus);
  box-shadow: 0 0 0 3px rgba(201, 117, 14, 0.2);
}

.whale-hint {
  font-size: 16px;
  color: #6b3b05;
  text-align: center;
}

.whale-divider {
  font-size: 24px;
  font-weight: 800;
  color: var(--chart-label-color);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid var(--whale-input-border);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Holder table */
.holder-table {
  width: min(820px, 96vw);
  margin-top: 0;
  border-collapse: collapse;
  background: var(--table-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.holder-stage {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 5px;
}

.holder-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 800;
  color: var(--chart-label-color);
  background: var(--table-header-bg);
}

.holder-table tbody td {
  padding: 16px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--chart-label-color);
  border-top: 1px solid var(--table-border);
}

.tier-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tier-icon {
  width: 60%;
  height: 60px;
  object-fit: contain;
}

.holder-table tbody tr.active {
  background: var(--table-active-bg);
}

.tier-range {
  color: #5c3308;
}

.tier-check {
  font-size: 18px;
  color: var(--table-check-color);
  opacity: 0.2;
  transition: opacity 0.2s ease;
}

.holder-table tbody tr.active .tier-check {
  opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .whale-stage {
    margin-top: 20px;
  }
}

@media (max-width: 720px) {
  .whale-fields {
    grid-template-columns: 1fr;
  }

  .whale-divider {
    display: none;
  }
}

@media (max-width: 640px) {
  .chart-wrap {
    aspect-ratio: 1 / 1;
  }

  .label-group text {
    font-size: 10px;
  }

  .label-group.active text {
    font-size: 12px;
  }

  .holder-stage {
    display: block;
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }

  .holder-table {
    width: 100%;
    min-width: 560px;
  }

  .whale-flow-row {
    gap: 24px;
  }
}
