:root {
  --bg-color: #0a0e14;
  --text-color: #eaeaea;
  --primary-color: #4caf50;
  --secondary-color: #388e3c;
  --card-bg: #141922;
  --border-color: #2c3440;
  --code-bg: #1e2631;
  --transition-speed: 0.3s;
}

body.light-theme {
  --bg-color: #f5f5f5;
  --text-color: #333333;
  --primary-color: #388e3c;
  --secondary-color: #4caf50;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --code-bg: #f0f0f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  background-image: radial-gradient(
    circle at top right,
    rgba(76, 175, 80, 0.1),
    transparent 70%
  );
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-speed) ease,
    color var(--transition-speed) ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and Navigation */
header {
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background-color: rgba(var(--bg-color), 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-speed) ease,
    border-color var(--transition-speed) ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.25rem;
}

/* Adjust logo image sizing */
.logo img {
  height: 30px;
  width: 30px;
  margin-right: 10px;
  /* Optional: if the favicon has a square background that you want to round */
  border-radius: 5px;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Make all icons in nav links consistent */
.nav-links a i {
  font-size: 1.1rem; /* Consistent size for all icons */
  vertical-align: middle;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60vh;
  padding: 3rem 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-content {
  flex: 1.5; /* Give more space to the content */
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(
    to right,
    var(--text-color),
    var(--primary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.cta-primary,
.cta-secondary {
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cta-primary {
  background-color: var(--primary-color);
  color: white;
}

.cta-secondary {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.cta-primary:hover,
.cta-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero-image {
  flex: 1; /* Reduced from flex: 1 to make it smaller relative to the content */
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 40%; /* Limit maximum width */
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  max-height: 300px; /* Limit maximum height */
  object-fit: contain; /* Maintain aspect ratio */
}

/* Create Project Section */
.create-project {
  padding: 3rem 0;
  background-color: var(--card-bg);
  text-align: center;
  transition: background-color var(--transition-speed) ease,
    border-color var(--transition-speed) ease;
}

.create-project h2 {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.command-box {
  background-color: var(--code-bg);
  border-radius: 8px;
  padding: 1rem 2rem;
  display: inline-block;
  margin: 0 auto;
}

.command-box code {
  color: var(--primary-color);
  font-family: "Courier New", monospace;
  font-size: 1rem;
}

/* Features Section */
.features {
  padding: 5rem 0;
}

.features .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  transition: background-color var(--transition-speed) ease,
    border-color var(--transition-speed) ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(76, 175, 80, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-icon i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.feature-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.feature-card p {
  opacity: 0.8;
  font-size: 0.95rem;
}

/* Installation Section */
.installation {
  padding: 5rem 0;
  background-color: var(--card-bg);
  transition: background-color var(--transition-speed) ease,
    border-color var(--transition-speed) ease;
}

.installation h2 {
  margin-bottom: 2rem;
  text-align: center;
}

.installation ol {
  max-width: 600px;
  margin: 0 auto;
  padding-left: 2rem;
}

.installation li {
  margin-bottom: 1rem;
}

.installation p {
  text-align: center;
  margin: 2rem 0 1rem;
}

.marketplace-link {
  display: block;
  text-align: center;
  color: var(--primary-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  width: fit-content;
  margin: 0 auto;
  transition: background-color 0.3s ease;
}

.marketplace-link:hover {
  background-color: rgba(76, 175, 80, 0.1);
}

/* Usage Section */
.usage {
  padding: 5rem 0;
}

.usage h2 {
  margin-bottom: 1rem;
  text-align: center;
}

.section-intro {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Adjust video size to approximately 900px width */
.video-tutorials {
  display: grid;
  grid-template-columns: 1fr; /* Single column */
  gap: 3rem; /* Slightly reduced gap */
  margin-top: 2rem;
  max-width: 900px; /* Set to requested 900px width */
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect ratio */
  overflow: hidden;
  background-color: #000;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* Slightly reduced shadow */
}

.video-info {
  padding: 1.5rem; /* Reduced padding */
  text-align: center;
}

.video-info h3 {
  font-size: 1.3rem; /* Slightly smaller headings */
  margin-bottom: 0.8rem;
}

.video-caption {
  font-size: 1rem; /* Smaller caption text */
  max-width: 90%;
  margin: 0 auto;
}

/* Responsive adjustments only for very small screens */
@media (max-width: 600px) {
  .video-tutorials {
    max-width: 100%;
  }
}

.video-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.video-overlay,
.play-button {
  display: none;
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from cover to contain to show full video content */
}

/* Responsive adjustment for mobile */
@media (max-width: 768px) {
  .video-tutorials {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Settings Section */
.settings {
  padding: 5rem 0;
  background-color: var(--card-bg);
  transition: background-color var(--transition-speed) ease,
    border-color var(--transition-speed) ease;
}

.settings h2 {
  margin-bottom: 2rem;
  text-align: center;
}

.settings p {
  text-align: center;
  margin-bottom: 2rem;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  max-width: 800px;
}

.settings-table th,
.settings-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.settings-table th {
  background-color: rgba(76, 175, 80, 0.1);
  font-weight: 500;
}

.settings-table code {
  background-color: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

/* About Section */
.about {
  padding: 5rem 0;
}

.about h2 {
  margin-bottom: 2rem;
  text-align: center;
}

.about p {
  max-width: 800px;
  margin: 0 auto 1rem;
  text-align: center;
}

.about .tagline {
  font-size: 1.2rem;
  margin-top: 2rem;
  font-weight: 500;
}

/* Templates Section */
#templates ul {
  max-width: 800px;
  margin: 0 auto;
}

#templates h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
}

#templates ol {
  max-width: 600px;
  margin: 0 auto;
  padding-left: 2rem;
}

#templates li {
  margin-bottom: 0.8rem;
}

/* Fix for extremely small screens in templates section */
@media (max-width: 480px) {
  #templates ol,
  #templates ul {
    padding-left: 1.2rem;
  }

  #templates h3 {
    font-size: 1.1rem;
  }
}

/* Footer */
footer {
  padding: 2rem 0;
  background-color: rgba(20, 25, 34, 0.8);
  border-top: 1px solid var(--border-color);
}

/* Make footer text white but allow license link to use accent color */
footer p {
  font-size: 0.9rem;
  opacity: 0.8;
  color: #ffffff !important;
}

/* Style the license link with accent color */
footer a {
  color: var(--primary-color) !important; /* Use primary color from theme */
  text-decoration: none;
  font-weight: 500; /* Make it slightly bolder */
  transition: opacity 0.3s ease;
}

footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  font-size: 0.9rem;
  opacity: 0.8;
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  color: var(--text-color);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

social-links a:hover {
  color: var(--primary-color);
}

/* Theme Toggle Icon */
.theme-toggle {
  color: var(--text-color);
  transition: color 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Prevent layout shift by setting consistent dimensions */
  width: 1.1rem;
  height: 1.1rem;
}

.theme-toggle i {
  font-size: 1.1rem; /* Match size with GitHub icon */
  /* Keep the icon properly centered */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.theme-toggle:hover {
  color: var(--primary-color);
  /* Remove any transform or other properties that might cause movement */
}

.theme-toggle:hover i {
  /* Keep the same positioning on hover - don't add any transforms here */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Make all icons in nav links consistent */
.nav-links a i:not(.theme-toggle i) {
  font-size: 1.1rem;
  vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    margin-bottom: 2rem;
  }

  .cta-buttons {
    justify-content: center;
  }

  .hero-image {
    max-width: 70%; /* Allow it to be slightly larger on medium screens */
  }

  .hero-image img {
    max-height: 250px; /* Slightly smaller on medium screens */
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* In a real project, add a mobile menu here */
  }

  .features .container {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-image {
    max-width: 80%; /* Even larger percentage on mobile but still smaller overall */
  }

  .hero-image img {
    max-height: 200px; /* Even smaller on mobile */
  }
}

/* Add to existing styles - Video element modifications */
.no-right-click {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none; /* Prevents all interaction including right-click */
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background-color: #000;
  user-select: none;
  -webkit-user-select: none;
}

/* Make sure the overlay can be clicked even if the video has pointer-events disabled */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
  pointer-events: auto; /* Ensure overlay can still be clicked */
  cursor: pointer;
}

/* Hide overlay when hovering the container */
.video-card:hover .video-overlay {
  opacity: 0;
}

/* Add a mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Improved mobile responsiveness */
@media (max-width: 768px) {
  /* Fix navigation for mobile */
  .mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    padding: 1rem;
    background-color: var(--card-bg);
    flex-direction: column;
    gap: 1rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    transform: translateY(0);
    display: flex;
  }

  /* Video tutorials adjustments for mobile */
  .video-tutorials {
    gap: 2rem;
    padding: 0 0.5rem;
  }

  .video-container {
    padding-top: 65%; /* Slightly taller on mobile */
  }

  /* Better spacing for feature cards on mobile */
  .features .container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  /* Improve hero section for mobile */
  .hero {
    padding: 2rem 0;
    min-height: auto;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
  }

  .cta-primary,
  .cta-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* Fix extremely small screens */
@media (max-width: 480px) {
  .video-container {
    padding-top: 75%; /* Even taller on small phones */
  }

  .video-info h3 {
    font-size: 1.1rem;
  }

  .video-caption {
    font-size: 0.9rem;
  }

  .installation ol {
    padding-left: 1.2rem;
  }

  .settings-table {
    font-size: 0.8rem;
  }
}
