/* Sidebar Link Styling for Interesting Games */
:root {
  --fg-sidebar-link: #1a7f37;
  /* Legible green for light mode */ }

[data-theme='dark'] {
  --fg-sidebar-link: #00ff41;
  /* Matrix green for dark mode */ }

.sidebar-action-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--fg-sidebar-link);
  text-decoration: none;
  padding: 8px 12px;
  background: rgba(0, 255, 65, 0.05);
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: 4px;
  transition: all 0.2s;
  margin-top: 8px; }

.sidebar-action-link:hover {
  background: rgba(0, 255, 65, 0.1);
  border-color: var(--fg-sidebar-link);
  transform: translateX(4px); }

.sidebar-action-link svg {
  width: 14px;
  height: 14px; }

/* Mermaid Diagrams */
.mermaid {
  display: flex;
  justify-content: center;
  background: transparent;
  padding: 1rem 0;
  margin: 2rem 0;
  overflow-x: auto;
  white-space: pre;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; }

/* Ensure mermaid SVG scales nicely */
.mermaid svg {
  max-width: 100%;
  height: auto; }

/* Mermaid Theme Overrides */
[data-theme='dark'] .mermaid .node rect,
[data-theme='dark'] .mermaid .node polygon,
[data-theme='dark'] .mermaid .node circle,
[data-theme='dark'] .mermaid .node ellipse,
[data-theme='dark'] .mermaid .node path {
  stroke: rgba(255, 255, 255, 0.2) !important; }

/* Custom Mermaid Classes for States */
.mermaid .state-initial rect {
  fill: #f8bbd0 !important;
  stroke: #c2185b !important; }

.mermaid .state-final rect {
  fill: #c8e6c9 !important;
  stroke: #2e7d32 !important; }

[data-theme='dark'] .mermaid .state-initial rect {
  fill: #880e4f !important;
  stroke: #ff4081 !important; }

[data-theme='dark'] .mermaid .state-final rect {
  fill: #1b5e20 !important;
  stroke: #69f0ae !important; }

/* Ensure text color in dark mode for custom nodes */
[data-theme='dark'] .mermaid .state-initial .nodeLabel,
[data-theme='dark'] .mermaid .state-initial text,
[data-theme='dark'] .mermaid .state-final .nodeLabel,
[data-theme='dark'] .mermaid .state-final text {
  fill: #ffffff !important;
  color: #ffffff !important; }
