@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  /* Light theme (default) */
  --bg-color: #f0f2f5;
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --accent: #0071e3;
  --accent-glow: rgba(0, 113, 227, 0.4);
  
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-hover: rgba(255, 255, 255, 0.9);

  --grid-color: rgba(128, 128, 128, 0.05);
  --mouse-glow: rgba(0, 113, 227, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #050505;
    --text-main: #f5f5f7;
    --text-muted: #a1a1a6;
    --accent: #2997ff;
    --accent-glow: rgba(41, 151, 255, 0.3);
    
    --glass-bg: rgba(30, 30, 30, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    --card-bg: rgba(40, 40, 40, 0.3);
    --card-hover: rgba(60, 60, 60, 0.5);

    --grid-color: rgba(255, 255, 255, 0.06);
    --mouse-glow: rgba(41, 151, 255, 0.16);
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--mouse-glow), transparent 80%),
    linear-gradient(var(--grid-color) 1px, transparent 1px), 
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  background-attachment: fixed;
}

/* Background animated gradients */
body::before, body::after {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.6;
  animation: float 20s infinite alternate;
  pointer-events: none;
}
body::before {
  background: radial-gradient(circle, rgba(0,113,227,0.4) 0%, rgba(0,0,0,0) 70%);
  top: -100px;
  left: -100px;
}
body::after {
  background: radial-gradient(circle, rgba(147,51,234,0.3) 0%, rgba(0,0,0,0) 70%);
  bottom: -100px;
  right: -100px;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 50px) scale(1.1); }
}

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

/* Navigation - Floating Glass */
nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  box-shadow: var(--glass-shadow);
  padding: 8px 16px;
  transition: all 0.3s ease;
  width: max-content;
  max-width: 90vw;
}

nav .container {
  display: flex;
  gap: 16px;
  padding: 0;
  align-items: center;
  height: 40px;
  overflow-x: auto;
  scrollbar-width: none;
}
nav .container::-webkit-scrollbar { display: none; }

nav a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

nav a:hover {
  background: rgba(128, 128, 128, 0.15);
  color: var(--accent);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 180px 0 80px;
  position: relative;
}

.logo-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.logo {
  width: 110px;
  height: 110px;
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.logo-container:hover .logo {
  transform: scale(1.05);
}

.broom {
  position: absolute;
  font-size: 2.5rem;
  bottom: -15px;
  right: -15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: rotate(0deg) scale(0.6);
  transform-origin: 80% 20%;
}

.logo-container:hover .broom {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  animation: sweep 1.2s ease-in-out infinite;
}

@keyframes sweep {
  0%, 100% { transform: rotate(0deg) translate(0, 0); }
  25% { transform: rotate(-18deg) translate(-14px, 4px); }
  50% { transform: rotate(8deg) translate(6px, -2px); }
  75% { transform: rotate(-18deg) translate(-14px, 4px); }
}

.dust {
  position: absolute;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.logo-container:hover .dust {
  opacity: 1;
}

.logo-container:hover .dust-1 { animation: dust-fly-1 1.5s infinite; }
.logo-container:hover .dust-2 { animation: dust-fly-2 1.5s infinite; }
.logo-container:hover .dust-3 { animation: dust-fly-3 1.5s infinite; }

@keyframes dust-fly-1 {
  0% { transform: translate(0, 0) scale(0); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translate(-50px, -30px) scale(1.2); opacity: 0; }
}

@keyframes dust-fly-2 {
  0% { transform: translate(0, 0) scale(0); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translate(50px, -20px) scale(1.1); opacity: 0; }
}

@keyframes dust-fly-3 {
  0% { transform: translate(0, 0) scale(0); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translate(-20px, 40px) scale(0.8); opacity: 0; }
}

.hero-title-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.hero-tag {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(60%, -100%);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.hero h1 {
  font-size: 4.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0;
  background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 36px;
}

.badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
  margin-bottom: 48px;
}

.badge {
  padding: 6px 18px;
  border-radius: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* Buttons */
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.trust-checklist {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}
.trust-checklist span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
}

.btn .arrow {
  transition: transform 0.3s ease;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: -20px;
  position: relative;
  z-index: 2;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card .num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card .label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Sections */
section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header .num {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover {
  transform: translateY(-5px);
  background: radial-gradient(circle at 10% 20%, rgba(0, 113, 227, 0.05) 0%, var(--card-hover) 80%);
  border-color: var(--accent);
  box-shadow: 0 20px 48px rgba(0,0,0,0.15);
}

.card.span-2 {
  grid-column: span 2;
}
.card.span-3 {
  grid-column: span 3;
}

.card .icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 24px;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
}
.card:hover .icon-wrap {
  transform: scale(1.1) rotate(5deg);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Carousel Screenshots */
.carousel-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.2);
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease-in-out;
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 20px;
  transition: all 0.3s;
  z-index: 10;
}
.carousel-btn:hover {
  background: var(--card-hover);
}
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

.carousel-dots {
  text-align: center;
  margin-top: 24px;
}
.carousel-dots .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 6px;
  background: var(--glass-border);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.carousel-dots .dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.screenshots-more {
  text-align: center;
  margin-top: 40px;
}

.screenshots-more a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  padding: 14px 28px;
  background: var(--glass-bg);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition: all 0.2s;
}

.screenshots-more a:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
}

/* Release Cards */
.release-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.release-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--accent);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--glass-shadow);
}

.release-card .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.release-card ul {
  list-style: none;
}

.release-card ul li {
  padding: 8px 0 8px 28px;
  position: relative;
  font-size: 1rem;
  color: var(--text-muted);
}

.release-card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.release-card ul li strong {
  color: var(--text-main);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 48px;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
}

.step {
  position: relative;
  margin-bottom: 32px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  transition: transform 0.3s;
}

.step:hover {
  transform: translateX(5px);
}

.step .num-dot {
  position: absolute;
  left: -46px;
  top: 32px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 0 0 6px var(--bg-color), 0 4px 12px var(--accent-glow);
}

.step h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Tree */
.tree-wrap {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(24px);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  overflow-x: auto;
}

.tree {
  font-family: 'SF Mono', Consolas, Menlo, monospace;
  font-size: 0.95rem;
  line-height: 1.8;
}

.tree .folder { color: #61afef; font-weight: 600; }
.tree .file { color: #abb2bf; }
.tree .comment { color: #5c6370; font-style: italic; }

/* Download Banner */
.download-banner {
  text-align: center;
  background: linear-gradient(135deg, rgba(0,113,227,0.1), rgba(147,51,234,0.1));
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 64px 24px;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.download-banner::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.download-banner .actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

.download-banner .req {
  margin-top: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  text-align: center;
  padding: 48px 0;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
}

footer a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

footer .sep {
  margin: 0 12px;
  color: var(--text-muted);
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .card.span-2, .card.span-3 {
    grid-column: span 2;
  }
}
@media (max-width: 768px) {
  body::before, body::after {
    width: 300px;
    height: 300px;
    filter: blur(80px);
  }
  .container {
    padding: 0 16px;
  }
  section {
    padding: 60px 0;
  }
  .hero {
    padding: 120px 0 48px;
  }
  .hero h1 {
    font-size: 2.4rem;
    letter-spacing: -0.03em;
  }
  .hero-tag {
    position: static;
    transform: none;
    margin-bottom: 12px;
  }
  .hero p {
    font-size: 1.05rem;
    margin-bottom: 24px;
  }
  .hero-actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 32px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .badges {
    margin-bottom: 32px;
  }
  .badge {
    padding: 4px 12px;
    font-size: 0.8rem;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 0;
  }
  .stat-card {
    padding: 16px;
  }
  .stat-card .num {
    font-size: 2rem;
  }
  .stat-card .label {
    font-size: 0.8rem;
  }
  .grid-2, .grid-3, .grid-bento {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .card.span-2, .card.span-3 {
    grid-column: span 1;
  }
  .card {
    padding: 24px;
  }
  nav {
    width: calc(100% - 32px);
    top: 12px;
    padding: 4px 8px;
  }
  nav a {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  .timeline {
    padding-left: 24px;
  }
  .step {
    padding: 20px;
  }
  .step .num-dot {
    left: -28px;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    top: 24px;
    box-shadow: 0 0 0 4px var(--bg-color);
  }
  .carousel-btn {
    padding: 8px 12px;
    font-size: 16px;
  }
  .carousel-btn.prev { left: 8px; }
  .carousel-btn.next { right: 8px; }
  .download-banner {
    padding: 40px 16px;
  }
  .download-banner h2 {
    font-size: 1.6rem;
  }
  .download-banner .actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 24px auto 0;
  }
  .download-banner .actions .btn {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2rem;
  }
}
