| /* Dark Mode Styles */ |
| :root { |
| --bg-primary: #ffffff; |
| --text-primary: #212529; |
| --text-secondary: #6c757d; |
| --navbar-bg: #343a40; |
| --code-bg: #f8f9fa; |
| } |
| |
| [data-theme="dark"] { |
| --bg-primary: #0d1117; |
| --text-primary: #e6edf3; |
| --text-secondary: #8b949e; |
| --navbar-bg: #0d1117; |
| --code-bg: #161b22; |
| } |
| |
| body { |
| background-color: var(--bg-primary) !important; |
| color: var(--text-primary) !important; |
| } |
| |
| [data-theme="dark"] .bg-white { |
| background-color: var(--bg-primary) !important; |
| color: var(--text-primary) !important; |
| } |
| |
| [data-theme="dark"] a { |
| color: #58a6ff !important; |
| } |
| |
| [data-theme="dark"] a:hover { |
| color: #79c0ff !important; |
| } |
| |
| [data-theme="dark"] .navbar-dark { |
| background-color: var(--navbar-bg) !important; |
| } |
| |
| [data-theme="dark"] pre { |
| background-color: var(--code-bg) !important; |
| border-radius: 6px; |
| } |
| |
| .dark-mode-toggle { |
| background: none; |
| border: none; |
| color: rgba(255, 255, 255, 0.8); |
| font-size: 1.2rem; |
| cursor: pointer; |
| padding: 0; |
| margin-left: 1rem; |
| line-height: 1; |
| display: inline-flex; |
| align-items: center; |
| transition: color 0.15s ease; |
| } |
| |
| .dark-mode-toggle:hover { |
| color: rgba(255, 255, 255, 1); |
| } |
| |
| .dark-mode-toggle:focus { |
| outline: 2px solid #79c0ff; |
| outline-offset: 2px; |
| } |
| |
| .dark-mode-toggle:focus:not(:focus-visible) { |
| outline: none; |
| } |
| |
| .sun-icon { |
| display: none; |
| } |
| |
| .moon-icon { |
| display: inline; |
| } |
| |
| .sun-icon, |
| .moon-icon { |
| line-height: 1; |
| } |
| |
| [data-theme="dark"] .sun-icon { |
| display: inline; |
| } |
| |
| [data-theme="dark"] .moon-icon { |
| display: none; |
| } |
| |
| [data-theme="dark"] .hljs { |
| background: var(--code-bg) !important; |
| color: var(--text-primary) !important; |
| } |
| |
| [data-theme="dark"] .hljs-comment { |
| color: var(--text-secondary) !important; |
| } |