/* ========================================
   RESET & GLOBAL STYLES
   ======================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* PERBAIKAN UTAMA: Mengatur layout vertikal */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  
  /* Background Image */
  background: url("../images/index_background.png") center top / cover no-repeat fixed;
  color: #fff;
}

/* Overlay Gelap pada Background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.60),
    rgba(0,0,0,0.85)
  );
  z-index: -1;
  pointer-events: none;
}

/* ========================================
   NAVBAR (ULTRA-MODERN GLASS)
   ======================================== */
.navbar {
  width: 100%;
  /* Background biru gelap transparan */
  background: rgba(15, 23, 42, 0.75);
  
  /* Efek Blur Kaca */
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
  /* KUNCI: Lebar disamakan dengan .hero agar sejajar */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo Style */
.logo-text {
  font-family: 'Arial Black', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 198, 255, 0.3);
  cursor: default;
}

.logo-text span {
  color: #00c6ff;
}

/* Menu Navigasi */
.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  text-shadow: 0 0 10px rgba(0, 198, 255, 0.6);
}

.nav-link.active {
  color: #00c6ff;
  background: rgba(0, 198, 255, 0.15);
}

/* ========================================
   HERO SECTION & SEARCH
   ======================================== */
.hero {
  width: 100%;
  max-width: 1200px;
  padding: 40px 20px;
  text-align: center;
  flex-grow: 1; /* Mengisi ruang sisa ke bawah */
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 30px;
  margin-top: 10px;
  text-shadow: 0 8px 24px rgba(0,0,0,0.9);
  font-weight: 800;
}

/* Card Pencarian */
.search-card {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 25px;
  margin: 0 auto;
  max-width: 850px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Filters Layout */
.filters {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 0;
}

.filters select,
.filters input {
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  background: rgba(255,255,255,0.9);
  color: #333;
  width: 100%;
}

.filters button,
.search-btn {
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.filters button:hover,
.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,114,255,0.6);
}

.search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Iklan Box (Opsional) */
.ad-box {
  margin-top: 15px;
  padding: 10px;
  font-size: 12px;
  opacity: 0.6;
  border: 1px dashed rgba(255,255,255,0.3);
  border-radius: 6px;
}

/* ========================================
   RESULTS GRID & CARDS
   ======================================== */
.result {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.base-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.1);
}

.base-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,198,255,0.25);
  border-color: rgba(0,198,255,0.5);
}

/* Image Container */
.image-container {
  position: relative;
  width: 100%;
  height: 250px;
  background: rgba(0,0,0,0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.base-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
  position: relative;
  z-index: 2;
}

.base-card img.loaded {
  opacity: 1;
}

/* Loading Spinner */
.image-container .image-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #00c6ff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  z-index: 1;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Card Info */
.base-info {
  padding: 15px;
}

.base-info h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: #00c6ff;
  font-weight: 700;
}

.base-info p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

/* Button Copy */
.copy-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  text-align: center;
  text-decoration: none;
}

.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(238,90,111,0.5);
}

/* ========================================
   PAGINATION & INFO BOX
   ======================================== */
.pagination {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

.pagination-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover:not(.disabled):not(.active) {
  background: rgba(0,198,255,0.2);
  border-color: #00c6ff;
}

.page-btn.active {
  background: #00c6ff;
  border-color: #00c6ff;
  box-shadow: 0 0 15px rgba(0,198,255,0.4);
}

/* TH Info Box */
.th-info-box {
  max-width: 900px;
  margin: 50px auto 20px;
  padding: 30px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(0,198,255,0.3);
}

.th-info-box h2 {
  color: #00c6ff;
  margin-bottom: 15px;
}

.th-info-box p {
  line-height: 1.6;
  opacity: 0.9;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  margin-top: 60px;
  padding: 40px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.4));
  border-top: 1px solid rgba(255,255,255,0.05);
  width: 100%;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.disclaimer {
  font-size: 0.9rem;
  opacity: 0.6;
  margin-bottom: 10px;
}

.copyright {
  font-weight: 600;
  margin-bottom: 20px;
}

.language-switcher {
  display: flex;
  justify-content: center;
  gap: 15px;
  align-items: center;
}

.lang-btn {
  padding: 8px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
}

.lang-btn.active {
  background: #00c6ff;
  border-color: #00c6ff;
  box-shadow: 0 0 15px rgba(0,198,255,0.4);
}

.lang-separator {
  opacity: 0.3;
}

/* ========================================
   RESPONSIVE (MOBILE)
   ======================================== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .filters {
    grid-template-columns: 1fr; /* Stack filters vertically on mobile */
  }
  
  .nav-container {
    padding: 0 15px;
  }
  
  .logo-text {
    font-size: 1.3rem;
  }
  
  .nav-menu {
    gap: 15px;
  }
  
  .nav-link {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}
/* =========================================
   TAMBAHAN KHUSUS TAMPILAN HP (RESPONSIF)
   ========================================= */
@media (max-width: 768px) {
  /* 1. Ubah Navigasi jadi Susun ke Bawah (Logo atas, Menu bawah) */
  .nav-container {
    flex-direction: column;
    padding: 10px;
    gap: 15px; /* Jarak antara logo dan menu */
  }

  /* 2. Atur Menu agar Rapi di Tengah */
  .nav-menu {
    width: 100%;
    justify-content: center; /* Menu di tengah */
    gap: 15px; /* Jarak antar tulisan diperkecil biar muat */
    padding: 0;
  }

  /* 3. Kecilkan sedikit tulisan menu biar gak kepotong */
  .nav-link {
    font-size: 14px; 
    padding: 8px 12px; /* Padding tombol agak dikecilkan */
  }

  /* 4. Logo diperkecil sedikit biar proporsional */
  .logo-text {
    font-size: 20px;
  }
}