:root {
  --bg-light: #f4f4f4;
  --bg-dark: #121212;
  --card-light: #e0e0e0;
  --card-dark: #1f1f1f;
  --text-light: #111;
  --text-dark: #eee;
  --accent-light: #666;
  --accent-dark: #aaa;
  --nav-light: rgba(255,255,255,0.7);
  --nav-dark: rgba(0,0,0,0.7);
  --example-light: #f0f0f0;
  --example-dark: #2c2c2c;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-light);
  color: var(--text-light);
  margin: 0;
  transition: background 0.4s ease, color 0.4s ease;
}

@media (prefers-color-scheme: dark) {
  .tools-container { background: #000 !important; }

  body { background: var(--bg-dark); color: var(--text-dark); }
  .tools-container { background: var(--card-dark); }
  .tool-option { background: var(--card-dark); color: var(--text-dark); }
  .tool-option:hover { background: #2a2a2a; }
  .tool-example { background: var(--example-dark); border-left: 3px solid var(--accent-dark); color: var(--text-dark); }
  .tool-description { color: var(--accent-dark); }
  .navbar { background: var(--nav-dark); }
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--nav-light);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
}
.navbar .brand { font-weight: 600; font-size: 1.1rem; }
.nav-links { display: flex; list-style: none; gap: 20px; }
.nav-links a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 6px; transition: color 0.3s; }
.nav-links a:hover { color: #4a90e2; }

.header {
  text-align: center;
  padding: 50px 20px 30px;
}
.header h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 500; margin-bottom: 8px; }
.header p { color: var(--accent-light); }

.tools-container {
  display: flex;
  gap: 12px;
  max-width: 880px;
  margin: auto;
  border-radius: 20px;
  padding: 10px;
  background: var(--card-light);
}
.tool-option {
  flex: 1;
  padding: 40px 30px;
  border-radius: 16px;
  background: var(--card-light);
  cursor: pointer;
  transition: all 0.3s ease;
}
.tool-option:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.tool-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.tool-description { font-size: 0.95rem; margin-bottom: 16px; color: var(--accent-light); }

.tool-example {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  padding: 10px 14px;
  border-left: 3px solid var(--accent-light);
  border-radius: 6px;
  background: var(--example-light);
  color: var(--text-light);
}

.navigation-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.processing-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(245,245,244,0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0; visibility: hidden;
  transition: all 0.4s ease;
  z-index: 1000;
}
.processing-overlay.active { opacity: 1; visibility: visible; }
.spinner {
  width: 44px; height: 44px;
  border: 3px solid #e5e5e5;
  border-top: 3px solid #666;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }



/* Force navbar always dark to match original design */
.navbar {
  background: rgba(0,0,0,0.92) !important;
  color: #ffffff !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.navbar a { color: #ffffff !important; }
.navbar .brand { color: #ffffff !important; }

/* FORCE: tools-container black in dark mode */
@media (prefers-color-scheme: dark) {
  .tools-container { background: #000 !important; }
}



/* ===== UNIFIED DARK MODE OVERRIDE - FORCE CONSISTENT BLACK CARD AREA ===== */
@media (prefers-color-scheme: dark) {
  /* Make the whole tools area pure black and remove mismatching light cards */
  .tools-container {
    background: #000 !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* Make each option match the container (darker card) */
  .tool-option {
    background: #0b0b0b !important;
    color: var(--text-dark) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6) !important;
    border: 1px solid rgba(255,255,255,0.03) !important;
  }

  /* The inner example/input should be slightly lighter but still dark */
  .tool-example, input[type="text"], textarea, select {
    background: #121212 !important;
    color: var(--text-dark) !important;
    border-left-color: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.04) !important;
    box-shadow: inset 4px 6px 0 rgba(0,0,0,0.6);
  }

  /* Ensure descriptions use the dark accent color */
  .tool-description { color: var(--accent-dark) !important; }

  /* Keep navbar always black and white text */
  .navbar {
    background: rgba(0,0,0,0.95) !important;
    color: #ffffff !important;
  }
  .navbar a { color: #ffffff !important; }

  /* Ensure navigation hint remains readable */
  .navigation-hint { background: rgba(255,255,255,0.06) !important; color: #eaeaea !important; }

  /* Processing overlay in dark mode */
  .processing-overlay { background: rgba(0,0,0,0.6) !important; }
}
/* ===== END OVERRIDE ===== */
