/**
 * Any CSS included here will be global. The classic template
 * bundles Infima by default. Infima is a CSS framework designed to
 * work well for content-centric websites.
 */

/* You can override the default Infima variables here. */
:root {
  --ifm-color-primary: #4f46e5;
  --ifm-color-primary-dark: #4338ca;
  --ifm-color-primary-darker: #3730a3;
  --ifm-color-primary-darkest: #312e81;
  --ifm-color-primary-light: #6366f1;
  --ifm-color-primary-lighter: #818cf8;
  --ifm-color-primary-lightest: #a5b4fc;
  --ifm-code-font-size: 95%;
  --ifm-font-family-base: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --ifm-font-family-monospace: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --ifm-navbar-height: 4rem;
  --ifm-navbar-padding-vertical: 0.75rem;
  --ifm-navbar-background-color: rgba(247, 248, 252, 0.8);
  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
  --ifm-code-background: #f3f4f6;
  --code-block-bg: #1e1e1e;
  --code-block-color: #e5e7eb;
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
  /* --- Enhanced Cyberpunk/Neon Theme --- */

  /* Primary Neon Accent: Electric Blue */
  --ifm-color-primary: #e9e9e9;         /* Deep Sky Blue */
  --ifm-color-primary-dark: #e9e9e9;     /* Slightly darker */
  --ifm-color-primary-darker: #e9e9e9;   /* Darker */
  --ifm-color-primary-darkest: #132c38;  /* Darkest */
  --ifm-color-primary-light: #33ccff;    /* Lighter */
  --ifm-color-primary-lighter: #66d9ff;  /* Even lighter */
  --ifm-color-primary-lightest: #99e6ff; /* Lightest */

  /* Backgrounds */
  --ifm-background-color: #0a0a0a; /* Even darker background */
  --ifm-navbar-background-color: rgba(10, 10, 10, 0.9); /* Match background, slightly transparent */
  --ifm-footer-background-color: #0a0a0a;
  --docusaurus-highlighted-code-line-bg: rgba(0, 191, 255, 0.2); /* Neon blue highlight */
  --code-block-bg: #141414; /* Dark background for code */
  --code-block-color: #e0e0e0;

  /* Base text color */
  --ifm-font-color-base: #e0e0e0;
  --ifm-font-color-secondary: #aaaaaa;

  /* Link colors */
  --ifm-link-color: var(--ifm-color-primary);
  --ifm-link-hover-color: var(--ifm-color-primary-light);

  /* Border color */
  --ifm-toc-border-color: rgba(0, 191, 255, 0.3); /* More pronounced neon blue border */

  /* Admonition Colors (Neon Accents) */
  --ifm-color-info: #00bfff;         /* Electric Blue */
  --ifm-color-success: #39ff14;    /* Lime Green */
  --ifm-color-warning: #ffff00;    /* Bright Yellow */
  --ifm-color-danger: #ff1dce;     /* Hot Pink */
}

/* Light mode specific styles */
[data-theme='light'] {
  /* Neon Theme for Light Mode */

  /* Primary Neon Accent: Electric Blue */
  --ifm-color-primary: #153945;
  --ifm-color-primary-dark: #00aeee;
  --ifm-color-primary-darker: #0099cc;
  --ifm-color-primary-darkest: #0077aa;
  --ifm-color-primary-light: #33ccff;
  --ifm-color-primary-lighter: #66d9ff;
  --ifm-color-primary-lightest: #99e6ff;

  /* Backgrounds */
  --ifm-background-color: #f0f0f0;
  --ifm-navbar-background-color: rgba(240, 240, 240, 0.9);
  --ifm-footer-background-color: #f8f9fa; /* Lighten the footer background */
  --docusaurus-highlighted-code-line-bg: rgba(0, 191, 255, 0.1);
  --code-block-bg: #141414; /* Dark background for code */
  --code-block-color: #e0e0e0;

  /* Base text color */
  --ifm-font-color-base: #333333;
  --ifm-font-color-secondary: #555555;

  /* Link colors */
  --ifm-link-color: var(--ifm-color-primary);
  --ifm-link-hover-color: var(--ifm-color-primary-light);

  /* Border color */
  --ifm-toc-border-color: rgba(0, 191, 255, 0.2);

  /* Admonition Colors (Neon Accents) */
  --ifm-color-info: #00bfff;
  --ifm-color-success: #39ff14;
  --ifm-color-warning: #ffff00;
  --ifm-color-danger: #ff1dce;
}

[data-theme='light'] .footer {
  background-color: #f8f9fa; /* Lighten the footer background */
  color: #333333; /* Ensure text is dark for contrast */
}

[data-theme='light'] .footer a {
  color: #007bff; /* Link color for visibility */
}

/* Navbar customization */
.navbar {
  border-bottom: 1px solid var(--ifm-toc-border-color);
}

[data-theme='dark'] .navbar {
  /* Stronger Neon blue glow */
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
}

[data-theme='light'] .navbar {
  /* Neon blue glow for light mode */
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.3);
}

/* GitHub icon in navbar */
.header-github-link:hover {
  opacity: 0.7;
}

[data-theme='dark'] .header-github-link::before {
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
    no-repeat;
}

/* Footer customization */
.footer {
  padding: 2rem 0;
  background-color: var(--ifm-footer-background-color);
  border-top: 1px solid var(--ifm-toc-border-color);
}

@media (min-width: 997px) {
  .navbar {
    backdrop-filter: blur(10px);
  }

  [data-theme='dark'] .footer {
    background-color: var(--ifm-navbar-background-color);
    backdrop-filter: blur(10px);
  }
}

.footer__link-item {
  font-weight: normal;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.2s;
  color: var(--ifm-color-primary);
}

.footer__link-item:hover {
  opacity: 1;
  text-decoration: none;
  color: var(--ifm-color-primary-dark);
}

.footer__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ifm-color-primary-darker);
}

[data-theme='dark'] .footer__title {
  color: var(--ifm-color-primary-lighter);
}

[data-theme='dark'] .footer__link-item {
  color: var(--ifm-color-primary-light);
}

[data-theme='dark'] .footer__link-item:hover {
  color: var(--ifm-color-primary-lighter);
}

.footer__copyright {
  font-size: 0.9rem;
  margin-top: 2rem;
  color: var(--ifm-color-primary-darker);
}

[data-theme='dark'] .footer__copyright {
  color: #9ca3af;
}

/* General improvements */
article {
  max-width: 850px;
  margin: 0 auto;
}

.markdown h1:first-child {
  --ifm-h1-font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff; /* Subtle white heading */
}

.markdown > h2 {
  --ifm-h2-font-size: 1.8rem;
  color: #cccccc; /* Subtle grey heading */
  border-left: 3px solid var(--ifm-color-primary);
  padding-left: 0.5em;
}

.theme-doc-markdown {
  font-size: 1rem;
  line-height: 1.7;
}

/* Code block customization */
div[class^='codeBlockContainer'] {
  box-shadow: none;
  background-color: var(--code-block-bg);
}

div[class^='codeBlockContent'] {
  background-color: var(--code-block-bg);
  color: var(--code-block-color);
  padding: 1rem;
}

section[class^='codeComparison'] div[class^='codeBlockContent'] {
  min-height: 280px;
}

.prism-code {
  background-color: var(--code-block-bg) !important;
  color: var(--code-block-color) !important;
  white-space: pre-wrap !important;
  word-break: break-word;
  padding: 1rem !important;
}

:not(pre) > code {
  background-color: var(--ifm-code-background);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Ensure code blocks in tabs have proper padding */
.tabs-container .tabs-content .prism-code {
  margin: 0;
  padding: 1rem !important;
}

/* Mobile navbar fixes */
@media (max-width: 996px) {
  .header-github-link::before {
    content: '';
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
      no-repeat;
      margin-right: 0.5rem;
  }

  /* Light mode specific styles */
  html[data-theme='light'] .navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
  }

  /* Dark mode specific styles */
  html[data-theme='dark'] .navbar {
    background-color: #0f172a;
    border-bottom: 1px solid #4b5563;
  }

  html[data-theme='dark'] .navbar-sidebar__brand {
    border-bottom: 1px solid #4b5563;
  }

  html[data-theme='light'] .navbar-sidebar__brand {
    border-bottom: 1px solid #e5e7eb;
  }

  .navbar__items--left > button.navbar__toggle::before {
    content: '☰';
    color: var(--ifm-navbar-link-color);
  }

  /* Fix for the toggle button and logo alignment */
  .navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  /* Ensure the mobile menu appears properly without backdrop filter */
  .navbar-sidebar {
    height: 100vh;
    padding: 1rem;
  }

  /* Light mode specific styles */
  html[data-theme='light'] .navbar-sidebar {
    background-color: #ffffff;
    color: #1e293b;
  }

  /* Dark mode specific styles */
  html[data-theme='dark'] .navbar-sidebar {
    background-color: #0f172a;
    color: #e5e7eb;
  }

  /* Ensure sidebar links are visible in both modes */
  .navbar-sidebar .navbar__link {
    color: var(--ifm-navbar-link-color);
  }

  /* Style the sidebar close button */
  .navbar-sidebar__close {
    color: var(--ifm-navbar-link-color);
  }
}

/* Announcement bar close button styling */
div[class^='announcementBar_'] button {
  color: #FFFFFF !important;
  opacity: 1 !important;
  font-size: 1.25rem !important;
}

div[class^='announcementBar_'] button:hover {
  color: #818CF8 !important;
  opacity: 1 !important;
}

/* --- Enhanced Admonition Neon Styling --- */
[data-theme='dark'] .admonition {
  border-left-width: 4px;
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] .admonition-heading {
  font-weight: bold;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme='dark'] .admonition-icon svg {
  fill: currentColor;
}

/* Specific neon colors for admonitions */
[data-theme='dark'] .admonition.alert--info {
  border-color: var(--ifm-color-info);
  background-color: rgba(0, 191, 255, 0.2); /* Neon Blue background */
  color: var(--ifm-color-primary-lightest);
}
[data-theme='dark'] .admonition.alert--info .admonition-heading {
  color: var(--ifm-color-info);
  background-color: rgba(0, 191, 255, 0.25);
}

[data-theme='dark'] .admonition.alert--success {
  border-color: var(--ifm-color-success);
  background-color: rgba(57, 255, 20, 0.2); /* Lime Green background */
  color: #caffbf;
}
[data-theme='dark'] .admonition.alert--success .admonition-heading {
  color: var(--ifm-color-success);
  background-color: rgba(57, 255, 20, 0.25);
}

[data-theme='dark'] .admonition.alert--warning {
  border-color: var(--ifm-color-warning);
  background-color: rgba(255, 255, 0, 0.2); /* Yellow background */
  color: #ffffcc;
}
[data-theme='dark'] .admonition.alert--warning .admonition-heading {
  color: var(--ifm-color-warning);
  background-color: rgba(255, 255, 0, 0.25);
}

[data-theme='dark'] .admonition.alert--danger {
  border-color: var(--ifm-color-danger);
  background-color: rgba(255, 29, 206, 0.2); /* Hot Pink background */
  color: #ffccf6;
}
[data-theme='dark'] .admonition.alert--danger .admonition-heading {
  color: var(--ifm-color-danger);
  background-color: rgba(255, 29, 206, 0.25);
}

/* Light mode specific styles */
[data-theme='light'] .admonition {
  border-left-width: 4px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

[data-theme='light'] .admonition-heading {
  font-weight: bold;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme='light'] .admonition-icon svg {
  fill: currentColor;
}

/* Specific neon colors for admonitions in light mode */
[data-theme='light'] .admonition.alert--info {
  border-color: var(--ifm-color-info);
  background-color: rgba(0, 191, 255, 0.1);
  color: var(--ifm-color-primary-darkest);
}
[data-theme='light'] .admonition.alert--info .admonition-heading {
  color: var(--ifm-color-info);
  background-color: rgba(0, 191, 255, 0.15);
}

[data-theme='light'] .admonition.alert--success {
  border-color: var(--ifm-color-success);
  background-color: rgba(57, 255, 20, 0.1);
  color: #2e7d32;
}
[data-theme='light'] .admonition.alert--success .admonition-heading {
  color: var(--ifm-color-success);
  background-color: rgba(57, 255, 20, 0.15);
}

[data-theme='light'] .admonition.alert--warning {
  border-color: var(--ifm-color-warning);
  background-color: rgba(255, 255, 0, 0.1);
  color: #f57f17;
}
[data-theme='light'] .admonition.alert--warning .admonition-heading {
  color: var(--ifm-color-warning);
  background-color: rgba(255, 255, 0, 0.15);
}

[data-theme='light'] .admonition.alert--danger {
  border-color: var(--ifm-color-danger);
  background-color: rgba(255, 29, 206, 0.1);
  color: #c2185b;
}
[data-theme='light'] .admonition.alert--danger .admonition-heading {
  color: var(--ifm-color-danger);
  background-color: rgba(255, 29, 206, 0.15);
}

[data-theme='light'] .markdown h1:first-child {
  color: #333333; /* Darker color for visibility in light theme */
}

[data-theme='light'] .markdown > h2 {
  color: #555555; /* Darker color for visibility in light theme */
}

[data-theme='light'] div[class^='ecosystemCard'] {
  border: 1px solid #c9c9c9; /* Light border for visibility in light theme */
}

[data-theme='light'] div[class^='featureCard'] {
  border: 1px solid #c9c9c9; /* Light border for visibility in light theme */
}
