/* =====================================================================
   Theme 8 — "Glassmorphism" (kaca frosted / blob warna / indigo-violet)
   Aktivasi: body.theme8 (dropdown Theme di header)
   Design language: panel kaca separa lutsinar dengan backdrop-blur,
   border putih halus, radius besar, latar blob radial lembut,
   aksen gradient indigo -> violet.
   ===================================================================== */

body.theme8 {
  color: #1e293b;
  --grid-line: rgba(255, 255, 255, 0.35);
  background-color: #eef2ff !important;
  background-image:
    radial-gradient(at 18% 18%, rgba(99, 102, 241, 0.40) 0, transparent 50%),
    radial-gradient(at 82% 8%, rgba(236, 72, 153, 0.28) 0, transparent 50%),
    radial-gradient(at 72% 82%, rgba(56, 189, 248, 0.32) 0, transparent 50%),
    radial-gradient(at 8% 88%, rgba(168, 85, 247, 0.30) 0, transparent 50%);
  background-attachment: fixed;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* ---------- Surface & text swaps ---------- */

body.theme8 .bg-zinc-900 {
  background-color: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
}
body.theme8 .bg-zinc-800 { background-color: rgba(255, 255, 255, 0.45) !important; }
body.theme8 .hover\:bg-zinc-800:hover { background-color: rgba(255, 255, 255, 0.75) !important; }

body.theme8 .text-white { color: #1e293b !important; }
body.theme8 .text-black { color: #ffffff !important; }
body.theme8 .text-zinc-100,
body.theme8 .text-zinc-200,
body.theme8 .text-zinc-300 { color: #1e293b !important; }
body.theme8 .text-zinc-400 { color: #475569 !important; }
body.theme8 .text-zinc-500 { color: #64748b !important; }
body.theme8 .text-zinc-600 { color: #94a3b8 !important; }

body.theme8 .border-zinc-800,
body.theme8 .border-zinc-800\/80,
body.theme8 .border-zinc-700,
body.theme8 .hover\:border-zinc-700:hover { border-color: rgba(255, 255, 255, 0.65) !important; }

/* aksen: kuning -> indigo/violet */
body.theme8 .bg-yellow-400 { background: linear-gradient(135deg, #6366f1, #a855f7) !important; }
body.theme8 .hover\:bg-yellow-300:hover { background: linear-gradient(135deg, #818cf8, #c084fc) !important; }
body.theme8 .text-yellow-400,
body.theme8 .text-yellow-300 { color: #6d5cff !important; }
body.theme8 .hover\:text-yellow-300:hover { color: #a855f7 !important; }
body.theme8 .focus\:border-yellow-400:focus { border-color: #6366f1 !important; }
body.theme8 .focus\:ring-yellow-400:focus { --tw-ring-color: rgba(99, 102, 241, 0.35) !important; }
body.theme8 .accent-yellow-400 { accent-color: #6366f1 !important; }

/* tombol merah kekal putih */
body.theme8 .bg-red-600 { color: #fff !important; }

/* ---------- Header (kaca) ---------- */

body.theme8 header {
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.12);
}
body.theme8 header button {
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.45) !important;
  color: #1e293b !important;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease !important;
}
body.theme8 header button:hover {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(31, 38, 135, 0.15);
}
body.theme8 #search-input {
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #1e293b !important;
}
body.theme8 #search-input::placeholder { color: #64748b; }
body.theme8 #search-input:focus {
  border-color: #6366f1 !important;
  background: rgba(255, 255, 255, 0.85) !important;
  outline: none;
}

/* ---------- Cards (kaca frosted) ---------- */

body.theme8 .prompt-card {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.12) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}
body.theme8 .prompt-card:hover {
  border-color: rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(31, 38, 135, 0.2) !important;
}
body.theme8 .prompt-card .img-checker {
  background-color: rgba(255, 255, 255, 0.3) !important;
  background-image: none !important;
}
body.theme8 .prompt-card .absolute.top-2.left-2 span {
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #475569 !important;
}
body.theme8 .prompt-card .absolute.top-2.right-2 {
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.theme8 .prompt-card .bg-yellow-400 {
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  color: #475569 !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.theme8 .prompt-card .border-t { border-color: rgba(255, 255, 255, 0.5) !important; }

/* ---------- Buttons, pills, chips ---------- */

body.theme8 .btn-primary {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 14px !important;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35) !important;
  transition: all 0.25s ease !important;
}
body.theme8 .btn-primary:hover {
  background: linear-gradient(135deg, #818cf8, #c084fc) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45) !important;
}
body.theme8 .btn-primary:active { transform: translateY(0); }

body.theme8 .btn-secondary {
  background: rgba(255, 255, 255, 0.5) !important;
  color: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  border-radius: 14px !important;
  font-weight: 600;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(31, 38, 135, 0.08) !important;
  transition: all 0.25s ease !important;
}
body.theme8 .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(31, 38, 135, 0.15) !important;
}

body.theme8 .filter-pill {
  background: rgba(255, 255, 255, 0.45) !important;
  color: #475569 !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  font-weight: 500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(31, 38, 135, 0.06) !important;
  transition: all 0.25s ease !important;
}
body.theme8 .filter-pill:hover {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(31, 38, 135, 0.12) !important;
}
body.theme8 .filter-pill.active {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4) !important;
}

body.theme8 .tag-chip {
  background: rgba(255, 255, 255, 0.5) !important;
  color: #4c4c7a !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease !important;
}
body.theme8 .tag-chip:hover { background: rgba(255, 255, 255, 0.8) !important; }
body.theme8 .tag-chip.active {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

body.theme8 .icon-btn { color: #64748b !important; }
body.theme8 .icon-btn:hover {
  background: rgba(255, 255, 255, 0.6) !important;
  color: #6366f1 !important;
}

/* ---------- Form fields ---------- */

body.theme8 .field-label { color: #334155; font-weight: 600; }
body.theme8 .field-input {
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 14px !important;
  color: #1e293b !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}
body.theme8 .field-input::placeholder { color: #94a3b8; }
body.theme8 .field-input:focus {
  border-color: #6366f1 !important;
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2) !important;
}
body.theme8 select {
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  color: #1e293b !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---------- Modals (kaca besar) ---------- */

body.theme8 .modal-backdrop { background: rgba(30, 41, 59, 0.35) !important; }
body.theme8 .modal-panel {
  background: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 24px !important;
  box-shadow: 0 24px 64px rgba(31, 38, 135, 0.25) !important;
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
}
body.theme8 .modal-panel .sticky {
  border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* blok prompt: kaca gelap lembut agar teks code jelas */
body.theme8 #dm-content pre {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 16px !important;
  color: #e2e8f0 !important;
  box-shadow: 0 8px 24px rgba(31, 38, 135, 0.25) !important;
}

/* result cards dalam detail */
body.theme8 #dm-content div.grid > div {
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(31, 38, 135, 0.12) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.theme8 #dm-content div.grid > div .img-checker {
  background-color: rgba(255, 255, 255, 0.4) !important;
  background-image: none !important;
}
body.theme8 #dm-content .border-t { border-color: rgba(255, 255, 255, 0.5) !important; }

/* ---------- Dropzone, toast, misc ---------- */

body.theme8 .dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.8) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.35) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease !important;
}
body.theme8 .dropzone:hover { background: rgba(255, 255, 255, 0.55) !important; }
body.theme8 .dropzone.dragover {
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.12) !important;
}

body.theme8 .toast {
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 32px rgba(31, 38, 135, 0.2) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-weight: 500;
}
body.theme8 .toast-success {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: #ffffff !important;
}
body.theme8 .toast-error { background: #e11d48 !important; color: #fff !important; }
body.theme8 .toast-info {
  background: rgba(255, 255, 255, 0.6) !important;
  color: #1e293b !important;
}

body.theme8 #im-summary {
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.5) !important;
  color: #334155 !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.theme8 #im-summary [class*="text-yellow"] { color: #6366f1 !important; }

body.theme8 #empty-state .bg-zinc-900 {
  background: rgba(255, 255, 255, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 24px !important;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.12) !important;
  color: #6366f1 !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.theme8 #lightbox { background: rgba(30, 41, 59, 0.75) !important; backdrop-filter: blur(8px); }

/* ---------- Scrollbar & selection ---------- */

body.theme8 ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.6);
  border-color: transparent;
}
body.theme8 ::-webkit-scrollbar-thumb:hover { background: #6366f1; }
body.theme8 ::selection {
  background: rgba(99, 102, 241, 0.35);
  color: #1e293b;
}
