/* ========================================
   SourceCraft — Design System
   ======================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  /* Colors */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-border: rgba(255, 255, 255, 0.08);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-start: #7c3aed;
  --accent-mid: #6366f1;
  --accent-end: #06b6d4;
  --accent-gradient: linear-gradient(135deg, var(--accent-start), var(--accent-mid), var(--accent-end));

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--bg-glass-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-large {
  padding: 18px 44px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

/* ---------- Background Effects ---------- */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  top: -200px;
  left: -200px;
  background: var(--accent-start);
}

.bg-glow-2 {
  top: 40%;
  right: -300px;
  background: var(--accent-end);
}

.bg-glow-3 {
  bottom: 10%;
  left: 10%;
  background: var(--accent-mid);
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-glass-border);
  padding: 10px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 700;
}

.navbar-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.navbar-links a:hover {
  color: var(--text-primary);
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-base);
  border-radius: 2px;
}

.navbar-links a:hover::after {
  width: 100%;
}

.navbar-cta {
  padding: 8px 20px !important;
  font-size: 0.9rem !important;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stat {
  text-align: left;
}

.hero-stat .number {
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-mockup {
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border: 1px solid var(--bg-glass-border);
  position: relative;
  z-index: 2;
}

.hero-visual::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: var(--accent-gradient);
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  z-index: 0;
}

/* ---------- Features ---------- */
.features {
  padding: var(--section-padding);
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-base);
  transform-origin: left;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.15);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  margin-bottom: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- Screenshot / Demo ---------- */
.showcase {
  padding: var(--section-padding);
  position: relative;
}

.showcase-wrapper {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.showcase-image {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border: 1px solid var(--bg-glass-border);
}

.showcase-wrapper::after {
  content: '';
  position: absolute;
  inset: -30px;
  background: var(--accent-gradient);
  border-radius: var(--radius-xl);
  filter: blur(60px);
  opacity: 0.06;
  z-index: -1;
}

/* ---------- Pricing ---------- */
.pricing {
  padding: var(--section-padding);
  position: relative;
}

.pricing-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

.pricing-badge {
  display: inline-block;
  padding: 4px 16px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.pricing-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-amount {
  margin: 24px 0;
}

.pricing-amount .currency {
  font-size: 1.5rem;
  font-weight: 600;
  vertical-align: top;
  line-height: 1;
  margin-top: 8px;
  display: inline-block;
}

.pricing-amount .price {
  font-size: 4rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.pricing-amount .period {
  font-size: 1rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.pricing-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 36px;
}

.pricing-features li {
  padding: 10px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features .check {
  color: var(--success);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ---------- Download ---------- */
.download {
  padding: var(--section-padding);
  position: relative;
}

.download-box {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-box::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--accent-gradient);
  border-radius: var(--radius-xl);
  z-index: -1;
  opacity: 0.15;
}

.download-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.download-box h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.download-box .version-info {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.system-req {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.8;
}

.system-req strong {
  color: var(--text-secondary);
}

/* ---------- Footer ---------- */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--bg-glass-border);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-info {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.footer-contact {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Scroll Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    width: 100%;
    max-width: 500px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --section-padding: 60px 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .navbar-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--bg-glass-border);
  }

  .navbar-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-stats {
    gap: 24px;
  }

  .pricing-card {
    padding: 36px 24px;
  }

  .download-box {
    padding: 36px 24px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Floating Contact Widget ---------- */
.floating-contact {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 999;
}

.floating-contact-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transition: all var(--transition-base);
  user-select: none;
}

.floating-contact-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.55);
}

.floating-contact-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: all var(--transition-base);
}

.floating-contact-panel.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.contact-panel-header {
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--bg-glass-border);
}

.contact-panel-body {
  padding: 16px;
}

.contact-panel-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.contact-panel-body .contact-qq {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .floating-contact {
    right: 16px;
    bottom: 80px;
  }

  .floating-contact-btn {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
}