/* CSS Custom Properties for Theme System */
:root {
  /* Light Theme Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f4;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent-primary: #2563eb;
  --accent-secondary: #3b82f6;
  --accent-success: #10b981;
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.1);
  --shadow-heavy: rgba(0, 0, 0, 0.15);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

[data-theme="dark"] {
  /* Dark Theme Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --accent-primary: #3b82f6;
  --accent-secondary: #60a5fa;
  --accent-success: #22c55e;
  --border-light: #334155;
  --border-medium: #475569;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-heavy: rgba(0, 0, 0, 0.5);
  --gradient-primary: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
  --gradient-secondary: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-primary);
  border: 2px solid var(--border-medium);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-medium);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-heavy);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--text-primary);
  transition: fill 0.3s ease;
}

/* Sun icon should be white in light theme */
.theme-toggle .sun-icon {
  fill: white;
  stroke: white;
  color: white;
}

/* Moon icon uses current text color */
.theme-toggle .moon-icon {
  fill: var(--text-primary);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

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

/* Typography Scale */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}
h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Navigation */
header {
  background: var(--bg-primary);
  box-shadow: 0 4px 20px var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  gap: 2rem;
}

.logo h1 {
  color: var(--accent-primary);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-primary);
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links a:hover::after {
  width: 80%;
}

/* Hero Section */
.hero {
  background: var(--gradient-primary);
  color: white;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

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

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: 2rem;
  font-weight: 400;
  opacity: 0.95;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-content p {
  font-size: 1.125rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
  line-height: 1.7;
}

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

.btn {
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--bg-primary);
  color: var(--accent-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background: var(--bg-secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: transparent;
  color: var(--bg-primary);
  border: 2px solid var(--bg-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-primary);
  color: var(--accent-primary);
  transform: translateY(-3px);
}

.btn-download {
  background: var(--accent-success);
  color: white;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-download:hover {
  background: #059669;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

/* Page Headers */
.page-header {
  background: var(--bg-primary);
  padding: 4rem 0;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 20px var(--shadow-light);
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Features Section */
.features {
  padding: 6rem 0;
  background: var(--bg-primary);
}

.features h2 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 4rem;
  color: var(--text-primary);
  font-weight: 700;
}

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

.feature-card {
  background: var(--bg-secondary);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--shadow-medium);
  border-color: var(--accent-primary);
}

.feature-card h3 {
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1.1rem;
}

/* About Section */
.about {
  padding: 6rem 0;
  background: var(--bg-secondary);
}

.about h2 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 3rem;
  color: var(--text-primary);
  font-weight: 700;
}

.about p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
}

/* Support Content */
.support-content {
  padding: 4rem 0;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.support-card {
  background: var(--bg-primary);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 8px 30px var(--shadow-light);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.support-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow-medium);
}

.support-card h3 {
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.support-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.support-card ul {
  list-style: none;
  padding-left: 0;
}

.support-card li {
  color: var(--text-secondary);
  padding: 0.75rem 0;
  position: relative;
  padding-left: 2rem;
  line-height: 1.6;
}

.support-card li:before {
  content: "✓";
  color: var(--accent-success);
  font-weight: bold;
  position: absolute;
  left: 0;
  font-size: 1.2rem;
}

.contact-info {
  background: var(--bg-secondary);
  padding: 3rem;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 30px var(--shadow-light);
}

.contact-info h2 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.contact-info ul {
  list-style: none;
  margin: 2rem 0;
}

.contact-info li {
  color: var(--text-secondary);
  padding: 0.75rem 0;
  font-size: 1.1rem;
}

/* Privacy & Terms Content */
.privacy-content,
.terms-content {
  padding: 4rem 0;
}

.privacy-section,
.terms-section {
  background: var(--bg-primary);
  padding: 2.5rem;
  border-radius: 16px;
  margin-bottom: 2.5rem;
  box-shadow: 0 8px 30px var(--shadow-light);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.privacy-section:hover,
.terms-section:hover {
  box-shadow: 0 15px 40px var(--shadow-medium);
}

.privacy-section h2,
.terms-section h2 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  font-weight: 600;
}

.privacy-section p,
.terms-section p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 1.1rem;
}

.privacy-section ul,
.terms-section ul {
  color: var(--text-secondary);
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.privacy-section li,
.terms-section li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  text-align: center;
  padding: 3rem 0;
  margin-top: 6rem;
  border-top: 1px solid var(--border-light);
}

footer p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Smooth Transitions */
* {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
  }

  .nav-links {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding: 4rem 0;
  }

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

  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .support-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .container {
    padding: 0 20px;
  }

  .theme-toggle {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 0;
  }

  .page-header {
    padding: 3rem 0;
  }

  .features,
  .about {
    padding: 4rem 0;
  }

  .feature-card,
  .support-card,
  .privacy-section,
  .terms-section {
    padding: 2rem;
  }

  .contact-info {
    padding: 2rem;
  }

  .container {
    padding: 0 16px;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States */
.btn:focus,
.nav-links a:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --border-light: #000000;
    --border-medium: #000000;
    --shadow-light: rgba(0, 0, 0, 0.8);
    --shadow-medium: rgba(0, 0, 0, 0.9);
    --shadow-heavy: rgba(0, 0, 0, 1);
  }
}
