body {
    background-color: #f9fafb;
    background-image:
        linear-gradient(#e5e7eb 1px, transparent 1px),
        linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
    background-size: 40px 40px;
}

.grid {
    align-items: stretch;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  padding: 20px 40px 60px;
  
}
.executor-section {
  margin-top: 40px;
  padding: 0 40px;
}

.executor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.script-card {
  display: flex;
  flex-direction: column;

  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: #000;

  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  transition: transform .25s ease, box-shadow .25s ease;
}

.script-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.14);
}

.card-thumb {
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 12px 15px;
}

.card-body h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.card-body small {
  color: #777;
}

.card-body p {
  font-size: 13px;
  color: #555;
  margin-top: 8px;
}

/* SEARCH BOX */
.search-box {
  display: flex;
  justify-content: center;
  margin: 25px 0;
}

.search-box input {
  width: 100%;
  max-width: 380px;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 999px;
  border: 1px solid #ddd;
  outline: none;
  transition: 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.search-box input:focus {
  border-color: #2563eb;
  box-shadow: 0 6px 18px rgba(37,99,235,0.25);
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 35px 0;
  flex-wrap: wrap;
}

.pagination a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: 0.25s;
}

.pagination a:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.pagination a.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  font-weight: 600;
}
.script-card {
  transition: 0.3s;
}

.script-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* FORCE CENTER SEARCH */
form.search-box {
  width: 100%;
  display: flex !important;
  justify-content: center !important;
}

form.search-box input {
  display: block !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 420px !important;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid #ddd;
}

.skeleton-wrapper {
  pointer-events: none;
  user-select: none;
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 40px;
  border-bottom: 1px solid #eee;
}

.top-header .logo {
  font-size: 22px;
  font-weight: 800;
}

.top-header nav a {
  margin-left: 18px;
  text-decoration: none;
  color: #444;
}

.hero-search {
  text-align: center;
  padding: 60px 20px 40px;
}

.hero-search h1 {
  font-size: 34px;
  margin-bottom: 20px;
}

.hero-search input {
  width: 100%;
  max-width: 520px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 16px;
  outline: none;
  background: #fff;

  transition: 
    box-shadow 0.3s ease,
    transform 0.25s ease,
    border-color 0.3s ease;
}

.hero-search input:focus {
  border-color: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transform: scale(1.03);
}

.hero-search {
  animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* VIEW PAGE */
.view-container {
  max-width: 1100px;
  margin: 0 auto;          /* CENTER halaman */
  padding: 0 20px;
}

.view-title {
  text-align: center;
  font-size: 26px;
  margin-bottom: 8px;
}

.view-meta {
  text-align: center;
  font-size: 14px;
  color: #777;
  margin-bottom: 30px;
}

.code-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 16px;

  max-width: 760px;
  width: 100%;
  margin: 28px auto;
  padding: 18px 20px;

  background: linear-gradient(135deg, #0b1220, #0f172a);
  border-radius: 16px;
}

.code-wrapper pre {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  max-width: calc(100% - 150px); /* ruang tombol */
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  margin-left: 16px;
  white-space: nowrap;
  height: fit-content;
  align-self: flex-start;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;

  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  border: none;
  border-radius: 12px;

  cursor: pointer;
  white-space: nowrap;

  transition: all 0.25s ease;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.45);
}

.copy-btn:active {
  transform: scale(0.96);
}

.copy-btn.copied {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.35);
}

.copy-btn::before {
  content: "⧉";
  font-size: 16px;
}

.copy-btn.copied::before {
  content: "✓";
}

.code-wrapper {
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.code-wrapper {
  position: relative;
  display: flex;
  align-items: flex-start;

  background: linear-gradient(135deg, #0b1220, #0f172a);
  border-radius: 18px;
  padding: 20px 22px;

  max-width: 100%;
}

/* Script text */
#codeBox {
  flex: 1;
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.6;

  white-space: pre-wrap;
  word-break: break-word;
  padding: 0;
}
}

.copy-btn {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
}

@media (max-width: 600px) {
  .code-wrapper {
    max-width: 100%;
    margin: 20px auto;
  }
}

@media (max-width: 640px) {
  .code-wrapper {
    flex-direction: column;
  }

  .copy-btn {
    align-self: flex-end;
    margin-top: 12px;
  }
}

  #codeBox {
    padding-right: 0;
    padding-bottom: 0;     /* 70px bikin box terasa tinggi */
  }
}


.view-title,
.view-meta {
  text-align: center;
}

.site-footer {
  background: #f1f1f1;
  margin-top: 80px;
  padding: 40px 20px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  margin-bottom: 14px;
}

.footer-links a {
  margin: 0 12px;
  font-size: 14px;
  color: #555;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 13px;
  color: #888;
}

/* ===============================
   FIX SCRIPT GRID (3x3 CENTER)
   =============================== */

/* ===== SCRIPTS SECTION (FULL FIX) ===== */
.scripts-section {
  width: 100%;
  display: flex;
  justify-content: center;
}

.scripts-container {
  width: 100%;
  max-width: 960px;
  padding: 0 20px 60px;
}

/* Judul */
.section-title {
  font-size: 24px;
  font-weight: 700;
  margin: 20px 0 24px;
}

/* Grid */
.scripts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* === MOBILE FIX === */
@media (max-width: 900px) {
  .scripts-grid,
  .executor-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .scripts-grid,
  .executor-home-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .script-card {
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  }
}

.home-executor-section {
  max-width: 960px;
  margin: 60px auto;
  padding: 0 20px;
}

.executor-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
}

.executor-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.static-page {
  max-width: 900px;
  margin: 100px auto 140px;
  padding: 0 20px;
}

.static-page h1 {
  font-size: 32px;
  margin-bottom: 20px;
}

.static-page p {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
}

html, body {
  height: 100%;
}

.site-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
}

/* footer tetap */
.site-footer {
  background: #f1f1f1;
  padding: 40px 20px;
}

/* ===== VIEW PAGE HEADER ONLY ===== */
.view-header {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.view-header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
  text-align: center;
}

.view-logo {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.view-nav a {
  margin: 0 12px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.view-nav a:hover {
  text-decoration: underline;
}

.view-note {
  max-width: 900px;
  margin: 40px auto 0;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}

.view-note h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.view-note ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.view-warning {
  color: #888;
  font-size: 13px;
}

.view-thumbnail {
  max-width: 900px;
  margin: 0 auto 24px;
  border-radius: 14px;
  overflow: hidden;
}

.view-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================
   MOBILE CARD THUMB FIX
========================= */

@media (max-width: 520px) {
  .card-thumb {
    height: 130px; /* lebih kecil & aman di HP */
    border-radius: 14px 14px 0 0;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p {
    font-size: 12.5px;
  }
}

/* =========================
   EXECUTOR MOBILE FIX
========================= */

@media (max-width: 520px) {

  /* Grid executor = full width */
  .executor-home-grid {
    grid-template-columns: 1fr !important;
  }

  /* Card executor full width */
  .executor-home-grid .script-card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  /* Thumbnail executor lebih pendek */
  .executor-home-grid .card-thumb {
    height: 120px;
  }

  /* Judul & text lebih rapih */
  .executor-home-grid .card-body h3 {
    font-size: 15px;
  }

  .executor-home-grid .card-body p {
    font-size: 12.5px;
  }
}

/* FIX ukuran view page */
.view-container .code-wrapper {
  max-width: 780px;
  width: 100%;
  margin: 28px auto;
}

.ad-native {
  margin: 30px 0;
  border-radius: 14px;
  overflow: hidden;
}

/* === THUMBNAIL PATH STYLE (PREMIUM CLEAN) === */
.card-thumb {
  position: relative;
  overflow: hidden;
}

.thumb-path {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px 6px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;

  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(99,102,241,.95),
    rgba(59,130,246,.95)
  );

  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(59,130,246,.35);
}

/* accent line kiri (ciri khas) */
.thumb-path::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,.7);
}

/* separator */
.thumb-path .sep {
  opacity: .7;
}

/* executor beda warna (tetap elegan) */
.badge.executor + .thumb-path,
.thumb-path.executor {
  background: linear-gradient(
    135deg,
    rgba(16,185,129,.95),
    rgba(5,150,105,.95)
  );
  box-shadow: 0 6px 18px rgba(16,185,129,.35);
}

.script-list-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

/* pill dasar */
.script-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: #444;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: all .25s ease;
}

/* hover */
.script-pill:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

/* active (list terpilih) */
.script-pill.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99,102,241,.35);
}

/* count badge */
.script-pill .pill-count {
  background: rgba(0,0,0,.06);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}

/* count saat active */
.script-pill.active .pill-count {
  background: rgba(255,255,255,.25);
}

/* NAV SPLIT OVERRIDE */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 40px;
  border-bottom: 1px solid #eee;
}

.top-header .logo {
  font-size: 22px;
  font-weight: 800;
}

.top-header .nav-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.top-header .nav-left,
.top-header .nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.top-header .nav-right {
  margin-left: auto; /* keep Home/Scripts/Executor on the right */
}

.top-header a {
  text-decoration: none;
  color: #444;
}

@media (max-width: 720px) {
  .top-header {
    padding: 12px 16px;
  }
  .top-header .nav-right {
    margin-left: 0; /* mobile: stack naturally */
  }
}
