:root {
  --background: #ffffff;
  --foreground: #020817;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --primary: #0f172a;
  --primary-foreground: #ffffff;
  --radius: 0.5rem;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Language Switcher */
.lang-switch {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  transition: all 0.2s;
}

.lang-switch:hover {
  background-color: var(--muted);
}

.lang-switch .icon {
  width: 1rem;
  height: 1rem;
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease-in-out;
}

.image-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 95%;
  max-height: 95%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 0.2s;
}

.modal-close:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-caption {
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.875rem;
  max-width: 600px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Hero Section */
.hero {
  position: relative;
  padding: 6rem 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
  overflow: hidden;
}

.hero-icons {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.icon-bg {
  position: absolute;
  width: 8rem;
  height: 8rem;
  color: var(--muted-foreground);
  opacity: 0.2;
}

.terminal {
  transform: rotate(12deg);
}

.server {
  transform: rotate(-12deg);
}

.monitor {
  position: relative;
  width: 10rem;
  height: 10rem;
  color: var(--primary);
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.hero-description {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

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

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.button svg {
  width: 1rem;
  height: 1rem;
}

.button.primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.button.primary:hover {
  opacity: 0.9;
}

.button.secondary {
  background-color: var(--muted);
  color: var(--foreground);
}

.button.secondary:hover {
  background-color: var(--border);
}

.button.ghost {
  color: var(--muted-foreground);
}

.button.ghost:hover {
  color: var(--foreground);
}

/* Features Section */
.features {
  padding: 3rem 0;
}

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

.card {
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card-title svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.card-description {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.card-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  color: var(--muted-foreground);
}

.card-content li {
  margin-bottom: 0.5rem;
}

/* Comparison Section */
.comparison {
  padding: 3rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.tabs {
  max-width: 48rem;
  margin: 0 auto;
}

.tab-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.75rem;
  background: none;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
}

.tab.active {
  background-color: var(--muted);
  color: var(--foreground);
}

.tab-content {
  display: none;
}

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

.content-section {
  margin-bottom: 1.5rem;
}

.content-section h4 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-links {
  display: flex;
  gap: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .button {
    width: 100%;
    justify-content: center;
  }
}

/* Home Labs Section */
.home-labs {
  padding: 3rem 0;
  min-height: 80vh;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-header .button {
  position: absolute;
  left: 0;
  top: 0;
}

.section-description {
  max-width: 600px;
  margin: 0 auto 0;
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

.lab-projects {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.lab-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.lab-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.lab-docs-btn {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
}

/* Page transitions */
.page-section {
  transition: opacity 0.3s ease-in-out;
}

.page-section.hidden {
  display: none;
}

/* Responsive adjustments for home labs */
@media (max-width: 768px) {
  .section-header .button {
    position: static;
    margin-bottom: 1rem;
  }

  .lab-projects {
    grid-template-columns: 1fr;
  }
}

/* Documentation Styles */
.docs-header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--muted) 0%, var(--background) 100%);
}

.docs-nav {
  margin-bottom: 2rem;
}

.docs-title-section {
  text-align: center;
}

.docs-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 50%;
  margin-bottom: 1rem;
}

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

.docs-subtitle {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.docs-content {
  padding: 3rem 0;
}

.docs-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
}

.docs-main {
  max-width: none;
}

.docs-section {
  margin-bottom: 3rem;
}

.docs-section h2 {
  font-size: 1.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.docs-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem 0;
}

.docs-section p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.docs-section ul {
  margin-bottom: 1rem;
}

.docs-section li {
  margin-bottom: 0.5rem;
}

/* Screenshot Placeholders */
.screenshot-placeholder {
  width: 100%;
  height: 300px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  background-color: var(--muted);
}

.placeholder-content {
  text-align: center;
  color: var(--muted-foreground);
}

.placeholder-content svg {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.placeholder-content p {
  font-weight: 500;
  margin: 0;
}

.screenshot-description {
  font-style: italic;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* Step List */
.step-list {
  margin: 2rem 0;
}

.step-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--muted);
}

.step-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.step-content h4 {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.step-content p {
  margin: 0;
  color: var(--muted-foreground);
}

/* Troubleshooting */
.troubleshooting-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-left: 4px solid var(--primary);
  background-color: var(--muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.troubleshooting-item h4 {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.troubleshooting-item p {
  margin: 0;
  color: var(--muted-foreground);
}

/* Sidebar */
.docs-sidebar {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.sidebar-section {
  background-color: var(--muted);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
}

.sidebar-nav li {
  margin-bottom: 0.5rem;
}

.sidebar-nav a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.sidebar-nav a:hover {
  color: var(--foreground);
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.spec-item strong {
  color: var(--foreground);
}

.spec-item span {
  color: var(--muted-foreground);
}

/* Responsive Design for Docs */
@media (max-width: 1024px) {
  .docs-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .docs-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .docs-title {
    font-size: 2rem;
  }

  .docs-content {
    padding: 2rem 0;
  }

  .step-item {
    flex-direction: column;
    text-align: center;
  }

  .step-number {
    align-self: center;
  }
}

/* Network Diagram Styles */
.network-diagram-container {
  width: 100%;
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  position: relative;
}

.network-diagram-image {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  object-fit: contain;
  background-color: #1a1a1a;
}

/* Clickable Image Styles */
.clickable-image {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.clickable-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.image-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.clickable-image:hover .image-overlay {
  opacity: 1;
}

.image-overlay svg {
  width: 1rem;
  height: 1rem;
}

/* Responsive adjustments for network diagram */
@media (max-width: 768px) {
  .network-diagram-container {
    margin: 1.5rem -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .modal-content {
    max-width: 98%;
    max-height: 98%;
  }

  .modal-close {
    top: -35px;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .network-diagram-container {
    margin: 1rem -1rem;
  }

  .image-overlay {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
}
