:root {
  --bg: #edf6f7;
  --surface: rgba(255, 255, 255, 0.82);
  --ink: #17233d;
  --muted: #69758a;
  --line: rgba(198, 216, 226, 0.72);
  --primary: #1683ff;
  --primary-dark: #0f68d8;
  --primary-soft: #e8f3ff;
  --notice: rgba(232, 247, 248, 0.78);
  --notice-line: rgba(168, 217, 223, 0.64);
  --price: #ff4d5e;
  --shadow: 0 18px 42px rgba(31, 74, 92, 0.11);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 16%, rgba(88, 158, 163, 0.36), transparent 34%),
    radial-gradient(circle at 16% 86%, rgba(255, 210, 222, 0.62), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(216, 238, 241, 0.94), transparent 36%),
    linear-gradient(120deg, #d7ebef 0%, #f7fbfb 48%, #e1f0ee 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(25, 77, 88, 0.28), transparent 230px),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.48), transparent 38%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 131, 255, 0.12);
}

input::placeholder {
  color: #a9b4c3;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 251, 251, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 200px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  background: #fff;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.nav-link {
  height: 68px;
  padding: 0 8px;
  background: transparent;
  color: #314461;
  border-bottom: 3px solid transparent;
  font-weight: 700;
}

.nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.link-btn {
  padding: 6px 2px;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
}

.notice-section {
  padding-top: 22px;
}

.notice-bar {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px 14px 48px;
  border: 1px solid var(--notice-line);
  border-radius: 999px;
  background: var(--notice);
  box-shadow: 0 18px 52px rgba(43, 93, 102, 0.12);
  backdrop-filter: blur(16px);
}

.notice-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.notice-bar strong {
  margin-right: 10px;
  color: #0f457c;
  font-size: 15px;
}

.notice-bar p {
  display: block;
  margin: 0;
  color: #18537f;
  font-size: 14px;
  line-height: 1.55;
}

.notice-bar p + p {
  margin-top: 4px;
}

.page {
  padding: 24px 0 46px;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.page-title h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.load-service-btn,
#queryButton,
#createOrder,
#authSubmit {
  height: 42px;
  border-radius: 10px;
  padding: 0 18px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.load-service-btn:hover,
#queryButton:hover,
#createOrder:hover,
#authSubmit:hover {
  background: var(--primary-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.shop-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.category-panel,
.goods-panel,
.query-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.category-panel {
  padding: 16px;
}

.panel-label {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.66);
  color: #314461;
  text-align: left;
  font-weight: 700;
}

.category-item.active,
.category-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.category-count {
  min-width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #d9ecff;
  color: var(--primary);
  font-size: 12px;
}

.goods-panel {
  padding: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-title h2 {
  margin: 0;
  font-size: 19px;
}

.search-box {
  width: min(300px, 100%);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
  padding-top: 16px;
}

.product-card {
  display: grid;
  gap: 14px;
  min-height: 188px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: #b7d9ff;
  box-shadow: 0 14px 34px rgba(32, 73, 122, 0.11);
}

.product-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.product-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.product-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
}

.product-meta,
.order-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.product-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.price {
  color: var(--price);
  font-size: 24px;
  font-weight: 900;
}

.buy-btn {
  height: 38px;
  border-radius: 10px;
  padding: 0 15px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.buy-btn:hover {
  background: var(--primary-dark);
}

.query-card {
  padding: 18px;
}

.query-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.order-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.order-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.order-card h3 {
  margin: 0;
  font-size: 17px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.refund {
  background: #fff2e8;
  color: #d46b08;
}

.order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.phone-box {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f9fc;
}

.phone-box span {
  color: var(--muted);
  font-weight: 800;
}

.phone-box strong {
  color: var(--ink);
  font-size: 20px;
  letter-spacing: 0;
  margin-left: 0;
  text-align: left;
}

.secret,
.sms-line {
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f7f9fc;
  color: #1c2d46;
  word-break: break-all;
}

.sms-line {
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
}

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

.order-tip {
  margin-top: 14px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.order-tip p {
  margin: 0;
}

.order-tip p + p {
  margin-top: 4px;
}

.muted-secret {
  color: var(--muted);
}

.pay-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 29, 49, 0.46);
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(16, 29, 49, 0.24);
}

.modal-card.small {
  width: min(420px, 100%);
}

.modal-card h2 {
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #f2f6fb;
  color: #4d5c72;
  font-size: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: #2d3d55;
  font-weight: 800;
}

.code-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
}

#sendCodeBtn {
  height: 42px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

#sendCodeBtn:hover {
  background: #d9ecff;
}

.modal-actions,
.payment-box {
  display: grid;
  gap: 10px;
}

.plain-btn {
  height: 38px;
  border-radius: 10px;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
}

.plain-btn:hover {
  background: var(--primary-soft);
}

.danger-btn {
  height: 38px;
  border-radius: 10px;
  padding: 0 15px;
  background: #fff2e8;
  color: #d4380d;
  font-weight: 800;
}

.danger-btn:hover {
  background: #ffd8bf;
}

.buy-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-right: 34px;
}

.buy-head strong {
  color: var(--price);
  font-size: 24px;
  white-space: nowrap;
}

.buy-grid {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
}

.pay-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 12px;
  background: #f7f9fc;
}

.pay-box strong {
  color: var(--price);
  font-size: 22px;
}

.payment-box {
  padding: 13px;
  border: 1px solid #b7d9ff;
  border-radius: 12px;
  background: var(--primary-soft);
}

.payment-box p {
  margin: 0;
  color: var(--muted);
}

.payment-box a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 16px;
  border-radius: 12px;
  background: #15233a;
  color: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

@media (max-width: 820px) {
  .nav-wrap {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .logo {
    min-width: auto;
  }

  .main-nav {
    order: 3;
    width: 100%;
  }

  .nav-link {
    height: 42px;
  }

  .notice-bar {
    border-radius: 14px;
  }

  .notice-bar p {
    display: block;
    margin-top: 3px;
  }

  .page-title,
  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-shell,
  .query-form,
  .buy-grid {
    grid-template-columns: 1fr;
  }

  .load-service-btn {
    width: 100%;
  }
}
