:root {
  --primary-pink: #E81E64;
  --primary-orange: #FF8C00;
  --primary-blue: #00AFF0;
  --primary-purple: #8F44AD;
  --primary-ocean: #0078D7;
  --background-light: #FAFAFA;
  --background-dark: #1C1C1E;
  --text-primary: #1C1C1E;
  --text-secondary: #6C6C70;
  --card-background: #FFFFFF;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --border-color: #E5E5EA;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--background-light);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 1rem 0;
}

nav .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

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

/* Language Toggle Switch */
.language-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  padding: 3px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-toggle:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-option {
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.language-option.active {
  color: white;
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-purple) 100%);
  box-shadow: 0 2px 8px rgba(232, 30, 100, 0.3);
}

.language-option:not(.active):hover {
  color: var(--text-primary);
}

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

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

.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, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--card-background);
  z-index: 1001;
  transition: right 0.3s ease;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-links {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-menu-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.mobile-menu-links a:hover {
  color: var(--primary-pink);
}

.mobile-menu-links .lang-switch {
  margin-top: 1rem;
  text-align: center;
  width: fit-content;
}

/* Mobile menu language toggle specific styling */
.mobile-menu-links .language-toggle {
  margin: 2rem auto 0;
  justify-content: center;
  background: var(--background-light);
  border: 2px solid var(--border-color);
  padding: 4px;
  max-width: 140px;
  border-radius: 30px;
}

.mobile-menu-links .language-toggle .language-option {
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.mobile-menu-links .language-toggle .language-option.active {
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-purple) 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(232, 30, 100, 0.4);
}

.mobile-menu-links .language-toggle .language-option:not(.active) {
  color: var(--text-secondary);
  background: transparent;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

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

.lang-switch {
  display: none; /* Hidden when using the toggle switch */
}

/* Fallback for old language switch if needed */
.lang-switch.fallback {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
  display: inline-block;
}

.lang-switch.fallback:hover {
  border-color: var(--primary-pink);
  color: var(--primary-pink);
}

/* Hero Section */
.hero {
  margin-top: 80px;
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(232, 30, 100, 0.05) 0%, rgba(0, 175, 240, 0.05) 100%);
}

.app-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  display: block;
  border-radius: 26px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.app-icon:hover {
  transform: scale(1.05);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* App Features Section */
.app-features {
  position: relative;
  width: 100%;
  background: var(--background-light);
}

/* Feature Row */
.feature-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-row:nth-child(even) {
  direction: rtl;
}

.feature-row:nth-child(even) > * {
  direction: ltr;
}

/* Feature Content */
.feature-content {
  opacity: 0;
  transform: translateX(-30px);
  animation: fadeInLeft 0.8s ease forwards;
}

.feature-row:nth-child(even) .feature-content {
  transform: translateX(30px);
  animation: fadeInRight 0.8s ease forwards;
}

.feature-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-purple) 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.feature-content h3 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.feature-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.feature-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-benefits li {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.feature-benefits li::before {
  content: '✓';
  display: inline-block;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-purple) 100%);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  margin-right: 1rem;
  flex-shrink: 0;
}

/* Feature Screenshot */
.feature-screenshot {
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.feature-screenshot img {
  width: 100%;
  height: auto;
  max-width: 400px;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.15));
  border-radius: 20px;
  transition: transform 0.3s ease;
}

.feature-screenshot:hover img {
  transform: scale(1.02);
}

/* Animations */
@keyframes fadeInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Section separator */
.feature-row:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

/* Features Section */
.features {
  padding: 4rem 2rem;
  background: var(--card-background);
}

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

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: var(--background-light);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-card .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Theme Showcase */
.themes-showcase {
  padding: 3rem 2rem;
  background: var(--background-light);
}

.themes-showcase h3 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.themes-container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.theme-bubble {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.theme-bubble:hover {
  transform: scale(1.1);
}

.theme-heart { background: rgba(232, 30, 100, 0.1); }
.theme-energy { background: rgba(255, 140, 0, 0.1); }
.theme-sky { background: rgba(0, 175, 240, 0.1); }
.theme-serenity { background: rgba(143, 68, 173, 0.1); }
.theme-ocean { background: rgba(0, 120, 215, 0.1); }

/* CTA Section */
.cta {
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(232, 30, 100, 0.05) 0%, rgba(143, 68, 173, 0.05) 100%);
}

.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.cta p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--text-primary);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(232, 30, 100, 0.1);
  color: var(--primary-pink) !important;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-top: 1rem;
  font-weight: 500;
  border: 1px solid rgba(232, 30, 100, 0.2);
}

p.badge {
  color: var(--primary-pink) !important;
  margin-bottom: 0;
}

p.badge::before {
  content: '•';
  font-weight: bold;
}

/* Quote Section */
.quote-section {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--card-background);
}

.quote {
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding: 0 2rem;
}

.quote::before,
.quote::after {
  content: '"';
  font-size: 3rem;
  color: var(--primary-pink);
  opacity: 0.3;
  position: absolute;
}

.quote::before {
  top: -1rem;
  left: 0;
}

.quote::after {
  bottom: -2rem;
  right: 0;
}

.quote-author {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  font-style: normal;
  font-weight: 500;
}

/* Footer */
footer {
  padding: 3rem 2rem;
  background: var(--text-primary);
  color: white;
  text-align: center;
}

footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

footer h4 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: white;
}

footer p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: block;
  padding: 0.3rem 0;
  transition: color 0.3s ease;
}

footer a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Content Pages (Privacy, Terms) */
.content {
  margin-top: 80px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 3rem 2rem;
  line-height: 1.8;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.last-updated {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 3rem;
}

h2 {
  font-size: 1.8rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

ul, ol {
  margin-bottom: 1.5rem;
  margin-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

.highlight {
  background: linear-gradient(135deg, rgba(232, 30, 100, 0.1) 0%, rgba(0, 175, 240, 0.1) 100%);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem 0;
  border-left: 4px solid var(--primary-pink);
}

.highlight h3 {
  margin-top: 0;
  color: var(--primary-pink);
}

.contact-info {
  background: var(--card-background);
  padding: 2rem;
  border-radius: 12px;
  margin-top: 3rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.contact-info a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Responsive Screenshot Gallery */
@media (max-width: 1024px) {
  .screenshot-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .screenshot-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .screenshot-item img {
    max-width: 200px;
  }
  
  .screenshot-caption {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .app-preview {
    padding: 3rem 0;
  }
  
  .screenshot-gallery {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .screenshot-item img {
    max-width: 250px;
  }
  
  /* Further adjustments for small mobile screens */
  .feature-row {
    padding: 2rem 1rem;
  }
  
  .feature-content h3 {
    font-size: 1.5rem;
  }
  
  .feature-content p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .feature-benefits {
    font-size: 0.95rem;
  }
  
  .feature-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
  
  /* Smaller language toggle on very small screens */
  .mobile-menu-links .language-toggle .language-option {
    padding: 6px 16px;
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  nav .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .mobile-menu-overlay {
    /* Remove display: block that was blocking the form */
    /* Overlay should only be visible when active class is added */
  }

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

  .hero .tagline {
    font-size: 1.2rem;
  }
  
  .app-icon {
    width: 100px;
    height: 100px;
  }
  
  /* Fix feature row layout on mobile */
  .feature-row {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 1rem;
  }
  
  .feature-row:nth-child(even) {
    direction: ltr;
  }
  
  .feature-content h3 {
    font-size: 1.8rem;
  }
  
  .feature-content p {
    font-size: 1rem;
  }
  
  .feature-benefits li {
    font-size: 1rem;
  }
  
  .feature-screenshot {
    order: -1; /* Show screenshot before content on mobile */
  }
  
  .feature-screenshot img {
    max-width: 100%;
    width: 100%;
  }

  .features h2,
  .cta h2 {
    font-size: 2rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .content {
    padding: 2rem 1rem;
  }

  .quote {
    font-size: 1.2rem;
  }
  
  nav .container {
    padding: 0 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* TestFlight form styles */
.testflight-form {
  margin: 2rem auto 0;
  padding: 2rem;
  background: var(--card-background);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  max-width: 600px;
  position: relative;
  z-index: 1000; /* Ensure form is above mobile menu overlay (999) */
}

.testflight-form h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.testflight-form p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-group input[type="email"],
.form-group input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 0.875rem 1.25rem;
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input[type="email"]::placeholder,
.form-group input[type="text"]::placeholder {
  color: var(--text-secondary);
}

.form-group input[type="email"]:focus,
.form-group input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-pink);
  box-shadow: 0 0 0 3px rgba(232, 30, 100, 0.1);
}

.form-group button {
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-purple) 100%);
  border: none;
  border-radius: 0.5rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.form-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(232, 30, 100, 0.3);
}

.form-group button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  animation: slideIn 0.3s ease;
}

.form-message.success {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.form-message.error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}