.coin-statistics-body {
  min-height: 100vh;
  background-color: #020504;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7)),
    url("../static/image/team-earth-bg.png");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.coin-statistics-body .header {
  border-bottom: 1px solid rgba(159, 255, 210, 0.08);
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.coin-statistics-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  overflow: hidden;
}

.coin-statistics-hero {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 154px 0 58px;
  text-align: center;
}

.coin-statistics-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.coin-statistics-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(48px, 5.5vw, 76px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
}

.coin-statistics-rule {
  position: relative;
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(159, 255, 210, 0.74);
  cursor: help;
  transition: transform 180ms ease, color 180ms ease, filter 180ms ease;
}

.coin-statistics-rule:hover,
.coin-statistics-rule:focus-visible {
  transform: translateY(-1px) scale(1.08);
  color: #9fffd2;
  filter: drop-shadow(0 0 6px rgba(105, 255, 190, 0.42));
  outline: none;
}

.coin-statistics-rule > svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.coin-statistics-rule-tip {
  position: absolute;
  z-index: 12;
  top: calc(100% + 13px);
  right: -10px;
  width: min(310px, calc(100vw - 28px));
  padding: 16px 18px;
  border: 1px solid rgba(159, 255, 210, 0.22);
  border-radius: 14px;
  background: rgba(4, 15, 11, 0.96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), 0 0 24px rgba(105, 255, 190, 0.08);
  color: rgba(226, 232, 228, 0.72);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}

.coin-statistics-rule-tip::before {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 100%;
  border: 7px solid transparent;
  border-bottom-color: rgba(159, 255, 210, 0.22);
}

.coin-statistics-rule-tip strong,
.coin-statistics-rule-tip span {
  display: block;
}

.coin-statistics-rule-tip strong {
  margin-bottom: 5px;
  color: #9fffd2;
  font-size: 14px;
}

.coin-statistics-rule:hover .coin-statistics-rule-tip,
.coin-statistics-rule:focus .coin-statistics-rule-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.coin-statistics-source {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
  color: rgba(226, 232, 228, 0.6);
  font-size: 14px;
  line-height: 1.5;
}

.coin-statistics-source a {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(159, 255, 210, 0.2);
  border-radius: 50%;
  background: rgba(159, 255, 210, 0.05);
  color: rgba(159, 255, 210, 0.72);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.coin-statistics-source a:hover {
  transform: translateY(-2px);
  border-color: rgba(159, 255, 210, 0.65);
  background: rgba(159, 255, 210, 0.13);
  color: #9fffd2;
  box-shadow: 0 0 20px rgba(105, 255, 190, 0.18);
}

.coin-statistics-source svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.coin-statistics-content {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 112px;
}

.coin-statistics-filterbar,
.coin-stat-metric,
.coin-stat-chart-card,
.coin-stat-history-card {
  border: 1px solid rgba(159, 255, 210, 0.12);
  background: linear-gradient(145deg, rgba(12, 29, 22, 0.76), rgba(4, 9, 7, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 26px 70px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.coin-statistics-filterbar {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
  gap: 14px;
  align-items: end;
  padding: 20px;
  border-radius: 22px;
}

.coin-statistics-field {
  display: grid;
  gap: 8px;
}

.coin-statistics-field > span {
  padding-left: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.coin-statistics-field select,
.coin-statistics-field input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  outline: none;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.coin-statistics-field select:focus,
.coin-statistics-field input:focus {
  border-color: rgba(159, 255, 210, 0.46);
}

.coin-statistics-field input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.55;
}

.coin-stat-picker {
  position: relative;
}

.coin-stat-picker-trigger {
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  outline: none;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.coin-stat-picker-trigger:hover,
.coin-stat-picker-trigger[aria-expanded="true"] {
  border-color: rgba(159, 255, 210, 0.42);
  background: rgba(4, 18, 12, 0.72);
}

.coin-stat-picker-trigger svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: rgba(159, 255, 210, 0.68);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.coin-stat-picker-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  border: 1px solid rgba(159, 255, 210, 0.18);
  border-radius: 14px;
  background: rgba(3, 12, 8, 0.98);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

.coin-stat-picker-panel[hidden] {
  display: none;
}

.coin-stat-trader-panel {
  display: grid;
  width: max(100%, 190px);
  max-height: 286px;
  gap: 3px;
  padding: 7px;
  overflow-y: auto;
  scrollbar-color: rgba(159, 255, 210, 0.3) transparent;
  scrollbar-width: thin;
}

.coin-stat-picker-option {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.coin-stat-picker-option:hover,
.coin-stat-picker-option.is-selected {
  background: rgba(159, 255, 210, 0.1);
  color: #9fffd2;
}

.coin-stat-calendar-panel {
  width: min(286px, calc(100vw - 64px));
  padding: 13px;
}

.coin-statistics-field:nth-child(3) .coin-stat-calendar-panel {
  right: 0;
  left: auto;
}

.coin-stat-calendar-head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.coin-stat-calendar-head strong {
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.coin-stat-calendar-head button {
  display: grid;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  place-items: center;
}

.coin-stat-calendar-head button:hover {
  border-color: rgba(159, 255, 210, 0.28);
  color: #9fffd2;
}

.coin-stat-calendar-head svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.coin-stat-calendar-week,
.coin-stat-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.coin-stat-calendar-week {
  margin-bottom: 5px;
}

.coin-stat-calendar-week span {
  color: rgba(255, 255, 255, 0.28);
  font-size: 9px;
  text-align: center;
}

.coin-stat-calendar-day,
.coin-stat-calendar-blank {
  aspect-ratio: 1;
}

.coin-stat-calendar-day {
  display: grid;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  cursor: pointer;
  place-items: center;
}

.coin-stat-calendar-day:hover {
  border-color: rgba(159, 255, 210, 0.22);
  background: rgba(159, 255, 210, 0.08);
  color: #9fffd2;
}

.coin-stat-calendar-day.is-today {
  border-color: rgba(159, 255, 210, 0.24);
  color: #9fffd2;
}

.coin-stat-calendar-day.is-selected {
  border-color: #9fffd2;
  background: #9fffd2;
  color: #07110c;
}

.coin-stat-calendar-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.coin-stat-calendar-actions button {
  min-width: 54px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  cursor: pointer;
}

.coin-stat-calendar-actions button:hover {
  border-color: rgba(159, 255, 210, 0.26);
  color: #9fffd2;
}

.coin-statistics-filter-actions {
  display: flex;
  gap: 8px;
}

.coin-statistics-button {
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.coin-statistics-button:hover {
  border-color: rgba(159, 255, 210, 0.35);
  color: #9fffd2;
  transform: translateY(-1px);
}

.coin-statistics-button.is-primary {
  border-color: rgba(159, 255, 210, 0.42);
  background: #9fffd2;
  color: #07110c;
}

.coin-statistics-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.coin-stat-metric {
  min-height: 124px;
  padding: 24px;
  border-radius: 20px;
}

.coin-stat-metric > span {
  display: block;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 11px;
  font-weight: 600;
}

.coin-stat-metric strong {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-family: "Departure Mono", "Geist Mono", monospace;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-stat-metric strong.pnl-positive {
  color: #9fffd2;
}

.coin-stat-metric strong.pnl-negative {
  color: #ff8d94;
}

.coin-statistics-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 0.88fr) minmax(0, 1.75fr);
  grid-template-rows: 240px 165px;
  gap: 14px;
  margin-top: 18px;
}

.coin-stat-chart-card {
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
  overflow: hidden;
}

.coin-stat-chart-card h2,
.coin-stat-history-heading h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 620;
}

.coin-stat-chart-card.is-equity {
  grid-column: 1;
  grid-row: 1;
}

.coin-stat-chart-card.is-sides {
  grid-column: 1;
  grid-row: 2;
}

.coin-stat-chart-card.is-win-rate {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.coin-stat-chart-card.is-ranking {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.coin-stat-chart-body {
  position: relative;
  height: calc(100% - 28px);
  margin-top: 14px;
}

.coin-stat-chart-body svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.coin-stat-chart-grid-line {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

.coin-stat-equity-line {
  fill: none;
  stroke: #52e6ad;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.coin-stat-equity-area {
  fill: url("#coin-stat-equity-gradient");
}

.coin-stat-chart-label {
  fill: rgba(255, 255, 255, 0.34);
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  font-weight: 500;
}

.coin-stat-equity-crosshair {
  stroke: rgba(159, 255, 210, 0.42);
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.coin-stat-equity-hover-point {
  fill: #9fffd2;
  stroke: rgba(4, 12, 8, 0.9);
  stroke-width: 3;
}

.coin-stat-equity-tooltip {
  position: absolute;
  z-index: 4;
  display: grid;
  min-width: 154px;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(159, 255, 210, 0.22);
  border-radius: 10px;
  background: rgba(3, 11, 7, 0.96);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
  pointer-events: none;
  transform: translate(-50%, -100%);
}

.coin-stat-equity-tooltip[hidden] {
  display: none;
}

.coin-stat-equity-tooltip span {
  color: rgba(255, 255, 255, 0.45);
  font-family: "Geist Mono", monospace;
  font-size: 9px;
  white-space: nowrap;
}

.coin-stat-equity-tooltip strong {
  font-family: "Departure Mono", "Geist Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.coin-stat-empty-chart {
  display: grid;
  height: 100%;
  place-items: center;
  color: rgba(255, 255, 255, 0.32);
  font-size: 11px;
}

.coin-stat-side-chart {
  display: flex;
  height: calc(100% - 28px);
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  padding-top: 18px;
}

.coin-stat-side-column {
  display: grid;
  width: 68px;
  height: 100%;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  gap: 8px;
  text-align: center;
}

.coin-stat-side-track {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: flex-end;
  border-radius: 7px 7px 3px 3px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.coin-stat-side-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #64f2bd, #23af7c);
}

.coin-stat-side-column.is-short .coin-stat-side-bar {
  background: linear-gradient(180deg, #ff9aa0, #da5f68);
}

.coin-stat-side-column strong {
  color: rgba(255, 255, 255, 0.85);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
}

.coin-stat-side-column span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
}

.coin-stat-donut-wrap {
  display: flex;
  height: calc(100% - 28px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding-top: 10px;
}

.coin-stat-donut {
  position: relative;
  display: grid;
  width: min(190px, 70%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#52e6ad 0 var(--win-rate, 0%), #ff747c var(--win-rate, 0%) 100%);
  place-items: center;
}

.coin-stat-donut::after {
  position: absolute;
  width: 56%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  background: #07100c;
  content: "";
}

.coin-stat-donut > span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Departure Mono", "Geist Mono", monospace;
  font-size: 22px;
  font-weight: 600;
}

.coin-stat-donut-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
}

.coin-stat-donut-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.coin-stat-donut-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52e6ad;
}

.coin-stat-donut-legend i.is-loss {
  background: #ff747c;
}

.coin-stat-donut-legend b {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.coin-stat-ranking {
  display: grid;
  height: calc(100% - 30px);
  align-content: start;
  gap: 12px;
  margin-top: 18px;
  overflow-y: auto;
  scrollbar-color: rgba(159, 255, 210, 0.28) transparent;
  scrollbar-width: thin;
}

.coin-stat-ranking-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.72fr) minmax(120px, 2fr) 78px;
  gap: 12px;
  align-items: center;
  min-height: 24px;
}

.coin-stat-ranking-name {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-stat-ranking-track {
  position: relative;
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.coin-stat-ranking-bar {
  height: 100%;
  min-width: 2px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(60, 210, 154, 0.62), #52e6ad);
}

.coin-stat-ranking-row.is-negative .coin-stat-ranking-bar {
  background: linear-gradient(90deg, rgba(255, 116, 124, 0.55), #ff747c);
}

.coin-stat-ranking-value {
  color: #9fffd2;
  font-family: "Geist Mono", monospace;
  font-size: 9px;
}

.coin-stat-ranking-row.is-negative .coin-stat-ranking-value {
  color: #ff8d94;
}

.coin-stat-history-card {
  margin-top: 18px;
  padding: 22px;
  border-radius: 22px;
}

.coin-stat-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.coin-stat-history-heading > span {
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
}

.coin-stat-table-scroll {
  overflow-x: auto;
  scrollbar-color: rgba(159, 255, 210, 0.24) transparent;
  scrollbar-width: thin;
}

.coin-stat-history-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.coin-stat-history-table th,
.coin-stat-history-table td {
  padding: 12px 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
  text-align: center;
  vertical-align: middle;
}

.coin-stat-history-table th {
  padding-top: 9px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.coin-stat-history-table tr:last-child td {
  border-bottom: 0;
}

.coin-stat-history-table th:nth-child(1),
.coin-stat-history-table td:nth-child(1) {
  width: 105px;
}

.coin-stat-history-table th:nth-child(2),
.coin-stat-history-table td:nth-child(2) {
  width: 98px;
}

.coin-stat-history-table th:nth-child(3),
.coin-stat-history-table td:nth-child(3) {
  width: 88px;
}

.coin-stat-history-table th:nth-child(4),
.coin-stat-history-table td:nth-child(4) {
  width: 46px;
}

.coin-stat-history-table th:nth-child(5),
.coin-stat-history-table td:nth-child(5) {
  width: 62px;
}

.coin-stat-history-table th:nth-child(6),
.coin-stat-history-table td:nth-child(6),
.coin-stat-history-table th:nth-child(7),
.coin-stat-history-table td:nth-child(7),
.coin-stat-history-table th:nth-child(8),
.coin-stat-history-table td:nth-child(8) {
  width: 132px;
}

.coin-stat-history-table th:nth-child(9),
.coin-stat-history-table td:nth-child(9),
.coin-stat-history-table th:nth-child(10),
.coin-stat-history-table td:nth-child(10),
.coin-stat-history-table th:nth-child(11),
.coin-stat-history-table td:nth-child(11) {
  width: 88px;
}

.coin-stat-history-table th:last-child,
.coin-stat-history-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #09140f;
  box-shadow: -12px 0 20px rgba(0, 0, 0, 0.24);
}

.coin-stat-history-table th:last-child {
  z-index: 3;
  background: #08110d;
}

@media screen and (min-width: 992px) {
  .coin-stat-history-table th:last-child,
  .coin-stat-history-table td:last-child {
    position: static;
    background: transparent;
    box-shadow: none;
  }
}

.coin-stat-time {
  display: grid;
  gap: 2px;
  font-family: "Geist Mono", monospace;
  line-height: 1.35;
}

.coin-stat-symbol,
.coin-stat-number {
  font-family: "Geist Mono", monospace;
}

.coin-stat-direction {
  font-weight: 700;
}

.coin-stat-direction.is-long,
.pnl-positive {
  color: #52e6ad !important;
}

.coin-stat-direction.is-short,
.pnl-negative {
  color: #ff747c !important;
}

.coin-stat-strategy {
  position: relative;
  display: inline-block;
}

.coin-stat-strategy summary {
  display: grid;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(92, 165, 255, 0.34);
  border-radius: 7px;
  background: rgba(65, 139, 239, 0.1);
  color: #7bb8ff;
  cursor: pointer;
  list-style: none;
  place-items: center;
}

.coin-stat-strategy summary::-webkit-details-marker {
  display: none;
}

.coin-stat-strategy summary svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.coin-stat-strategy-panel {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 8;
  width: 230px;
  padding: 13px;
  border: 1px solid rgba(159, 255, 210, 0.18);
  border-radius: 12px;
  background: rgba(3, 10, 7, 0.97);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  line-height: 1.65;
  text-align: left;
  transform: translateX(-50%);
}

.coin-stat-strategy-panel b {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}

.coin-stat-plan-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.coin-stat-plan-item {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  background: transparent;
  color: #e2e8f0;
  font-family: "Geist Mono", monospace;
  font-size: 9px;
  white-space: nowrap;
}

.coin-stat-plan-item b {
  display: grid;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  font-weight: 500;
  place-items: center;
}

.coin-stat-plan-item.hit {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(52, 211, 153, 0.18);
  box-shadow: inset 0 0 10px rgba(52, 211, 153, 0.25);
}

.coin-stat-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.coin-stat-page-button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  cursor: pointer;
}

.coin-stat-page-button:disabled {
  cursor: default;
  opacity: 0.3;
}

.coin-stat-page-label {
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
}

.coin-statistics-error {
  display: grid;
  margin-top: 18px;
  padding: 70px 24px;
  border: 1px dashed rgba(255, 116, 124, 0.28);
  border-radius: 22px;
  background: rgba(20, 4, 6, 0.54);
  place-items: center;
  text-align: center;
}

.coin-statistics-error[hidden] {
  display: none;
}

.coin-statistics-error strong {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}

.coin-statistics-error span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

@media screen and (max-width: 991px) {
  .coin-statistics-filterbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coin-statistics-filter-actions {
    align-self: end;
  }

  .coin-statistics-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coin-statistics-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 250px 175px 340px;
  }

  .coin-stat-chart-card.is-equity {
    grid-column: 1;
    grid-row: 1;
  }

  .coin-stat-chart-card.is-sides {
    grid-column: 1;
    grid-row: 2;
  }

  .coin-stat-chart-card.is-win-rate {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .coin-stat-chart-card.is-ranking {
    grid-column: 1 / span 2;
    grid-row: 3;
  }
}

@media screen and (max-width: 767px) {
  .coin-statistics-hero,
  .coin-statistics-content {
    width: min(100% - 28px, 1240px);
  }

  .coin-statistics-hero {
    padding: 120px 0 48px;
  }

  .coin-statistics-hero h1 {
    font-size: 42px;
  }

  .coin-statistics-title-row {
    gap: 10px;
    margin-top: 14px;
  }

  .coin-statistics-filterbar {
    grid-template-columns: 1fr;
    padding: 17px;
    border-radius: 18px;
  }

  .coin-statistics-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coin-statistics-metrics {
    gap: 10px;
    margin-top: 12px;
  }

  .coin-stat-metric {
    min-height: 104px;
    padding: 18px 15px;
    border-radius: 17px;
  }

  .coin-stat-metric > span {
    min-height: 28px;
    margin-bottom: 10px;
    font-size: 9px;
    line-height: 1.5;
  }

  .coin-stat-metric strong {
    font-size: clamp(17px, 5.2vw, 22px);
  }

  .coin-statistics-chart-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 250px 175px 320px 350px;
    gap: 12px;
    margin-top: 12px;
  }

  .coin-stat-chart-card.is-equity,
  .coin-stat-chart-card.is-sides,
  .coin-stat-chart-card.is-win-rate,
  .coin-stat-chart-card.is-ranking {
    grid-column: 1;
  }

  .coin-stat-chart-card.is-equity {
    grid-row: 1;
  }

  .coin-stat-chart-card.is-sides {
    grid-row: 2;
  }

  .coin-stat-chart-card.is-win-rate {
    grid-row: 3;
  }

  .coin-stat-chart-card.is-ranking {
    grid-row: 4;
  }

  .coin-stat-chart-card {
    padding: 17px;
    border-radius: 18px;
  }

  .coin-stat-ranking-row {
    grid-template-columns: 80px minmax(100px, 1fr) 68px;
    gap: 8px;
  }

  .coin-stat-history-card {
    margin-top: 12px;
    padding: 17px;
    border-radius: 18px;
  }

  .coin-stat-table-scroll {
    margin-right: -17px;
    margin-left: -17px;
    padding: 0 17px 7px;
  }

  .coin-stat-history-heading {
    align-items: flex-start;
    gap: 10px;
  }

  .coin-stat-history-table {
    min-width: 1060px;
  }

  .coin-statistics-content {
    padding-bottom: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .coin-statistics-button {
    transition: none;
  }
}
