﻿:root, [data-theme="dark"] {
  --bg: #0f172a;
  --bg-gradient-1: rgba(76, 29, 149, 0.25);
  --bg-gradient-2: rgba(15, 118, 110, 0.2);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --card-bg-glass: rgba(30, 41, 59, 0.6);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --card-hover-border: rgba(255, 255, 255, 0.25);
  --grain-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --neural-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --accent-glow: rgba(139, 92, 246, 0.4);
  --title-gradient: linear-gradient(to right, #fff, #94a3b8);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-gradient-1: rgba(167, 139, 250, 0.4);
  --bg-gradient-2: rgba(52, 211, 153, 0.35);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --card-bg-glass: rgba(255, 255, 255, 0.6);
  --card-border: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
  --card-hover-border: rgba(0, 0, 0, 0.15);
  --grain-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --neural-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
  --accent-glow: rgba(139, 92, 246, 0.2);
  --title-gradient: linear-gradient(to right, #0f172a, #475569);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 15% 50%, var(--bg-gradient-1) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, var(--bg-gradient-2) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

/* Base Page Setup */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 20px 120px; /* Leave space for layouts */
  position: relative;
  z-index: 10; 
}

/* ======= Gallery Zoom Preview (突破容器的放大预览) ======= */
.gallery-zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2147483647;
  opacity: 0;
  
  transition: opacity 0.3s ease;
}

.gallery-zoom-overlay.visible {
  opacity: 1;
}

.gallery-zoom-image {
  position: fixed;
  width: auto;
  height: auto;
  border-radius: 16px;
  box-shadow:
    0 0 0 6px var(--card-hover-border),
    0 25px 80px rgba(0, 0, 0, 0.6),
    0 0 60px var(--accent-glow);
  object-fit: cover;
  transform-origin: center center;
  transform: scale(0.9);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.25s ease;
  pointer-events: none;
  z-index: 2147483647;
}

.gallery-zoom-image.visible {
  transform: scale(1);
  opacity: 1;
}
/* ======= Layout Toggles ======= */
[data-layout="layout-a"] .edge-cats { display: none !important; }
[data-layout="layout-a"] .page { padding: 24px 20px 64px; } /* Reset padding for bubble mode */

[data-layout="layout-b"] .floating-cats { display: none !important; }

/* ======= Layout A: Floating Wrap Around Cats ======= */
.floating-cats {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: auto; /* Allow hover zoom */
  z-index: 1;
  overflow: hidden;
}

.floating-cats .orb {
  position: absolute;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  opacity: 0.8;
  border: 4px solid var(--card-hover-border);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  cursor: pointer;
}

.floating-cats .orb:hover {
  transform: scale(2) !important;
  opacity: 1;
  z-index: 99;
}

/* Animations for orbs */
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(30vw, 15vh) rotate(10deg); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-20vw, 30vh) rotate(-15deg); } }
@keyframes drift3 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(25vw, -40vh) rotate(5deg); } }
@keyframes drift4 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-35vw, -20vh) rotate(-10deg); } }

.orb1 { top: -5%; left: 5%; width: 220px; height: 220px; animation: drift1 80s infinite ease-in-out; }
.orb2 { top: 10%; right: -5%; width: 180px; height: 180px; animation: drift2 70s infinite ease-in-out; animation-delay: -10s; }
.orb3 { bottom: 5%; left: 15%; width: 200px; height: 200px; animation: drift3 90s infinite ease-in-out; animation-delay: -20s; }
.orb4 { bottom: -10%; right: 10%; width: 250px; height: 250px; animation: drift4 100s infinite ease-in-out; animation-delay: -30s; }


/* ======= Layout B: Edge Tracks ======= */
.edge-cats {
  position: fixed;
  left: 0;
  width: 100vw;
  height: 90px;
  overflow: hidden;
  z-index: 100;
  pointer-events: auto;
  background: var(--bg);
}

.edge-top {
  top: 0;
  border-bottom: 2px solid var(--card-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.edge-bottom {
  bottom: 0;
  border-top: 2px solid var(--card-border);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
}

.edge-track {
  display: flex;
  height: 100%;
  width: max-content;
  align-items: center;
  padding: 0; /* Fully flushed tape style */
}

/* New Marquee Group handles the seamless math */
.marquee-group {
  display: flex;
  height: 100%;
  align-items: center;
}

.edge-track:hover {
  animation-play-state: paused;
}

.animate-left { animation: scrollLeft 90s linear infinite; }
.animate-right { animation: scrollRight 90s linear infinite; }

.marquee-group img {
  height: 100%; /* Fully filling the belt height */
  width: auto;
  border-radius: 0; /* Remove border-radius for tape effect */
  margin-right: -1px; /* Remove gaps completely, overlap slightly to avoid antialiasing line */
  border: none; /* Remove borders */
  transition: transform 0.3s ease;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}

.marquee-group img:hover {
  transform: scale(1.3);
  z-index: 10;
  box-shadow: 0 8px 16px var(--accent-glow);
  position: relative; /* ensure scale brings it to top layer */
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } 
}
@keyframes scrollRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}


/* ======= Component Styles ======= */
.topbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--card-bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  padding: 8px 16px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.lang-toggle:hover {
  transform: translateY(-2px);
  background: var(--card-hover-border);
  border-color: var(--card-hover-border);
  box-shadow: 0 12px 24px var(--accent-glow);
}

.hero {
  text-align: center;
  margin-bottom: 48px;
  padding-top: 20px;
}

.kicker {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
}

h1 {
  margin: 16px 0 12px;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.subtitle {
  color: var(--text-secondary);
  margin: 0 auto 36px;
  max-width: 680px;
  font-size: 1.15rem;
  line-height: 1.6;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.card {
  text-align: left;
  text-decoration: none;
  color: inherit;
  padding: 32px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--card-bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--card-shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.card.grain::before { background: var(--grain-gradient); }
.card.neuralnote::before { background: var(--neural-gradient); }

.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--card-hover-border);
  box-shadow: 0 20px 40px var(--accent-glow);
}

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

.card h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.card p {
  margin: 0 0 24px;
  color: var(--text-secondary);
  line-height: 1.5;
  min-height: 48px;
}

.card span {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card.grain span { color: #3b82f6; }
.card.neuralnote span { color: #10b981; }

.card span::after {
  content: "→";
  transition: transform 0.3s ease;
}

.card:hover span::after {
  transform: translateX(4px);
}

.site-footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
  text-align: center;
}

.filings {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 32px;
}

.filing-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.filing-link:hover {
  color: var(--text-primary);
}

.filing-badge {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

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

@media (max-width: 560px) {
  .page {
    padding-top: 100px;
  }
  h1 {
    font-size: 2.2rem;
  }
  .floating-cats .orb {
    width: 140px; height: 140px;
  }
    .edge-cats {
    height: 70px;
  }
  .gallery-zoom-image {
    max-width: 280px;
    max-height: 280px;
  }
}





