:root {
  --gf-bg: #0a0e0a;
  --gf-panel: #0d1f0f;
  --gf-muted: #1a3320;
  --gf-text: #9fc5a4;
  --gf-subtle: #5a7c5e;
  --gf-green: #00ff41;
  --gf-green-mid: #1a4d2e;
  --gf-green-weak: #0f1f12;
  --gf-green-bright: #00ff41;
  --gf-green-glow: rgba(0, 255, 65, 0.4);
  --gf-terminal-font: 'Courier New', 'Consolas', monospace;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--gf-terminal-font);
  background: var(--gf-bg);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 255, 65, 0.03) 2px,
      rgba(0, 255, 65, 0.03) 4px
    );
  pointer-events: none;
  z-index: 1;
}

/* Sidebar animation */
#sidebar.open {
  width: 24rem;
}

/* Post card in sidebar */
.post-card {
  background: var(--gf-panel);
  border: 1px solid var(--gf-muted);
  border-radius: 2px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.post-card::before {
  content: '>';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gf-green);
  opacity: 0;
  transition: all 0.2s ease;
}

.post-card:hover {
  border-color: var(--gf-green);
  box-shadow: 0 0 15px var(--gf-green-glow);
  transform: translateX(4px);
  background: var(--gf-green-weak);
}

.post-card:hover::before {
  opacity: 1;
  left: -15px;
}

.post-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--gf-bg);
}

.post-card-content {
  padding: 1rem;
}

.post-card-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gf-text);
  line-height: 1.4;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.post-card-tag {
  padding: 0.15rem 0.5rem;
  background: var(--gf-green-weak);
  border: 1px solid var(--gf-green-mid);
  border-radius: 2px;
  font-size: 0.75rem;
  color: var(--gf-green);
  font-family: var(--gf-terminal-font);
  text-transform: uppercase;
}

/* Search highlight */
.search-dimmed {
  opacity: 0.2;
}

/* Graph node tweaks for vis-network */
.vis-network {
  outline: none !important;
}

/* Custom scrollbar for sidebar */
#sidebarContent::-webkit-scrollbar {
  width: 8px;
}

#sidebarContent::-webkit-scrollbar-track {
  background: var(--gf-panel);
}

#sidebarContent::-webkit-scrollbar-thumb {
  background: var(--gf-muted);
  border-radius: 4px;
}

#sidebarContent::-webkit-scrollbar-thumb:hover {
  background: var(--gf-green);
}

/* Loading indicator */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: var(--gf-green);
  font-family: var(--gf-terminal-font);
}

.loading::after {
  content: "[LOADING GRAPH DATA...]";
  animation: blink 1s steps(2, start) infinite;
  text-transform: uppercase;
  letter-spacing: 2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #sidebar.open {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    z-index: 20;
    width: 100%;
    max-width: 24rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }
}

/* Button hover states */
button:not(:disabled):hover {
  filter: brightness(1.1);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}