/* Dark Mode Styles for Gridzone */
:root {
  --bg-color: #1a1a1a;
  --text-color: #e5e5e5;
  --text-muted: #999;
  --primary-color: #3b82f6;
  --border-color: #333;
  --card-bg: #2d2d2d;
  --header-bg: #222;
  --sidebar-bg: #252525;
}

body.dark {
  background: var(--bg-color);
  color: var(--text-color);
}

.dark a {
  color: var(--primary-color);
}

.dark .post-wrapper,
.dark .masonry-inner,
.dark .sidebar .widget {
  background: var(--card-bg);
  border-color: var(--border-color);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.dark .entry-header .entry-title,
.dark .entry h1, 
.dark .entry h2,
.dark .entry h3,
.dark .entry h4,
.dark .entry h5,
.dark .entry h6 {
  color: #fff;
}

.dark .entry-meta,
.dark .entry-meta a,
.dark .entry-meta i {
  color: var(--text-muted);
}

.dark #header {
  background: var(--header-bg);
  border-color: var(--border-color);
}

.dark .s2 {
  background: var(--sidebar-bg);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.dark .themeform input,
.dark .themeform select,
.dark .themeform textarea {
  background: #333;
  border-color: #444;
  color: var(--text-color);
}

.dark .themeform input[type="button"],
.dark .themeform input[type="submit"],
.dark .themeform button {
  background: var(--primary-color);
  color: white;
}

.dark .entry pre {
  background: none;
  background-color: #333;
}

/* Dark mode toggle button */
.theme-toggle {
  background: rgba(0,0,0,0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 10px;
  margin-left: 400px;
  margin-top: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.theme-toggle:hover {
  background: rgba(0,0,0,0.2);
  transform: scale(1.1);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle svg {
  fill: currentColor;
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.dark .theme-toggle {
  background: rgba(255,255,255,0.1);
}

.dark .theme-toggle:hover {
  background: rgba(255,255,255,0.2);
}

/* Tooltip for better UX */
.theme-toggle::after {
  content: 'Toggle Dark Mode';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.theme-toggle:hover::after {
  opacity: 1;
  visibility: visible;
  top: calc(100% + 5px);
}

.dark .author-bio {
  background: #222222;
  padding: 0 20px 20px;
  border-radius: 10px;
  position: relative;
  color: #777;
  margin: 40px 0;
  text-align: center;
}

.dark .post-nav {
  background: #626768;
  border-radius: 10px;
  margin-bottom: 40px;
}

.dark .post-nav li a span {
  font-size: 15px;
  font-weight: 600;
  color: #f6f6f6;
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.dark .post-tags a {
  background: #62676882;
  display: inline-block;
  white-space: nowrap;
  font-size: 14px;
  color: #999;
  padding: 1px 7px;
  margin: 0 5px 6px 0;
  -webkit-border-radius: 3px;
  border-radius: 3px;
}

