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

:root {
  --primary-color: #4fc3f7;
  --dark-bg: #1a1a2e;
  --darker-bg: #16213e;
  --light-bg: #f8f9fa;
  --text-dark: #222;
  --text-light: #fff;
  --code-bg: #f4f4f4;
  --border-color: #e0e0e0;
  --nav-width: 280px;
  --transition-speed: 0.3s;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.8;
  background: var(--light-bg);
  color: var(--text-dark);
}

/* Navigation Styles */
.navbar {
  width: var(--nav-width);
  background: var(--dark-bg);
  color: var(--text-light);
  padding: 30px 20px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar-header {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 30px;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 15px;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 5px;
  transition: all var(--transition-speed);
  display: block;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary-color);
  color: var(--text-dark);
  transform: translateX(5px);
}

/* Main Content Area */
.main-container {
  margin-left: var(--nav-width);
  min-height: 100vh;
}

.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* Landing Page Styles */
.hero {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
  color: var(--text-light);
  border-radius: 10px;
  margin-bottom: 40px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.hero h1 {
  font-size: 3em;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.hero p {
  font-size: 1.3em;
  margin-bottom: 10px;
  opacity: 0.9;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.doc-card {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-dark);
  border: 2px solid var(--border-color);
  transition: all var(--transition-speed);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.doc-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.doc-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.4em;
}

.doc-card p {
  color: #666;
  line-height: 1.6;
}

/* Documentation Page Styles */
.doc-header {
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.doc-header h1 {
  font-size: 2.5em;
  color: var(--dark-bg);
  margin-bottom: 10px;
}

.doc-section {
  margin-bottom: 40px;
}

.doc-section h2 {
  color: var(--dark-bg);
  margin-bottom: 15px;
  font-size: 1.8em;
}

.doc-section p {
  margin-bottom: 15px;
  color: #444;
}

.doc-section ul {
  margin: 20px 0 20px 30px;
}

.doc-section li {
  margin-bottom: 10px;
  color: #444;
}

/* Code Blocks */
code {
  background: var(--code-bg);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #c7254e;
  border: 1px solid #e0e0e0;
}

pre {
  background: var(--code-bg);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  border-left: 4px solid var(--primary-color);
}

pre code {
  background: none;
  padding: 0;
  border: none;
  color: var(--text-dark);
}

/* Navigation Buttons */
.page-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid var(--border-color);
  gap: 20px;
}

.nav-button {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: all var(--transition-speed);
  text-align: center;
}

.nav-button:hover {
  background: var(--dark-bg);
  color: var(--text-light);
  transform: scale(1.05);
}

.nav-button.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.back-home {
  padding: 10px 20px;
  background: var(--darker-bg);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  transition: all var(--transition-speed);
}

.back-home:hover {
  background: var(--primary-color);
  color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 900px) {
  .navbar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 20px;
  }

  .navbar-header {
    font-size: 1.3em;
    margin-bottom: 20px;
  }

  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-link {
    padding: 8px 12px;
    font-size: 0.9em;
  }

  .main-container {
    margin-left: 0;
  }

  .content {
    padding: 20px;
  }

  .hero h1 {
    font-size: 2em;
  }

  .hero p {
    font-size: 1.1em;
  }

  .doc-grid {
    grid-template-columns: 1fr;
  }

  .page-navigation {
    flex-direction: column;
  }

  .nav-button {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .content {
    padding: 15px;
  }

  .doc-header h1 {
    font-size: 2em;
  }

  .doc-section h2 {
    font-size: 1.5em;
  }

  .hero {
    padding: 40px 15px;
  }

  .hero h1 {
    font-size: 1.8em;
  }
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--text-dark);
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Print Styles */
@media print {
  .navbar,
  .page-navigation,
  .back-home {
    display: none;
  }

  .main-container {
    margin-left: 0;
  }

  .content {
    box-shadow: none;
  }
}
