:root {
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffffcc;
  --surface-solid: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --danger: #dc2626;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html,body{
  overflow-x:hidden;
  max-width:100%;
}


.popup-box,
textarea,
input,
button,
.sidebar,
.workspace,
.topbar,
.modal{
  box-sizing:border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, #eff6ff 0%, transparent 40%),
    radial-gradient(circle at 100% 0%, #f8fafc 0%, transparent 30%),
    var(--bg);
}




/* =========================================
   NEON DARK BACKGROUND (GREEN + BLUE)
========================================= */

body.theme-dark {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);

  background:
    radial-gradient(circle at 15% 20%, rgba(0, 255, 170, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(59, 130, 246, 0.20) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(0, 255, 200, 0.10) 0%, transparent 55%),
    linear-gradient(180deg, #020617 0%, #0b1220 100%);

  background-size: 200% 200%;
  animation: neonDarkFlow 12s ease-in-out infinite;
}

/* soft moving glow */
@keyframes neonDarkFlow {
  0% {
    background-position: 0% 50%;
    filter: hue-rotate(0deg);
  }
  50% {
    background-position: 100% 50%;
    filter: hue-rotate(10deg);
  }
  100% {
    background-position: 0% 50%;
    filter: hue-rotate(0deg);
  }
}

body.theme-dark {
  --bg: #020617;
  --bg-soft: #0f172a;
  --surface: #0f172acc;
  --surface-solid: #0f172a;
  --surface-2: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #1e293b;
  --accent: #3b82f6;
  --accent-soft: #172554;
  --danger: #ef4444;
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
  background:
    radial-gradient(circle at 0% 0%, #17255455 0%, transparent 40%),
    radial-gradient(circle at 100% 0%, #020617 0%, transparent 30%),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand h1,
.brand p,
.sidebar-head h2,
.sidebar-head p {
  margin: 0;
}

.brand h1 {
  font-size: 1.1rem;
}

.brand p,
.sidebar-head p,
.saved-indicator,
.workspace-footer p {
  color: var(--muted);
  font-size: 0.85rem;
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
  min-height: calc(100vh - 120px);
}

.sidebar,
.workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100vh;
  padding: 0.85rem;
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.search-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
}

.search-wrap span {
  font-size: 0.8rem;
  color: var(--muted);
}

input,
textarea,
button {
  font: inherit;
}

input[type="search"],
input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-solid);
  color: var(--text);
}

input:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-color: var(--accent);
}

.docs-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.doc-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-solid);
  padding: 0.65rem;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.doc-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}

.doc-card.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.doc-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: start;
}

.doc-title {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

mark {
  padding: 0 2px;
  border-radius: 3px;
  background: #fde68a;
}

.workspace {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  min-height: 0;
}

.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.title-block {
  min-width: 0;
}

.title-input {
  border: none;
  padding: 0;
  font-size: 1.35rem;
  font-weight: 700;
  background: transparent;
}

.title-input:focus {
  outline: none;
}

.toolbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.8rem 0;
}

/* =========================================
   CHIP BUTTONS - LIGHT MODE CLEAN
========================================= */

.chip-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;

  border-radius: 10px;
  padding: 0.48rem 0.68rem;
  cursor: pointer;

  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.chip-btn:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

/* ICON */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.3rem;
  color: #64748b;
}

/* PRIMARY */
.chip-btn.primary {
  background: #0f172a;
  border: 1px solid #0f172a;
  color: #ffffff;
}

.chip-btn.primary:hover {
  background: #111827;
  border-color: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

/* INSTALL BUTTON (light premium gradient) */
.chip-btn.install-btn {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  border: 1px solid #dbeafe;
  color: #0f172a;

  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.chip-btn.install-btn:hover {
  transform: translateY(-1px) scale(1.03);
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

/* SECONDARY */
.chip-btn.secondary-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

.chip-btn.secondary-btn:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

/* DANGER */
.chip-btn.danger {
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #dc2626;
}

.chip-btn.danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}



/* =========================================
   CHIP BUTTONS - DARK MODE CLEAN UPGRADE
========================================= */

body.theme-dark .chip-btn {
  border: 1px solid #1f2937;
  background: #0f172a;
  color: #e5e7eb;

  border-radius: 10px;
  padding: 0.48rem 0.68rem;
  cursor: pointer;

  transition: all 0.18s ease;
}

body.theme-dark .chip-btn:hover {
  transform: translateY(-1px);
  border-color: #334155;
  background: #111827;
}

/* ICON */
body.theme-dark .btn-icon {
  color: #cbd5e1;
}

/* PRIMARY (פחות כחול, יותר "soft highlight") */
body.theme-dark .chip-btn.primary {
  background: linear-gradient(135deg, #111827, #0b1220);
  border: 1px solid #334155;
  color: #f8fafc;
}

body.theme-dark .chip-btn.primary:hover {
  border-color: #475569;
  box-shadow: 0 10px 24px rgba(0,0,0,0.6);
}

/* INSTALL BUTTON - keep slight accent but muted */
body.theme-dark .chip-btn.install-btn {
  background: linear-gradient(135deg, #111827, #1f2937);
  border: 1px solid #334155;
  color: #e5e7eb;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

body.theme-dark .chip-btn.install-btn:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: #475569;
  box-shadow: 0 12px 28px rgba(0,0,0,0.65);
}

/* SECONDARY */
body.theme-dark .chip-btn.secondary-btn {
  background: #0b1220;
  border: 1px solid #1f2937;
  color: #cbd5e1;
}

body.theme-dark .chip-btn.secondary-btn:hover {
  background: #111827;
  border-color: #334155;
}

/* DANGER */
body.theme-dark .chip-btn.danger {
  border: 1px solid #3f1d1d;
  color: #f87171;
  background: #0f172a;
}

body.theme-dark .chip-btn.danger:hover {
  background: #1a0f12;
  border-color: #ef4444;
  color: #fecaca;
}

.editor-wrap {
  flex: 1;
  min-height: 260px;
}

textarea {
  width: 100%;
  height: 100%;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  background: var(--surface-solid);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
}

.workspace-footer {
  padding-top: 0.75rem;
}

.saved-indicator {
  margin-top: 0.35rem;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.saved-indicator.saving {
  color: #f59e0b;
}

.saved-indicator.saved {
  color: #22c55e;
}

.saved-indicator.idle {
  opacity: 0.7;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 0 10px;
}

.icon-btn span {
  height: 2px;
  width: 100%;
  background: var(--text);
}

.mobile-only {
  display: none;
}

.fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  box-shadow: var(--shadow);
}

.backdrop {
  position: fixed;
  inset: 0;
  background: #00000066;
  z-index: 15;
}

.hidden {
  display: none;
}

.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.6rem 0.8rem;
  animation: fade-up 220ms ease;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-solid);
  color: var(--text);
  width: min(420px, calc(100% - 2rem));
  padding: 1rem;
}

.modal::backdrop {
  background: #00000070;
}

.modal h3 {
  margin-top: 0;
}

.modal label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

body.focus-mode .layout {
  grid-template-columns: minmax(0, 1fr);
}

body.focus-mode .sidebar {
  display: none;
}

body.focus-mode textarea {
  font-size: 1.06rem;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .mobile-only {
    display: inline-flex;
  }

  .topbar-right .chip-btn.primary {
    display: none;
  }

  .topbar-right .chip-btn .btn-label {
    display: none;
  }

  .topbar-right .chip-btn .btn-icon {
    margin-right: 0;
  }

  .layout {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 100px);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    z-index: 25;
    border-radius: 0 16px 16px 0;
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .workspace {
    min-height: calc(100vh - 130px);
  }

  .toolbar {
    max-height: 90px;
    overflow: auto;
    padding-bottom: 0.2rem;
  }

  .fab.mobile-only {
    display: grid;
    place-items: center;
  }
}









/* =====================================
   PREMIUM CUSTOM SCROLLBAR
   Light + Dark Mode
===================================== */

/* Firefox */
*{
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #e2e8f0;
}

/* Chrome / Edge / Safari */
::-webkit-scrollbar{
  width:12px;
  height:12px;
}

::-webkit-scrollbar-track{
  background:#e2e8f0;
  border-radius:20px;
}

::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#94a3b8,#64748b);
  border-radius:20px;
  border:2px solid #e2e8f0;
}

::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,#64748b,#475569);
}

::-webkit-scrollbar-corner{
  background:#e2e8f0;
}


/* =====================================
   DARK MODE
===================================== */

body.dark *{
  scrollbar-color: #475569 #0f172a;
}

body.dark ::-webkit-scrollbar-track{
  background:#0f172a;
}

body.dark ::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#475569,#334155);
  border:2px solid #0f172a;
}

body.dark ::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,#64748b,#475569);
}

body.dark ::-webkit-scrollbar-corner{
  background:#0f172a;
}









/* DARK MODE FIX */

body.theme-dark .tool-disclaimer,
body.theme-dark .embed-box,
body.theme-dark .similar-tools,
body.theme-dark .tool-legal{
  background:#020617;
  border-color:#1e293b;
  color:#e5e7eb;
}

body.theme-dark .tool-disclaimer h3,
body.theme-dark .embed-box h3,
body.theme-dark .tool-legal strong{
  color:#f8fafc;
}

body.theme-dark .tool-disclaimer p,
body.theme-dark .embed-box p,
body.theme-dark .tool-legal p{
  color:#94a3b8;
}

/* textarea embed */
body.theme-dark .embed-code{
  background:#0f172a;
  border-color:#1e293b;
}

body.theme-dark #embedCode{
  background:#0f172a;
  color:#e2e8f0;
}

/* copy button */
body.theme-dark .copy-btn{
  background:#2563eb;
  color:#fff;
}

body.theme-dark .copy-btn:hover{
  background:#3b82f6;
}

/* top button */
body.theme-dark #scrollTopBtn{
  background:#1e293b;
  color:#fff;
}

body.theme-dark #scrollTopBtn:hover{
  background:#334155;
}

body.theme-dark .arrow-icon{
  fill:#fff;
}









/* =========================================
LEGAL POPUP
========================================= */

.legal-popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:99999;
  padding:20px;
  animation:fadeIn .3s ease;
}

.legal-popup-box{
  width:100%;
  max-width:520px;
  background:#ffffff;
  border-radius:22px;
  padding:28px;
  box-shadow:0 25px 70px rgba(0,0,0,.25);
  text-align:center;
  animation:popIn .35s ease;
}

.legal-popup-icon{
  font-size:42px;
  margin-bottom:12px;
}

.legal-popup-box h3{
  margin:0 0 14px;
  font-size:24px;
  color:#111827;
}

.legal-popup-box p{
  color:#4b5563;
  font-size:15px;
  line-height:1.7;
  margin:0 0 14px;
}

.legal-popup-box button{
  margin-top:10px;
  background:#2563eb;
  color:#fff;
  border:none;
  padding:14px 24px;
  border-radius:14px;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
  transition:.25s;
}

.legal-popup-box button:hover{
  background:#1d4ed8;
  transform:translateY(-2px);
}

@keyframes fadeIn{
  from{opacity:0;}
  to{opacity:1;}
}

@keyframes popIn{
  from{
    opacity:0;
    transform:translateY(30px) scale(.95);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

/* Mobile */
@media(max-width:600px){
  .legal-popup-box{
    padding:22px;
    border-radius:18px;
  }

  .legal-popup-box h3{
    font-size:20px;
  }

  .legal-popup-box p{
    font-size:14px;
  }
}







/* =========================================
POPUP OVERLAY
========================================= */

/* KEEP EVERYTHING + FIX PERFECT Y CENTER */

.popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.60);
  display:none;

  align-items:center;
  justify-content:center;

  z-index:99999;
  padding:20px;

  min-height:100vh; /* חשוב */
}

.popup-overlay.active{
  display:flex;
  animation:fadeIn .25s ease;
}

.popup-box{
  width:100%;
  max-width:720px;

  background:#ffffff;
  border-radius:24px;
  padding:28px;
  box-shadow:0 25px 80px rgba(0,0,0,.25);
  position:relative;
  animation:popIn .28s ease;

  max-height:calc(100vh - 40px); /* במקום 90vh */
  overflow:auto;

  transform:none;
}


/* =========================================
CLOSE BUTTON
========================================= */

.popup-close{
  position:absolute;
  top:14px;
  right:14px;
  width:38px;
  height:38px;
  border:none;
  border-radius:50%;
  background:#f1f5f9;
  font-size:18px;
  cursor:pointer;
}

.popup-close:hover{
  background:#e2e8f0;
}


/* =========================================
BUTTONS
========================================= */

.tool-extra-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:20px 0;
}

/* =========================
   CLEAN PREMIUM BUTTON
========================= */

.tool-toggle-btn{
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: #0f172a;

  border: 1px solid #e2e8f0;

  padding: 14px 18px;
  border-radius: 14px;

  font-weight: 600;
  cursor: pointer;

  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);

  transition: all 0.25s ease;
}

/* hover */
.tool-toggle-btn:hover{
  transform: translateY(-2px);

  background: linear-gradient(135deg, #f1f5f9, #ffffff);

  border-color: #cbd5e1;

  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
}

/* active click */
.tool-toggle-btn:active{
  transform: translateY(0px) scale(0.98);
}


/* =========================================
TEXTAREA
========================================= */

textarea{
  width:100%;
  min-height:180px;
  margin-top:12px;
  border:1px solid #d1d5db;
  border-radius:14px;
  padding:14px;
  resize:vertical;
  font-family:monospace;
}

.copy-btn{
  margin-top:14px;
  background:#10b981;
  color:#fff;
  border:none;
  padding:12px 18px;
  border-radius:12px;
  cursor:pointer;
}


/* =========================================
ANIMATIONS
========================================= */

@keyframes fadeIn{
  from{opacity:0;}
  to{opacity:1;}
}

@keyframes popIn{
  from{
    opacity:0;
    transform:translateY(20px) scale(.96);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}


/* =========================================
MOBILE
========================================= */

@media(max-width:700px){

  .popup-box{
    padding:22px;
    border-radius:18px;
  }

  .tool-extra-actions{
    flex-direction:column;
  }

  .tool-toggle-btn{
    width:100%;
  }

}





/* =========================================
LIGHT MODE (DEFAULT)
========================================= */

.popup-overlay{
  background:rgba(0,0,0,.60);
}

.popup-box{
  background:#ffffff;
  color:#111827;
  border:1px solid #e5e7eb;
  box-shadow:0 25px 80px rgba(0,0,0,.25);
}

/* Headings */
.popup-box h1,
.popup-box h2,
.popup-box h3,
.popup-box h4{
  color:#111827;
}

/* Text */
.popup-box p,
.popup-box li,
.popup-box span,
.popup-box small{
  color:#4b5563;
}

/* Close button */
.popup-close{
  background:#f1f5f9;
  color:#111827;
  border:1px solid #e5e7eb;
}

.popup-close:hover{
  background:#e2e8f0;
}

/* Copy button */
.copy-btn{
  background:#10b981;
  color:#ffffff;
}

.copy-btn:hover{
  background:#059669;
}

/* Textarea */
textarea{
  background:#ffffff;
  color:#111827;
  border:1px solid #d1d5db;
}

/* Embed box */
.embed-box{
  background:#ffffff;
  color:#111827;
}

/* Similar tools */
.similar-tools{
  background:#f8fafc;
  color:#111827;
}

.similar-tool-card{
  background:#ffffff;
  color:#111827;
  border:1px solid #e5e7eb;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
}

/* Cards text */
.tool-card-content p{
  color:#6b7280;
}

/* List */
#similarToolsList li{
  background:#ffffff;
  border:1px solid #e5e7eb;
  color:#111827;
}



/* =========================================
DARK MODE
body.theme-dark
========================================= */

body.theme-dark .popup-overlay{
  background:rgba(0,0,0,.78);
  color:#f9fafb;
}

body.theme-dark .popup-box{
  background:#0f172a;
  color:#f9fafb;
  border:1px solid #1e293b;
  box-shadow:0 25px 80px rgba(0,0,0,.55);
}

/* Headings */
body.theme-dark .popup-box h1,
body.theme-dark .popup-box h2,
body.theme-dark .popup-box h3,
body.theme-dark .popup-box h4{
  color:#f8fafc;
}

/* Text */
body.theme-dark .popup-box p,
body.theme-dark .popup-box li,
body.theme-dark .popup-box span,
body.theme-dark .popup-box small{
  color:#cbd5e1;
}

/* Close button */
body.theme-dark .popup-close{
  background:#1e293b;
  color:#f8fafc;
  border:1px solid #334155;
}

body.theme-dark .popup-close:hover{
  background:#334155;
}

body.theme-dark .tool-toggle-btn{
  background: linear-gradient(135deg, #0f172a, #111827);
  color: #e5e7eb;
  border: 1px solid #1f2937;
}

body.theme-dark .tool-toggle-btn:hover{
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.15),
              0 10px 26px rgba(0,0,0,0.6);
}

/* Copy button */
body.theme-dark .copy-btn{
  background:#059669;
  color:#ffffff;
  border:1px solid #10b981;
}

body.theme-dark .copy-btn:hover{
  background:#047857;
}

/* Textarea */
body.theme-dark textarea{
  background:#020617;
  color:#e2e8f0;
  border:1px solid #334155;
}

/* Embed box */
body.theme-dark .embed-box{
  background:transparent;
  color:#e5e7eb;
}

/* Similar tools section */
body.theme-dark .similar-tools{
  background:#0f172a;
  color:#f9fafb;
}

/* Cards */
body.theme-dark .similar-tool-card{
  background:#111827;
  color:#f9fafb;
  border:1px solid rgba(255,255,255,0.06);
  box-shadow:0 6px 18px rgba(0,0,0,0.55);
}

body.theme-dark .similar-tool-card:hover{
  box-shadow:0 12px 28px rgba(0,0,0,0.65);
}

/* Card text */
body.theme-dark .tool-card-content h3{
  color:#f9fafb;
}

body.theme-dark .tool-card-content p{
  color:#9ca3af;
}

/* Rating */
body.theme-dark .tool-card-content .tool-rating{
  color:#fbbf24;
}

/* Badges */
body.theme-dark .tool-badge{
  color:#ffffff;
}

body.theme-dark .tool-badge.trending{
  background:#3b82f6;
}

body.theme-dark .tool-badge:not(.trending){
  background:#f59e0b;
}

/* Image */
body.theme-dark .similar-tool-card img{
  filter:brightness(0.9) contrast(1.1);
}

/* List */
body.theme-dark #similarToolsList li{
  background:#111827;
  border:1px solid rgba(255,255,255,0.06);
  color:#f9fafb;
}

body.theme-dark #similarToolsList li:hover{
  background:#1f2937;
  box-shadow:0 6px 16px rgba(0,0,0,0.5);
}

body.theme-dark #similarToolsList li a{
  color:#93c5fd;
}

body.theme-dark #similarToolsList li a:hover{
  color:#ffffff;
}





/* =========================
   ADS CENTERING
========================= */

.top-ad,
.bottom-ad{
  display:flex;
  justify-content:center;  /* מרכז אופקי */
  align-items:center;
  width:100%;
}

/* חשוב מאוד - מונע "דחיפה" לצד */
.top-ad ins.adsbygoogle,
.bottom-ad ins.adsbygoogle{
  display:block !important;
  margin:0 auto;
}




















/* =========================================
   LIGHT MODE (נשאר רגיל לגמרי)
========================================= */

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);

  background:
    radial-gradient(circle at 0% 0%, #eff6ff 0%, transparent 40%),
    radial-gradient(circle at 100% 0%, #f8fafc 0%, transparent 30%),
    var(--bg);
}

/* =========================================
   DARK MODE - NEON MOVING BACKGROUND
========================================= */

body.theme-dark {
  position: relative;
  overflow-x: hidden;
  background: #020617;
}

/* שכבת ניאון */
body.theme-dark::before {
  content: "";
  position: fixed;
  inset: -60%;
  z-index: -1;

  background:
    radial-gradient(circle at 20% 25%, rgba(0, 255, 170, 0.22), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.25), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(0, 200, 255, 0.18), transparent 55%);

  filter: blur(80px);
  animation: neonMove 14s ease-in-out infinite;
  transform: translate3d(0,0,0);
}

/* תנועה של הניאון */
@keyframes neonMove {
  0% {
    transform: translate(-6%, -4%) scale(1.2);
  }
  50% {
    transform: translate(6%, 6%) scale(1.35);
  }
  100% {
    transform: translate(-6%, -4%) scale(1.2);
  }
}