/* ToolsHub – Shared Styles for All Tool Pages */
:root {
  --bg-start: #0f0c29;
  --bg-mid: #302b63;
  --bg-end: #24243e;
  --glass-bg: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.12);
  --glass-hover: rgba(255,255,255,0.1);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
}
body.light {
  --bg-start: #f0f4ff;
  --bg-mid: #e8eeff;
  --bg-end: #f5f0ff;
  --glass-bg: rgba(255,255,255,0.75);
  --glass-border: rgba(0,0,0,0.1);
  --glass-hover: rgba(255,255,255,0.95);
  --text: #1e1b4b;
  --text-muted: #475569;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 50%, #f5f0ff 100%) !important;
  color: #1e1b4b !important;
}
* { box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
  min-height: 100vh;
  color: var(--text);
}
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px;
}
.glass-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text);
  padding: 10px 14px;
  width: 100%;
  font-size: 0.875rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  font-family: 'Inter', sans-serif;
}
body.light .glass-input { background: rgba(255,255,255,0.85); }
.glass-input:focus {
  outline: none;
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6,182,212,0.2);
}
.glass-input::placeholder { color: var(--text-muted); }
.neon-text {
  background: linear-gradient(135deg, #06b6d4, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #a855f7);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px 24px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: scale(1.02); }
.btn-secondary {
  background: var(--glass-bg);
  color: var(--text);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 11px 24px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--glass-hover); }

/* Slider */
input[type=range] { accent-color: #06b6d4; cursor: pointer; }

/* Navbar */
.tool-navbar {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}
body:not(.light) .tool-navbar { background: rgba(15,12,41,0.85); }
body.light .tool-navbar { background: rgba(240,244,255,0.9); }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--glass-border);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: #06b6d4;
  background: rgba(6,182,212,0.05);
  box-shadow: 0 0 0 4px rgba(6,182,212,0.1);
}

/* Toast */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  background: rgba(30,27,75,0.95); backdrop-filter: blur(12px);
  border: 1px solid rgba(6,182,212,0.4);
  color: #e2e8f0; padding: 12px 18px; border-radius: 12px;
  font-size: 0.85rem; font-weight: 500;
  animation: slideInRight 0.35s ease, fadeOutRight 0.35s ease 2.65s both;
  display: flex; align-items: center; gap-8px;
  max-width: 300px;
  pointer-events: all;
}
body.light .toast { background: rgba(255,255,255,0.95); color: #1e1b4b; }
@keyframes slideInRight { from { opacity:0; transform:translateX(60px); } to { opacity:1; transform:translateX(0); } }
@keyframes fadeOutRight { from { opacity:1; } to { opacity:0; transform:translateX(60px); } }

/* Blob */
.blob {
  position: fixed; border-radius: 50%; filter: blur(120px);
  pointer-events: none; opacity: 0.3;
  animation: floatBlob 18s ease-in-out infinite;
}
@keyframes floatBlob {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-50px) scale(1.08); }
  66% { transform: translate(-25px,25px) scale(0.93); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 99px; }

/* Ad */
.ad-container {
  background: var(--glass-bg);
  border: 1px dashed var(--glass-border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(148,163,184,0.5); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
}

/* Fade anim */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}
.fade-up { animation: fadeUp 0.45s ease both; }

/* ─── Light Mode Accessibility & Contrast Overrides ─── */
body.light {
  color: #1e1b4b !important;
}
body.light h1, body.light h2, body.light h3, body.light h4, body.light h5, body.light h6,
body.light .text-white, body.light .text-slate-50, body.light .text-slate-100, body.light .text-slate-200, body.light .text-slate-300 {
  color: #1e1b4b !important;
}
body.light p, body.light span:not(.tag-badge), body.light label, body.light li,
body.light .text-slate-400, body.light .text-slate-500, body.light .text-gray-300, body.light .text-gray-400 {
  color: #334155 !important;
}
body.light em {
  color: #06b6d4 !important;
  font-style: normal;
  font-weight: 600;
}
body.light .text-slate-600 {
  color: #475569 !important;
}
body.light a:not(.btn-primary):not(.btn-secondary):not(.category-pill) {
  color: #4f46e5 !important;
}
body.light a:hover:not(.btn-primary):not(.btn-secondary):not(.category-pill) {
  color: #0891b2 !important;
}
body.light pre, body.light code, body.light textarea {
  color: #0f172a !important;
}
body.light ::placeholder {
  color: #64748b !important;
}

/* Light mode specific element contrast overrides */
body.light a[href*="buymeacoffee"] {
  border-color: rgba(217, 119, 6, 0.4) !important;
  background: rgba(217, 119, 6, 0.08) !important;
  color: #b45309 !important;
}
body.light a[href*="buymeacoffee"] i {
  color: #d97706 !important;
}
body.light .border-white\/10 {
  border-color: rgba(30, 27, 75, 0.1) !important;
}
body.light .text-cyan-400 {
  color: #0891b2 !important;
}
body.light .text-purple-400 {
  color: #7c3aed !important;
}
body.light .text-emerald-400 {
  color: #059669 !important;
}
body.light .bg-cyan-500\/10 {
  background: rgba(8, 145, 178, 0.1) !important;
}
body.light .bg-purple-500\/10 {
  background: rgba(124, 58, 237, 0.1) !important;
}
body.light .bg-emerald-500\/10 {
  background: rgba(5, 150, 105, 0.1) !important;
}
