/* ============================================
   Zeno Turtle — Changelog Styles
   ============================================ */

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

:root {
  --brand: #38D83B;
  --brand-dim: rgba(56, 216, 59, 0.12);
  --brand-glow: rgba(56, 216, 59, 0.25);
  --bg-base: #0A0A0F;
  --bg-card: #141420;
  --bg-card-hover: #1a1a2e;
  --bg-subtle: #1e1e2e;
  --text-primary: #E0E0E6;
  --text-secondary: #9090A8;
  --text-muted: #5a5a72;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.13);

  --tag-new-bg: rgba(56, 216, 59, 0.12);
  --tag-new-text: #4ade80;
  --tag-new-border: rgba(56, 216, 59, 0.3);

  --tag-improve-bg: rgba(59, 130, 246, 0.1);
  --tag-improve-text: #60a5fa;
  --tag-improve-border: rgba(59, 130, 246, 0.3);

  --tag-fix-bg: rgba(251, 146, 60, 0.1);
  --tag-fix-text: #fb923c;
  --tag-fix-border: rgba(251, 146, 60, 0.3);

  --review-bg: rgba(251, 191, 36, 0.1);
  --review-text: #fbbf24;
  --review-border: rgba(251, 191, 36, 0.35);
  --review-glow: rgba(251, 191, 36, 0.2);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── 背景装饰 ─── */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  animation: orb-float 8s ease-in-out infinite alternate;
}

.bg-orb-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: radial-gradient(circle, #38D83B, transparent 70%);
  animation-delay: 0s;
}

.bg-orb-2 {
  width: 400px;
  height: 400px;
  top: 30%;
  right: -100px;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  opacity: 0.10;
  animation-delay: 3s;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,0.5) 10%, rgba(0,0,0,0.5) 70%, transparent);
}

@keyframes orb-float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -40px) scale(1.05); }
}

/* ─── 布局 ─── */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── 导航栏 ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.75);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-logo-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.nav-link.active {
  color: var(--brand);
  background: var(--brand-dim);
}

/* ─── Hero 区域 ─── */
.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-dim);
  border: 1px solid var(--tag-new-border);
  border-radius: 99px;
  padding: 4px 12px;
  margin-bottom: 28px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  animation: fade-up 0.6s ease both;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.hero-title {
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fade-up 0.6s 0.1s ease both;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #ffffff 0%, var(--brand) 50%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fade-up 0.6s 0.2s ease both;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  animation: fade-up 0.6s 0.3s ease both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── 时间线 ─── */
.timeline {
  padding: 0 0 96px;
  position: relative;
}

.timeline-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--border) 5%,
    var(--border) 95%,
    transparent 100%
  );
}

.timeline-entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  margin-bottom: 56px;
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-entry.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 时间轴节点 */
.timeline-meta {
  padding-top: 24px;
  text-align: right;
  position: relative;
}

.timeline-node {
  position: absolute;
  right: -16px;
  top: 28px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim), 0 0 12px var(--brand-glow);
  z-index: 2;
}

.timeline-version {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.3px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  margin-bottom: 4px;
}

.timeline-date {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

/* 版本卡片 */
.version-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px 32px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.version-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-glow), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.version-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(56, 216, 59, 0.06);
}

.version-card:hover::before {
  opacity: 1;
}

/* 卡片头部 */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.card-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 9px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-latest {
  background: var(--brand-dim);
  color: var(--brand);
  border: 1px solid var(--tag-new-border);
}

.badge-stable {
  background: rgba(148, 163, 184, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* 分组区块 */
.change-group {
  margin-bottom: 22px;
}

.change-group:last-child {
  margin-bottom: 0;
}

.group-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.group-label-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.group-new {
  background: var(--tag-new-bg);
  color: var(--tag-new-text);
  border: 1px solid var(--tag-new-border);
}

.group-new .group-label-dot {
  background: var(--tag-new-text);
}

.group-improve {
  background: var(--tag-improve-bg);
  color: var(--tag-improve-text);
  border: 1px solid var(--tag-improve-border);
}

.group-improve .group-label-dot {
  background: var(--tag-improve-text);
}

.group-fix {
  background: var(--tag-fix-bg);
  color: var(--tag-fix-text);
  border: 1px solid var(--tag-fix-border);
}

.group-fix .group-label-dot {
  background: var(--tag-fix-text);
}

/* 更改列表 */
.change-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.change-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  transition: color 0.2s ease;
}

.change-item:hover {
  color: var(--text-primary);
}

.change-item-icon {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  opacity: 0.7;
}

.change-item strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* 分隔线 */
.group-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ─── 底部 Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-logo-icon {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--brand), #22c55e);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #0A0A0F;
}

.footer-logo-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.footer-right {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── 响应式 ─── */
@media (max-width: 640px) {
  .timeline-entry {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .timeline-line {
    display: none;
  }

  .timeline-meta {
    padding-top: 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .timeline-node {
    position: static;
    flex-shrink: 0;
  }

  .version-card {
    padding: 20px;
  }

  .hero {
    padding: 64px 0 48px;
  }

  .hero-stats {
    gap: 20px;
  }

  .hero-stat-num {
    font-size: 18px;
  }

  .nav-links {
    display: none;
  }

  .download-section {
    flex-direction: column;
    flex-wrap: wrap;
  }

  .download-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ─── 订阅区块 ─── */
.subscribe-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  margin-bottom: 64px;
  position: relative;
  overflow: hidden;
}

.subscribe-section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}

.subscribe-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.subscribe-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.subscribe-form {
  display: flex;
  gap: 8px;
  max-width: 380px;
  margin: 0 auto;
}

.subscribe-input {
  flex: 1;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.subscribe-input::placeholder {
  color: var(--text-muted);
}

.subscribe-input:focus {
  border-color: rgba(56, 216, 59, 0.4);
}

.subscribe-btn {
  background: var(--brand);
  color: #0A0A0F;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: transform 0.15s, opacity 0.15s;
  letter-spacing: -0.2px;
}

.subscribe-btn:hover {
  opacity: 0.9;
  transform: scale(0.98);
}

.subscribe-btn:active {
  transform: scale(0.96);
}

/* ─── 版本快捷导航 ─── */
.version-nav {
  position: fixed;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
}

.version-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  padding: 4px 0;
}

.version-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.version-nav-item.active .version-nav-dot,
.version-nav-item:hover .version-nav-dot {
  background: var(--brand);
  box-shadow: 0 0 6px var(--brand-glow);
}

.version-nav-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  white-space: nowrap;
}

.version-nav-item:hover .version-nav-label {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 1100px) {
  .version-nav {
    display: none;
  }
}

/* ─── 减弱动效 ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── 语言切换器 ─── */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-selector-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 70px;
  justify-content: center;
}

.lang-selector-trigger:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.lang-selector-trigger.active {
  background: var(--brand-dim);
  border-color: var(--brand);
}

.lang-selector-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--text-secondary);
  transition: transform 0.2s;
}

.lang-selector.open .lang-selector-arrow {
  transform: rotate(180deg);
}

.lang-selector-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
  z-index: 100;
  overflow: hidden;
}

.lang-selector.open .lang-selector-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-option:hover {
  background: var(--bg-card-hover);
}

.lang-option.active {
  background: var(--brand-dim);
  color: var(--brand);
}

.lang-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.download-section {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: nowrap;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 1;
}

.download-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.download-btn-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.download-btn-icon svg {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.download-btn-android .download-btn-icon svg {
  color: #3ddc84;
}

.download-btn-apple .download-btn-icon svg {
  color: #ffffff;
}

.download-btn-google .download-btn-icon svg {
  color: #4285f4;
}

.download-btn-text {
  flex-shrink: 0;
  white-space: nowrap;
}

.download-btn-badge {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ─── 审核中状态按钮 ─── */
.download-btn-review {
  border-color: var(--review-border) !important;
  background: rgba(251, 191, 36, 0.06) !important;
  position: relative;
  overflow: visible;
}

.download-btn-review::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, var(--review-border), transparent 60%, var(--review-border)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: review-border-glow 2.5s ease-in-out infinite;
}

@keyframes review-border-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.download-btn-review:hover {
  border-color: rgba(251, 191, 36, 0.55) !important;
  background: rgba(251, 191, 36, 0.12) !important;
  box-shadow: 0 0 28px var(--review-glow), 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.download-btn-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--review-text);
  background: var(--review-bg);
  border: 1px solid var(--review-border);
  border-radius: 99px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
  animation: review-badge-pulse 2s ease-in-out infinite;
}

@keyframes review-badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.download-btn-review-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--review-text);
  flex-shrink: 0;
  animation: review-dot-pulse 2s ease-in-out infinite;
}

@keyframes review-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.lang-code {
  width: 28px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}
