/* Import Font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");

/* Variabel CSS untuk Tema */
:root {
  --font-family: "Inter", sans-serif;
  --primary-color: #00aaff;
  --card-bg-color: rgba(20, 20, 30, 0.75);
  --text-color: #e0e0e0;
  --text-secondary-color: #a0a0a0;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.5);
}

/* Reset dan Pengaturan Dasar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  transition: background 0.5s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Pengaturan Tema === */

/* Tema 1: Latar Belakang Gambar (Default) */
body[data-theme="image"] {
  background-color: #1a1a1a;
  background-image: url("../images/background.jpg"); /* Pastikan ada gambar di sini */
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}

/* Tema 2: Tema Gelap Polos */
body[data-theme="dark"] {
  background-color: #121212;
  background-image: none;
}

/* Container Utama */
.container {
  background-color: var(--card-bg-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Untuk Safari */
  border-radius: 12px;
  padding: 2rem 2.5rem;
  margin: 2rem auto;
  width: 90%;
  max-width: 800px;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px 0 var(--shadow-color);
  flex-grow: 1;
}

/* Judul dan Teks */
h1 {
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-align: center;
}

p {
  color: var(--text-secondary-color);
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}

hr {
  border: none;
  height: 1px;
  background-color: var(--border-color);
  margin-bottom: 2rem;
}

/* Daftar Subtitle */
#subtitle-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#subtitle-list a {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  text-decoration: none;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#subtitle-list a:hover {
  background-color: rgba(0, 170, 255, 0.2);
  transform: translateX(5px);
}

.loading-text {
  text-align: center;
  font-style: italic;
}

/* Search Bar */
.search-bar-container {
  margin-bottom: 2rem;
}

#search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--text-color);
  font-size: 1rem;
}

#search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.3);
}

/* Tombol Ganti Tema */
.theme-switcher {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 100;
}

#theme-toggle {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

#theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-secondary-color);
  font-size: 0.9rem;
}
