/* CSS Variables based on app_theme.dart */
:root {
  /* Colors from AppTheme */
  --primary-color: #086EFD;
  --secondary-color: #FF1585;
  --white: #FFFFFF;
  --black: #000000;
  --yellow: #FFD700;
  --surface-color: #F9F9F9;
  --error-color: #D32F2F;
  --success-color: #4CAF50;
  --text-color-primary: #212121;
  --text-color-secondary: #757575;
  --divider-color: #EEEEEE;
  
  /* Gradient colors */
  --gradient-purple: #8A2BE2;
  --gradient-royal-blue: #4169E1;
  --gradient-sky-blue: #00BFFF;
  --gradient-pink: #FF69B4;
  --gradient-dark-pink: #FF1585;
  
  /* Border radius values */
  --border-radius-small: 8px;
  --border-radius-medium: 12px;
  --border-radius-large: 16px;
  --border-radius-xlarge: 20px;
  
  /* Spacing values */
  --spacing-xs: 4px;
  --spacing-small: 8px;
  --spacing-normal: 12px;
  --spacing-medium: 16px;
  --spacing-large: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  
  /* Typography */
  --font-family: 'League Spartan', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color-primary);
  background-color: var(--white);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-medium);
}

/* Animated Gradient Background */
.animated-gradient-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    var(--gradient-purple),
    var(--gradient-royal-blue),
    var(--gradient-sky-blue),
    var(--gradient-pink),
    var(--gradient-dark-pink),
    var(--gradient-purple)
  );
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
  opacity: 0.1;
  z-index: 0;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--gradient-purple),
    var(--gradient-royal-blue),
    var(--gradient-pink)
  );
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientTextShift 6s ease infinite;
}

@keyframes gradientTextShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-medium);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-small);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-small);
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
}

.nav-link {
  text-decoration: none;
  color: var(--text-color-primary);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--text-color-primary);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 70px;
  overflow: hidden;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-medium);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xxl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  animation: fadeInUp 0.8s ease;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--spacing-large);
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-color-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-medium);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.download-btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.download-btn img {
  height: 60px;
  width: auto;
}

.qr-section {
  text-align: center;
  padding-top: var(--spacing-large);
}

.qr-text {
  font-size: 0.9rem;
  color: var(--text-color-secondary);
  margin-bottom: var(--spacing-small);
}

.qr-code {
  display: inline-block;
  padding: var(--spacing-medium);
  background: var(--white);
  border-radius: var(--border-radius-medium);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight 0.8s ease 0.2s both;
}

.phone-mockup {
  position: relative;
  max-width: 300px;
  width: 100%;
}

.app-screenshot {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-large);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xxl);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-medium);
  line-height: 1.2;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-color-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Features Section */
.features {
  padding: var(--spacing-xxl) 0;
  background: var(--surface-color);
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.feature-card {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-large);
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--gradient-purple),
    var(--gradient-royal-blue),
    var(--gradient-pink)
  );
}

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

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--spacing-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--gradient-purple),
    var(--gradient-royal-blue)
  );
  border-radius: var(--border-radius-medium);
  padding: var(--spacing-medium);
}

.feature-icon img {
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-small);
  color: var(--text-color-primary);
}

.feature-description {
  color: var(--text-color-secondary);
  line-height: 1.6;
}

/* About Section */
.about {
  padding: var(--spacing-xxl) 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xxl);
  align-items: center;
}

.about-description {
  font-size: 1.1rem;
  color: var(--text-color-secondary);
  margin-bottom: var(--spacing-large);
  line-height: 1.7;
}

.about-features {
  list-style: none;
  margin-bottom: var(--spacing-large);
}

.about-features li {
  padding: var(--spacing-small) 0;
  font-size: 1rem;
  color: var(--text-color-primary);
  position: relative;
  padding-left: var(--spacing-large);
}

.about-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

.about-visual {
  display: flex;
  justify-content: center;
}

.showcase-phone {
  max-width: 400px;
  width: 100%;
}

.showcase-image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-large);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Download Section */
.download {
  padding: var(--spacing-xxl) 0;
  background: linear-gradient(
    135deg,
    var(--gradient-purple),
    var(--gradient-royal-blue),
    var(--gradient-pink)
  );
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.download-content {
  position: relative;
  z-index: 1;
}

.download .section-title,
.download .section-description {
  color: var(--white);
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-medium);
  margin: var(--spacing-xl) 0;
  flex-wrap: wrap;
}

.download-note {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: var(--spacing-medium);
}

/* Contact Section */
.contact {
  padding: var(--spacing-xxl) 0;
  background: var(--surface-color);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-xxl);
  margin-top: var(--spacing-xl);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-large);
}

.contact-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--spacing-small);
  color: var(--text-color-primary);
}

.contact-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

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

.contact-form {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-large);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: var(--spacing-large);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-small);
  font-weight: 500;
  color: var(--text-color-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--spacing-medium);
  border: 1px solid var(--divider-color);
  border-radius: var(--border-radius-medium);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(8, 110, 253, 0.1);
}

.submit-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--gradient-royal-blue)
  );
  color: var(--white);
  border: none;
  padding: var(--spacing-medium) var(--spacing-xl);
  border-radius: var(--border-radius-medium);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(8, 110, 253, 0.3);
}

/* Footer */
.footer {
  background: var(--text-color-primary);
  color: var(--white);
  padding: var(--spacing-xxl) 0 var(--spacing-large);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--spacing-medium);
  color: var(--white);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-small);
  margin-bottom: var(--spacing-medium);
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-small);
}

.footer-logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

.footer-description {
  color: #ccc;
  line-height: 1.6;
  margin-bottom: var(--spacing-medium);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-small);
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-download-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-small);
}

.footer-badge {
  height: 40px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-badge:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: var(--spacing-large);
  text-align: center;
  color: #ccc;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: var(--spacing-large) 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: var(--spacing-medium) 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-xl);
  }

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

  .hero-description {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .download-buttons,
  .hero-buttons {
    justify-content: center;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-download-buttons {
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-small);
  }

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

  .hero-description {
    font-size: 1rem;
  }

  .download-btn img {
    height: 50px;
  }

  .feature-card,
  .contact-form {
    padding: var(--spacing-large);
  }

  .section-title {
    font-size: 1.8rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .animated-gradient-bg,
  .gradient-text,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-color-primary: #000000;
    --text-color-secondary: #4A4A4A;
    --primary-color: #085AFD;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #1a1a1a;
    --surface-color: #2a2a2a;
    --text-color-primary: #ffffff;
    --text-color-secondary: #cccccc;
    --divider-color: #404040;
  }

  .navbar {
    background: rgba(26, 26, 26, 0.95);
  }

  .feature-card,
  .contact-form {
    background: #2a2a2a;
    border: 1px solid #404040;
  }
}
