* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: #f5f6fa;
  color: #1f2937;
  overflow-x: hidden;
}

.fall-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.fall-item {
  position: fixed;
  top: -10vh;
  user-select: none;
  pointer-events: none;
  z-index: 1;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  animation-name: fall-down;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  will-change: transform;
}

@keyframes fall-down {
  to {
    transform: translateY(120vh) rotate(360deg);
  }
}

.top-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #2563eb !important;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.25;
  padding: 5px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.top-banner:hover,
.top-banner:active,
.top-banner:visited {
  color: #ffffff;
  text-decoration: none;
}

.page {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 28px auto;
  padding: 0 16px 36px;
}

.vip-page .page {
  max-width: 1220px;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

h1,
h2 {
  margin: 0 0 10px;
  font-weight: 700;
  text-align: center;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 26px;
}

p {
  margin: 8px 0;
  line-height: 1.55;
  text-align: center;
}

.section-head {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 10px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  justify-content: center;
}

.tab {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.tab.active {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.label {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 600;
}

.input-row {
  display: flex;
  gap: 8px;
}

input[type="text"] {
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  text-align: center;
}

input[type="text"]::placeholder {
  text-align: center;
}

.primary {
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  padding: 10px 16px;
  cursor: pointer;
}

.copy-box {
  margin-top: 10px;
  margin-right: 100px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

code {
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
  text-align: center;
  padding: 0 12px;
}

.copy-btn {
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
  position: absolute;
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
}

.links a {
  color: #2563eb;
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

.tips {
  color: #6b7280;
}

.panel {
  background: #fff;
  border: 1px solid #d8dce6;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.panel-title {
  background: #eef0f6;
  text-align: center;
  padding: 8px;
  font-weight: 700;
  color: #1f2937;
}

.panel-body {
  padding: 8px 10px;
}

.result-lines p {
  margin: 0;
  text-align: center;
  border-bottom: 1px solid #edf0f5;
  padding: 6px 4px;
  overflow-wrap: anywhere;
}

#currentAddress {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.result-lines p:last-child {
  border-bottom: none;
}

.ok-badge {
  display: inline-block;
  background: #22c55e;
  color: #fff;
  border-radius: 2px;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  font-size: 11px;
}

.filter-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin: 6px 0;
  flex-wrap: wrap;
}

.filter-row input[type="date"] {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 4px 8px;
}

.summary-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 6px 0;
  font-size: 16px;
}

.gold-btn {
  background: #f59e0b;
  padding: 8px 22px;
}

.okx-box {
  border: none;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
}

.okx-box p {
  margin: 4px 0;
}

#usdtCnyTitle {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.price-num,
.okx-box .price-num,
#usdtTrxLine .price-num {
  color: #16a34a !important;
  font-weight: 700;
}

.tips-bar {
  text-align: center;
  font-size: 14px;
  color: #374151;
  margin: 8px 0;
  font-weight: 700;
}

.tx-template th {
  background: #eef0f6;
}

.tx-template td,
.tx-template th {
  border: 1px solid #e5e7eb;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0 6px;
}

.page-btn {
  min-width: 34px;
  height: 32px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  color: #1f2937;
  font-size: 13px;
}

.page-btn.active {
  border-color: #22c55e;
  color: #16a34a;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-dots {
  color: #6b7280;
  padding: 0 2px;
}

.amount-badge {
  display: inline-block;
  border-radius: 4px;
  color: #fff;
  min-width: 38px;
  text-align: center;
  font-weight: 700;
  padding: 2px 6px;
}

.amount-in {
  background: #22c55e;
}

.amount-out {
  background: #ef4444;
}

.tx-table tbody tr {
  cursor: pointer;
}

.tx-table tbody tr:hover {
  background: #f8fafc;
}

.tx-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.tx-modal[hidden] {
  display: none !important;
}

.tx-modal-card {
  width: min(1400px, 100%);
  background: #efefef;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: none;
}

.tx-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px 8px;
}

.tx-modal-header h3 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #111827;
}

.tx-modal-close {
  border: none;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #9ca3af;
}

.tx-modal-body {
  padding: 0 18px 14px;
}

.tx-detail-row {
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #d1d5db;
  padding: 6px 0;
}

.tx-detail-label {
  width: 74px;
  flex: 0 0 74px;
  font-size: 28px;
  color: #374151;
  text-align: left;
}

.tx-detail-value {
  flex: 1;
  min-width: 0;
  font-size: 28px;
  color: #111827;
  text-align: left;
  word-break: break-all;
}

.addr-btn {
  display: inline-block;
  margin-left: 10px;
  font-size: 22px;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 3px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #f9fafb;
}

.stat-label {
  margin: 0 0 6px;
  color: #6b7280;
  font-size: 13px;
}

.stat-value {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

.tx-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

.tx-table th,
.tx-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.tx-table th {
  color: #4b5563;
  font-weight: 700;
}

.tx-table th:nth-child(1),
.tx-table td:nth-child(1) {
  width: 60px;
  white-space: nowrap;
}

.tx-table th:nth-child(2),
.tx-table td:nth-child(2) {
  width: 100px;
  white-space: nowrap;
}

.tx-table th:nth-child(3),
.tx-table td:nth-child(3) {
  width: 160px;
  white-space: nowrap;
}

.tx-table th:nth-child(4),
.tx-table td:nth-child(4) {
  width: 330px;
  white-space: nowrap;
}

.tx-table th:nth-child(5),
.tx-table td:nth-child(5) {
  width: auto;
  white-space: nowrap;
}

.full-address,
.full-hash,
.full-hash a {
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
}

.full-address {
  font-weight: 700;
}

.full-hash a {
  color: #1f2937;
  text-decoration: none;
}

@media (max-width: 640px) {
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 21px;
  }

  .section-head {
    font-size: 21px;
  }

  #usdtCnyTitle {
    font-size: 21px;
  }

  .input-row {
    flex-direction: column;
  }

  input[type="text"] {
    font-size: 16px;
  }

  .primary {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .summary-row {
    flex-direction: column;
    gap: 6px;
    align-items: center;
  }

  .result-lines p {
    font-size: 18px;
    line-height: 1.35;
    padding: 8px 6px;
  }

  .result-lines p strong {
    display: inline;
  }

  #currentAddress {
    display: inline;
    margin-top: 0;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0;
    text-align: inherit;
    white-space: nowrap;
  }

  .top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100vw;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    font-size: 16px;
    text-align: center;
    background-color: #2563eb !important;
    background-image: none !important;
  }

  body {
    padding-top: 34px;
  }

  .tx-modal {
    padding: 8px;
    align-items: center;
    justify-content: center;
  }

  .tx-modal-card {
    width: 100%;
    max-width: 100%;
  }

  .tx-modal-header {
    padding: 8px 10px 6px;
  }

  .tx-modal-header h3 {
    font-size: 16px;
  }

  .tx-modal-close {
    font-size: 22px;
  }

  .tx-modal-body {
    padding: 0 10px 10px;
  }

  .tx-detail-row {
    gap: 5px;
    padding: 6px 0;
  }

  .tx-detail-label {
    width: 56px;
    flex: 0 0 56px;
    font-size: 14px;
  }

  .tx-detail-value {
    font-size: 14px;
    line-height: 1.3;
  }

  .addr-btn {
    margin-left: 4px;
    font-size: 12px;
    padding: 4px 6px;
  }

  .copy-box {
    margin-right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .copy-box code {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0 4px;
  }

  .copy-btn {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    padding: 10px 12px;
  }
}