/* ═══════════════════════════════════════════
   UpDog 颈察汪 — Official Website Styles
   ═══════════════════════════════════════════ */

:root {
  --bg-primary: #0e0e1a;
  --bg-secondary: #161625;
  --bg-card: #1e1e30;
  --accent: #ffd93d;
  --accent-glow: rgba(255, 217, 61, 0.3);
  --danger: #ff6b6b;
  --success: #51cf66;
  --text: #e8e8e8;
  --text-dim: #8a8a9a;
  --border: #2a2a40;
  --grid: 8px;
}

@font-face {
  font-family: 'Pixel';
  src: url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-primary);
}

body {
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

.pixel-font {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 calc(var(--grid) * 4);
}

img {
  image-rendering: pixelated;
}

/* ─── NAV ─── */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--grid) * 2) calc(var(--grid) * 4);
  background: rgba(14, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
  transition: background 0.3s;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: calc(var(--grid) * 1.5);
  text-decoration: none;
  color: var(--accent);
  font-size: 14px;
}

.nav-logo-img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: calc(var(--grid) * 3);
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

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

.pixel-btn-sm {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 6px 12px;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: all 0.2s;
}

.pixel-btn-sm:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ─── SECTIONS ─── */

.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--grid) * 12) 0;
  position: relative;
}

.section-dark {
  background: var(--bg-secondary);
}

.section-title {
  font-size: clamp(16px, 3vw, 24px);
  color: var(--accent);
  text-align: center;
  margin-bottom: calc(var(--grid) * 6);
}

/* ─── HERO ─── */

#hero {
  background: radial-gradient(ellipse at 50% 80%, rgba(255, 217, 61, 0.06) 0%, transparent 60%),
              var(--bg-primary);
  overflow: hidden;
}

.hero-bg-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  animation: twinkle var(--dur, 3s) var(--delay, 0s) infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; }
  50% { opacity: var(--max-opacity, 0.6); }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
}

.hero-gogo {
  width: 180px;
  height: 180px;
  margin-bottom: calc(var(--grid) * 4);
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--accent-glow));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

#hero-title {
  font-size: clamp(18px, 4vw, 32px);
  color: var(--text);
  margin-bottom: calc(var(--grid) * 2);
  min-height: 2.4em;
  word-spacing: -0.15em;
}

#hero-title .cursor {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 0.7s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-subtitle {
  font-size: clamp(12px, 1.8vw, 16px);
  color: var(--text-dim);
  margin-bottom: calc(var(--grid) * 5);
  max-width: 550px;
}

.hero-cta {
  display: flex;
  gap: calc(var(--grid) * 2);
  flex-wrap: wrap;
  justify-content: center;
}

.pixel-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: calc(var(--grid) * 2) calc(var(--grid) * 3);
  text-decoration: none;
  border: 2px solid;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  display: inline-block;
}

.pixel-btn.primary {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.pixel-btn.primary:hover {
  background: #ffe566;
  transform: translateY(-2px);
  box-shadow: 0 4px 0 rgba(255, 217, 61, 0.4);
}

.pixel-btn.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.pixel-btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.pixel-btn.large {
  font-size: 13px;
  padding: calc(var(--grid) * 2.5) calc(var(--grid) * 4);
}

.scroll-hint {
  position: absolute;
  bottom: calc(var(--grid) * 4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--grid);
  color: var(--text-dim);
  font-size: 10px;
  animation: fadeInUp 1s 2s both;
}

.scroll-arrow {
  font-size: 14px;
  animation: bobDown 1.5s ease-in-out infinite;
}

@keyframes bobDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ─── HEALTH DATA ─── */

.neck-pressure {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--grid) * 6);
  align-items: center;
  margin-bottom: calc(var(--grid) * 8);
}

.neck-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.human-svg {
  width: 280px;
  height: auto;
}

.human-svg path,
.human-svg line,
.human-svg ellipse,
.human-svg circle,
.human-svg text {
  transition: all 0.4s ease;
}

.pressure-row.active {
  opacity: 1 !important;
  background: rgba(255, 217, 61, 0.06);
  border-left: 3px solid var(--accent);
  padding-left: calc(var(--grid) * 1.5);
}

.pressure-table {
  display: flex;
  flex-direction: column;
  gap: calc(var(--grid) * 2);
}

.pressure-row {
  display: flex;
  align-items: center;
  gap: calc(var(--grid) * 2);
  opacity: 0;
}

.p-angle {
  font-size: 12px;
  color: var(--accent);
  width: 40px;
  text-align: right;
}

.p-bar {
  flex: 1;
  height: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  overflow: hidden;
}

.p-bar-fill {
  height: 100%;
  background: var(--success);
  width: 0;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.p-weight {
  font-size: 14px;
  color: var(--text);
  width: 60px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--grid) * 3);
  margin-bottom: calc(var(--grid) * 6);
}

.stat-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  padding: calc(var(--grid) * 4);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

.stat-number {
  display: block;
  font-size: clamp(20px, 4vw, 36px);
  color: var(--accent);
  margin-bottom: calc(var(--grid) * 1.5);
}

.stat-desc {
  font-size: 13px;
  color: var(--text-dim);
}

.section-transition {
  font-size: clamp(14px, 2vw, 20px);
  text-align: center;
  color: var(--text);
  opacity: 0;
  font-style: italic;
}

.data-source {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: calc(var(--grid) * 3);
  opacity: 0.5;
}

/* ─── STORY ─── */

#story {
  background: radial-gradient(ellipse at 30% 50%, rgba(255, 217, 61, 0.04) 0%, transparent 50%),
              var(--bg-primary);
}

.story-container {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--grid) * 6);
  max-width: 800px;
}

.story-gogo {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

.story-bubbles {
  display: flex;
  flex-direction: column;
  gap: calc(var(--grid) * 2);
}

.story-bubble {
  background: var(--bg-card);
  border: 2px solid var(--border);
  padding: calc(var(--grid) * 2) calc(var(--grid) * 3);
  font-size: 15px;
  line-height: 1.7;
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  max-width: 480px;
}

.story-bubble:first-child::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 14px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid var(--border);
}

/* ─── FEATURES (POSTURE) ─── */

.feature-demo {
  max-width: 900px;
  margin: 0 auto;
}

.posture-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--grid) * 6);
  margin-bottom: calc(var(--grid) * 6);
  flex-wrap: wrap;
}

.posture-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--grid) * 2);
  opacity: 0;
}

.skeleton-svg {
  width: 200px;
  height: 260px;
}

.posture-label {
  font-size: 11px;
}

.posture-gogo-reaction {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--grid);
  opacity: 0;
  transform: translateX(40px);
}

.reaction-gogo {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

.reaction-bubble {
  background: var(--accent);
  color: var(--bg-primary);
  padding: calc(var(--grid)) calc(var(--grid) * 2);
  font-size: 11px;
  position: relative;
  animation: shake 0.5s ease-in-out infinite alternate;
}

.reaction-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--accent);
}

@keyframes shake {
  0% { transform: rotate(-1deg); }
  100% { transform: rotate(1deg); }
}

.feature-points {
  display: flex;
  flex-direction: column;
  gap: calc(var(--grid) * 2);
  max-width: 500px;
  margin: 0 auto;
}

.feature-point {
  display: flex;
  align-items: center;
  gap: calc(var(--grid) * 2);
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
}

.fp-icon {
  color: var(--accent);
  font-size: 12px;
  flex-shrink: 0;
}

/* ─── REMINDER ─── */

.reminder-demo {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.timer-visual {
  position: relative;
  margin-bottom: calc(var(--grid) * 4);
}

.timer-bar {
  width: 100%;
  height: 40px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}

.timer-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--accent));
  width: 0%;
  transition: width 0.1s linear;
}

.timer-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  color: var(--text);
  z-index: 1;
  text-shadow: 0 0 4px var(--bg-primary);
}

.timer-gogo {
  width: 100px;
  height: 100px;
  position: absolute;
  right: -20px;
  top: -70px;
  opacity: 0;
  transform: scale(0);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.timer-gogo.active {
  opacity: 1;
  transform: scale(1);
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.reminder-tagline {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: calc(var(--grid) * 5);
  font-style: italic;
}

/* ─── DAILY TIMELINE ─── */

.timeline-wrapper {
  width: 100%;
  overflow: hidden;
  padding: calc(var(--grid) * 4) 0;
}

.timeline-track {
  display: flex;
  gap: calc(var(--grid) * 5);
  padding: 0 calc(var(--grid) * 4);
  width: max-content;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--grid) * 2);
  min-width: 180px;
}

.timeline-item img {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.timeline-item span {
  font-size: 11px;
  color: var(--accent);
}

/* ─── PRIVACY SECTION ─── */

.privacy-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--grid) * 3);
  margin-bottom: calc(var(--grid) * 5);
}

.privacy-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  padding: calc(var(--grid) * 4);
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: border-color 0.3s;
}

.privacy-card:hover {
  border-color: var(--success);
}

.pc-icon {
  font-size: 28px;
  color: var(--success);
  margin-bottom: calc(var(--grid) * 2);
  display: block;
}

.privacy-card h3 {
  font-size: 12px;
  color: var(--text);
  margin-bottom: calc(var(--grid) * 1.5);
}

.privacy-card p {
  font-size: 13px;
  color: var(--text-dim);
}

.privacy-link {
  display: block;
  text-align: center;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.2s;
}

.privacy-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ─── CTA ─── */

.cta-section {
  text-align: center;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 217, 61, 0.08) 0%, transparent 60%),
              var(--bg-secondary);
}

.cta-gogo {
  width: 160px;
  height: 160px;
  margin-bottom: calc(var(--grid) * 4);
  filter: drop-shadow(0 0 24px var(--accent-glow));
  animation: float 3s ease-in-out infinite;
}

.cta-title {
  font-size: clamp(16px, 3vw, 26px);
  color: var(--text);
  margin-bottom: calc(var(--grid) * 2);
}

.cta-sub {
  color: var(--text-dim);
  margin-bottom: calc(var(--grid) * 5);
  font-size: 14px;
}

.cta-buttons {
  display: flex;
  gap: calc(var(--grid) * 3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── FOOTER ─── */

#footer {
  background: var(--bg-primary);
  border-top: 2px solid var(--border);
  padding: calc(var(--grid) * 5) 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--grid) * 3);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: calc(var(--grid) * 1.5);
  font-size: 12px;
  color: var(--accent);
}

.footer-gogo {
  width: 28px;
  height: 28px;
}

.footer-links {
  display: flex;
  gap: calc(var(--grid) * 3);
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
  max-width: 600px;
  opacity: 0.6;
}

/* ─── ANIMATIONS ─── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─── RESPONSIVE ─── */

@media (max-width: 768px) {
  /* Nav — compact single line */
  #nav {
    padding: calc(var(--grid) * 1.5) calc(var(--grid) * 2);
  }

  .nav-logo-img { width: 24px; height: 24px; }

  .nav-logo { font-size: 12px; gap: calc(var(--grid)); }

  .nav-links { gap: calc(var(--grid) * 1.5); }

  .nav-links a { font-size: 14px; }

  .pixel-btn-sm { font-size: 10px; padding: 5px 10px; }

  /* Sections — reduce vertical padding */
  .section {
    min-height: auto;
    padding: calc(var(--grid) * 6) 0;
  }

  .section-title {
    font-size: clamp(16px, 5vw, 22px);
    margin-bottom: calc(var(--grid) * 3);
  }

  /* Hero */
  .hero-gogo {
    width: 120px;
    height: 120px;
    margin-bottom: calc(var(--grid) * 2);
  }

  #hero-title {
    font-size: clamp(16px, 5.5vw, 24px);
    min-height: 1.8em;
  }

  .hero-subtitle {
    font-size: 14px;
    margin-bottom: calc(var(--grid) * 3);
    padding: 0 calc(var(--grid) * 2);
  }

  #hero { padding-bottom: calc(var(--grid) * 10); }
  .scroll-hint { font-size: 11px; position: relative; bottom: auto; margin-top: calc(var(--grid) * 3); }

  /* Health data — neck figure + bars */
  .neck-pressure {
    grid-template-columns: 1fr;
    gap: calc(var(--grid) * 3);
  }

  .human-svg {
    width: 220px;
  }

  .pressure-table {
    padding: 0 calc(var(--grid) * 1);
  }

  .p-angle { font-size: 12px; width: 36px; }
  .p-weight { font-size: 14px; width: 55px; }
  .p-bar { height: 16px; }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: calc(var(--grid) * 2);
  }

  .stat-card {
    padding: calc(var(--grid) * 2.5);
  }

  .stat-number { font-size: clamp(20px, 6vw, 28px); }
  .stat-desc { font-size: 14px; }

  .section-transition {
    font-size: clamp(15px, 4.5vw, 20px);
    padding: 0 calc(var(--grid) * 2);
  }

  .data-source {
    font-size: 11px;
    padding: 0 calc(var(--grid) * 2);
  }

  /* Story */
  .story-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: calc(var(--grid) * 3);
  }

  .story-gogo { width: 100px; height: 100px; }

  .story-bubble {
    font-size: 15px;
    padding: calc(var(--grid) * 2) calc(var(--grid) * 2.5);
    max-width: 100%;
  }

  .story-bubble:first-child::before { display: none; }

  /* Posture feature */
  .posture-compare {
    flex-direction: column;
    gap: calc(var(--grid) * 3);
  }

  .skeleton-svg {
    width: 160px;
    height: 210px;
  }

  .reaction-gogo { width: 100px; height: 100px; }

  .feature-points {
    padding: 0 calc(var(--grid) * 1);
  }

  .feature-point {
    font-size: 15px;
  }

  /* Timer / Reminder */
  .timer-bar { height: 32px; }
  .timer-label { font-size: 11px; }
  .timer-gogo { width: 80px; height: 80px; top: -55px; right: -10px; }
  .reminder-tagline { font-size: 15px; }

  /* Timeline — grid layout for mobile */
  .timeline-wrapper {
    padding: calc(var(--grid) * 2) 0;
    overflow: visible;
  }

  .timeline-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--grid) * 2.5);
    padding: 0 calc(var(--grid) * 2);
    width: auto;
    transform: none !important;
    justify-items: center;
  }

  .timeline-item {
    min-width: 0;
    gap: calc(var(--grid) * 0.8);
    align-items: center;
    text-align: center;
  }

  .timeline-item img {
    width: 80px;
    height: 80px;
  }

  .timeline-item span { font-size: 9px; }

  .timeline-item:last-child {
    grid-column: 2 / 3;
  }

  /* Privacy */
  .privacy-cards {
    grid-template-columns: 1fr;
    gap: calc(var(--grid) * 2);
  }

  .privacy-card {
    padding: calc(var(--grid) * 3);
  }

  .privacy-card h3 { font-size: 14px; }
  .privacy-card p { font-size: 15px; }
  .pc-icon { font-size: 26px; }

  .privacy-link { font-size: 14px; }

  /* CTA */
  .cta-gogo { width: 110px; height: 110px; }
  .cta-title { font-size: clamp(16px, 5vw, 22px); }
  .cta-sub { font-size: 14px; }

  /* Footer */
  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: calc(var(--grid) * 1.5);
  }

  .footer-links a { font-size: 14px; }
  .footer-copy { font-size: 12px; padding: 0 calc(var(--grid) * 2); }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
    padding: 0 calc(var(--grid) * 2);
  }

  .pixel-btn {
    width: 100%;
    text-align: center;
    font-size: 12px;
    padding: calc(var(--grid) * 1.5) calc(var(--grid) * 2);
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
    padding: 0 calc(var(--grid) * 2);
  }

  .cta-buttons .pixel-btn {
    width: 100%;
    text-align: center;
  }

  .reaction-bubble { font-size: 12px; }

  .posture-label { font-size: 11px; }
}
