/* Dark theme styles */
[data-theme="dark"] {
  --background-color: #1a1a1a;
  --text-color: #eaeaea;
  --heading-color: #ffffff;
  --border-color: #404040;
  --code-background: #2d2d2d;
}

[data-theme="light"] {
  --background-color: #ffffff;
  --text-color: inherit;
  --heading-color: inherit;
  --border-color: #ddd;
  --code-background: #f8f9fa;
}

body {
  background-color: var(--background-color);
  transition: background-color 0.3s ease;
}

[data-theme="dark"] body {
  color: var(--text-color);
}

/* Theme toggle button styles */
.theme-toggle {
  background: transparent;
  border: none;
  color: currentColor;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.2rem;
  margin-left: 1rem;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1000;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Adjust other elements for dark mode */
[data-theme="dark"] .masthead,
[data-theme="dark"] .page__footer {
  background-color: #222831;
}

[data-theme="dark"] code {
  background-color: var(--code-background);
}

/* 确保按钮在导航栏中正确显示 */
.greedy-nav {
  position: relative;
}

.greedy-nav .theme-toggle {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

@media screen and (max-width: 600px) {
  .greedy-nav .theme-toggle {
    right: 3.5rem;
  }
} 