/* CSS Variables for theming */
:root {
  --bg-color: #ffffff;
  --text-color: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --code-bg: #f3f4f6;
  --card-bg: #ffffff;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --bg-color: #111827;
  --text-color: #f9fafb;
  --text-secondary: #9ca3af;
  --border-color: #374151;
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --code-bg: #1f2937;
  --card-bg: #1f2937;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* 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-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  font-size: 1.25rem;
}

.nav-brand-icon {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.5rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.theme-toggle:hover {
  background-color: var(--code-bg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 1.5rem;
  height: 2px;
  background-color: var(--text-color);
  margin: 2px 0;
  transition: 0.3s;
}

/* Mobile navigation */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--bg-color);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2rem;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border-color);
  }
}

.nav-menu-open {
  @media (max-width: 768px) {
    left: 0;
  }
}

.nav-toggle-open span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle-open span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Main content */
.main-content {
  min-height: calc(100vh - 120px);
}

/* Hero section */
.hero {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--code-bg) 100%);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-color);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Page header */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

/* Page content */
.page-content {
  padding: 3rem 0;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
h4 { font-size: 1.25rem; margin-top: 1rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Code */
code {
  background-color: var(--code-bg);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
}

pre {
  background-color: var(--code-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  background: none;
  padding: 0;
}

/* Badges */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.badges a {
  display: inline-block;
  transition: transform 0.2s ease;
}

.badges a:hover {
  transform: scale(1.05);
  text-decoration: none;
}

.badge {
  display: inline-block;
}

.badge img,
.badges a img {
  height: 20px;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  margin-top: 0;
  color: var(--accent-color);
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature {
  text-align: center;
  padding: 2rem 1rem;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.feature h3 {
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background-color: var(--code-bg);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

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

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

.support-link {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 500;
}

.support-link:hover {
  background-color: var(--accent-hover);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Responsive design */
@media (max-width: 768px) {
  .nav-menu {
    display: flex;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .cards {
    grid-template-columns: 1fr;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Screenshots */
.screenshot {
  text-align: center;
  margin: 2rem 0;
  padding: 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.screenshot img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 0.5rem;
}

.screenshot p {
  margin: 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Screenshot gallery for multiple images */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.screenshot-gallery .screenshot {
  margin: 0;
}

/* Configuration sections */
.config-section {
  background-color: var(--code-bg);
  border-left: 4px solid var(--accent-color);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 0.25rem 0.25rem 0;
}

.config-section h4 {
  margin-top: 0;
  color: var(--accent-color);
}

/* Download buttons */
.download-section {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.download-section h3 {
  margin-top: 0;
  color: var(--text-color);
}

.download-section .btn {
  margin: 0.5rem;
}

/* Feature highlights */
.feature-highlight {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
  text-align: center;
}

.feature-highlight h3 {
  margin-top: 0;
  color: white;
}

/* Installation steps */
.installation-steps {
  counter-reset: step-counter;
}

.installation-steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
}

.installation-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background-color: var(--accent-color);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
}

/* CLI examples */
.cli-example {
  background-color: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
}

.cli-example h4 {
  margin-top: 0;
  color: var(--accent-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* Responsive screenshots */
@media (max-width: 768px) {
  .screenshot-gallery {
    grid-template-columns: 1fr;
  }
  
  .screenshot img {
    max-width: 100%;
  }
  
  .installation-steps li {
    padding-left: 2.5rem;
  }
  
  .installation-steps li::before {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
  }
}

/* Dark mode transition */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}