/* Variables */
:root {
  /* Colors */
  --bg-primary: #1a1b26;
  --bg-secondary: #24283b;
  --bg-tertiary: #1f2335;
  --bg-demo-container: #1a1a25;
  --text-primary: #c0caf5;
  --text-secondary: #9aa5ce;
  --text-tertiary: #393d4e; /* #4f5262 */
  --accent: #7aa2f7;
  --accent-secondary: #bb9af7;
  --success: #9ece6a;

  /* Typography */
  --font-orbitron: 'Orbitron', sans-serif;
  --font-hack: Hack, monospace;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;

  /* Border */
  --border-default: 1px solid rgba(255,255,255,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 4px 6px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);

  /* Transitions */
  --transition-default: all 0.3s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-system);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

/* Common Layout Styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Common Text Styles */
code {
  font-family: var(--font-hack);
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}

code:not(pre code)::before {
  content: "`";
}

code:not(pre code)::after {
  content: "`";
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.hero h1 {
  font-family: var(--font-orbitron);
  font-size: 4.5rem;
  margin-bottom: var(--space-sm);
  letter-spacing: 2px;
  color: var(--accent);
}

.hero p {
  font-family: var(--font-orbitron);
  font-size: 1.5rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

.hero-stats {
  margin-top: var(--space-md);
}

.hero-stats img {
  height: 20px;
  filter: brightness(1.1);
  transition: var(--transition-default);
}

.hero-stats img:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

/* Demo Section */
.demo-section {
  background: var(--bg-secondary);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.demo-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-demo-container);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  border: var(--border-default);
  box-shadow: var(--shadow-lg);
}

.demo-heading {
  font-family: var(--font-orbitron);
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.demo-description {
  font-family: var(--font-hack);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-md);
}

.demo-gif {
  width: 100%;
  border-radius: var(--radius-md);
  display: block;
}

/* Features Section */
.features {
  background: var(--bg-tertiary);
  padding: var(--space-lg) 0;
}

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

.feature {
  background: var(--bg-secondary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: var(--border-default);
}

.feature h3 {
  font-family: var(--font-orbitron);
  color: var(--accent-secondary);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.feature p {
  font-family: var(--font-hack);
  color: var(--text-secondary);
}

.feature a:not(.github) {
  /* text-decoration: none; */
  /* border-bottom: 1px dotted var(--text-tertiary); */
  /* padding-bottom: 1px; */

  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--text-tertiary);
  text-underline-offset: 5px;
}

.feature a:not(.github):link,
.feature a:not(.github):visited {
  color: var(--text-secondary);
}

.feature a:not(.github):hover {
  color: var(--text-primary);
}

.feature a.github {
  font-family: var(--font-hack);
  text-decoration: none;
  color: var(--success);
}

/* Installation Section */
.installation {
  background: var(--bg-secondary);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.installation h2 {
  font-family: var(--font-orbitron);
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

/* Code Blocks - Common Styles */
.code-container,
.cli-demo {
  max-width: 600px;
  margin: var(--space-md) auto;
  text-align: left;
  background: var(--bg-primary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: var(--border-default);
  width: 100%;
}

/* Installation Code Block */
.code-container {
  position: relative;
}

.code pre {
  margin: 0;
  white-space: pre;
  font-family: var(--font-hack);
  font-size: 1.1rem;
  line-height: 1.8;
  padding-left: 1rem;
  padding-right: 100px;
}

.copy-button {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  color: var(--bg-primary);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-orbitron);
  transition: var(--transition-default);
}

.copy-button:hover {
  background: var(--accent-secondary);
}

.copy-button.copied {
  background: var(--success);
}

/* CLI Demo Block */
.cli-demo pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-hack);
  font-size: 1.1rem;
  line-height: 1.8;
  padding-left: 1rem;
}

.cli-demo .command {
  color: var(--success);
}

.cli-demo .output {
  color: var(--text-secondary);
  display: inline-block;
  width: 100%;
}

/* Common Button Style */
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: bold;
  margin-top: var(--space-md);
  transition: var(--transition-default);
  font-family: var(--font-orbitron);
}

.button:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
}

/* 404 */
.notfound {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.notfound-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.notfound-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.notfound p {
  font-family: var(--font-orbitron);
  color: var(--text-secondary);
  font-size: 2rem;
  margin: 0;
}

/* Footer Styles */
.footer {
  background: var(--bg-secondary);
  padding: var(--space-lg) var(--space-md);
  border-top: var(--border-default);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

/* Footer Author */
.footer-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 400px;
}

.footer-avatar-link {
  display: block;
  transition: var(--transition-default);
}

.footer-avatar-link:hover {
  transform: scale(1.1);
}

.footer-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.footer-author-info {
  text-align: left;
  min-width: 0;
}

.footer-author-name {
  font-family: var(--font-orbitron);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 500;
}

.footer-author-title {
  font-family: var(--font-hack);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 300px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

/* Footer Links */
.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-hack);
  font-size: 0.9rem;
  transition: var(--transition-default);
  display: flex;
  align-items: center;
}

.footer-link i {
  font-size: 1.2rem;
}

.footer-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-link-separator {
  color: var(--text-secondary);
  opacity: 0.5;
  font-size: 0.8rem;
}

.footer-copyright {
  padding-top: 5rem;
  font-family: var(--font-hack);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 480px) {
  /* Installation code block */
  .code-container .code pre,
  .code-container .code code {
    font-size: 0.9rem;
    line-height: 1.4;
    padding-left: 0.5rem;
  }

  /* CLI demo block */
  .cli-demo pre,
  .cli-demo .command,
  .cli-demo .output {
    font-size: 0.9rem;
    line-height: 1.4;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  /* Copy button */
  .copy-button {
    font-size: 10px;
    padding: 2px 6px;
  }

  /* Installation section heading */
  .installation h2 {
    font-size: 1.5rem;
  }

  /* Hero section */
  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  /* Container padding adjustment */
  .code-container,
  .cli-demo {
    padding: var(--space-sm);
  }
}

/* Larger mobile devices */
@media (min-width: 481px) and (max-width: 768px) {
  .code-container .code pre,
  .code-container .code code,
  .cli-demo pre,
  .cli-demo .command,
  .cli-demo .output {
    font-size: 0.9rem;
    padding-left: 0.75rem;
  }
}

@media (max-width: 480px) {
  .code {
    padding: var(--space-sm);
  }

  .code pre {
    overflow-y: hidden;
    overflow-x: auto; /* enable horizontal scroll */
    white-space: pre;
    -webkit-overflow-scrolling: touch; /* for iOS smooth scroll */
    font-size: 0.9rem;
    padding-right: 2.5rem;
  }

  .copy-button {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* Carousel Section */
.carousel-section {
  background: linear-gradient(to right, var(--bg-primary), var(--bg-tertiary));
  padding: var(--space-lg) var(--space-md);
  padding-bottom: var(--space-lg);
  text-align: center;

}

.carousel-section h2 {
  font-family: var(--font-orbitron);
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.carousel-footer-spacer {
  height: var(--space-lg);
  background: linear-gradient(to right, var(--bg-primary), var(--bg-tertiary));
}

/* Carousel Container */
.carousel-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  background: var(--bg-demo-container);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  border: var(--border-default);
  box-shadow: var(--shadow-lg);
}

/* Carousel */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
}

/* Slides */
.carousel-slide {
  display: none;
  width: 100%;
  transition: opacity 0.5s ease-in-out;
  opacity: 0;
}

.carousel-slide.active {
  display: block;
  opacity: 1;
}

.carousel-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

/* Carousel Controls */
.carousel-controls {
  margin-top: var(--space-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Carousel Title Animation */
#carousel-title {
  transition: opacity 0.3s ease, transform 0.4s ease;
}

/* Optional: Add a smooth fade effect when changing titles */
.title-change {
  opacity: 0;
  transform: translateY(-10px);
}

/* Adjust the carousel section spacing for better title display */
.carousel-section h2 {
  min-height: 2.5rem; /* Ensures consistent height during title changes */
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  position: relative;
}

/* Add a subtle underline animation */
.carousel-section h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width 0.4s ease;
}

.carousel-section h2.active:after {
  width: 100px;
}

/* Prev/Next Buttons */
.carousel-prev,
.carousel-next {
  background: var(--bg-tertiary);
  color: var(--accent);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: var(--transition-default);
  z-index: 2;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* Indicators */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: var(--space-sm) 0;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-tertiary);
  border: none;
  cursor: pointer;
  transition: var(--transition-default);
}

.indicator.active {
  background: var(--accent);
  transform: scale(1.2);
}

.indicator:hover {
  background: var(--accent-secondary);
}

.carousel-button-container {
  margin-top: var(--space-lg);
  /* padding-top: var(--space-md); */
  position: relative;
}

/* .carousel-button-container:before { */
/*   content: ''; */
/*   position: absolute; */
/*   top: 0; */
/*   left: 50%; */
/*   transform: translateX(-50%); */
/*   width: 150px; */
/*   height: 1px; */
/*   background: rgba(255,255,255,0.1); */
/* } */

/* Responsive Styles */
@media (max-width: 768px) {
  .carousel-section h2 {
    font-size: 1.5rem;
  }

  .carousel-prev,
  .carousel-next {
    width: 30px;
    height: 30px;
  }

  .indicator {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .carousel-controls {
    margin-top: var(--space-xs);
  }

  .carousel-prev,
  .carousel-next {
    width: 25px;
    height: 25px;
  }

  .indicator {
    width: 8px;
    height: 8px;
  }
}

