/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #252540;
  --bg-card-hover: #2d2d4a;
  --accent: #00d4aa;
  --accent-hover: #00f5c4;
  --accent-glow: rgba(0, 212, 170, 0.3);
  --text-primary: #ffffff;
  --text-secondary: #b8b8c8;
  --text-muted: #6b6b80;
  --border: #3d3d5c;
  --code-bg: #0d1117;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
  --transition: 0.3s ease;
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ========================================
   Container & Layout
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  text-align: center;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

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

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

/* ========================================
   Navigation
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 1px;
}

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

.logo-img {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

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

.nav-github {
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding-top: 150px;
  padding-bottom: 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-slider {
  max-width: 900px;
  margin: 0 auto 40px;
  position: relative;
}

.slides-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-card);
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.dot:hover,
.dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

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

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   Services Section
   ======================================== */
.services {
  padding: 40px 0;
  background: var(--bg-secondary);
  text-align: center;
}

.services-title {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.services-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-bottom: 20px;
}

.service-logo {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: default;
}

.service-logo:hover {
  color: var(--text-primary);
  transform: scale(1.1);
}

.service-logo svg {
  width: 100%;
  height: 100%;
}

.services-ai {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========================================
   Why Section
   ======================================== */
.why {
  text-align: center;
}

.why .container {
  max-width: 800px;
}

.why p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.why p:last-child {
  margin-bottom: 0;
}

/* ========================================
   Features Section
   ======================================== */
.features {
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.feature-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-primary);
}

.feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.feature-card:hover .feature-img img {
  transform: scale(1.02);
}

.feature-card h3 {
  padding: 20px 20px 8px;
}

.feature-card p {
  padding: 0 20px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery {
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.gallery-item:hover {
  transform: scale(1.03);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item::after {
  content: attr(data-caption);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: var(--text-primary);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========================================
   Install Section
   ======================================== */
.install {
  background: var(--bg-secondary);
  text-align: center;
}

.install-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.tab-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.tab-content {
  display: none;
  position: relative;
  max-width: 700px;
  margin: 0 auto 24px;
  text-align: left;
}

.tab-content.active {
  display: block;
}

.tab-content pre {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
}

.tab-content code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.copy-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.copy-btn.copied {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.unraid-content {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 40px 20px;
  border: 1px solid var(--border);
  text-align: center;
}

.unraid-content p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.unraid-content p:last-child {
  margin-bottom: 0;
}

.install-requirements {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ========================================
   Support Section
   ======================================== */
.support {
  text-align: center;
}

.support-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px 40px;
  text-decoration: none;
  transition: all var(--transition);
  min-width: 200px;
}

.support-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.support-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.support-card h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.support-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}

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

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

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lightbox-caption {
  color: var(--text-secondary);
  margin-top: 16px;
  font-size: 1rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

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

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .features-grid {
    gap: 20px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-links li {
    border-bottom: 1px solid var(--border);
  }
  
  .nav-links li:last-child {
    border-bottom: none;
  }
  
  .nav-links a {
    display: block;
    padding: 16px 0;
  }
  
  .hero {
    padding-top: 120px;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .install-tabs {
    flex-direction: column;
    align-items: center;
  }
  
  .tab-btn {
    width: 100%;
    max-width: 280px;
  }
  
  .support-grid {
    flex-direction: column;
    align-items: center;
  }
  
  .support-card {
    width: 100%;
    max-width: 300px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .services-logos {
    gap: 20px;
  }
  
  .service-logo {
    width: 32px;
    height: 32px;
  }
  
  .tab-content pre {
    padding: 16px;
    font-size: 0.8rem;
  }
  
  .copy-btn {
    position: static;
    margin-top: 12px;
    width: 100%;
    justify-content: center;
  }
}
