/* CSS Variables for Theme */
:root {
  /* Light Mode Colors */
  --bg-primary-light: #f0f2f5;
  --bg-secondary-light: #ffffff;
  --bg-tertiary-light: #e8ecf0;
  --text-primary-light: #1a1a1a;
  --text-secondary-light: #666666;
  --text-muted-light: #999999;
  --accent-light: #6366f1;
  --accent-hover-light: #5855eb;
  --border-light: #e1e5e9;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-inset-light: inset 2px 2px 5px rgba(0, 0, 0, 0.1), inset -2px -2px 5px rgba(255, 255, 255, 0.8);
  --shadow-raised-light: 5px 5px 15px rgba(0, 0, 0, 0.1), -5px -5px 15px rgba(255, 255, 255, 0.8);
  
  /* Dark Mode Colors */
  --bg-primary-dark: #1a1d23;
  --bg-secondary-dark: #242831;
  --bg-tertiary-dark: #2d3139;
  --text-primary-dark: #ffffff;
  --text-secondary-dark: #b8bcc8;
  --text-muted-dark: #8b92a5;
  --accent-dark: #818cf8;
  --accent-hover-dark: #a5b4fc;
  --border-dark: #3d4147;
  --shadow-dark: rgba(0, 0, 0, 0.3);
  --shadow-inset-dark: inset 2px 2px 5px rgba(0, 0, 0, 0.3), inset -2px -2px 5px rgba(255, 255, 255, 0.05);
  --shadow-raised-dark: 5px 5px 15px rgba(0, 0, 0, 0.3), -5px -5px 15px rgba(255, 255, 255, 0.05);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Dark Mode (Default) */
body.dark-mode {
  background: var(--bg-primary-dark);
  color: var(--text-primary-dark);
}

/* Light Mode */
body.light-mode {
  background: var(--bg-primary-light);
  color: var(--text-primary-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.dark-mode .header {
  background: rgba(26, 29, 35, 0.9);
  border-bottom: 1px solid var(--border-dark);
}

.light-mode .header {
  background: rgba(240, 242, 245, 0.9);
  border-bottom: 1px solid var(--border-light);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
}

.logo-icon {
  width: 32px;
  height: 32px;
}

.dark-mode .logo-icon {
  color: var(--accent-dark);
}

.light-mode .logo-icon {
  color: var(--accent-light);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
}

.dark-mode .theme-toggle {
  background: var(--bg-secondary-dark);
  box-shadow: var(--shadow-inset-dark);
}

.light-mode .theme-toggle {
  background: var(--bg-secondary-light);
  box-shadow: var(--shadow-inset-light);
}

.theme-toggle:hover {
  transform: scale(1.05);
}

.theme-icon {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.dark-mode .sun-icon {
  opacity: 0;
  transform: rotate(180deg);
}

.dark-mode .moon-icon {
  opacity: 1;
  transform: rotate(0deg);
}

.light-mode .sun-icon {
  opacity: 1;
  transform: rotate(0deg);
}

.light-mode .moon-icon {
  opacity: 0;
  transform: rotate(-180deg);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-hover-dark));
}

.light-mode .btn-primary {
  background: linear-gradient(135deg, var(--accent-light), var(--accent-hover-light));
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 16px;
}

/* Hero Section */
.hero {
  padding: 80px 0;
  text-align: center;
}

.hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 18px;
  margin-bottom: 48px;
}

.dark-mode .hero-subtitle {
  color: var(--text-secondary-dark);
}

.light-mode .hero-subtitle {
  color: var(--text-secondary-light);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.dark-mode .stat-card {
  background: var(--bg-secondary-dark);
  box-shadow: var(--shadow-raised-dark);
}

.light-mode .stat-card {
  background: var(--bg-secondary-light);
  box-shadow: var(--shadow-raised-light);
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode .stat-icon {
  background: var(--bg-tertiary-dark);
  color: var(--accent-dark);
}

.light-mode .stat-icon {
  background: var(--bg-tertiary-light);
  color: var(--accent-light);
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  opacity: 0.8;
}

/* Search Container */
.search-container {
  max-width: 500px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  transition: all 0.3s ease;
}

.dark-mode .search-box {
  background: var(--bg-secondary-dark);
  box-shadow: var(--shadow-inset-dark);
}

.light-mode .search-box {
  background: var(--bg-secondary-light);
  box-shadow: var(--shadow-inset-light);
}

.search-icon {
  width: 20px;
  height: 20px;
  opacity: 0.6;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 16px;
  color: inherit;
}

.search-input::placeholder {
  opacity: 0.6;
}

/* Tools Section */
.tools-section {
  padding: 80px 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.tool-card {
  padding: 24px;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dark-mode .tool-card {
  background: var(--bg-secondary-dark);
  box-shadow: var(--shadow-raised-dark);
}

.light-mode .tool-card {
  background: var(--bg-secondary-light);
  box-shadow: var(--shadow-raised-light);
}

.tool-card:hover {
  transform: translateY(-4px);
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.tool-icon {
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode .tool-icon {
  background: var(--bg-tertiary-dark);
  color: var(--accent-dark);
}

.light-mode .tool-icon {
  background: var(--bg-tertiary-light);
  color: var(--accent-light);
}

.tool-icon svg {
  width: 24px;
  height: 24px;
}

.tool-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tool-description {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.dark-mode .tool-description {
  color: var(--text-secondary-dark);
}

.light-mode .tool-description {
  color: var(--text-secondary-light);
}

.tool-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #10b981;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.tool-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.dark-mode .tool-link {
  background: var(--bg-tertiary-dark);
  color: var(--text-primary-dark);
}

.light-mode .tool-link {
  background: var(--bg-tertiary-light);
  color: var(--text-primary-light);
}

.tool-link:hover {
  transform: translateY(-1px);
}

/* Demo Section */
.demo-section {
  padding: 80px 0;
  text-align: center;
}

.demo-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.video-icon {
  width: 24px;
  height: 24px;
}

.dark-mode .video-icon {
  color: var(--accent-dark);
}

.light-mode .video-icon {
  color: var(--accent-light);
}

.demo-title {
  font-size: 32px;
  font-weight: 700;
}

.demo-subtitle {
  font-size: 18px;
  margin-bottom: 48px;
}

.dark-mode .demo-subtitle {
  color: var(--text-secondary-dark);
}

.light-mode .demo-subtitle {
  color: var(--text-secondary-light);
}

.video-container {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dark-mode .video-placeholder {
  background: var(--bg-secondary-dark);
  box-shadow: var(--shadow-raised-dark);
}

.light-mode .video-placeholder {
  background: var(--bg-secondary-light);
  box-shadow: var(--shadow-raised-light);
}

.video-placeholder:hover {
  transform: scale(1.02);
}

.play-button {
  width: 80px;
  height: 80px;
}

.dark-mode .play-button {
  color: var(--accent-dark);
}

.light-mode .play-button {
  color: var(--accent-light);
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  text-align: center;
}

.cta-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 18px;
  margin-bottom: 32px;
}

.dark-mode .cta-subtitle {
  color: var(--text-secondary-dark);
}

.light-mode .cta-subtitle {
  color: var(--text-secondary-light);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.dark-mode .back-to-top {
  background: var(--bg-secondary-dark);
  box-shadow: var(--shadow-raised-dark);
  color: var(--text-primary-dark);
}

.light-mode .back-to-top {
  background: var(--bg-secondary-light);
  box-shadow: var(--shadow-raised-light);
  color: var(--text-primary-light);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 16px;
  }
  
  .hero {
    padding: 60px 0;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .tool-card {
    padding: 20px;
  }
  
  .demo-section,
  .cta-section,
  .tools-section {
    padding: 60px 0;
  }
  
  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }
  
  .hero-subtitle,
  .demo-subtitle,
  .cta-subtitle {
    font-size: 16px;
  }
  
  .demo-title,
  .cta-title {
    font-size: 24px;
  }
  
  .search-box {
    padding: 12px 16px;
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

