/* 基础样式重置 */
:root {
  --primary: #6366f1;
  /* Indigo */
  --primary-hover: #4f46e5;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  /* New Premium Tokens */
  --bg-gradient: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(244, 63, 94, 0.08), transparent 25%);
  --glass-surface: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(20px);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --letter-spacing-tight: -0.02em;
}

body.dark {
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --bg: #0f172a;
  --surface: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --bg-gradient: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(244, 63, 94, 0.15), transparent 25%);
  --glass-surface: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* Modern Footer & Table Styles */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 40px;
  background: white;
}

body.dark .table-wrapper {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 15px;
}

.modern-table th {
  text-align: left;
  padding: 18px 24px;
  background: rgba(241, 245, 249, 0.5);
  /* lighter gray */
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

body.dark .modern-table th {
  background: rgba(0, 0, 0, 0.2);
}

.modern-table td {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}

.modern-table tr:last-child td {
  border-bottom: none;
}

/* Status Pills Modern */
.status-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.status-pill.success {
  background: #dcfce7;
  color: #166534;
}

.status-pill.warning {
  background: #dbeafe;
  color: #1e40af;
}

.status-pill.danger {
  background: #fee2e2;
  color: #991b1b;
}

body.dark .status-pill.success {
  background: rgba(22, 163, 74, 0.2);
  color: #4ade80;
}

body.dark .status-pill.warning {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

body.dark .status-pill.danger {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
}

.device-name {
  font-weight: 600;
  color: var(--text-main);
  /* Ensure it remains a table-cell */
  display: table-cell;
  vertical-align: middle;
}

.device-name i {
  color: var(--primary);
  opacity: 0.8;
  margin-right: 10px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Modern Minimal Footer */
.site-footer {
  margin-top: 120px;
  padding: 80px 0 40px;
  background: #f8fafc;
  /* Very light slate for contrast against white body */
  border-top: 1px solid var(--border);
  color: #334155;
}

body.dark .site-footer {
  background: #0b1120;
  /* Darker than body */
  color: #94a3b8;
  border-top-color: #1e293b;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand-name {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  /* Adaptive */
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 320px;
}

.footer-links-col h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  color: var(--text-main);
}

.footer-links-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 12px;
  font-size: 15px;
  transition: color 0.2s;
}

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

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}

body.dark .footer-socials a {
  background: rgba(255, 255, 255, 0.05);
}

.footer-socials a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.footer-disclaimer {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark .footer-disclaimer {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.footer-disclaimer summary {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  opacity: 0.8;
  cursor: pointer;
  list-style: none;
  /* Hide default marker */
  position: relative;
  transition: opacity 0.2s;
  user-select: none;
  outline: none;
}

.footer-disclaimer summary:hover {
  opacity: 1;
  color: var(--primary);
}

.footer-disclaimer summary::-webkit-details-marker {
  display: none;
}

/* Hide Chrome marker */

/* Custom Marker */
.footer-disclaimer summary::after {
  content: '+';
  display: inline-block;
  margin-left: 8px;
  font-weight: 400;
  transition: transform 0.2s ease;
}

.footer-disclaimer details[open] summary::after {
  transform: rotate(45deg);
}

.footer-disclaimer .disclaimer-content {
  margin-top: 12px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-disclaimer p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 8px;
  opacity: 0.8;
  max-width: 900px;
}

.footer-bottom {
  border-top: none;
  /* Removed border as disclaimer has it now */
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
}

body.dark .footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.footer-note {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-outline {
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  margin: 16px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  width: calc(100% - 32px);
  margin-left: auto;
  margin-right: auto;
}

body.dark .nav-bar {
  background: var(--glass-surface);
  border-bottom-color: var(--glass-border);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-title {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-weight: 500;
  font-size: 15px;
}

.nav-links span {
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links span:hover {
  color: var(--primary);
}

.logo-svg {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Buttons */
button {
  font-family: inherit;
}

#darkModeToggle {
  color: var(--text-muted);
  transition: all 0.2s;
}

#darkModeToggle:hover {
  background: var(--surface) !important;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Banner */
/* Premium Banner */
.banner {
  max-width: 600px;
  margin: 24px auto 0;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #e11d48;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 6px -1px rgba(244, 63, 94, 0.1);
  animation: slideDown 0.6s ease-out;
}

body.dark .banner {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

.banner i {
  font-size: 14px;
  opacity: 0.9;
}

.banner a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.2s;
}

.banner a:hover {
  opacity: 0.8;
}

@media (max-width: 640px) {
  .banner {
    width: calc(100% - 32px);
    margin: 20px auto 0;
    border-radius: 12px;
    /* Soften the pill shape on mobile for multi-line text */
    padding: 12px 16px;
    flex-direction: row;
    align-items: flex-start;
    /* Align icon to top if text wraps */
    text-align: left;
    line-height: 1.5;
  }

  .banner i {
    margin-top: 3px;
    /* Optical alignment with text line */
    flex-shrink: 0;
  }
}

/* Hero Section */
.page-header {
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Background Glow */
.page-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.page-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-description {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Version Tag */
.version-info {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}

.version-tag {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* Platforms Grid */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin: 60px 0 40px;
}

.platform-item {
  background: var(--surface);
  border: 2px solid transparent;
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.platform-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.2);
}

.platform-item.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: var(--shadow-md);
}

.platform-icon {
  font-size: 48px;
  margin-bottom: 16px;
  transition: transform 0.3s;
}

.platform-item:hover .platform-icon {
  transform: scale(1.1);
}

.platform-name {
  font-weight: 600;
  color: var(--text-main);
}

/* Downloads Area */
.download-info {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: none;
  animation: fadeIn 0.5s ease-out;
}

.download-info.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.download-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.download-btn {
  margin-top: 24px;
  background: var(--primary);
  color: white;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.download-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.23);
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

/* Features & Use Cases */
.section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-main);
}

.use-cases-section,
.features-section,
.screenshots-section {
  margin: 100px 0;
}

.use-case-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card-base {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.card-base:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.use-case-card,
.feature-card {
  text-align: center;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.use-case-card::before,
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #ef4444);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.use-case-card:hover,
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.2);
}

.use-case-card:hover::before,
.feature-card:hover::before {
  transform: scaleX(1);
}

/* Mapped Icon Styles */
.feature-icon,
.use-case-icon {
  width: 56px;
  height: 56px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 24px;
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;
}

/* Animation Aliases */
.reveal {
  transform: translateY(30px);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Keep existing reveal-left/right logic from new CSS but ensure they work */
.reveal-left {
  transform: translateX(-30px);
}

.reveal-left.in-view {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  transform: translateX(30px);
}

.reveal-right.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-title {
    font-size: 32px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-feature span {
    display: none;
  }

  /* Make click trigger tooltip on mobile if needed, 
     but normally hover doesn't work well. 
     Just showing icon is a subtle hint. */

  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  color: var(--text-main);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  pointer-events: auto;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

.toast i {
  font-size: 20px;
}

.toast.info i {
  color: var(--primary);
}

.toast.success i {
  color: #10b981;
}

.toast.warning i {
  color: #f59e0b;
}

@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeOutToast {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.toast.hiding {
  animation: fadeOutToast 0.3s forwards;
}

/* Screenshot Gallery */
.screenshot-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  perspective: 1000px;
  padding: 20px;
}

.screenshot-image {
  width: 260px;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: var(--surface);
}

.screenshot-image:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 30px 60px -10px rgba(99, 102, 241, 0.3);
  z-index: 10;
  border-color: var(--primary);
}

@media (max-width: 768px) {
  .screenshot-container {
    gap: 20px;
  }

  .screenshot-image {
    width: 100%;
    max-width: 320px;
  }
}

/* Nav Feature Highlights */
.nav-feature {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: help;
  transition: all 0.2s;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.nav-feature:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
}

.nav-feature i {
  color: var(--primary);
  font-size: 14px;
}

.nav-tooltip {
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 240px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  z-index: 1000;
  pointer-events: none;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.nav-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

.nav-feature:hover .nav-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}