:root {
  --bg: #ffffff;
  --fg: #111111;
  --accent: #2a9d8f;
  --accent-dark: #21867b;
  --accent-light: #48b4a7;
  --fg-secondary: #555;
  --btn-radius: 6px;
  --card-bg: #f9f9f9;
  --shadow: rgba(0, 0, 0, 0.08);
  --header-shadow: rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
  --border-color: #ddd;
}

[data-theme="dark"] {
  --bg: #111111;
  --fg: #f5f5f5;
  --fg-secondary: #ccc;
  --accent: #2a9d8f;
  --accent-light: #3bae9f;
  --card-bg: #1a1a1a;
  --shadow: rgba(0, 0, 0, 0.2);
  --header-shadow: rgba(0, 0, 0, 0.25);
  --border-color: #333;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  transition: background var(--transition-speed), color var(--transition-speed);
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

h3 {
  font-size: 1.3rem;
  margin: 0.5rem 0;
}

p {
  font-size: 1.1rem;
  margin: 0.5rem 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-speed);
}

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

section {
  margin: 4rem 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background var(--transition-speed), box-shadow var(--transition-speed);
  box-shadow: 0 2px 8px var(--header-shadow);
}

.header.scrolled {
  box-shadow: 0 4px 12px var(--header-shadow);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.logo-container:hover .logo-icon {
  transform: rotate(-10deg);
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background: var(--fg);
  transition: all 0.3s ease;
}

/* Buttons */
.btn {
  padding: 0.6em 1.2em;
  font-size: 1rem;
  border-radius: var(--btn-radius);
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn.secondary:hover {
  background: var(--accent);
  color: #fff;
}

.btn.outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn.outline:hover {
  background: var(--accent);
  color: #fff;
}

/* Theme Toggle */
.theme-switch {
  display: flex;
  align-items: center;
  position: relative;
  width: 40px;
  height: 24px;
  margin-left: 0.5rem;
}

.theme-switch input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.theme-icon {
  position: absolute;
  cursor: pointer;
  font-size: 1.5rem;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

input:checked + .theme-icon {
  transform: rotate(180deg);
}

/* Main */
.main {
  max-width: 1100px;
  margin: auto;
  padding: 2rem 1rem;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  /* Make sure hero section is visible initially and not affected by scroll reveal */
  opacity: 1;
  transform: translateY(0);
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block; /* Ensure visibility */
}

.subhead {
  font-size: 1.3rem;
  color: var(--fg-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  display: block; /* Ensure visibility */
}

.cta-buttons {
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.privacy-badge,
.coming-soon {
  font-size: 1rem;
  color: var(--fg-secondary);
  text-align: center;
  display: block; /* Ensure visibility */
}

.privacy-badge {
  margin-top: 2rem;
}

.coming-soon {
  margin-top: 0.5rem;
}

/* Animations */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.6s forwards;
}

.animate-in:nth-child(1) {
  animation-delay: 0.1s;
}
.animate-in:nth-child(2) {
  animation-delay: 0.3s;
}
.animate-in:nth-child(3) {
  animation-delay: 0.5s;
}
.animate-in:nth-child(4) {
  animation-delay: 0.7s;
}
.animate-in:nth-child(5) {
  animation-delay: 0.9s;
}

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

/* Screenshots */
.screenshots {
  margin: 4rem 0;
}

.screenshot-gallery {
  display: flex;
  gap: 1rem;
  justify-content: center;
  overflow: hidden;
  margin: 2rem auto;
  position: relative;
  max-width: 100%;
}

.screenshot {
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  transform: scale(0.9);
}

.screenshot.active {
  opacity: 1;
  transform: scale(1);
}

.screenshot-nav {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--fg-secondary);
  opacity: 0.3;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-dot:hover {
  opacity: 0.5;
}

.nav-dot.active {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.2);
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 16px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px var(--shadow);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

/* Extensions */
.section-intro {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--fg-secondary);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.extensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.ext-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 16px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: var(--fg);
}

.ext-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px var(--shadow);
}

.ext-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.ext-card:hover .ext-icon {
  transform: scale(1.1);
}

.ext-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Support */
.support {
  background: var(--card-bg);
  padding: 3rem 1rem;
  margin: 6rem 0;
  border-radius: 12px;
}

.support-card {
  max-width: 700px;
  margin: auto;
  text-align: center;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 4px 16px var(--shadow);
  background: var(--bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.support-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px var(--shadow);
}

.support-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  transition: transform 0.3s ease;
}

.support-card:hover .support-icon {
  transform: rotate(15deg);
}

.support-card h2 {
  font-size: 1.75rem;
  margin: 0.5rem 0 1rem;
}

.support-card p {
  font-size: 1.1rem;
  color: var(--fg-secondary);
  margin-bottom: 1.5rem;
}

.support-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Community */
.community {
  text-align: center;
  margin: 4rem 0;
}

.community-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: var(--card-bg);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  max-width: 900px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.2rem;
}

.footer-logo-icon {
  width: 30px;
  height: 30px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.footer p {
  color: var(--fg-secondary);
  font-size: 0.9rem;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 1.2rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    padding: 1rem;
  }

  .nav {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: var(--bg);
    width: 80%;
    height: calc(100vh - 70px);
    padding: 2rem;
    box-shadow: -2px 0 8px var(--shadow);
    transition: right 0.3s ease;
    z-index: 10;
  }

  .nav.active {
    right: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .features-grid, .extensions-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    max-width: 100%;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }

  .support-buttons {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .support-buttons .btn {
    width: 100%;
    max-width: 300px;
  }

  .screenshot-gallery {
    flex-direction: column;
    align-items: center;
  }

  .screenshot {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  h2 {
    font-size: 1.75rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .support-card {
    padding: 1.5rem;
  }
}

/* Theme transition class for smooth theme switching */
.theme-transition {
  transition: background 0.5s ease, color 0.5s ease;
}

.theme-transition * {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

