/* Custom styles for LDK Documentation */

:root {
  --md-primary-fg-color: #2196F3;
  --md-primary-fg-color--light: #64B5F6;
  --md-primary-fg-color--dark: #1976D2;
  --md-accent-fg-color: #2196F3;
}

/* Hero section styling */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

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

.feature-card {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-card .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--md-primary-fg-color);
}

.feature-card h3 {
  margin-bottom: 1rem;
  color: var(--md-primary-fg-color);
}

/* Code blocks */
.highlight {
  margin: 1.5rem 0;
}

.highlight pre {
  border-radius: 8px;
  border: 1px solid var(--md-default-fg-color--lightest);
}

/* Buttons */
.md-button {
  border-radius: 6px;
  font-weight: 500;
  text-transform: none;
  padding: 0.75rem 1.5rem;
}

.md-button--primary {
  background: linear-gradient(135deg, var(--md-primary-fg-color), var(--md-primary-fg-color--dark));
  border: none;
}

.md-button--primary:hover {
  background: linear-gradient(135deg, var(--md-primary-fg-color--dark), var(--md-primary-fg-color));
  transform: translateY(-1px);
}

/* Navigation */
.md-nav__title {
  font-weight: 600;
}

.md-nav__item--active > .md-nav__link {
  color: var(--md-primary-fg-color);
  font-weight: 600;
}

/* Tables */
.md-typeset table:not([class]) {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background: var(--md-default-fg-color--lightest);
  font-weight: 600;
}

/* Admonitions */
.md-typeset .admonition {
  border-radius: 6px;
  border-left: 4px solid var(--md-primary-fg-color);
}

.md-typeset .admonition.tip {
  border-left-color: #00C851;
}

.md-typeset .admonition.warning {
  border-left-color: #FF8800;
}

.md-typeset .admonition.danger {
  border-left-color: #FF4444;
}

/* Search */
.md-search__input {
  border-radius: 6px;
}

/* Footer */
.md-footer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #1e1e1e;
  --md-default-fg-color: #ffffff;
}

[data-md-color-scheme="slate"] .feature-card {
  background: #2d2d2d;
  border-color: #404040;
}

[data-md-color-scheme="slate"] .feature-card:hover {
  box-shadow: 0 8px 25px rgba(255,255,255,0.1);
}

/* Code syntax highlighting improvements */
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #60a0b0; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #60a0b0; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .cpf { color: #60a0b0; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */

/* Loading animation */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.loading {
  animation: pulse 2s infinite;
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--md-primary-fg-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
}

.scroll-to-top:hover {
  background: var(--md-primary-fg-color--dark);
  transform: translateY(-2px);
}