/* ═══ DMA Soft — Centered Dark Theme ═══ */
:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --surface: #16161e;
  --border: #2a2a35;
  --text: #e8e8ec;
  --muted: #6b6b7b;
  --accent: #76b900;
  --accent-dim: rgba(118,184,0,0.15);
  --red: #ef4444;
  --font: 'Inter', 'Microsoft YaHei', sans-serif;
  --mono: 'JetBrains Mono', 'Consolas', monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }

/* ── Top Nav ── */
.topnav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; height: 52px; background: rgba(10,10,15,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topnav-brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.topnav-brand span { font-size: 0.7rem; color: var(--accent); background: var(--accent-dim); padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.topnav-links { display: flex; align-items: center; gap: 24px; }
.topnav-links a { color: var(--muted); font-size: 0.85rem; transition: color 0.2s; }
.topnav-links a:hover { color: var(--text); }
.nav-cta { background: var(--accent); color: #000; border: none; padding: 6px 16px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; }

/* ── Buttons ── */
.btn-primary { display: inline-block; background: var(--accent); color: #000; padding: 12px 28px; border-radius: 8px; font-weight: 700; font-size: 0.9rem; border: none; cursor: pointer; transition: opacity 0.2s; }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { display: inline-block; border: 1px solid var(--border); color: var(--text); padding: 11px 28px; border-radius: 8px; font-size: 0.9rem; transition: border-color 0.2s; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Hero ── */
.hero { padding: 140px 24px 64px; text-align: center; max-width: 700px; margin: 0 auto; }
.hero-badge { display: inline-block; background: var(--accent-dim); color: var(--accent); padding: 4px 14px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; letter-spacing: 1.5px; margin-bottom: 20px; font-family: var(--mono); }
.hero h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.15; margin-bottom: 14px; background: linear-gradient(135deg, var(--text), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { color: var(--muted); font-size: 1.05rem; margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }
.hero-tags { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.tag { background: var(--surface); border: 1px solid var(--border); color: var(--accent); font-size: 0.78rem; padding: 5px 14px; border-radius: 20px; font-family: var(--mono); }
.hero-actions { display: flex; gap: 12px; justify-content: center; }

/* ── Section Titles ── */
.section-title { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; padding-top: 64px; }
.section-title span { color: var(--accent); font-weight: 400; font-size: 0.9rem; }
.section-desc { text-align: center; color: var(--muted); font-size: 0.88rem; margin-bottom: 32px; }

/* ── Skeleton Interactive Section ── */
.skeleton-section { max-width: 700px; margin: 0 auto; padding: 0 24px 48px; }
.skeleton-stage-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; overflow: hidden; }
.skeleton-svg { display: block; width: 100%; max-width: 480px; margin: 0 auto; cursor: crosshair; user-select: none; touch-action: none; }

/* SVG Elements */
.skel-backdrop { fill: rgba(118,184,0,0.03); stroke: var(--border); stroke-width: 0.5; }
.skel-grid line { stroke: var(--border); stroke-width: 0.3; opacity: 0.4; }
.skel-zone { font-size: 8px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px; }
.skel-zone--hidden { fill: var(--muted); opacity: 0.5; }
.skel-zone--visible { fill: var(--accent); opacity: 0.6; }

.skel-pass { color: var(--accent); }
.skel-pass.dm-skeleton-pass--occluded { color: var(--muted); opacity: 0.35; }

/* Occluded / Visible layers */
.skel-occluded { opacity: 0.3; }
.skel-visible { color: var(--accent); }
.skel-occluded .skel-bone, .skel-occluded .skel-head { color: #888; }

.skel-hitbox, .skel-bone, .skel-head { fill: none; stroke: currentColor; vector-effect: non-scaling-stroke; }
.skel-hitbox { stroke-linecap: round; stroke: rgba(118,184,0,0.25); fill: rgba(118,184,0,0.08); }
.skel-bone { stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px rgba(118,184,0,0.4)); }
.skel-head { stroke-width: 2; fill: rgba(118,184,0,0.06); filter: drop-shadow(0 0 4px rgba(118,184,0,0.3)); }
.skel-joint { fill: currentColor; filter: drop-shadow(0 0 2px rgba(118,184,0,0.5)); }

/* Aim tracking line */
.aim-line { stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.aim-line.aim-hit { stroke: var(--accent); }
.aim-line.aim-miss { stroke: var(--red); }
.aim-dot { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.aim-dot.aim-hit { stroke: var(--accent); }
.aim-dot.aim-miss { stroke: var(--red); }
.aim-target { fill: var(--accent); opacity: 0.8; }
.aim-label { font-size: 10px; font-family: var(--mono); font-weight: 700; }
.aim-label.aim-hit { fill: var(--accent); }
.aim-label.aim-miss { fill: var(--red); }

/* Wall */
.wall-line { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: 0.6; }
.wall-hit-area { stroke: transparent; stroke-width: 20; cursor: col-resize; }
.wall-handle { fill: var(--surface); stroke: var(--accent); stroke-width: 1; cursor: col-resize; }
.wall-text { fill: var(--accent); font-size: 8px; font-family: var(--mono); font-weight: 700; }

/* Turntable */
.turntable-shadow { fill: rgba(0,0,0,0.3); }
.turntable-base { fill: var(--surface); stroke: var(--border); stroke-width: 1; cursor: grab; }
.turntable-top { fill: var(--bg2); stroke: var(--accent); stroke-width: 0.6; opacity: 0.6; cursor: grab; }
.turntable-core { fill: var(--accent); }

/* Controls */
.skeleton-controls { display: flex; align-items: center; gap: 16px; padding: 12px 0 0; justify-content: center; }
.skel-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.8rem; color: var(--muted); font-family: var(--mono); }
.toggle-box { width: 14px; height: 14px; border: 2px solid var(--border); border-radius: 3px; display: inline-block; }
.toggle-box.on { background: var(--accent); border-color: var(--accent); }
.skel-info { font-size: 0.75rem; color: var(--muted); font-family: var(--mono); }
.skeleton-hint { text-align: center; color: var(--muted); font-size: 0.75rem; margin-top: 8px; opacity: 0.6; }

/* ── Features ── */
.features-section { max-width: 800px; margin: 0 auto; padding: 0 24px 48px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px 20px; text-align: center; transition: border-color 0.2s; }
.feature-card:hover { border-color: var(--accent); }
.feature-icon { font-size: 1.6rem; margin-bottom: 10px; color: var(--accent); }
.feature-card h3 { font-size: 0.95rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 0.8rem; line-height: 1.6; }

/* ── Products ── */
.products-section { max-width: 900px; margin: 0 auto; padding: 0 24px 48px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px 20px; text-align: center; transition: border-color 0.2s; }
.product-card.featured { border-color: var(--accent); box-shadow: 0 0 24px rgba(118,184,0,0.08); }
.product-badge { font-size: 0.65rem; font-family: var(--mono); letter-spacing: 1.5px; color: var(--accent); background: var(--accent-dim); display: inline-block; padding: 2px 10px; border-radius: 10px; margin-bottom: 12px; }
.product-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.product-desc { color: var(--muted); font-size: 0.82rem; margin-bottom: 16px; }
.product-price { margin-bottom: 16px; }
.product-price strong { font-size: 1.8rem; color: var(--accent); font-family: var(--mono); }
.product-price span { color: var(--muted); font-size: 0.8rem; }
.product-features { list-style: none; text-align: left; margin-bottom: 20px; }
.product-features li { padding: 4px 0; font-size: 0.82rem; color: var(--muted); }
.product-features li::before { content: "✓ "; color: var(--accent); }
.product-card button { width: 100%; padding: 10px; background: var(--accent); color: #000; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.9rem; }

/* ── Download ── */
.download-section { max-width: 600px; margin: 0 auto; padding: 0 24px 48px; }
.download-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.download-btn { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 12px; text-decoration: none; transition: border-color 0.2s, transform 0.15s; cursor: pointer; font-family: var(--font); border: none; }
.download-btn:hover { transform: translateY(-2px); }
.download-btn.primary { background: var(--accent); color: #000; }
.download-btn.primary:hover { opacity: 0.9; }
.download-btn.secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.download-btn.secondary:hover { border-color: var(--accent); }
.dl-icon { font-size: 1.4rem; }
.dl-text { display: flex; flex-direction: column; }
.dl-text strong { font-size: 0.95rem; }
.dl-text small { font-size: 0.72rem; opacity: 0.7; }

/* ── Footer ── */
.site-footer { text-align: center; padding: 48px 24px 32px; border-top: 1px solid var(--border); margin-top: 32px; }
.site-footer span { display: block; color: var(--muted); font-size: 0.75rem; margin-top: 12px; }
.site-footer .btn-primary { margin-bottom: 12px; }

/* ── Chat Dock ── */
.chat-dock { position: fixed; bottom: 20px; right: 20px; z-index: 200; }
.chat-toggle { background: var(--accent); color: #000; border: none; padding: 10px 20px; border-radius: 24px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.chat-panel { display: none; flex-direction: column; position: fixed; bottom: 70px; right: 20px; width: 360px; max-height: 500px; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.chat-panel.open { display: flex; }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-close { background: none; border: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.chat-tabs { display: flex; border-bottom: 1px solid var(--border); }
.chat-tabs .tab { flex: 1; background: none; border: none; padding: 8px; color: var(--muted); cursor: pointer; font-size: 0.82rem; }
.chat-tabs .tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.chat-body { display: none; flex-direction: column; flex: 1; min-height: 200px; }
.chat-body.active { display: flex; }
.messages { flex: 1; overflow-y: auto; padding: 12px; max-height: 280px; }
.message { padding: 6px 10px; margin: 4px 0; border-radius: 8px; font-size: 0.82rem; white-space: pre-wrap; word-break: break-word; }
.message.user { background: var(--accent-dim); text-align: right; }
.message.assistant, .message.admin { background: var(--surface); }
.message.system { color: var(--muted); text-align: center; font-size: 0.75rem; }
.chat-form { display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea, .chat-form input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 8px; color: var(--text); font-size: 0.82rem; resize: none; font-family: var(--font); }
.chat-form button { background: var(--accent); color: #000; border: none; padding: 8px 14px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 0.82rem; }
.chat-img-btn { background: var(--surface) !important; color: var(--text) !important; padding: 8px 10px !important; }
.identity-form { display: flex; gap: 6px; padding: 8px 12px; }
.identity-form input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; color: var(--text); font-size: 0.8rem; }
.chat-img { max-width: 160px; border-radius: 6px; }
.msg-read-status { display: block; font-size: 10px; margin-top: 2px; text-align: right; }
.msg-read-status.read { color: var(--accent); }
.msg-read-status.unread { color: var(--muted); }

/* ── Modal ── */
.modal { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.7); justify-content: center; align-items: center; padding: 24px; }
.modal.open { display: flex; }
.modal-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 32px; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.checkout-form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.checkout-form input { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 10px; color: var(--text); font-size: 0.85rem; }
.checkout-form button { background: var(--accent); color: #000; border: none; padding: 12px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.checkout-result { color: var(--muted); font-size: 0.8rem; text-align: center; margin-top: 8px; }
.payment-active { text-align: center; }
.payment-status-bar { padding: 8px 12px; border-radius: 8px; font-size: 0.82rem; margin-bottom: 16px; background: var(--accent-dim); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; }
.payment-qr-section { margin: 16px 0; }
.qr-code { display: flex; justify-content: center; margin-bottom: 12px; }
.qr-code canvas { border-radius: 8px; }
.payment-amount-display strong { display: block; font-size: 1.4rem; color: var(--accent); font-family: var(--mono); margin: 4px 0; }
.payment-amount-display span { font-size: 0.8rem; color: var(--muted); }
.address-box { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.address-box code { flex: 1; font-size: 0.72rem; word-break: break-all; color: var(--text); font-family: var(--mono); }
.address-box button { background: var(--accent); color: #000; border: none; padding: 6px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.payment-note { color: var(--muted); font-size: 0.78rem; }
.address-section { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.address-section h4 { font-size: 0.85rem; color: var(--muted); }

/* ── Mobile ── */
@media (max-width: 640px) {
  .topnav { padding: 0 16px; }
  .topnav-links { gap: 12px; }
  .topnav-links a { font-size: 0.75rem; }
  .hero { padding: 120px 16px 48px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 0.9rem; }
  .hero-tags { gap: 6px; }
  .tag { font-size: 0.7rem; padding: 4px 10px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .features-grid { grid-template-columns: 1fr; }
  .download-buttons { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .skeleton-stage-wrap { padding: 16px; }
  .chat-panel { position: fixed; inset: 0; width: 100%; max-height: 100%; border-radius: 0; bottom: 0; right: 0; }
  .modal { padding: 0; }
  .modal-card { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
}
