:root {
  --bg: #080c12;
  --panel: rgba(14, 22, 32, 0.82);
  --panel-solid: #101823;
  --line: rgba(141, 232, 255, 0.18);
  --text: #edf7ff;
  --muted: #9db0bf;
  --cyan: #55d7ff;
  --emerald: #70f0b6;
  --silver: #c7d3dd;
  --danger: #ff7878;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(85, 215, 255, 0.16), transparent 30rem),
    radial-gradient(circle at 92% 28%, rgba(112, 240, 182, 0.12), transparent 26rem),
    var(--bg);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 18, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(85, 215, 255, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(85, 215, 255, 0.95), rgba(112, 240, 182, 0.76)),
    #102231;
  box-shadow: 0 0 32px rgba(85, 215, 255, 0.32);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 690px;
  display: grid;
  align-items: center;
  padding: 88px clamp(18px, 5vw, 72px) 70px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 12, 18, 0.94) 0%, rgba(8, 12, 18, 0.72) 42%, rgba(8, 12, 18, 0.28) 100%),
    url("assets/hero-tech.png") center / cover no-repeat;
  opacity: 0.96;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow,
.plan-label,
.panel-kicker {
  margin: 0 0 14px;
  color: var(--emerald);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 740px;
  margin-bottom: 22px;
  font-size: clamp(42px, 6.7vw, 78px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
}

.hero-copy {
  max-width: 620px;
  color: var(--silver);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-btn,
.secondary-btn,
.plan-btn,
.send-btn,
.ghost-btn,
.mini-btn {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.primary-btn,
.plan-btn,
.send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #051018;
  background: linear-gradient(135deg, var(--cyan), var(--emerald));
  box-shadow: 0 14px 34px rgba(85, 215, 255, 0.22);
}

.secondary-btn,
.ghost-btn,
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn:hover,
.secondary-btn:hover,
.plan-btn:hover,
.send-btn:hover,
.ghost-btn:hover,
.mini-btn:hover {
  transform: translateY(-1px);
}

.send-btn:disabled,
.secondary-btn:disabled {
  cursor: not-allowed;
  color: rgba(237, 247, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  transform: none;
}

.full {
  width: 100%;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.trust-strip span {
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(7, 14, 22, 0.62);
  color: var(--silver);
  font-size: 14px;
}

.section {
  padding: 86px clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 840px;
  margin-bottom: 34px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.plan-card,
.checkout-panel,
.order-panel,
.tutorial-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 24, 35, 0.86), rgba(12, 18, 27, 0.72));
  box-shadow: var(--shadow);
}

.plan-card {
  position: relative;
  display: flex;
  min-height: 460px;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
}

.plan-card.featured {
  border-color: rgba(112, 240, 182, 0.5);
  background: linear-gradient(180deg, rgba(18, 35, 42, 0.92), rgba(12, 19, 29, 0.78));
}

.badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #06130f;
  background: var(--emerald);
  font-size: 13px;
  font-weight: 800;
}

.price {
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 42px;
  font-weight: 800;
}

.price span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

.plan-desc,
.tutorial-grid p,
.order-panel p,
.delivery-result p,
.footer p {
  color: var(--muted);
  line-height: 1.7;
}

.plan-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--silver);
}

.plan-card li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--emerald);
}

.purchase-band,
.admin-band {
  background: rgba(255, 255, 255, 0.025);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 18px;
}

.checkout-panel,
.order-panel {
  padding: 28px;
}

label {
  display: block;
  margin: 0 0 9px;
  color: var(--silver);
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 52px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

select option {
  color: #101823;
}

input:focus,
select:focus {
  border-color: rgba(85, 215, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(85, 215, 255, 0.14);
}

.order-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
}

.order-meta {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(85, 215, 255, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: rgba(85, 215, 255, 0.06);
}

.order-meta span {
  color: var(--muted);
  font-size: 13px;
}

.order-meta strong {
  color: var(--cyan);
  font-size: 18px;
  overflow-wrap: anywhere;
}

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

.delivery-result {
  margin-top: 28px;
  border: 1px solid rgba(112, 240, 182, 0.24);
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(85, 215, 255, 0.08), rgba(112, 240, 182, 0.06)),
    rgba(12, 18, 27, 0.72);
  box-shadow: var(--shadow);
}

.section-heading.compact {
  margin-bottom: 24px;
}

.delivery-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
  gap: 18px;
}

.resource-panel,
.email-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(8, 14, 22, 0.62);
}

.resource-panel h3 {
  color: var(--cyan);
  overflow-wrap: anywhere;
}

.resource-qr {
  display: block;
  width: min(260px, 100%);
  aspect-ratio: 1;
  margin: 18px auto;
  border: 10px solid rgba(237, 247, 255, 0.94);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.delivery-actions,
.email-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.email-panel pre {
  max-height: 360px;
  margin: 18px 0 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  color: var(--silver);
  background: rgba(255, 255, 255, 0.05);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.tutorial-grid article {
  min-height: 250px;
  padding: 24px;
}

.step {
  display: block;
  margin-bottom: 20px;
  color: var(--cyan);
  font-size: 34px;
  font-weight: 900;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-toolbar p {
  margin: 0;
  color: var(--silver);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-login {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-login input {
  width: min(260px, 100%);
  margin-bottom: 0;
}

.admin-page h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 58px);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 27, 0.72);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  color: var(--silver);
}

.status {
  display: inline-flex;
  min-width: 86px;
  justify-content: center;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.status.pending {
  color: #071018;
  background: #ffd36e;
}

.status.paid {
  color: #041019;
  background: var(--cyan);
}

.status.sent {
  color: #04150e;
  background: var(--emerald);
}

.status-select {
  width: auto;
  min-width: 112px;
  min-height: 38px;
  margin: 10px 0 0;
  padding: 0 10px;
  font-size: 13px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-btn {
  min-height: 36px;
  padding: 0 12px;
  color: var(--silver);
  font-size: 13px;
  box-shadow: none;
}

.mini-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.empty {
  text-align: center;
  color: var(--muted);
}

.footer {
  padding: 36px clamp(18px, 5vw, 72px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer p {
  margin: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 18px;
  min-height: 100dvh;
}

.modal.open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 10, 0.72);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  max-height: calc(100dvh - 36px);
  border: 1px solid rgba(85, 215, 255, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 29, 42, 0.98), rgba(8, 13, 20, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.modal-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 28px 28px 12px;
}

.modal-footer {
  flex: 0 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 14px 28px 28px;
  background: linear-gradient(180deg, rgba(8, 13, 20, 0.88), rgba(8, 13, 20, 0.98));
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.pay-qr {
  display: block;
  width: min(300px, 100%);
  max-height: 52vh;
  margin: 22px auto 16px;
  border: 10px solid rgba(237, 247, 255, 0.94);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.pay-note {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.image-error {
  margin: -4px 0 16px;
  border: 1px solid rgba(255, 120, 120, 0.32);
  border-radius: 8px;
  padding: 10px 12px;
  color: #ffd1d1;
  background: rgba(255, 120, 120, 0.08);
  font-size: 14px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100% - 36px));
  border: 1px solid rgba(112, 240, 182, 0.3);
  border-radius: 8px;
  padding: 13px 15px;
  color: var(--text);
  background: rgba(10, 20, 28, 0.94);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: 640px;
  }

  .plans,
  .checkout-layout,
  .delivery-grid,
  .tutorial-grid {
    grid-template-columns: 1fr;
  }

  .plan-card,
  .tutorial-grid article {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: auto;
    padding: 14px 16px;
  }

  .nav {
    gap: 18px;
    font-size: 13px;
  }

  .hero,
  .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    min-height: 610px;
    padding-top: 74px;
  }

  .hero-bg {
    background:
      linear-gradient(180deg, rgba(8, 12, 18, 0.92), rgba(8, 12, 18, 0.66)),
      url("assets/hero-tech.png") 58% center / cover no-repeat;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .order-actions {
    grid-template-columns: 1fr;
  }

  .checkout-panel,
  .order-panel,
  .plan-card,
  .tutorial-grid article {
    padding: 22px;
  }

  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    flex-direction: column;
  }

  .admin-login {
    flex-direction: column;
  }

  .admin-login input {
    width: 100%;
  }

  .modal {
    align-items: stretch;
    padding: 10px;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .modal-panel {
    width: 100%;
    max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom)));
  }

  .modal-scroll {
    padding: 22px 18px 10px;
  }

  .modal-scroll h2 {
    padding-right: 42px;
    font-size: 26px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
  }

  .pay-qr {
    width: min(100%, 250px);
    max-height: 34dvh;
    margin: 14px auto 12px;
    border-width: 8px;
  }

  .pay-note {
    margin-bottom: 4px;
    font-size: 13px;
  }

  .modal-footer {
    padding: 12px 18px max(16px, env(safe-area-inset-bottom));
  }
}

@media (max-height: 680px) and (max-width: 560px) {
  .modal-scroll {
    padding-top: 18px;
  }

  .modal-scroll .panel-kicker {
    margin-bottom: 8px;
  }

  .modal-scroll h2 {
    margin-bottom: 8px;
    font-size: 23px;
  }

  .modal-scroll label {
    margin-bottom: 6px;
  }

  .modal-scroll input,
  .modal-scroll select {
    min-height: 44px;
    margin-bottom: 10px;
  }

  .pay-qr {
    width: min(100%, 210px);
    max-height: 28dvh;
  }
}
