:root {
  --nek-sidebar: #1e293b;
  --nek-sidebar-text: #e2e8f0;
  --nek-accent: #0d9488;
  --nek-accent-hover: #0f766e;
}

body.nek-home {
  min-height: 100vh;
  background: radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.15), transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(14, 116, 144, 0.2), transparent 30%),
    linear-gradient(145deg, #020617 0%, #0f172a 45%, #083344 100%);
}

/* --- Tanya jawab NEK (home, sebelum footer) --- */
.nek-home-faq {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(2, 6, 23, 0.25) 100%);
}

.nek-home-faq__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5eead4;
  background: rgba(13, 148, 136, 0.2);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.nek-home-faq__badge--soft {
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(129, 140, 248, 0.35);
}

.nek-home-faq__accordion .accordion-item {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.75rem !important;
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.65);
}

.nek-home-faq__accordion .accordion-button {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f1f5f9;
  background: rgba(30, 41, 59, 0.85);
  box-shadow: none;
}

.nek-home-faq__accordion .accordion-button:not(.collapsed) {
  color: #f1f5f9;
  background: rgba(13, 148, 136, 0.22);
}

.nek-home-faq__accordion .accordion-button::after {
  filter: invert(1) brightness(1.2);
}

.nek-home-faq__accordion .accordion-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.92);
  background: rgba(2, 6, 23, 0.35);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.nek-home-faq__disclaimer {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.nek-home-footer {
  margin-top: auto;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.45);
}

.nek-home-footer__link {
  color: #e2e8f0;
  text-decoration: underline;
  text-decoration-color: rgba(226, 232, 240, 0.45);
  text-underline-offset: 0.2em;
}

.nek-home-footer__link:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.6);
}

body.nek-auth {
  min-height: 100vh;
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 45%, #134e4a 100%);
}

.nek-card-auth {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.nek-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--nek-accent);
}

.nek-home-hero {
  position: relative;
  overflow: hidden;
}

.nek-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(13, 148, 136, 0.16), rgba(34, 197, 94, 0.08));
  pointer-events: none;
}

.nek-home-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  transition: transform 200ms linear;
}

.nek-home-orb-1 {
  width: 18rem;
  height: 18rem;
  top: 5%;
  right: -4rem;
  background: radial-gradient(circle at 35% 35%, #34d399 0%, rgba(52, 211, 153, 0.1) 65%, transparent 70%);
}

.nek-home-orb-2 {
  width: 13rem;
  height: 13rem;
  bottom: -2rem;
  left: -2rem;
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, rgba(56, 189, 248, 0.1) 65%, transparent 70%);
}

.nek-home-hero .container {
  position: relative;
  z-index: 1;
}

.py-lg-6 {
  padding-top: 4.5rem !important;
  padding-bottom: 4.5rem !important;
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.82);
}

.nek-home-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ecfeff;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  background: rgba(15, 23, 42, 0.3);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nek-home-card {
  border-radius: 1rem;
  backdrop-filter: blur(4px);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.nek-home-card .form-control {
  border-radius: 0.75rem;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}

.nek-home-card .form-control:focus {
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.18);
}

.nek-home-quote {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 1rem;
  color: #e2e8f0;
  padding: 1rem 1.1rem;
  box-shadow: 0 20px 35px -25px rgba(0, 0, 0, 0.8);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.nek-home-quote:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: 0 24px 35px -24px rgba(0, 0, 0, 0.95);
}

.nek-home-float {
  will-change: transform;
}

.nek-home-micro-tilt {
  transform-style: preserve-3d;
}

@media (hover: hover) {
  .nek-home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 40px -30px rgba(0, 0, 0, 0.9);
  }
}

/* --- Gallery Diskusi Terpilih (home) --- */
.nek-home-gallery {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.1) 100%);
}

.nek-gallery-viewport {
  overflow: hidden;
  width: 100%;
  padding: 0.5rem 0 1rem;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.nek-gallery-marquee {
  overflow: hidden;
  width: 100%;
}

/* Dua strip berdampingan (bukan bertumpuk); animasi menggeser seluruh track */
.nek-gallery-marquee-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: max-content;
  will-change: transform;
  animation: nek-gallery-marquee 55s linear infinite;
}

.nek-gallery-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes nek-gallery-marquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.nek-gallery-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0 0.75rem;
  flex: 0 0 auto;
  width: max-content;
}

.nek-gallery-card {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: min(18rem, 85vw);
  max-width: 18rem;
  min-height: 8.5rem;
  border-radius: 1rem;
  padding: 1rem 1rem 0.85rem;
  margin: 0;
  box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 0 0 auto;
  font: inherit;
  text-align: start;
  color: #0f172a;
}

.nek-gallery-card:focus-visible {
  outline: 3px solid rgba(45, 212, 191, 0.65);
  outline-offset: 3px;
}

@media (hover: hover) {
  .nek-gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 32px -20px rgba(0, 0, 0, 0.65);
  }
}

.nek-gallery-card__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.65);
  color: #0f172a;
  align-self: flex-start;
}

.nek-gallery-card__q {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #0f172a;
  flex: 1 1 auto;
}

.nek-gallery-card__hint {
  font-size: 0.72rem;
  color: rgba(15, 23, 42, 0.55);
}

/* Timpa reset Bootstrap pada <button> agar gradien & border terlihat */
.nek-gallery-card.nek-gallery-card--c0 {
  background: linear-gradient(160deg, #e0f2fe 0%, #f0f9ff 100%) !important;
  border: 1px solid rgba(125, 211, 252, 0.55) !important;
}
.nek-gallery-card.nek-gallery-card--c1 {
  background: linear-gradient(160deg, #ecfccb 0%, #f7fee7 100%) !important;
  border: 1px solid rgba(190, 242, 100, 0.55) !important;
}
.nek-gallery-card.nek-gallery-card--c2 {
  background: linear-gradient(160deg, #fce7f3 0%, #fdf2f8 100%) !important;
  border: 1px solid rgba(244, 114, 182, 0.45) !important;
}
.nek-gallery-card.nek-gallery-card--c3 {
  background: linear-gradient(160deg, #fef3c7 0%, #fffbeb 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.55) !important;
}
.nek-gallery-card.nek-gallery-card--c4 {
  background: linear-gradient(160deg, #e0e7ff 0%, #eef2ff 100%) !important;
  border: 1px solid rgba(129, 140, 248, 0.55) !important;
}
.nek-gallery-card.nek-gallery-card--c5 {
  background: linear-gradient(160deg, #ccfbf1 0%, #f0fdfa 100%) !important;
  border: 1px solid rgba(45, 212, 191, 0.55) !important;
}

.nek-gallery-modal-content {
  border-radius: 1rem;
  border: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .nek-home-orb,
  .nek-home-float,
  .nek-home-card,
  .nek-home-quote {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }

  /* Jangan wrap track (dua strip akan bertumpuk vertikal). Satu strip + scroll horizontal. */
  .nek-gallery-marquee-track {
    animation: none !important;
    transform: none !important;
    flex-wrap: nowrap;
    width: max-content;
    justify-content: flex-start;
  }

  .nek-gallery-strip[aria-hidden="true"] {
    display: none !important;
  }

  .nek-gallery-viewport {
    mask-image: none;
    -webkit-mask-image: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

.nek-sidebar {
  min-height: 100vh;
  background: var(--nek-sidebar);
  color: var(--nek-sidebar-text);
}

.nek-sidebar .nav-link {
  color: #94a3b8;
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
}

.nek-sidebar .nav-link:hover,
.nek-sidebar .nav-link.active {
  color: #fff;
  background: rgba(13, 148, 136, 0.25);
}

.nek-main {
  background: #f8fafc;
  min-height: 100vh;
}

.nek-chat-bubble-user {
  background: #e0f2f1;
  border-radius: 1rem 1rem 0.25rem 1rem;
}

.nek-chat-bubble-ai {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem 1rem 1rem 0.25rem;
}

.table-history td {
  vertical-align: top;
  font-size: 0.9rem;
}

.nek-history-cell {
  max-width: 28rem;
}

.nek-history-scroll {
  max-height: 12rem;
  overflow-y: auto;
  overflow-x: hidden;
  word-break: break-word;
  padding-right: 0.25rem;
}

.nek-chat-processing-inline {
  display: inline-block;
  min-width: 9.5rem;
  line-height: 1.5;
  animation: nek-processing-blink 1.15s ease-in-out infinite;
}

.nek-assistant-body strong {
  font-weight: 700;
  color: #0f172a;
}

@keyframes nek-processing-blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  40% {
    opacity: 0.15;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.15;
  }
  60% {
    opacity: 1;
    transform: scale(1);
  }
}
