/* ============================================
   Dark Mode Styles
   ============================================ */

/* Base */
html.dark-mode,
body.dark-mode {
  background: #1a1a2e;
  color: #c9d1d9;
}

body.dark-mode #wrap {
  background: #1a1a2e;
}

/* Links */
body.dark-mode a {
  color: #58a6ff;
}
body.dark-mode a:hover {
  color: #79c0ff;
}

/* ============================================
   Article blocks (homepage & post list)
   ============================================ */

/* The white card with shadow - need !important to override $block */
body.dark-mode .article,
body.dark-mode .article-inner,
body.dark-mode .article-type-post .article-inner {
  background: #161b22 !important;
  border-color: #30363d !important;
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.3) !important;
}

/* Also cover #main area in case it has white bg */
body.dark-mode #main {
  background: transparent !important;
}

/* Article title */
body.dark-mode .article-title {
  color: #e6edf3;
}
body.dark-mode .article-title a:hover {
  color: #58a6ff;
}

/* Article entry (post content) */
body.dark-mode .article-entry {
  color: #c9d1d9;
}
body.dark-mode .article-entry h1,
body.dark-mode .article-entry h2,
body.dark-mode .article-entry h3,
body.dark-mode .article-entry h4,
body.dark-mode .article-entry h5,
body.dark-mode .article-entry h6 {
  color: #e6edf3;
  border-bottom-color: #30363d;
}
body.dark-mode .article-entry h6 {
  color: #8b949e;
}
body.dark-mode .article-entry a {
  color: #58a6ff;
}
body.dark-mode .article-entry a:hover {
  color: #79c0ff;
}
body.dark-mode .article-entry code {
  background: #0d1117;
  color: #e6edf3;
  border: 1px solid #30363d;
}
body.dark-mode .article-entry pre {
  background: #0d1117;
  border: 1px solid #30363d;
}
body.dark-mode .article-entry pre code {
  border: none;
  background: transparent;
}
body.dark-mode .article-entry blockquote {
  border-left-color: #30363d;
  color: #8b949e;
}
body.dark-mode .article-entry hr {
  border-color: #30363d;
}
body.dark-mode .article-entry table {
  border-color: #30363d;
}
body.dark-mode .article-entry table th,
body.dark-mode .article-entry table td {
  border-color: #30363d;
}
body.dark-mode .article-entry table th {
  background: #0d1117;
}
body.dark-mode .article-entry table tr {
  background: #161b22;
  border-top-color: #21262d;
}
body.dark-mode .article-entry table tr:nth-child(2n) {
  background: #1a1a2e;
}
body.dark-mode .article-entry img {
  opacity: 0.95;
}
body.dark-mode .article-entry dl dt {
  color: #e6edf3;
}

/* ============================================
   Article meta, category, tags
   ============================================ */

body.dark-mode .article-meta {
  color: #8b949e;
}

/* Category label - remove 3D text shadow, use flat style */
body.dark-mode .article-category {
  color: #8b949e;
  text-shadow: none;
}
body.dark-mode .article-category-link {
  color: #58a6ff;
  text-shadow: none;
}

/* Date label */
body.dark-mode .article-date,
body.dark-mode .article-date time {
  color: #8b949e;
  text-shadow: none;
}

/* Tag links */
body.dark-mode .article-tag-list-link {
  color: #58a6ff;
  text-shadow: none;
}
body.dark-mode .article-tag-list-link:hover {
  color: #79c0ff;
}

/* Article footer */
body.dark-mode .article-footer {
  border-top-color: #30363d;
}
body.dark-mode .article-footer a {
  color: #8b949e;
}
body.dark-mode .article-footer a:hover {
  color: #e6edf3;
}

/* ============================================
   "Read More" button
   ============================================ */

body.dark-mode .article-more-link a {
  background: #161b22;
  color: #8b949e;
  border-color: #30363d;
  text-shadow: none;
}
body.dark-mode .article-more-link a:hover {
  background: #58a6ff;
  color: #fff;
  text-shadow: none;
}

/* ============================================
   Article navigation (prev/next)
   ============================================ */

body.dark-mode #article-nav {
  color: #c9d1d9;
}
body.dark-mode #article-nav:before {
  background: #30363d;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
body.dark-mode .article-nav-link-wrap {
  color: #8b949e;
  text-shadow: none;
}
body.dark-mode .article-nav-link-wrap:hover {
  color: #e6edf3;
}
body.dark-mode .article-nav-caption {
  color: #30363d;
  text-shadow: none;
}
body.dark-mode .article-nav-title {
  color: #c9d1d9;
}

/* ============================================
   Sidebar
   ============================================ */

body.dark-mode #sidebar {
  color: #c9d1d9;
}
body.dark-mode .sidebar-wrap {
  background: #161b22;
}
body.dark-mode .widget {
  background: #161b22 !important;
  border-color: #30363d !important;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.3) inset !important;
  color: #c9d1d9 !important;
  text-shadow: none !important;
}
body.dark-mode .widget-title {
  color: #e6edf3 !important;
  text-shadow: none !important;
  border-bottom-color: #30363d;
}
body.dark-mode .widget a {
  color: #58a6ff !important;
  text-shadow: none !important;
}
body.dark-mode .widget a:hover {
  color: #79c0ff !important;
  text-decoration: underline;
}
body.dark-mode .widget li {
  border-bottom-color: #21262d;
}
body.dark-mode .widget .tag-cloud a {
  color: #58a6ff !important;
  text-shadow: none !important;
}
body.dark-mode .tagcloud a {
  color: #58a6ff !important;
  text-shadow: none !important;
}
body.dark-mode .category-list-count,
body.dark-mode .tag-list-count,
body.dark-mode .archive-list-count {
  color: #8b949e;
}

/* ============================================
   Archive
   ============================================ */

body.dark-mode .archive-article {
  border-bottom-color: #21262d;
}
body.dark-mode .archive-article-title a {
  color: #e6edf3;
}
body.dark-mode .archive-article-title a:hover {
  color: #58a6ff;
}

/* ============================================
   Footer
   ============================================ */

body.dark-mode #footer {
  background: #0d1117;
  color: #8b949e;
}
body.dark-mode #footer a {
  color: #58a6ff;
}

/* ============================================
   Search
   ============================================ */

body.dark-mode .search-form {
  background: #161b22;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
body.dark-mode .search-form-input {
  color: #e6edf3;
}
body.dark-mode .search-form-submit {
  color: #8b949e;
}
body.dark-mode #local-search-result {
  background: #161b22;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
body.dark-mode .search-result-item {
  color: #c9d1d9;
  border-bottom-color: #21262d;
}
body.dark-mode .search-result-item:hover {
  background: #1a1a2e;
}
body.dark-mode .search-result-empty {
  color: #8b949e;
}

/* ============================================
   Code highlight
   ============================================ */

body.dark-mode .highlight {
  background: #0d1117;
  border-color: #30363d;
}
body.dark-mode .highlight table {
  border-color: #30363d;
}
body.dark-mode .highlight figcaption {
  color: #8b949e;
  border-bottom-color: #21262d;
}
body.dark-mode .highlight .gutter {
  background: #0d1117;
  border-right-color: #21262d;
}
body.dark-mode .highlight .gutter pre {
  color: #484f58;
}
body.dark-mode .highlight .line {
  color: #8b949e;
}

/* ============================================
   Share box
   ============================================ */

body.dark-mode .article-share-box {
  background: #161b22;
  border-color: #30363d;
  box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.4);
}
body.dark-mode .article-share-input {
  background: #0d1117;
  color: #c9d1d9;
  border-color: #30363d;
}
body.dark-mode .article-share-links {
  background: #0d1117;
}
body.dark-mode .article-share-links a {
  color: #8b949e;
  text-shadow: none;
}
body.dark-mode .article-share-links a:hover {
  color: #fff;
}

/* ============================================
   Caption, misc
   ============================================ */

body.dark-mode .caption {
  color: #8b949e;
}
body.dark-mode .pullquote {
  color: #8b949e;
}

/* ============================================
   Mobile nav
   ============================================ */

body.dark-mode .mobile-nav {
  background: #0d1117;
}
body.dark-mode .mobile-nav a {
  color: #c9d1d9;
}
body.dark-mode .mobile-nav a:hover {
  background: #161b22;
}

/* ============================================
   Fancybox
   ============================================ */

body.dark-mode .fancybox-wrap {
  background: rgba(0, 0, 0, 0.9);
}

/* ============================================
   Scrollbar
   ============================================ */

body.dark-mode::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
body.dark-mode::-webkit-scrollbar-track {
  background: #0d1117;
}
body.dark-mode::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 4px;
}
body.dark-mode::-webkit-scrollbar-thumb:hover {
  background: #484f58;
}

/* ============================================
   Pagination
   ============================================ */

body.dark-mode .page-number,
body.dark-mode .extend {
  color: #58a6ff;
}

/* ============================================
   Remove ALL light-theme text-shadows globally
   This catches everything: sidebar items, tags,
   archive, recent posts, year labels, etc.
   ============================================ */

body.dark-mode * {
  text-shadow: none !important;
}

/* ============================================
   Dark mode toggle button
   ============================================ */

body.dark-mode #dark-mode-toggle .fa {
  color: #f0c040;
}