/* ===== PromptbyMe — flat yellow & black theme ===== */

/* Corak grid latar (semua tema) — warna garis di-tint per tema
   melalui pembolehubah --grid-line (default: tema 1, atas hitam) */
body { --grid-line: #26262b; }
body::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 20px 30px;
  -webkit-mask-image: radial-gradient(
    ellipse 70% 60% at 50% 0%,
    #000 60%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 70% 60% at 50% 0%,
    #000 60%,
    transparent 100%
  );
}

/* Buang panah natif (tanda v) pada dropdown select */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Form primitives */
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #d4d4d8;
  margin-bottom: 0.375rem;
}
.field-input {
  width: 100%;
  background: #000;
  border: 1px solid #27272a;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #e4e4e7;
  transition: border-color 0.15s;
}
.field-input::placeholder { color: #52525b; }
.field-input:focus {
  outline: none;
  border-color: #facc15;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
  background: #facc15;
  transition: background 0.15s;
}
.btn-primary:hover { background: #fde047; }
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d4d4d8;
  background: #18181b;
  border: 1px solid #27272a;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: #27272a; border-color: #3f3f46; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  color: #a1a1aa;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: #27272a; color: #facc15; }

/* Filter pills */
.filter-pill {
  padding: 0.375rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #a1a1aa;
  background: #18181b;
  border: 1px solid #27272a;
  transition: all 0.15s;
  cursor: pointer;
}
.filter-pill:hover { color: #f4f4f5; border-color: #3f3f46; }
.filter-pill.active {
  color: #000;
  background: #facc15;
  border-color: #facc15;
  font-weight: 600;
}

/* Tag chips */
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #fde047;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.28);
  transition: background 0.15s, color 0.15s;
}
.tag-chip:hover { background: rgba(250, 204, 21, 0.16); }
.tag-chip.active {
  color: #000;
  background: #facc15;
  border-color: #facc15;
  font-weight: 600;
}

/* Modals */
.modal-backdrop { animation: fade-in 0.15s ease-out; }
.modal-panel { animation: modal-in 0.18s ease-out; }
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Toasts */
.toast {
  animation: toast-in 0.2s ease-out;
  max-width: 340px;
}
.toast.leaving {
  animation: toast-out 0.25s ease-in forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(6px) scale(0.97); }
}

/* Dropzone */
.dropzone.dragover {
  border-color: #facc15 !important;
  background: rgba(250, 204, 21, 0.1) !important;
}

/* Cards */
.prompt-card { animation: card-in 0.25s ease-out backwards; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Media previews */
.img-checker {
  background-image: conic-gradient(#27272a 0 25%, #18181b 0 50%, #27272a 0 75%, #18181b 0);
  background-size: 16px 16px;
}
iframe { background: #ffffff; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 8px;
  border: 2px solid #000;
}
::-webkit-scrollbar-thumb:hover { background: #facc15; }

::selection {
  background: #facc15;
  color: #000;
}

/* Mobile: sembunyi scrollbar untuk baris yang scroll mendatar */
.pm-noscroll { scrollbar-width: none; }
.pm-noscroll::-webkit-scrollbar { display: none; }
