* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #ffffff;
  color: #202124;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================
   HOMEPAGE
========================= */
.home-page {
  min-height: 100vh;
}

.home-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
}

.logo img {
  width: 260px;
  max-width: 80vw;
  height: auto;
}

.search-box {
  width: 100%;
  max-width: 584px;
  margin-top: 28px;
}

.search-box input {
  width: 100%;
  height: 52px;
  border: 1px solid #dfe1e5;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 16px;
  outline: none;
  box-shadow: 0 1px 6px rgba(32,33,36,.18);
}

.search-box input:focus {
  box-shadow: 0 2px 10px rgba(32,33,36,.24);
}

.buttons {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.buttons button {
  position: relative;
  padding: 12px 24px;
  font-size: 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}

/* efek glow luar */
.buttons button::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #4f46e5, #9333ea, #06b6d4);
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

/* hover glow */
.buttons button:hover::before {
  opacity: 1;
}

/* hover naik dikit */
.buttons button:hover {
  transform: translateY(-2px) scale(1.03);
}

/* klik */
.buttons button:active {
  transform: scale(0.96);
}

/* tombol kedua beda warna */
.buttons button:nth-child(2) {
  background: linear-gradient(135deg, #10b981, #22c55e);
}

.buttons button:nth-child(2)::before {
  background: linear-gradient(135deg, #10b981, #22c55e, #84cc16);
}

.footer-text {
  margin-top: 22px;
  font-size: 13px;
  color: #5f6368;
}

/* =========================
   HASIL
========================= */
.result-page {
  background: #fff;
}

.result-header {
  width: 100%;
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
}

.result-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.result-logo-link {
  text-decoration: none;
}

.logo.small img {
  width: 180px;
  max-width: 35vw;
}

.result-search-form {
  flex: 1;
  position: relative;
  max-width: 680px;
}

.result-search-form input {
  width: 100%;
  height: 52px;
  border: 1px solid #dfe1e5;
  border-radius: 999px;
  padding: 0 100px 0 18px;
  font-size: 16px;
  outline: none;
  box-shadow: 0 1px 6px rgba(32,33,36,.12);
}

.result-search-form button {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: #f8f9fa;
  border: 1px solid #dadce0;
  cursor: pointer;
}

.result-wrap {
  max-width: 760px;
  margin: 28px auto;
  padding: 0 24px;
}

.result-count {
  font-size: 14px;
  color: #70757a;
  margin-bottom: 24px;
}

.result-item {
  margin-bottom: 34px;
}

.result-item a {
  font-size: 22px;
  color: #1a0dab;
  text-decoration: none;
  line-height: 1.35;
  word-break: break-word;
}

.result-item a:hover {
  text-decoration: underline;
}

.result-url {
  color: #188038;
  font-size: 14px;
  margin-top: 6px;
  word-break: break-all;
}

.result-desc {
  color: #4d5156;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 6px;
  word-break: break-word;
}

.no-result {
  font-size: 16px;
  color: #4d5156;
}
.buttons button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shine 2s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  .logo img {
    width: 500px;
  }

  .search-box {
    margin-top: 22px;
  }

  .search-box input {
    height: 48px;
    font-size: 15px;
  }

  .buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .buttons button {
    width: 100%;
  }

  .result-header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
  }

  .logo.small img {
    width: 140px;
    max-width: 50vw;
  }

  .result-search-form {
    max-width: 100%;
  }

  .result-search-form input {
    height: 48px;
    font-size: 15px;
    padding: 0 90px 0 14px;
  }

  .result-search-form button {
    height: 36px;
    top: 6px;
    right: 6px;
    padding: 0 12px;
  }

  .result-wrap {
    margin: 20px auto;
    padding: 0 16px;
  }

  .result-item a {
    font-size: 18px;
  }

  .result-url,
  .result-desc {
    font-size: 13px;
  }
}

:root {
  --bg-main: radial-gradient(circle at center, #0f172a, #020617);
  --text-main: #ffffff;
  --text-soft: #cbd5e1;
  --input-bg: rgba(255,255,255,0.08);
  --input-border: rgba(255,255,255,0.15);
  --input-shadow: 0 4px 24px rgba(0,0,0,0.25);
  --button-bg: linear-gradient(135deg, #4f46e5, #9333ea);
  --button-bg-2: linear-gradient(135deg, #10b981, #22c55e);
  --button-text: #ffffff;
  --button-border: transparent;
  --header-border: rgba(255,255,255,0.08);
  --card-bg: transparent;
}

body.light-theme {
  --bg-main: linear-gradient(180deg, #ffffff, #f3f6fb);
  --text-main: #202124;
  --text-soft: #5f6368;
  --input-bg: #ffffff;
  --input-border: #dfe1e5;
  --input-shadow: 0 1px 6px rgba(32,33,36,.18);
  --button-bg: linear-gradient(135deg, #2563eb, #3b82f6);
  --button-bg-2: linear-gradient(135deg, #16a34a, #22c55e);
  --button-text: #ffffff;
  --button-border: transparent;
  --header-border: #e5e7eb;
  --card-bg: transparent;
}

html, body {
  min-height: 100%;
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  transition: background .35s ease, color .35s ease;
  overflow-x: hidden;
  position: relative;
}

/* layer cahaya */
.bg-anim {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-anim span {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: 0;
  animation: floatLight linear infinite;
}

body:not(.light-theme) .bg-anim span {
  background: rgba(255,255,255,0.9);
  box-shadow:
    0 0 10px rgba(255,255,255,0.9),
    0 0 20px rgba(59,130,246,0.7),
    0 0 40px rgba(147,51,234,0.5);
}

body.light-theme .bg-anim span {
  background: rgba(59,130,246,0.25);
  box-shadow:
    0 0 8px rgba(59,130,246,0.18),
    0 0 18px rgba(147,197,253,0.2);
}

@keyframes floatLight {
  0% {
    transform: translateY(110vh) scale(.6);
    opacity: 0;
  }
  15% {
    opacity: .8;
  }
  85% {
    opacity: .6;
  }
  100% {
    transform: translateY(-15vh) scale(1.15);
    opacity: 0;
  }
}

/* pastikan konten di atas background */
.home-wrap,
.result-header,
.result-wrap,
.theme-toggle-wrap {
  position: relative;
  z-index: 2;
}

/* home */
.home-page {
  min-height: 100vh;
}

.home-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
}

.logo img {
  width: 260px;
  max-width: 80vw;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.25));
}

.search-box input,
.result-search-form input {
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--input-border);
  box-shadow: var(--input-shadow);
  backdrop-filter: blur(10px);
}

.search-box input::placeholder,
.result-search-form input::placeholder {
  color: var(--text-soft);
}

.footer-text,
.result-count,
.result-url,
.result-desc {
  color: var(--text-soft);
}

/* button glow */
.buttons button,
.result-search-form button,
.theme-toggle-btn {
  position: relative;
  border: 1px solid var(--button-border);
  color: var(--button-text);
  cursor: pointer;
  transition: all .25s ease;
}

.buttons button {
  background: var(--button-bg);
}

.buttons button:nth-child(2) {
  background: var(--button-bg-2);
}

.buttons button::before,
.theme-toggle-btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  filter: blur(14px);
  opacity: 0;
  z-index: -1;
  transition: opacity .25s ease;
}

.buttons button:first-child::before,
.theme-toggle-btn::before {
  background: linear-gradient(135deg, #4f46e5, #9333ea, #06b6d4);
}

.buttons button:nth-child(2)::before {
  background: linear-gradient(135deg, #10b981, #22c55e, #84cc16);
}

.buttons button:hover::before,
.theme-toggle-btn:hover::before {
  opacity: 1;
}

.buttons button:hover,
.result-search-form button:hover,
.theme-toggle-btn:hover {
  transform: translateY(-2px);
}

.buttons button:active,
.result-search-form button:active,
.theme-toggle-btn:active {
  transform: scale(.97);
}

/* toggle theme */
.theme-toggle-wrap {
  position: fixed;
  top: 18px;
  right: 18px;
}

.theme-toggle-btn {
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #111827, #374151);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

body.light-theme .theme-toggle-btn {
  background: linear-gradient(135deg, #e5e7eb, #ffffff);
  color: #111827;
}

/* result page */
.result-header {
  border-bottom: 1px solid var(--header-border);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(8px);
}

body.light-theme .result-header {
  background: rgba(255,255,255,0.75);
}

.result-item a {
  color: #8ab4f8;
}

body.light-theme .result-item a {
  color: #1a0dab;
}

.result-url {
  color: #86efac;
}

body.light-theme .result-url {
  color: #188038;
}

.no-result {
  color: var(--text-main);
}

/* mobile */
@media (max-width: 768px) {
  .theme-toggle-wrap {
    top: 12px;
    right: 12px;
  }

  .theme-toggle-btn {
    font-size: 13px;
    padding: 9px 14px;
  }
}

/* =========================
   RESULT PAGE ENHANCED
========================= */
.result-page {
  min-height: 100vh;
  color: var(--text-main);
}

.result-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--header-border);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.light-theme .result-header {
  background: rgba(255, 255, 255, 0.8);
}

.result-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.result-logo-link {
  text-decoration: none;
  flex-shrink: 0;
}

.logo.small img {
  width: 170px;
  max-width: 34vw;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.18));
}

.result-search-form {
  flex: 1;
  position: relative;
  max-width: 720px;
}

.result-search-form input {
  width: 100%;
  height: 54px;
  border-radius: 999px;
  padding: 0 90px 0 18px;
  font-size: 16px;
  outline: none;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
  box-shadow: var(--input-shadow);
  backdrop-filter: blur(12px);
}

.result-search-form input::placeholder {
  color: var(--text-soft);
}

.result-search-form button {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 42px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all .25s ease;
}

.result-search-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(79,70,229,.25);
}

.result-wrap {
  max-width: 860px;
  margin: 32px auto;
  padding: 0 24px 50px;
  position: relative;
  z-index: 2;
}

.result-count {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result-item {
  padding: 22px 22px 20px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

body.light-theme .result-item {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(17,24,39,0.06);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.2);
  border-color: rgba(99,102,241,.22);
}

.result-item a {
  display: inline-block;
  font-size: 22px;
  line-height: 1.35;
  color: #8ab4f8;
  text-decoration: none;
  word-break: break-word;
  font-weight: 600;
}

body.light-theme .result-item a {
  color: #1a0dab;
}

.result-item a:hover {
  text-decoration: underline;
}

.result-url {
  color: #86efac;
  font-size: 14px;
  margin-top: 8px;
  word-break: break-all;
}

body.light-theme .result-url {
  color: #188038;
}

.result-desc {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
  margin-top: 8px;
  word-break: break-word;
}

.no-result {
  padding: 20px 0;
  color: var(--text-main);
  font-size: 16px;
}

/* mobile */
@media (max-width: 768px) {
  .result-header-inner {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .logo.small img {
    width: 140px;
    max-width: 48vw;
  }

  .result-search-form {
    max-width: 100%;
  }

  .result-search-form input {
    height: 48px;
    font-size: 15px;
    padding: 0 84px 0 14px;
  }

  .result-search-form button {
    top: 6px;
    right: 6px;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .result-wrap {
    margin: 20px auto;
    padding: 0 16px 36px;
  }

  .result-item {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .result-item a {
    font-size: 18px;
  }

  .result-url,
  .result-desc,
  .result-count {
    font-size: 13px;
  }
}

/* =========================
   SUGGESTION STYLE
========================= */
.suggest-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggest-item {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.suggest-item:hover {
  background: rgba(99,102,241,0.2);
  transform: translateX(4px);
}


/* =========================
   DARK MODE TEXT FIX
========================= */

/* teks utama */
body:not(.light-theme) {
  color: #e5e7eb;
}

/* judul hasil */
body:not(.light-theme) .result-item a {
  color: #93c5fd !important; /* biru terang */
}

/* URL */
body:not(.light-theme) .result-url {
  color: #86efac !important; /* hijau terang */
}

/* deskripsi */
body:not(.light-theme) .result-desc {
  color: #cbd5f5 !important;
}

/* jumlah hasil */
body:not(.light-theme) .result-count {
  color: #94a3b8 !important;
}

/* teks tidak ditemukan */
body:not(.light-theme) .no-result {
  color: #000000 !important;
}

/* suggestion */
body:not(.light-theme) .suggest-item {
  color: #000000;
  background: rgba(255,255,255,0.06);
}

body:not(.light-theme) .suggest-item:hover {
  background: rgba(99,102,241,0.25);
}

/* input */
body:not(.light-theme) input {
  color: #f9fafb !important;
}

/* placeholder */
body:not(.light-theme) input::placeholder {
  color: #9ca3af;
}

.result-tabs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 14px;
  display: flex;
  gap: 18px;
  align-items: center;
}

.result-tab {
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 14px;
  padding: 10px 0;
  cursor: pointer;
  position: relative;
}

.result-tab.active {
  color: var(--text-main);
  font-weight: 700;
}

.result-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5, #9333ea);
}

body:not(.light-theme) .result-tab {
  color: #94a3b8;
}

body:not(.light-theme) .result-tab.active {
  color: #f8fafc;
}

@media (max-width: 768px) {
  .result-tabs {
    padding: 0 16px 12px;
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .result-tab {
    font-size: 13px;
  }
}