* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #2f2f2f;
  color: #fff;
  font-family: system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#loading {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #2f2f2f; z-index: 10;
}

/* Bar atas dengan tombol home */
#topbar {
  display: flex; align-items: center; justify-content: flex-start;
  padding: 8px 12px;
  background: #3a3a3a;
}
#home {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; text-decoration: none;
  background: #5a5a5a; border-radius: 999px;
  padding: 8px 16px 8px 12px;
  font-size: 15px; line-height: 1;
}
#home:hover { background: #6a6a6a; }
#home:active { background: #777; }

/* Slide horizontal dengan snap */
#slides {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#slides::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page { background: #fff; box-shadow: 0 4px 20px rgba(0,0,0,.4); }
.page img { width: 100%; height: 100%; display: block; }

#controls {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px;
  padding: 12px;
  background: #3a3a3a;
}
#controls button {
  background: none; border: 0; color: #fff;
  font-size: 22px; padding: 6px 14px; cursor: pointer;
}
#indicator {
  background: #5a5a5a; border-radius: 999px;
  padding: 8px 28px; min-width: 110px; text-align: center;
}
#slider { width: 100%; }