:root {
  color-scheme: dark;
  --bg: #0c0d0d;
  --panel: #1a2228;
  --panel-soft: rgba(255, 255, 255, 0.08);
  --muted: #979797;
  --gold: #f3daa5;
  --green: #aad589;
  --red: #fc6e6d;
  --blue: #57bfff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: #fff;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial,
    sans-serif;
}

button {
  border: 0;
  padding: 0;
  color: inherit;
  background: none;
  font: inherit;
}

.home {
  min-height: 100vh;
  background:
    url("static/imgs/home/top_bg.png") no-repeat left top / 100% 53.333vw,
    var(--bg);
  padding: max(18px, env(safe-area-inset-top)) 16px
    calc(106px + env(safe-area-inset-bottom));
}

.top {
  max-width: 430px;
  margin: 0 auto;
}

.bar {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.logo {
  width: 115px;
  height: 28px;
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.search {
  height: 32px;
  min-width: 122px;
  padding: 0 12px 0 9px;
  border-radius: 16px;
  background: #252525;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  white-space: nowrap;
}

.search-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid #d4d4d4;
  border-radius: 50%;
  flex: 0 0 auto;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: #d4d4d4;
  transform: rotate(45deg);
}

.banner {
  position: relative;
  height: 104px;
  overflow: hidden;
  margin-bottom: 13px;
}

.banner-track {
  height: 104px;
  display: flex;
  transition: transform 320ms ease;
}

.banner-item {
  width: 100%;
  height: 104px;
  flex: 0 0 100%;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.banner-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.dot {
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: #aaa;
}

.dot.active {
  background: #fff;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: 430px;
  margin: 0 auto;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  background: rgba(12, 13, 13, 0.96);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  height: 30px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 15px;
  white-space: nowrap;
}

.asset-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(243, 218, 165, 0.95), rgba(49, 100, 111, 0.95)),
    #31646f;
  position: relative;
}

.asset-icon::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  transform: rotate(45deg);
}

.tab.active {
  color: #fff;
  font-weight: 600;
  border-bottom: 3px solid #31646f;
}

.content {
  max-width: 430px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.state {
  padding: 32vw 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.load-more {
  padding: 8px 0 22px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  font-size: 13px;
}

.spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto 14px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.goods-card {
  margin-bottom: 15px;
  border-radius: 13px;
  overflow: hidden;
  background: var(--panel);
}

.goods-media {
  position: relative;
  height: min(350px, calc((100vw - 32px) * 1.02));
  background: #2a2c3e;
}

.goods-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("static/image.png") center top / 100% auto no-repeat;
  opacity: 0.9;
}

.goods-media > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 13px;
  object-fit: cover;
}

.badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #060606;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--green);
  font-size: 12px;
}

.badge img {
  width: 16px;
  height: 16px;
}

.badge.red {
  color: var(--red);
}

.badge.grey {
  color: #abceea;
}

.airdrop {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 0 10px;
  border-radius: 2px;
  background: var(--gold);
  color: #000;
  line-height: 30px;
  font-size: 13px;
}

.goods-info {
  padding: 10px 15px 11px;
}

.goods-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  color: #f3f3f3;
  min-width: 0;
}

.goods-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-icon {
  height: 17px;
  flex: 0 0 auto;
}

.labels {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.limit,
.label {
  height: 18px;
  border-radius: 3px;
  background: #30373c;
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}

.limit strong {
  height: 18px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 400;
}

.limit span,
.label {
  padding: 2px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.author {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
}

.author img {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.author span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.date-card {
  margin-bottom: 15px;
  padding: 18px 10px;
  border-radius: 20px;
  background: linear-gradient(
    137deg,
    rgba(72, 72, 72, 0.42) 0%,
    rgba(71, 71, 71, 0.18) 100%
  );
}

.date-goods {
  height: 115px;
  display: flex;
  gap: 10px;
}

.date-img {
  position: relative;
  width: 115px;
  height: 115px;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

.schedule-badge {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #060606;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--green);
  font-size: 11px;
}

.schedule-badge img {
  width: 14px;
  height: 14px;
}

.schedule-badge.red {
  color: var(--red);
}

.schedule-badge.grey {
  color: #abceea;
}

.date-img > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.date-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.date-name {
  width: 80%;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.date-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.date-price {
  font-size: 20px;
  font-weight: 700;
}

.buy-btn {
  min-width: 70px;
  height: 28px;
  padding: 0 14px;
  border-radius: 18px;
  background: #f3e0bc;
  color: #0e0d35;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.buy-btn.disabled {
  background: #666;
  color: #999;
}

.date-time {
  height: 36px;
  margin-top: 10px;
  padding: 0 15px;
  border-radius: 12px;
  background: rgba(87, 191, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--blue);
  font-size: 13px;
}

.date-rule {
  opacity: 0.8;
  cursor: pointer;
}

.schedule-steps-container {
  margin-top: 5px;
  padding: 10px 0 28px;
  height: 82px;
  position: relative;
}

.schedule-step-line-future {
  position: absolute;
  top: 31px;
  left: 10px;
  right: 10px;
  height: 3px;
  background: #4a4a4a;
  z-index: 2;
}

.schedule-step-line-active {
  position: absolute;
  top: 31px;
  left: 10px;
  height: 3px;
  background: linear-gradient(90deg, #b35aff 0%, #2dafff 100%);
  z-index: 3;
}

.schedule-steps-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
}

.schedule-step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-top: 76px;
}

.schedule-step-item.active .schedule-step-time {
  color: #57bfff;
}

.schedule-step-title {
  position: absolute;
  top: 0;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
  z-index: 1;
}

.schedule-step-title.completed {
  color: rgba(255, 255, 255, 0.5);
}

.schedule-step-title.active {
  color: #57bfff;
}

.schedule-step-title.future {
  color: #ffffff;
}

.schedule-step-time {
  width: 100%;
  position: absolute;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 14px;
  text-align: center;
  z-index: 1;
}

.schedule-step-date {
  top: 44px;
}

.schedule-step-clock {
  top: 58px;
}

.schedule-step-dot {
  position: absolute;
  top: 19px;
  width: 14px;
  height: 16px;
  background: url("static/imgs/yxg_dot.png") no-repeat center / 100% 100%;
  z-index: 4;
}

.schedule-step-dot.future {
  background: url("static/imgs/yxg_dot_2.png") no-repeat center / 6px 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  max-width: calc(100vw - 48px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 13px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

.app-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: calc(74px + env(safe-area-inset-bottom));
  padding: 0 max(34px, calc((100vw - 430px) / 2 + 34px))
    env(safe-area-inset-bottom);
  background: #171919;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  display: grid;
  grid-template-columns: 1fr 78px 1fr;
  align-items: center;
}

.tabbar-item {
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding-bottom: 7px;
  color: #a4a7ab;
  font-size: 12px;
  line-height: 17px;
}

.tabbar-item.active {
  color: #fff;
}

.tabbar-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.tabbar-mid {
  width: 60px;
  height: 75px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  filter: drop-shadow(0 3px 8px rgba(74, 144, 226, 0.3));
  transform: translateY(-18px);
}

.tabbar-mid img {
  width: 60px;
  height: 75px;
  object-fit: contain;
}

@media (min-width: 700px) {
  .home {
    background-size: 430px 230px;
    background-position: center top;
  }
}
/* login info bar */
.login-bar {
  position: fixed;
  left: 50%;
  bottom: calc(74px + env(safe-area-inset-bottom) + 20px);
  transform: translateX(-50%);
  width: 85%;
  height: 94px;
  border-radius: 26px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 9999;
}
.login-bar .login-txt {
  color: #fff;
  font-size: 14px;
}
.login-bar .login-btn {
  background: var(--gold);
  border: none;
  color: #0e0d35;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

/* Detail Page */
.detail-page {
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

.detail-header {
  position: relative;
  width: 100%;
  height: 100vw;
  max-height: 500px;
  background: #1a1c2e;
  overflow: hidden;
}

.detail-header img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.back-btn {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  left: 16px;
  z-index: 100;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.back-btn::after {
  content: "";
  width: 10px;
  height: 10px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  margin-left: 4px;
}

.detail-main {
  padding: 20px 16px;
}

.detail-info {
  margin-bottom: 24px;
}

.detail-info .price {
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 8px;
}

.detail-info .name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.detail-info .tags {
  display: flex;
  gap: 8px;
}

.detail-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.detail-card .title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #fff;
}

.detail-card .desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-info img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.author-info .name {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.detail-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(80px + env(safe-area-inset-bottom));
  background: #171919;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 16px env(safe-area-inset-bottom);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.buy-group {
  flex: 1;
  height: 48px;
  background: var(--gold);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0e0d35;
  font-weight: 700;
  font-size: 16px;
}

.buy-group.disabled {
  background: #444;
  color: #888;
}

.nft-info {
  font-size: 12px;
  color: var(--muted);
}

.nft-info .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.nft-info .val {
  color: #fff;
}
