body {
  font-family: Arial, sans-serif;
  background: #fff;
  color: #222;
  margin: 0;
  padding: 0;
  height: 100%;
  transition: 0.3s;
}

body.dark {
  background: #181818;
  color: #ddd;
}

.container {
  max-width: 800px;
  margin: auto;
  padding: 40px 20px;
}

.logo {
  text-align: center;
  margin-bottom: 40px;
}

.logo h1 {
  font-size: 48px;
  color: #4285f4;
}

.search-box form {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.search-box input[type="text"] {
  width: 100%;
  max-width: 500px;
  padding: 12px 50px;
  border: 1px solid #ccc;
  border-radius: 50px;
  font-size: 16px;
  outline: none;
}

.search-box button {
  background: #4285f4;
  border: none;
  color: #fff;
  padding: 12px 18px;
  border-radius: 50%;
  cursor: pointer;
}

.results {
  margin-top: 30px;
}

.result-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 12px;
  background-color: transparent;
  transition: 0.3s;
}

.result-item:hover {
  background-color: #eee;
}

body.dark .result-item {
  background-color: transparent;
}

.result-item img.icon {
  width: 40px;
  height: 40px;
  margin-right: 15px;
}

.result-item a {
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  color: #4285f4;
}

.result-item p {
  font-size: 14px;
  margin-top: 5px;
}

/* Styling link asli yang ditambahkan */
.result-item .original-link {
  font-size: 14px;
  color: #0073e6;
  text-decoration: none;
  margin-bottom: 5px;
}

.result-item .original-link:hover {
  text-decoration: underline;
}

.dark-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

#toggleDark {
  padding: 12px 25px;
  background: linear-gradient(135deg, #2e2e2e, #444);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 10px rgba(76, 175, 80, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

#toggleDark i {
  font-size: 18px;
}

#toggleDark:hover {
  background: linear-gradient(135deg, #444, #2e2e2e);
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 255, 100, 0.5);
}

body.dark #toggleDark {
  background: linear-gradient(135deg, #222, #444);
  color: #fff;
}

body.dark #toggleDark:hover {
  background: linear-gradient(135deg, #444, #222);
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 255, 255, 0.4);
}

body.dark {
  background-color: #181818;
  color: #e0e0e0;
  transition: all 0.3s ease-in-out;
}

/* Contoh perubahan elemen saat dark mode */
body.dark .search-box input[type="text"] {
  background-color: #333;
  color: #fff;
}

body.dark .search-box button {
  background-color: #444;
  color: #fff;
}

body.dark .result-item {
  background-color: transparent;
  border-color: transparent;
}

/* Bungkus semua konten utama dan footer */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Bagian utama akan mengisi ruang kosong agar footer terdorong ke bawah */
.container {
  flex: 1;
}

.link-asli {
  font-size: 13px;
  color: #006621;
  margin-bottom: 4px;
}

/* Footer styling tetap sama */
footer {
  text-align: center;
  padding: 20px;
  background-color: #f1f1f1;
  font-size: 14px;
  color: #555;
}

body.dark footer {
  background-color: #333;
  color: #ddd;
}

/* Ukuran logo normal */
.logo img {
  max-width: 400px;
  height: auto;
}

/* Responsive - untuk layar kecil */
@media (max-width: 760px) {
  .logo img {
    max-width: 250px;
  }

  .search-box input[type="text"] {
    padding: 10px 20px;
    font-size: 14px;
  }

  .search-box button {
    padding: 10px 14px;
    font-size: 14px;
  }

  #toggleDark {
    font-size: 14px;
    padding: 10px 20px;
  }

  .result-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-item img.icon {
    margin-bottom: 10px;
  }
}

@media (max-width: 760px) {
  body.search-mode .search-column {
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-left: -25px;
  }

  body.search-mode .logo img {
    max-width: 300px !important;
  }

  body.search-mode #toggleDark {
    margin-top: 0 !important;
    margin-left: 0 !important;
  } 

  body.search-mode .search-box {
    width: 350px !important;
  }
  
  body.search-mode .result-item {
    max-width: 100% !important;
  }
}

/* Default mode: sebelum ada query pencarian */
body.default-mode .header-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
}

body.default-mode .logo {
  margin-bottom: 20px;
}

body.default-mode .search-box {
  margin-top: 20px;
}

/* Mode pencarian: setelah ada query pencarian */
body.search-mode .dark .search-box input[type="text"] {
  background-color: #333;
  color: #fff;
}

body.search-mode .dark .search-box button {
  background-color: #444;
  color: #fff;
}

body.search-mode .dark .result-item {
  background-color: transparent;
  border-color: transparent;
}

body.search-mode .search-column {
  display: flex;
}

body.search-mode .header-wrapper {
  display: flex;
  justify-content: flex-start;
  padding-left: 20px;
  text-align: left;
}

body.search-mode .logo {
  margin-bottom: 20px;
}

body.search-mode .logo img {
  max-width: 150px;
}

body.search-mode .search-box {
  margin-top: 10px;
  width: 450px;
}

body.search-mode #toggleDark {
  margin-top: -40px;
  margin-left: 10px;
}

body.search-mode .container {
  width: 100%;
}

body.search-mode .results {
  margin-top: 30px;
}

body.search-mode .result-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 12px;
  background-color: transparent;
}

body.search-mode .result-item:hover {
  background-color: #eee;
}

body.search-mode.dark .result-item {
  background-color: transparent; /* atau warna hitam yang Anda inginkan */
  border-color: transparent;
}

/* Kontainer GIF */
.gif-container {
  width: 100%;
  text-align: left;  /* Pusatkan GIF */
}

/* GIF yang ditampilkan di atas judul */
.gif-above-title {
  width: 100%;         /* Responsif */
  max-width: 120px;    /* Lebar maksimal GIF */
  height: auto;
}

/* Hasil pencarian item */
.result-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 12px;
  background-color: #f9f9f9;
  border-radius: 10px;
}

.result-item:hover {
  background-color: #eee;
}

/* Konten teks (judul dan deskripsi) */
.result-content {
  flex: 1;
}

/* Judul hasil pencarian */
.result-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 6px;
}