/* =====================
   HEADER
===================== */
.tool-header{
  width:100%;
  margin-bottom:20px;
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
}
/* Title */
.tool-title{
  margin:0;
  font-size:1.8rem;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:.5rem;
  color:#1f2937;
}
/* =====================
   THEME TOGGLE
===================== */
.theme-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:600;
  font-size:14px;
}
.switch{
  position:relative;
  width:48px;
  height:26px;
}
.switch input{
  opacity:0;
  width:0;
  height:0;
}
.slider{
  position:absolute;
  inset:0;
  background:#d1d5db;
  border-radius:30px;
  cursor:pointer;
  transition:.3s;
}
.slider:before{
  content:"";
  position:absolute;
  width:20px;
  height:20px;
  left:3px;
  bottom:3px;
  background:#fff;
  border-radius:50%;
  transition:.3s;
}
.switch input:checked + .slider{
  background:linear-gradient(135deg,#6366f1,#22c55e);
}
.switch input:checked + .slider:before{
  transform:translateX(22px);
}
/* =====================
/* =====================
   DARK MODE – GLOBAL
===================== */
body.dark {
  --bg: #0f172a;
  --box: #020617;
  --text: #e5e7eb;
  --accent: #a5b4fc;
  --muted: #94a3b8;
}

body.dark{
  background:#0f172a;
  color:#e5e7eb;
}

/* Cards / Outputs */
body.dark .output-box{
  background:#020617;
  color:#e5e7eb;
  box-shadow:0 2px 8px rgba(0,0,0,.6);
}

/* Inputs */
body.dark textarea,
body.dark input[type="text"]{
  background:#020617;
  color:#e5e7eb;
  border:1px solid #334155;
}

/* Buttons */
body.dark button{
  background:linear-gradient(135deg,#6366f1,#22c55e);
  color:#fff;
}

body.dark .container {
  background: var(--box);
  border-color: #334155;
}

body.dark .results {
  background: #020617;
  border-color: #334155;
}

body.dark textarea {
  background: #020617;
  color: var(--text);
}

body.dark .metric-title {
  color: var(--accent);
}

body.dark h1,
body.dark h2,
body.dark h3 {
  color: var(--text);
}


/* Header */
body.dark .tool-title{
  color:#f9fafb;
}
body.dark .theme-toggle{
  color:#e5e7eb;
}
body.dark .tool-title { 
color:#f9fafb; 
    
}

/* =====================
   DARK MODE – TOOL CONTAINER
===================== */

body.dark .tool-container{
  background:#020617;
  border:1px solid #334155;
  color:#e5e7eb;
}

/* Subtitle מעל הכלי */
body.dark .subtitle{
  color:#cbd5f5;
}

/* Labels */
body.dark .tool-container label{
  color:#e5e7eb;
}

/* Inputs & Selects */
body.dark .tool-container input,
body.dark .tool-container select{
  background:#0f172a;
  color:#f9fafb;
  border:1px solid #334155;
}

body.dark .tool-container input::placeholder{
  color:#94a3b8;
}

/* Field info */
body.dark .field-info{
  color:#94a3b8;
}

/* Button */
body.dark .tool-container button{
  background:linear-gradient(135deg,#6366f1,#22c55e);
  color:#ffffff;
}

body.dark .tool-container button:hover{
  filter:brightness(1.1);
}

/* Result box */
body.dark .result-box{
  background:#020617;
  border:1px solid #334155;
  color:#e5e7eb;
}

/* Graph legend text */
body.dark .graph-legend{
  color:#cbd5f5;
}

/* Canvas wrapper */
body.dark .graph-wrap{
  background:#020617;
  border-radius:10px;
}

/* Small muted text */
body.dark #vizNote{
  color:#94a3b8;
}

/* =====================
   DARK MODE – CORE
===================== */
body.dark {
  background:#0f172a;
  color:#e5e7eb;
}

/* =====================
   PANELS / CONTAINERS
===================== */
body.dark .tool-container,
body.dark .panel,
body.dark .container {
  background:#020617;
  color:#e5e7eb;
  border:1px solid #1e293b;
}

/* =====================
   HEADINGS & TEXT
===================== */
body.dark h1,
body.dark h2,
body.dark h3,
body.dark strong {
  color:#f9fafb;
}

body.dark .subtitle,
body.dark .small,
body.dark .field-info,
body.dark .tooltip,
body.dark .level,
body.dark .timeline-legend {
  color:#94a3b8;
}

/* =====================
   LABELS
===================== */
body.dark label {
  color:#cbd5f5;
}

/* =====================
   INPUTS / SELECTS / TEXTAREA
===================== */
body.dark input,
body.dark select,
body.dark textarea {
  background:#020617;
  color:#e5e7eb;
  border:1px solid #334155;
}

body.dark input::placeholder,
body.dark textarea::placeholder {
  color:#64748b;
}

/* Range sliders */
body.dark input[type="range"] {
  accent-color:#6366f1;
}

/* =====================
   BUTTONS
===================== */
body.dark .btn,
body.dark button {
  background:linear-gradient(135deg,#6366f1,#22c55e);
  color:#ffffff;
}

body.dark .btn.secondary,
body.dark button.secondary {
  background:#020617;
  border:1px solid #334155;
  color:#e5e7eb;
}

body.dark .btn:hover,
body.dark button:hover {
  filter:brightness(1.1);
}

/* =====================
   RESULT / BOXES
===================== */
body.dark .result-box,
body.dark .results,
body.dark .export-area {
  background:#020617;
  border:1px solid #1e293b;
  color:#e5e7eb;
}

/* =====================
   LISTS / INLINE LISTS
===================== */
body.dark .list-inline div {
  background:#020617;
  border:1px solid #334155;
  color:#e5e7eb;
}

/* =====================
   HR / DIVIDERS
===================== */
body.dark hr {
  border-top:1px solid #1e293b;
}

/* =====================
   PREVIEW / STAGES
===================== */
body.dark .preview-stage,
body.dark .timeline {
  background:#020617;
  border:1px solid #1e293b;
}

/* =====================
   CANVAS WRAPS
===================== */
body.dark canvas {
  background:#020617;
  border-radius:8px;
}

/* =====================
   SCROLLBARS (Webkit)
===================== */
body.dark textarea::-webkit-scrollbar-track {
  background:#020617;
}

body.dark textarea::-webkit-scrollbar-thumb {
  background:#475569;
}

body.dark textarea::-webkit-scrollbar-thumb:hover {
  background:#64748b;
}
/* =====================
   DARK MODE – LAYOUT GRID
===================== */

body.dark .layout-grid{
  background:transparent;
}

/* =====================
   PREVIEW AREA
===================== */

body.dark .preview-box{
  background:#020617;
  border:1px solid #1e293b;
}

body.dark .preview-container{
  background:#020617;
  border:1px solid #1e293b;
}

body.dark .preview{
  background:#0f172a;
  color:#e5e7eb;
  border:1px dashed #334155;
}

/* Code preview */
body.dark pre,
body.dark #cssCode{
  background:#020617;
  color:#e5e7eb;
  border:1px solid #1e293b;
}

/* =====================
   STRIPS / BORDERS
===================== */

body.dark .strip{
  opacity:0.85;
}

/* =====================
   ACTION BUTTONS (MIDDLE)
===================== */

body.dark .buttons-box{
  background:#020617;
  border:1px solid #1e293b;
}

body.dark .buttons-box button{
  background:#020617;
  border:1px solid #334155;
  color:#e5e7eb;
}

body.dark .buttons-box button:hover{
  background:#1e293b;
}

/* =====================
   TOOLS PANEL
===================== */

body.dark .tools-box{
  background:#020617;
  border:1px solid #1e293b;
}

/* Cards */
body.dark .card{
  background:#0f172a;
  border:1px solid #1e293b;
  color:#e5e7eb;
}

/* =====================
   INPUTS / SELECTS
===================== */

body.dark .tools-box input,
body.dark .tools-box select{
  background:#020617;
  color:#e5e7eb;
  border:1px solid #334155;
}

body.dark .tools-box input::placeholder{
  color:#64748b;
}

/* Color / Pattern palettes */
body.dark .palette{
  background:#020617;
  border:1px solid #1e293b;
}

/* Draggable colors */
body.dark .draggable-color{
  outline:1px solid #334155;
}

/* Draggable patterns */
body.dark .draggable-pattern{
  color:#e5e7eb;
  border:1px solid #334155;
}

/* Dark mode image area */
body.dark .image-area{
  background: #0f172a;              /* slate-900 */
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

/* Image itself */
body.dark .image-area img{
  background: transparent;
}

/* If you ever overlay text or empty-state inside */
body.dark .image-area::after{
  color: #94a3b8;                    /* slate-400 */
}


/* =====================
   LABELS & TEXT
===================== */

body.dark .tools-box label{
  color:#cbd5f5;
}

body.dark .controls {
  background-color: #1e1e2f;
  border: 1px solid #333;
  color: #ddd;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

body.dark .controls h1 { color: #fff; }
body.dark .controls label { color: #aaa; }
body.dark .controls input,
body.dark .controls select,
body.dark .controls textarea {
  background-color: #2a2a3f;
  color: #fff;
  border: 1px solid #444;
}

body.dark .controls .btn { background: #4a6eff; color: #fff; }
body.dark .controls .btn.small { background: #2f3b5c; }


/* =========================
   TABLE – DARK MODE
========================= */

body.dark table {
  background: #1e1e1e;
  border-color: #333;
}

body.dark th,
body.dark td {
  border: 1px solid #333;
  color: #e0e0e0;
}

/* Header */
body.dark th {
  background-color: #2a2a2a;
  color: #ffffff;
}

/* Zebra rows */
body.dark tr:nth-child(even) {
  background-color: #242424;
}

body.dark tr:nth-child(odd) {
  background-color: #1e1e1e;
}

/* Similarity text */
body.dark .similarity {
  color: #aaa;
}


















.dark /* ===== עיצוב כללי ===== */
body {
  margin: 0;
  padding: 15px;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Segoe UI", sans-serif;
  background: #0f1115; /* רקע בהיר */
  color: #e6e6e6; /* טקסט כהה */
  text-align: center;
}
.dark .wrap {
  font-family: 'Arial', sans-serif;
  background: #0f1115; /* רקע לבן */
  color: #e6e6e6;
  margin: 0 auto;
  padding: 20px;
  border:1px solid #0f1115; /* גבול בהיר */
  border-radius: 10px;
}

/* ===== כותרות וטקסטים ===== */
h1 {
  color: #e6e6e6;
  margin: 1.5rem 0 0.5rem;
  font-size: 2.4rem;
  animation: fadeSlide 0.8s ease-out;
}
.dark p {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: #555;
  animation: fadeSlide 1s ease-out;
}
.dark /* ===== ניווט קטגוריות ===== */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  animation: fadeSlide 1.2s ease-out;
}
.dark .cat-btn {
  padding: 0.6rem 1.4rem;
  border: 1px solid #0f1115;
  border-radius: 10px;
  background: transparent;
  color: #e6e6e6;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.35s ease;
  opacity: 0;
  animation: fadeSlide 0.8s ease-out forwards;
}

.dark .cat-btn:hover {
  /* צבע נשאר אותו דבר */
  color: #e6e6e6;
  background: transparent;

  /* אפקטים חדשים */
  transform: translateY(-3px);
  border-color: #42a5f5; /* שינוי צבע הגבול בלבד */
  box-shadow: 0 6px 12px rgba(66, 165, 245, 0.4); /* הילה עדינה */
}

.dark .cat-btn.active {
  background: #0f1115;
  color: #e6e6e6;
  border:1px solid #0f1115;
}
.dark /* ===== גרפים ===== */
#charts-container {
  max-width: 950px;
  margin: 0 auto 2rem;
  background: #0f1115;
  border-radius: 15px;
  padding: 2rem;
  border:1px solid #0f1115;
  animation: fadeSlide 1.3s ease-out;
}
.dark .spinner {
  border: 4px solid #e6e6e6;
  border-top: 4px solid #666;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}
.dark canvas {
  width: 100% !important;
  height: 400px !important;
  background: #0f1115;
  border-radius: 8px;
  border: 1px solid #0f1115;
}
.dark /* ===== כרטיסי טרנדים ===== */
.trend-list {
  max-width: 950px;
  margin: 0 auto 3rem;
  text-align: left;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.dark .trend-card {
  background: #0f1115;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  transition: all 0.35s ease;
  border:1px solid #0f1115;
  opacity: 0;
  color: #e6e6e6;
  animation: fadeSlide 0.9s ease-out forwards;
}
.dark .trend-card:hover {
  transform: translateY(-4px);
  border:1px solid #999;
}
.dark .trend-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: #e6e6e6;
}
.dark .trend-card p {
  margin: 0.2rem 0;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.3;
}
.dark /* ===== פוטר ===== */
footer {
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: #555;
  background: #0f1115;
  border:1px solid #0f1115;
  animation: fadeSlide 1.5s ease-out;
}


















/* ===== עיצוב כללי ===== */
body {
  margin: 0;
  padding: 15px;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Segoe UI", sans-serif;
  background: #f5f5f5; /* רקע בהיר */
  color: #222; /* טקסט כהה */
  text-align: center;
}

.wrap {
  font-family: 'Arial', sans-serif;
  background: #f5f5f5; /* רקע לבן */
  color: #222;
  margin: 0 auto;
  padding: 20px;
  border:1px solid #ccc; /* גבול בהיר */
  border-radius: 10px;
}

/* ===== אנימציות ===== */
@keyframes fadeSlide {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== כותרות וטקסטים ===== */
h1 {
  color: #111;
  margin: 1.5rem 0 0.5rem;
  font-size: 2.4rem;
  animation: fadeSlide 0.8s ease-out;
}

p {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: #555;
  animation: fadeSlide 1s ease-out;
}

/* ===== ניווט קטגוריות ===== */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  animation: fadeSlide 1.2s ease-out;
}

.cat-btn {
  padding: 0.6rem 1.4rem;
  border:1px solid #ccc;
  border-radius: 10px;
  background: transparent;
  color: #333;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.35s ease;
  opacity: 0;
  animation: fadeSlide 0.8s ease-out forwards;
}

.cat-btn:hover {
  background: #ddd;
  color: #111;
  transform: translateY(-3px);
}

.cat-btn.active {
  background: #ddd;
  color: #111;
  border:1px solid #ccc;
}

/* ===== גרפים ===== */
#charts-container {
  max-width: 950px;
  margin: 0 auto 2rem;
  background: #fafafa;
  border-radius: 15px;
  padding: 2rem;
  border:1px solid #ccc;
  animation: fadeSlide 1.3s ease-out;
}

.spinner {
  border: 4px solid rgba(0,0,0,0.1);
  border-top: 4px solid #666;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

canvas {
  width: 100% !important;
  height: 400px !important;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #ccc;
}

/* ===== כרטיסי טרנדים ===== */
.trend-list {
  max-width: 950px;
  margin: 0 auto 3rem;
  text-align: left;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.trend-card {
  background: #f9f9f9;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  transition: all 0.35s ease;
  border:1px solid #ccc;
  opacity: 0;
  color: #333;
  animation: fadeSlide 0.9s ease-out forwards;
}

.trend-card:hover {
  transform: translateY(-4px);
  border:1px solid #999;
}

.trend-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: #111;
}

.trend-card p {
  margin: 0.2rem 0;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.3;
}

/* ===== פוטר ===== */
footer {
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: #555;
  background: #f5f5f5;
  border:1px solid #ccc;
  animation: fadeSlide 1.5s ease-out;
}

/* ===== רספונסיביות ===== */
@media (max-width: 600px) {
  h1 {
    font-size: 1.8rem;
  }
  #charts-container {
    padding: 1rem;
  }
  .trend-card {
    padding: 0.8rem;
  }
}