:root, .dark {
  --background: #111315;
  --foreground: #f4f5f6;
  --card: #191c1f;
  --card-foreground: #f4f5f6;
  --primary: #d2ff5a;
  --primary-foreground: #111315;
  --primary-hover: #e0ff8d;
  --ai-accent: #00e599;
  --ai-accent-hover: #1cf0a7;
  --ai-accent-bg: #09261d;
  --muted: #262a2e;
  --muted-foreground: #acb2b8;
  --border: #353a3f;
  --border-light: #485058;
  --radius: 0.75rem;
  --radius-lg: 1.125rem;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.site-shell {
  max-width: 1440px;
  margin: auto;
  padding: 0 6vw;
}

/* Header */
header {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -1px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 8px;
  font-size: 28px;
  line-height: 1;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 14px;
  color: #d1d4d7;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(210, 255, 90, 0.08);
}

/* Main */
main {
  padding: 50px 0 70px;
}

/* Intro & Category Selector */
.eyebrow-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #adb4bb;
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 600;
}

.eyebrow > span {
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(210, 255, 90, 0.6);
}

/* Filter / Business Switcher Tabs */
.business-tabs {
  display: inline-flex;
  background: #181b1e;
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 100px;
  gap: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: #a6adb5;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: var(--primary);
  color: #111315;
}

.tab-btn .tab-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
  font-weight: 700;
}

.tab-btn.active .tab-count {
  background: rgba(0, 0, 0, 0.25);
  color: #111315;
}

/* Intro Section */
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 24px 0 40px;
  gap: 25px;
}

h1 {
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: -1px;
  line-height: 1.25;
  margin: 0;
  font-weight: 500;
}

h1 > span {
  display: block;
  font-size: clamp(46px, 5.5vw, 76px);
  letter-spacing: -4px;
  margin-top: 6px;
  font-weight: 700;
}

.intro p {
  color: #aab0b6;
  font-size: 15px;
  max-width: 380px;
  margin: 0 0 5px;
}

/* Products Container */
.products-wrapper {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.product {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  border: 1px solid #3a4148;
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, opacity 0.3s ease;
}

.product:hover {
  border-color: #555f69;
}

/* Card 1: Windows 软件 (Neon Lime Theme) */
.product.theme-lime .product-main {
  background: var(--primary);
  color: #171c12;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

.product.theme-lime .status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  border: 1px solid #6c8637;
  border-radius: 100px;
  padding: 4px 14px;
  font-weight: 600;
}

.product.theme-lime .status i {
  width: 6px;
  height: 6px;
  background: #283818;
  border-radius: 50%;
}

.product.theme-lime .period {
  color: #607a25;
}

.product.theme-lime .release-note {
  font-size: 14px;
  color: #405223;
  font-weight: 600;
}

/* Card 2: ChatGPT 额度业务 (AI Emerald Theme) */
.product.theme-ai {
  border-color: #27473b;
}

.product.theme-ai:hover {
  border-color: var(--ai-accent);
}

.product.theme-ai .product-main {
  background: linear-gradient(145deg, #0d1e19 0%, #081713 100%);
  color: #ecfdf5;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  border-right: 1px solid #1f3b31;
  position: relative;
  overflow: hidden;
}

.product.theme-ai .product-main::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(0, 229, 153, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.product.theme-ai .status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  border: 1px solid #00e59955;
  background: rgba(0, 229, 153, 0.1);
  color: #a7f3d0;
  border-radius: 100px;
  padding: 4px 14px;
  font-weight: 600;
}

.product.theme-ai .status i {
  width: 6px;
  height: 6px;
  background: var(--ai-accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--ai-accent);
}

.product.theme-ai h2 {
  color: #ffffff;
}

.product.theme-ai .period {
  color: var(--ai-accent);
}

.product.theme-ai .release-note {
  font-size: 14px;
  color: #6ee7b7;
}

.product.theme-ai .feature-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.product.theme-ai .badge-item {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card Common Elements */
.product-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.index {
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 700;
}

h2 {
  font-size: clamp(44px, 5.5vw, 78px);
  letter-spacing: -3.5px;
  font-weight: 650;
  line-height: 1.1;
  margin: 45px 0 24px;
  overflow-wrap: anywhere;
}

h2 em {
  font-weight: 400;
  font-family: Georgia, serif;
  font-style: italic;
}

.product-bottom {
  margin-top: auto;
}

.product-bottom p {
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 5px;
}

/* Side Action Panel */
.action-panel {
  background: #1b1e22;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  color: #9aa2aa;
  font-weight: 600;
}

h3 {
  font-size: 22px;
  font-weight: 500;
  margin: 10px 0 20px;
}

dl {
  margin: 0 0 22px;
  font-size: 14px;
}

dl > div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #32383f;
}

dt {
  color: #9aa2aa;
}

dd {
  margin: 0;
  font-weight: 500;
}

/* Dual Button Group */
.dual-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.action-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  padding: 14px 20px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #171c12;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.action-button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.action-button.btn-ai {
  background: var(--ai-accent);
  border-color: var(--ai-accent);
  color: #052319;
  font-weight: 700;
}

.action-button.btn-ai:hover {
  background: var(--ai-accent-hover);
  box-shadow: 0 4px 15px rgba(0, 229, 153, 0.3);
}

.action-button.btn-outline {
  background: transparent;
  border-color: #4b5563;
  color: #f3f4f6;
}

.action-button.btn-outline:hover {
  border-color: var(--ai-accent);
  color: var(--ai-accent);
  background: rgba(0, 229, 153, 0.05);
}

.action-button span {
  font-size: 18px;
  line-height: 1;
}

.action-panel > p {
  font-size: 13px;
  color: #9aa2aa;
  line-height: 1.6;
  margin: 14px 0 0;
}

.action-link {
  display: inline-block;
  color: var(--primary);
  margin-top: 8px;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 13px;
  cursor: pointer;
}

.action-link.ai-link {
  color: var(--ai-accent);
}

/* ========================================================
   MODAL / POPUP SYSTEM (卡密购买 & 兑换模态框)
   ======================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 12, 14, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  display: grid;
  opacity: 1;
}

.modal-dialog {
  background: #181c20;
  border: 1px solid #363d45;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  position: relative;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid #282f37;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-header h3 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.5px;
  color: #fff;
}

.modal-header p {
  margin: 0;
  font-size: 13px;
  color: #9aa2aa;
}

.modal-close {
  background: #252b32;
  border: 1px solid #363e47;
  color: #9aa2aa;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #363e47;
  color: #fff;
}

.modal-body {
  padding: 24px 28px 28px;
}

/* ========================================================
   PRICING / PACKAGES (卡密套餐选择)
   ======================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.pricing-card {
  background: #14171a;
  border: 1px solid #2d343c;
  border-radius: var(--radius);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: center;
}

.pricing-card:hover {
  border-color: #4b5663;
  transform: translateY(-2px);
}

.pricing-card.selected {
  border-color: var(--ai-accent);
  background: rgba(0, 229, 153, 0.06);
  box-shadow: 0 0 16px rgba(0, 229, 153, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -9px;
  right: 12px;
  background: var(--ai-accent);
  color: #052319;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.pricing-title {
  font-size: 14px;
  font-weight: 600;
  color: #d1d5db;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 24px;
  font-weight: 750;
  color: #fff;
  letter-spacing: -1px;
}

.pricing-price small {
  font-size: 13px;
  font-weight: 500;
  color: var(--ai-accent);
}

.pricing-desc {
  font-size: 12px;
  color: #8b95a0;
  margin-top: 8px;
  line-height: 1.4;
}

.pricing-card.selected .pricing-title {
  color: var(--ai-accent);
}

/* Purchase Channel Options */
.channel-box {
  background: #131619;
  border: 1px solid #2a3139;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.channel-title {
  font-size: 13px;
  font-weight: 600;
  color: #adb5bd;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-title span {
  color: var(--ai-accent);
}

.channel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ========================================================
   FORM & REDEMPTION (卡密兑换表单)
   ======================================================== */
.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: #111417;
  border: 1px solid #333a42;
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--ai-accent);
  background: #0d1210;
  box-shadow: 0 0 0 3px rgba(0, 229, 153, 0.15);
  outline: none;
}

.form-input::placeholder {
  color: #636c76;
}

.form-hint {
  font-size: 12px;
  color: #89939e;
  margin-top: 6px;
  line-height: 1.4;
}

.form-hint a {
  color: var(--ai-accent);
  text-decoration: underline;
}

/* Status / Feedback Box */
.status-box {
  display: none;
  padding: 16px 18px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 16px;
}

.status-box.show {
  display: block;
}

.status-box.success {
  background: rgba(0, 229, 153, 0.08);
  border: 1px solid rgba(0, 229, 153, 0.35);
  color: #a7f3d0;
}

.status-box.error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* History List */
.history-empty {
  text-align: center;
  padding: 35px 20px;
  color: #7b848f;
  font-size: 14px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: #131619;
  border: 1px solid #2a3138;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.history-key {
  font-family: monospace;
  font-weight: 600;
  color: #e5e7eb;
}

.history-status {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 229, 153, 0.15);
  color: var(--ai-accent);
}

/* Footer */
footer {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding: 30px 0 40px;
  font-size: 13px;
  color: #9da5ad;
  margin-top: 50px;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.skip {
  position: absolute;
  top: -100px;
  background: var(--primary);
  color: #111;
  padding: 12px;
}

.skip:focus {
  top: 12px;
  z-index: 2;
}

/* Responsive */
@media (max-width: 900px) {
  .product {
    grid-template-columns: 1fr;
  }
  .product.theme-ai .product-main {
    border-right: none;
    border-bottom: 1px solid #1f3b31;
  }
}

@media (max-width: 740px) {
  .site-shell {
    padding: 0 6vw;
  }
  header {
    height: auto;
    padding: 20px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  nav {
    width: 100%;
    justify-content: space-between;
  }
  main {
    padding: 25px 0 40px;
  }
  .intro {
    display: block;
    margin: 20px 0 25px;
  }
  .intro p {
    margin-top: 15px;
  }
  .product-main {
    min-height: 300px !important;
    padding: 24px !important;
  }
  .action-panel {
    padding: 24px;
  }
  h1 > span {
    letter-spacing: -3px;
  }
  h2 {
    letter-spacing: -2.5px;
    margin-top: 35px;
  }
  .business-tabs {
    width: 100%;
    justify-content: space-between;
  }
  .tab-btn {
    padding: 7px 12px;
    font-size: 12px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .modal-dialog {
    padding: 0;
  }
  .modal-header {
    padding: 20px;
  }
  .modal-body {
    padding: 20px;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .action-button, .pricing-card, .modal-dialog {
    transition: none;
  }
}
