:root {
  --bg: #080e1a;
  --bg-elev: #0f172a;
  --bg-card: #111c33;
  --bg-card-hover: #172544;
  --border: rgba(148, 163, 184, 0.16);
  --border-bright: rgba(163, 230, 53, 0.42);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --lime: #a3e635;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --danger: #f87171;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  background: radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.09), transparent 40%),
              radial-gradient(circle at 82% 14%, rgba(163, 230, 53, 0.08), transparent 36%),
              var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

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

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 14, 26, 0.86);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(163, 230, 53, 0.35);
}

.brand-name {
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--lime);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.lang-switcher {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--lime);
  color: #080e1a;
}

/* Hero */
.hero-band {
  padding: 28px 0 18px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.28);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(1.65rem, 3.2vw, 2.45rem);
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero-sub {
  color: var(--text-muted);
  max-width: 820px;
  font-size: 0.96rem;
}

/* Main 3D Studio Layout */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(350px, 0.88fr);
  gap: 20px;
  align-items: start;
  margin-top: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(17, 28, 51, 0.92), rgba(11, 18, 32, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.viewport-card {
  position: sticky;
  top: 84px;
  padding: 14px;
}

.viewport-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.racket-live-title {
  font-size: 1.18rem;
  font-weight: 800;
}

.racket-live-meta {
  font-size: 0.82rem;
  color: var(--cyan);
  font-weight: 600;
}

.stage-wrap {
  position: relative;
  height: 520px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 42%, rgba(34, 211, 238, 0.14), rgba(8, 14, 26, 0.92) 72%);
  border: 1px solid rgba(148, 163, 184, 0.15);
  overflow: hidden;
  cursor: grab;
}

.stage-wrap:active {
  cursor: grabbing;
}

.stage-canvas {
  width: 100%;
  height: 100%;
}

.stage-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 14, 26, 0.78);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--text-muted);
  pointer-events: none;
  white-space: nowrap;
}

.cam-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.btn-chip {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-chip:hover,
.btn-chip.active {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(163, 230, 53, 0.1);
}

/* Telemetry 4-stat bar */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.tele-box {
  background: rgba(8, 14, 26, 0.75);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.tele-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.tele-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tele-val.accent {
  color: var(--lime);
}

.racket-summary-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.07);
  border: 1px solid rgba(34, 211, 238, 0.2);
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* Right Column: Radar + Customizer + AI + Buy */
.right-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.section-head h2,
.section-head h3 {
  font-size: 1.02rem;
  font-weight: 800;
}

.radar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#radar-canvas {
  width: 100%;
  max-width: 370px;
}

.radar-legend {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.dot-a,
.dot-b {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}

.dot-a { background: var(--lime); }
.dot-b { background: var(--cyan); }

/* Controls */
.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

select,
input[type="search"] {
  width: 100%;
  background: #0a1222;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 0.86rem;
  outline: none;
}

select:focus,
input[type="search"]:focus {
  border-color: var(--cyan);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--lime);
  cursor: pointer;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.swatch:hover {
  transform: scale(1.12);
}

.swatch.active {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px #080e1a, 0 0 0 4px var(--lime);
}

/* AI Analyzer */
.ai-header-score {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(8, 14, 26, 0.75);
  border: 1px solid var(--border);
}

.score-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
  border: 3px solid var(--lime);
  color: var(--lime);
  flex-shrink: 0;
}

.score-ring.warn {
  border-color: var(--amber);
  color: var(--amber);
}

.ai-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.84rem;
}

.ai-list li {
  padding: 8px 10px;
  border-radius: 8px;
}

.ai-pro {
  background: rgba(163, 230, 53, 0.08);
  border-left: 3px solid var(--lime);
}

.ai-warn {
  background: rgba(248, 113, 113, 0.1);
  border-left: 3px solid var(--danger);
}

.alt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.alt-pill {
  background: rgba(8, 14, 26, 0.72);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.alt-pill:hover {
  border-color: var(--cyan);
}

.alt-pill small {
  display: block;
  color: var(--lime);
  font-weight: 700;
  font-size: 0.72rem;
}

/* Affiliate Buy Cards */
.buy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.buy-btn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(8, 14, 26, 0.85);
  border: 1px solid var(--border);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.buy-btn:hover {
  transform: translateY(-2px);
  border-color: var(--lime);
}

.buy-store {
  font-weight: 800;
  font-size: 0.9rem;
}

.buy-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.buy-cta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lime);
  margin-top: 2px;
}

.disclosure-note {
  margin-top: 10px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Light Ad Slot */
.ad-slot {
  margin: 26px 0;
  padding: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  text-align: center;
  background: rgba(15, 23, 42, 0.45);
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Scatter Matrix */
.section-block {
  margin-top: 34px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.matrix-wrap {
  position: relative;
  width: 100%;
  height: 440px;
  background: radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.1), rgba(8, 14, 26, 0.92) 72%);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.matrix-3d-stage {
  width: 100%;
  height: 100%;
}

.matrix-tooltip {
  display: none;
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 10;
  background: rgba(8, 14, 26, 0.92);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 10px 13px;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.brand-legend-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.brand-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.promo-showcase {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
  align-items: center;
  padding: 20px;
  margin: 16px 0 6px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(17, 28, 51, 0.92), rgba(8, 14, 26, 0.96));
  border: 1px solid var(--border);
}

.promo-img-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.25);
  aspect-ratio: 16 / 9;
  background: #0b1220;
}

.promo-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.promo-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.promo-stat-chip {
  background: rgba(8, 14, 26, 0.78);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 0.78rem;
}

.promo-stat-chip strong {
  display: block;
  color: var(--lime);
  font-size: 1rem;
}

@media (max-width: 820px) {
  .promo-showcase {
    grid-template-columns: 1fr;
  }
}

/* Catalog */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tab-row,
.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 14px;
}

.gear-card {
  background: linear-gradient(180deg, rgba(17, 28, 51, 0.88), rgba(10, 16, 29, 0.95));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.gear-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
}

.gear-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.brand-pill {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
}

.price-pill {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--lime);
}

.gear-title {
  font-size: 1rem;
  font-weight: 800;
}

.gear-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gear-specs span {
  background: rgba(8, 14, 26, 0.7);
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.gear-desc {
  font-size: 0.81rem;
  color: #cbd5e1;
  flex-grow: 1;
}

.gear-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-primary {
  flex: 1;
  background: var(--lime);
  color: #080e1a;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  flex: 1;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* pSEO Links & Guides */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.pseo-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  font-weight: 600;
}

.pseo-link:hover {
  border-color: var(--lime);
  color: var(--lime);
}

/* Footer */
.site-footer {
  margin-top: 52px;
  border-top: 1px solid var(--border);
  padding: 32px 0 42px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--lime);
}

/* Responsive Mobile First Polish */
@media (max-width: 980px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .viewport-card {
    position: static;
  }
  .stage-wrap {
    height: 410px;
  }
  .main-nav {
    display: none;
  }
}

@media (max-width: 600px) {
  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .control-grid,
  .buy-grid,
  .alt-grid {
    grid-template-columns: 1fr;
  }
  .stage-wrap {
    height: 360px;
  }
}
