:root {
  --primary-color: #2c5f2d;
  --secondary-color: #97be0d;
  --bg-color: #f8f9fa;
  --text-color: #333;
  --border-color: #ddd;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --code-bg: #f4f4f4;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

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

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a3d1b 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
  box-shadow: var(--shadow);
}

header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 20px;
}

.header-links {
  margin-top: 20px;
}

.header-links a {
  color: white;
  text-decoration: none;
  margin: 0 15px;
  padding: 8px 20px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  transition: all 0.3s ease;
  display: inline-block;
}

.header-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  transform: translateY(-2px);
}

/* Main content */
main {
  padding: 40px 0;
}

section {
  margin-bottom: 60px;
}

h2 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--secondary-color);
  padding-bottom: 10px;
}

/* Intro section */
.intro p, .examples-intro {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 15px;
}

.intro a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.intro a:hover {
  text-decoration: underline;
}

/* Installation section */
.installation pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 15px;
  overflow-x: auto;
  margin-bottom: 15px;
}

.installation code {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.installation .install-commands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 15px 0;
}

.installation .install-commands pre {
  margin: 0;
}

.installation .install-note {
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: #555;
}

.quick-start-grid {
  display: grid;
  gap: 25px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.quick-start-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.quick-start-card h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.quick-start-details {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(44, 95, 45, 0.05);
}

.quick-start-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-color);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.quick-start-details summary::-webkit-details-marker {
  display: none;
}

.quick-start-details summary::after {
  content: '▸';
  transition: transform 0.2s ease;
}

.quick-start-details[open] summary::after {
  transform: rotate(90deg);
}

.quick-start-details[open] summary {
  border-bottom: 1px solid var(--border-color);
  background: white;
}

.quick-start-details ul {
  padding: 16px 24px 8px 40px;
  margin: 0;
  list-style: disc;
  font-size: 0.95rem;
  display: grid;
  gap: 8px;
}

.quick-start-details pre {
  padding: 12px 20px 20px;
  margin: 0;
  border-top: 1px solid var(--border-color);
}

.quick-start-card pre {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.quick-start-card code {
  font-size: 0.85rem;
}

/* Examples */
.example {
  margin-bottom: 50px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.example:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.example-header {
  background: linear-gradient(135deg, var(--primary-color), #3d7d3f);
  color: white;
  padding: 20px 30px;
}

.example-header h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.example-header p {
  opacity: 0.95;
  font-size: 0.95rem;
}

.example-code {
  background: #fefefe;
  border-bottom: 1px solid var(--border-color);
}

.code-summary {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-color);
  padding: 20px 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.code-summary::-webkit-details-marker {
  display: none;
}

.code-summary::after {
  content: '▸';
  transition: transform 0.2s ease;
  color: var(--primary-color);
}

.example-code[open] .code-summary::after {
  transform: rotate(90deg);
}

.example-code[open] .code-summary {
  border-bottom: 1px solid var(--border-color);
  background: rgba(44, 95, 45, 0.05);
}

.code-content {
  padding: 0 30px 25px;
}

.code-description {
  margin-bottom: 15px;
  color: #555;
  font-size: 0.95rem;
}

.code-block {
  margin-bottom: 18px;
}

.code-block-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #666;
  margin-bottom: 6px;
}

.code-block pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  font-family: 'Fira Code', 'Courier New', monospace;
}

.code-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.code-notes {
  margin-top: 10px;
  background: rgba(44, 95, 45, 0.05);
  border-left: 4px solid var(--secondary-color);
  border-radius: 6px;
  padding: 15px 20px;
}

.code-notes-heading {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.code-notes-list {
  margin-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.code-notes-list li strong {
  font-weight: 600;
  color: #222;
}

.example-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.example-side {
  padding: 20px;
  position: relative;
}

.example-side h4 {
  font-size: 1rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.client-side {
  border-right: 2px solid var(--border-color);
}

.client-side h4::before {
  content: '🌐 ';
}

.server-side h4::before {
  content: '🖥️ ';
}

.map-container {
  width: 100%;
  height: 400px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
  background: #e0e0e0;
  position: relative;
}

.server-image {
  width: 100%;
  height: 400px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  object-fit: contain;
  background: #e0e0e0;
  display: block;
}

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-color);
  font-size: 1.2rem;
}

/* Features section */
.features ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.features li {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 1rem;
}

.features strong {
  color: var(--primary-color);
}

/* Footer */
footer {
  background: #2c3e50;
  color: white;
  padding: 40px 0;
  text-align: center;
  margin-top: 60px;
}

footer p {
  margin-bottom: 10px;
}

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

footer a:hover {
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 968px) {
  .example-content {
    grid-template-columns: 1fr;
  }

  .client-side {
    border-right: none;
    border-bottom: 2px solid var(--border-color);
  }

  header h1 {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .header-links a {
    display: block;
    margin: 10px auto;
    max-width: 200px;
  }
}

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

  h2 {
    font-size: 1.5rem;
  }

  .map-container,
  .server-image {
    height: 300px;
  }
}
