.hidden {
  display: none !important;
}

.app-hero {
  position: relative;
  margin: 16px 0 28px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.86) 27%, rgba(0, 0, 0, 0.46) 54%, rgba(0, 0, 0, 0.16) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.42) 100%),
    url("../assets/bg.jpg") center center / cover no-repeat;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.app-hero-inner {
  position: relative;
  min-height: 680px;
  padding: 48px 56px 42px;
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  align-items: stretch;
  gap: 28px;
}

.app-hero-inner::after {
  content: "";
  position: absolute;
  inset: auto auto 38px 56px;
  width: 300px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d71e18 0%, #ff3a32 68%, rgba(255, 58, 50, 0.12) 100%);
  box-shadow: 0 0 30px rgba(255, 58, 50, 0.18);
}

.topbar {
  position: relative;
  z-index: 5;
  margin-bottom: 10px;
  border-bottom: 0;
}

.top-nav {
  display: flex;
  gap: 34px;
}

.lang-dropdown {
  position: relative;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 132px;
  max-height: min(60vh, 320px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 18, 23, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  z-index: 30;
}

.lang-option {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  color: #d6d8de;
  background: transparent;
  text-align: left;
  font: 600 13px inherit;
  cursor: pointer;
}

.lang-option:hover,
.lang-option.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.topbar .top-nav .top-nav-language {
  display: none !important;
}

.desktop-lang-dropdown {
  display: block;
}

.top-nav-language-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(17, 18, 23, 0.92);
  color: #d8dae0;
  font: 600 14px inherit;
  cursor: pointer;
}

.top-nav-language-trigger span:last-child {
  color: #8f94a0;
  margin-left: 8px;
}

.topbar .brand,
.topbar .brand b {
  color: #ff3b33;
}

.topbar .top-nav a {
  color: rgba(255, 255, 255, 0.72);
}

.topbar .top-nav a:hover,
.topbar .top-nav a:first-child {
  color: #fff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 18, 23, 0.92);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.menu-toggle-lines {
  display: grid;
  gap: 4px;
}

.menu-toggle-lines span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fbbf24;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open .menu-toggle-lines span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-lines span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open .menu-toggle-lines span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
  padding-bottom: 62px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.hero-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.24));
  flex: 0 0 auto;
}

.hero-brand-text {
  min-width: 0;
  color: #f33b33;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.2px;
}

.hero-heading-en {
  margin: 0;
  color: #f02d27;
  font-size: clamp(56px, 6.5vw, 86px);
  line-height: 0.96;
  letter-spacing: -3px;
  font-weight: 700;
}

.hero-heading-zh {
  margin: 12px 0 0;
  color: #fff;
  font-size: clamp(48px, 6vw, 78px);
  line-height: 1;
  letter-spacing: -2px;
  font-weight: 800;
}

.hero-copy .lede,
.hero-desc-cn {
  max-width: 520px;
  margin: 34px 0 0;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.42;
  font-weight: 600;
}

.hero-desc-en {
  max-width: 520px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-actions {
  margin-top: 26px;
}

.hero-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 12, 18, 0.54);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-side {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-width: 260px;
}

.hero-badge-card {
  width: min(100%, 310px);
  margin-bottom: 24px;
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(12, 12, 18, 0.58) 0%, rgba(12, 12, 18, 0.32) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-badge-card span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  margin-bottom: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-badge-card strong {
  display: block;
  font-size: 30px;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.12;
}

.hero-badge-card small {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.7;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: start;
}

.field-shell {
  display: grid;
  gap: 10px;
}

.field-shell .field-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.field-shell .input-wrap {
  height: auto;
  min-height: 54px;
  padding-right: 14px;
}

.field-shell .input-wrap input {
  font-size: 14px;
}

.input-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.ghost-action,
.primary-action {
  min-height: 44px;
  border-radius: 12px;
  font: 600 13px inherit;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ghost-action {
  background: #1b1d24;
  color: #c5a96c;
}

.primary-action {
  width: 100%;
  border: 0;
  color: #17110a;
  background: linear-gradient(100deg, #fbbf24, #f97316);
  box-shadow: 0 12px 30px rgba(255, 121, 69, 0.17);
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

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

.mini-stats article {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.mini-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 8px;
}

.mini-stats strong {
  font-size: 18px;
  color: #fff;
  word-break: break-word;
}

.status-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.status-line strong {
  color: #fff;
  font-weight: 600;
}

.link-card {
  display: grid;
  gap: 14px;
}

.link-box {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.link-box-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.link-box-value {
  display: block;
  margin-top: 10px;
  color: #fff;
  line-height: 1.7;
  word-break: break-all;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-row > * {
  flex: 1;
}

.order-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d7d9df;
  font-size: 12px;
  line-height: 1.75;
}

.order-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.pager-info {
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  min-width: min(92vw, 260px);
  max-width: min(92vw, 420px);
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
  background: rgba(8, 8, 14, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
  text-align: center;
  font-size: 13px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(5, 4, 14, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  width: min(100%, 400px);
  border-radius: 22px;
  padding: 20px;
  background: rgba(12, 8, 26, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  color: #fff;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-text {
  color: rgba(232, 225, 255, 0.72);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.modal-field {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.modal-field input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  padding: 0;
}

.modal-error {
  min-height: 20px;
  margin-top: 10px;
  color: #ffb4c8;
  font-size: 12px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.modal-actions button {
  flex: 1;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1080px);
  }

  .topbar {
    height: 72px;
    gap: 10px;
  }

  .header-actions {
    gap: 8px;
    margin-left: auto;
  }

  .wallet {
    max-width: 150px;
    padding: 0 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-hero {
    min-height: auto;
    background-position: 68% center;
  }

  .app-hero-inner {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 22px 28px;
  }

  .hero-brand {
    gap: 12px;
    margin-bottom: 14px;
  }

  .hero-brand-logo {
    width: 54px;
    height: 54px;
  }

  .hero-copy,
  .hero-side {
    max-width: 100%;
    min-width: 0;
    padding-bottom: 0;
  }

  .app-hero-inner::after {
    left: 22px;
    bottom: 20px;
    width: 160px;
    height: 6px;
  }

  .hero-brand-text {
    font-size: 14px;
  }

  .hero-heading-en {
    font-size: 40px;
    letter-spacing: -1.2px;
  }

  .hero-heading-zh {
    margin-top: 8px;
    font-size: 40px;
    letter-spacing: -1px;
  }

  .hero-copy .lede,
  .hero-desc-cn {
    margin-top: 22px;
    font-size: 18px;
    line-height: 1.45;
  }

  .hero-desc-en {
    margin-top: 14px;
    font-size: 11px;
    line-height: 1.5;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .hero-link-btn {
    width: 100%;
  }

  .hero-badge-card {
    padding: 16px;
    width: 100%;
    margin-bottom: 0;
  }

  .hero-badge-card strong {
    font-size: 22px;
    letter-spacing: -0.4px;
  }

  .split-grid,
  .mini-stats,
  .modal-actions {
    grid-template-columns: 1fr;
  }

  .mini-stats article,
  .link-box,
  .order-item {
    padding: 14px;
  }

  .panel {
    padding: 18px;
    border-radius: 20px;
  }

  .panel-heading,
  .status-line,
  .order-item-head,
  .pager {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-heading {
    gap: 12px;
    margin-bottom: 18px;
  }

  .panel h2 {
    font-size: 22px;
  }

  .status-line {
    gap: 8px;
  }

  .status-line strong {
    display: block;
  }

  .field-shell .input-wrap {
    padding-right: 10px;
  }

  .input-topline {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .input-wrap input {
    min-width: 0;
  }

  .action-row,
  .action-row > *,
  .modal-actions button,
  .pager button,
  .ghost-action,
  .primary-action {
    width: 100%;
  }

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

  .pager-info {
    width: 100%;
    text-align: left;
  }

  footer {
    gap: 12px;
    text-align: center;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .desktop-lang-dropdown {
    display: none !important;
  }

  .top-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 12, 18, 0.96);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 20;
  }

  .top-nav.is-open {
    display: flex;
  }

  .top-nav a {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    color: #d8dae0;
  }

  .top-nav a + a {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .topbar .top-nav .top-nav-language {
    display: block !important;
    width: 100%;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .top-nav .top-nav-language-trigger {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
  }

  .top-nav .lang-menu {
    position: static;
    margin-top: 8px;
    box-shadow: none;
  }
}
