/* Global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 1200px;
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

h1 {
  font-size: 1.875rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #111827;
}

h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1f2937;
  border-bottom: 2px solid #f3f4f6;
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #374151;
}

p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #4b5563;
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: #4b5563;
}

a {
  color: #8b5cf6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Navigation styles */
.nav-container {
  width: 100%;
  max-width: 1200px;
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  overflow: hidden;
}

.nav {
  display: flex;
  overflow-x: auto;
  padding: 0.75rem 1rem;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.nav-link {
  padding: 0.5rem 1rem;
  white-space: nowrap;
  color: #4b5563;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  background-color: #f3f4f6;
  text-decoration: none;
}

.nav-link.active {
  background-color: #8b5cf6;
  color: white;
}

/* Footer */
.footer {
  color: white;
  text-align: center;
  font-size: 0.875rem;
  padding: 0.5rem;
  margin-top: 0.2rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.footer p {
  margin: 0;
  display: flex;
  align-items: center;
  height: 100%;
  color: white;
  font-weight: 500;
}

.footer a {
  color: white;
  margin-right: 1rem;
  font-weight: 500;
}

.footer a:last-child {
  margin-right: 0;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
  
  h3 {
    font-size: 1.125rem;
  }
  
  .nav {
    padding: 0.5rem;
  }
  
  .nav-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* Code blocks */
.code-block {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
  overflow-x: auto;
  position: relative;
}

.code-block pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #1f2937;
  max-width: 100%;
  overflow-x: auto;
  word-wrap: normal;
  white-space: pre;
}

/* Tips and warnings */
.tip {
  background-color: #f0fdf4;
  border-left: 4px solid #10b981;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 0.25rem 0.25rem 0;
}

.tip-title {
  font-weight: 600;
  color: #047857;
  margin-bottom: 0.5rem;
}

.tip-content {
  color: #065f46;
}

.warning {
  background-color: #fff7ed;
  border-left: 4px solid #f59e0b;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 0.25rem 0.25rem 0;
}

.warning-title {
  font-weight: 600;
  color: #b45309;
  margin-bottom: 0.5rem;
}

.warning-content {
  color: #92400e;
}

/* Buttons */
.button {
  display: inline-block;
  background-color: #8b5cf6;
  color: white;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.button:hover {
  background-color: #7c3aed;
  text-decoration: none;
}

.button-primary {
  background-color: #8b5cf6;
  color: white;
}

.button-secondary {
  background-color: #f3f4f6;
  color: #1f2937;
}

.button-secondary:hover {
  background-color: #e5e7eb;
}

/* Tab-style learning resources */
.learning-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.learning-label {
  font-weight: 600;
  color: #4b5563;
  margin-right: 1rem;
  display: flex;
  align-items: center;
}

.resource-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.resource-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  text-decoration: none;
  color: #4b5563;
  font-weight: 500;
  transition: all 0.2s ease;
}

.resource-tab:hover {
  background-color: #f3f4f6;
  border-color: #d1d5db;
  text-decoration: none;
}

.resource-tab svg {
  margin-right: 0.5rem;
}

.resource-tab.learn-more {
  background-color: #f3f4f6;
}

.resource-tab.mdn {
  border-color: #6366f1;
}

.resource-tab.wiki {
  border-color: #3b82f6;
}

.resource-tab.youtube {
  border-color: #ef4444;
}

.resource-tab.learn-more:hover {
  background-color: #e5e7eb;
}

.resource-tab.mdn:hover {
  background-color: #eef2ff;
}

.resource-tab.wiki:hover {
  background-color: #eff6ff;
}

.resource-tab.youtube:hover {
  background-color: #fef2f2;
}
