:root {
  /* Dark Theme (Default) */
  --primary: #00a2ff;
  --primary-dark: #0081cc;
  --bg: #0b0f19;
  --bg-secondary: #161c2d;
  --bg-secondary-alpha: rgba(26, 28, 45, 0.8);
  --card-bg: #1f2937;
  --text: #ffffff;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --font-main: 'Inter', sans-serif;
  --transition: all 0.3s ease;
}

[data-theme="light"] {
  --primary: #0081cc;
  --primary-dark: #006eb3;
  --bg: #f8fafc;
  --bg-secondary: #ffffff;
  --card-bg: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  border-radius: 100px;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 100px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

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


/* Navbar Responsive */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  z-index: 1001;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 60%;
    height: 100vh;
    background-color: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transition: right 0.3s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }

  .section.alternate {
    background-color: var(--bg-secondary);
  }
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-secondary);
}

.theme-toggle svg {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:active svg {
  transform: rotate(45deg);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 0;
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 900;
  margin-bottom: 24px;
  line-height: 1.1;
  letter-spacing: -2px;
  color: var(--text);
  /* text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); */
}

.hero h1 span {
  background: linear-gradient(90deg, #00a2ff, #00d1c1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin: 0 auto 48px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-visual {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(11, 15, 25, 0.4) 0%, rgba(11, 15, 25, 0.7) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Mobile Hero Image */
.hero-visual-mobile {
  display: none;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.hero-visual-mobile img {
  width: 100%;
  height: auto;
  display: block;
}

/* iPhone Mockup */
.iphone-mockup {
  width: 300px;
  height: 600px;
  background: #000;
  border-radius: 50px;
  padding: 12px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  background: #111;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
}

.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iphone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 25px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}

/* Features Sections */
section {
  padding: 8rem 4rem;
  transition: background-color 0.3s ease;
}

section.alternate {
  background-color: var(--bg-secondary);
  border-radius: 4rem;
  margin: 4rem auto;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.section-grid.reversed {
  direction: rtl;
}

.section-grid.reversed .feature-text {
  direction: ltr;
}

.feature-text h2 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}

.feature-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.feature-points {
  list-style: none;
}

.feature-points li {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-points li svg {
  color: var(--primary);
  width: 24px;
  height: 24px;
}

/* Pricing/PRO Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 60px;
}

.price-card {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--border);
  position: relative;
}

.price-card.featured {
  border-color: var(--primary);
  background: linear-gradient(145deg, var(--bg-secondary), rgba(0, 162, 255, 0.1));
}

.badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 4px 12px;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Download Section */
.download-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.download-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.download-btn svg {
  width: 24px;
  height: 24px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

/* Responsive */
@media (max-width: 991px) {
  .hero {
    min-height: auto;
    padding: 60px 0;
    display: block;
  }

  .hero h1 {
    font-size: 2.5rem;
    text-shadow: none;
  }

  .hero-desc {
    font-size: 1.1rem;
    margin-bottom: 32px;
    color: var(--text-muted);
    text-shadow: none;
  }

  .hero-visual {
    display: none;
  }

  /* Show mobile hero, hide desktop hero */
  .hero-visual {
    display: none;
  }

  .hero-visual-mobile {
    display: block;
  }

  .section-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 60px;
  }

  .section-grid.reversed {
    direction: ltr;
  }

  .iphone-mockup {
    margin: 40px auto 0;
  }

  .feature-points {
    display: inline-block;
    text-align: left;
    margin: 0 auto;
  }

  .feature-points li {
    justify-content: flex-start;
  }

  /* Mobile Section Spacing */
  section {
    padding: 60px 20px;
  }

  section.alternate {
    background-color: var(--bg-secondary);
    border-radius: 2rem;
    margin: 2rem 10px;
    padding: 60px 0;
  }

  /* Left-align lists on mobile while centering the block */
  .feature-points {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    margin: 0 auto;
    text-align: left;
  }

  .feature-points li {
    justify-content: flex-start;
    width: 100%;
  }
}

/* =========================================
   Modal System & Legal Styles
   ========================================= */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: hidden;
}

.modal.active {
  display: flex !important;
  animation: modalFadeIn 0.3s ease-out forwards;
}

.modal-content {
  background-color: var(--bg-secondary-alpha);
  width: 100%;
  max-width: 800px;
  height: auto;
  max-height: 90vh;
  /* Viewport-based height constraint */
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-header {
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.lang-switch {
  padding: 16px 32px;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background-color: rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.lang-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.lang-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.lang-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.legal-text {
  padding: 32px;
  overflow-y: auto;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.legal-text h3 {
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.legal-text h3:first-child {
  margin-top: 0;
}

.legal-text p {
  margin-bottom: 16px;
}

.legal-text a {
  color: var(--primary);
  text-decoration: none;
}

.legal-text a:hover {
  text-decoration: underline;
}

/* Standalone legal pages (privacy-policy / terms-of-service) */
.legal-text-content a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: rgba(0, 162, 255, 0.45);
}

.legal-text-content a:hover {
  color: var(--text);
  text-decoration-color: rgba(0, 162, 255, 0.9);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

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

/* Custom Scrollbar */
.legal-text::-webkit-scrollbar {
  width: 8px;
}

.legal-text::-webkit-scrollbar-track {
  background: transparent;
}

.legal-text::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.legal-text::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.highlight {
  color: rgba(26, 193, 199, 1);
}

/* Mobile Adjustments for Modal */
@media (max-width: 768px) {
  .modal {
    padding: 0;
    background-color: var(--bg-secondary);
    /* Solid background on mobile */
  }

  .modal-content {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: none;
  }

  .modal-header {
    padding: 20px;
  }

  .lang-switch {
    padding: 12px 20px;
  }

  .legal-text {
    padding: 20px;
  }
}