/* 1. VARIABEL & THEMES (Dikelompokkan Jadi Satu) */
:root {
  --theme-bg-color: rgba(16, 18, 27, 0.4);
  --theme-color: #f9fafb;
  --inactive-color: rgba(113, 119, 144, 0.78);
  --border-color: rgba(113, 119, 144, 0.25);
  --dropdown-bg: #21242d;
  --popup-bg: rgb(22, 25, 37);
  --content-bg: rgba(146, 151, 179, 0.13);
  --hover-List-bg: rgba(12, 15, 25, 0.3);
  --scrollbar-bg: rgba(1, 2, 3, 0.4);
  --button-inactive: rgba(249, 250, 251, 0.55);
  /* UBAH ANGKA DI BAWAH INI UNTUK MENGGESER DI MASA DEPAN */
  --geser-kanan-kiri: 0px; 
  --geser-atas-bawah: 0px;
}

/* 2. MODE CERAH (Dibersihkan & Digabung) */
body.Mode_Cerah {
  --theme-bg-color: rgb(255 255 255 / 31%);
  --theme-color: #3c3a3a;
  --inactive-color: #333333;
  --border-color: rgb(255 255 255 / 35%);
  --dropdown-bg: #f7f7f7;
  --popup-bg: #ffffff;
  --content-bg: rgba(255, 255, 255, 0.4);
  --hover-List-bg: rgba(255 255 255 / 35%);
  --scrollbar-bg: rgb(255 253 253 / 57%);
  --button-inactive: #3c3a3a;
  --overlay-bg: rgb(255 255 255 / 30%);
  --dropdown-hover: rgb(236 236 236);
  --content-title-color: var(--theme-color);
}

/* 3. BASE RESET (Disederhanakan) */
* {
  margin: 0;
  padding: 0;
  outline: none;
  box-sizing: border-box;
}

html {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

Body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(45deg, #ff0000, #008000, #ffff00, #008000, #9C27B0, #ffff00, #3F51B5, #2196F3, #03A9F4);
  background-size: 400% 400%;
  animation: gradient 10s ease infinite;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 4. MODE LOGIC & THEME OVERRIDES */
.Mode_Gelap {
  position: fixed;
  bottom: 10px;
  right: 15px;
  z-index: 2000;
  cursor: pointer;
  background-color: var(--dropdown-bg);
  padding: 12px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.icon-to-light { display: block; color: #ffce45; }
.icon-to-dark { display: none; }

body.Mode_Cerah .icon-to-dark { display: block; fill: #3c3a3a; }
body.Mode_Cerah .icon-to-light { display: none; }
.Mode_Gelap svg { transition: transform 0.5s ease; }
.Mode_Gelap:active svg { transform: scale(0.8); }

.Mode_Cerah .Mode_Gelap svg { fill: transparent; stroke: var(--theme-color); }
.Mode_Cerah .Bani { --teks-utama: #333333; --border-color: rgba(0, 0, 0, 0.1); }
.Mode_Cerah .Desc-img { border: 2px solid var(--theme-bg-color); }
.Mode_Cerah .Frame_Applications ul { background-color: var(--theme-bg-color); }
.Mode_Cerah .Box-Warn__title { border-color: var(--theme-color); }
.Mode_Cerah .Owner_Roof { color: white; }
.Mode_Cerah .dropdown.is-active ul { background-color: rgba(255, 255, 255, 0.94); }

body.Mode_Cerah:before,
body.Mode_Cerah .video-bg:before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.45) 100%);
  -webkit-backdrop-filter: saturate(3);
  backdrop-filter: saturate(3);
}

/* 5. LAYOUT UTAMA (BANI) */
.Bag_Inti {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  align-items: center;
}

.Bani {
  position: relative;
  z-index: 1;
  top: 10px;
  width: calc(100% - 20px);
  max-width: 1200px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--theme-bg-color);
  color: var(--theme-color);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  transform: translate(var(--geser-kanan-kiri), var(--geser-atas-bawah));
}

/* 6. HEADER (ROOF) */
.Roof {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 58px;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
  padding: 0 30px;
  white-space: nowrap;
}

@media screen and (max-width: 480px) { .Roof { padding: 0 16px; } }

.Roof-List { display: flex; align-items: center; }
.Roof-List a {
  padding: 20px 30px;
  text-decoration: none;
  color: var(--inactive-color);
  border-bottom: 2px solid transparent;
  transition: 0.3s;
}

@media screen and (max-width: 610px) { .Roof-List a:not(.Roof-Inti-link) { display: none; } }

.Roof-List a.is-active, .Roof-List a:hover {
  color: var(--theme-color);
  border-bottom: 2px solid var(--theme-color);
}

.Ball_Roof {
  width: 15px; height: 15px;
  background-color: grey;
  border-radius: 50%;
  box-shadow: 24px 0 0 0 grey, 48px 0 0 0 grey, 72px 0 0 0 grey;
  margin-right: 195px;
  flex-shrink: 0;
}
@media screen and (max-width: 945px) { .Ball_Roof { display: none; } }

.Roof-Desc {
  display: flex;
  align-items: center;
  padding: 0 16px 0 40px;
  margin-left: auto;
  flex-shrink: 0;
}

.Roof-Desc svg { width: 22px; color: #f9fafb; flex-shrink: 0; }
.Info { position: relative; }
.Info_Number {
  position: absolute;
  background-color: #3a6df0;
  width: 16px; height: 16px;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  right: -6px; top: -6px;
}

.Info + svg { margin-left: 22px; }
@media screen and (max-width: 945px) { .Info + svg { display: none; } }

.Desc-img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--theme-color);
  margin-left: 22px;
}

/* 7. CONTENT FRAME */
.Frame { display: flex; flex-grow: 1; overflow: hidden; }

.Sisi_Kiri {
  flex-basis: 240px;
  border-right: 1px solid var(--border-color);
  padding: 26px;
  overflow: auto;
  flex-shrink: 0;
}
@media screen and (max-width: 945px) { .Sisi_Kiri { display: none; } }

.Frame_Sisi + .Frame_Sisi { margin-top: 20px; }
.Judul_Sisi { color: var(--inactive-color); margin-bottom: 14px; }
.Daftar_Sisi { display: flex; flex-direction: column; white-space: nowrap; }
.Daftar_Sisi a {
  text-decoration: none;
  color: var(--theme-color);
  display: flex;
  align-items: center;
  font-weight: 400;
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
  transition: 0.3s;
}
.Daftar_Sisi a:hover { background-color: var(--hover-List-bg); }
.Daftar_Sisi svg { width: 16px; margin-right: 8px; }

.Frame_Owner {
  display: flex;
  flex-direction: column;
  padding: 20px 40px;
  height: 100%;
  overflow: auto;
  background-color: var(--theme-bg-color) !important;
  color: var(--theme-color) !important;
  transition: background-color 0.3s ease;
}

.Frame_Owner.overlay { pointer-events: none; transition: 0.3s; background-color: var(--overlay-bg); }

@media screen and (max-width: 510px) { .Frame_Owner { padding: 20px; } }

.Owner_Roof {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  background-image: url("utama.png"), linear-gradient(to left top, blue,cyan,green,purple,red,yellow);
  border-radius: 14px;
  padding: 20px 40px;
}
@media screen and (max-width: 415px) { .Owner_Roof { padding: 20px; } }

/* 8. APPLICATIONS LIST */
.Frame_Applications { margin-top: 30px; display: flex; flex-direction: column; }
.Desc_Applications { color: var(--content-title-color); margin-bottom: 14px; }

.Frame_Applications ul {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  justify-content: space-around;
  background-color: var(--content-bg);
  padding-left: 0; margin: 0;
  border-radius: 14px;
  border: 1px solid var(--theme-bg-color);
  cursor: pointer;
}

.Frame_Applications ul li {
  list-style: none;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  font-size: 16px;
  width: 100%; height: 100%;
  white-space: nowrap;
  transition: 0.3s;
}

.Frame_Applications ul li:hover { background-color: var(--theme-bg-color); }
.Frame_Applications ul li:hover:first-child { border-radius: 13px 13px 0 0; }
.Frame_Applications ul li:hover:last-child { border-radius: 0 0 13px 13px; }
.Frame_Applications ul li + li { border-top: 1px solid var(--border-color); }

.Frame_Applications ul svg { width: 28px; border-radius: 6px; margin-right: 16px; flex-shrink: 0; }

.List_Applications { display: flex; align-items: center; width: 150px; }
@media screen and (max-width: 480px) { .List_Applications { width: 120px; } }

/* 9. BUTTONS & INDICATORS */
.Btn_Link {
  background-color: #3a6df0;
  align-items: center;
  border: none;
  padding: 8px 26px;
  color: #fff;
  border-radius: 20px;
  transition: 0.3s;
  white-space: nowrap;
  position: relative !important;
  z-index: 10 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}
.Btn_Link:not(.open):hover { background: #1e59f1; }
.Btn_Link-Frame { margin-top: auto; margin-left: auto; }
.Btn_Link-Frame .open { margin-right: 8px; }

.Check_List { margin-left: auto; width: 140px; font-size: 15px; position: relative; }
@media screen and (max-width: 700px) { .Check_List { display: none; } }

.Green_Ball {
  width: 6px; height: 6px;
  background-color: green;
  position: absolute;
  border-radius: 50%;
  top: 4px; left: -20px;
}

.Red_Ball {
  margin-left: 55px;
  width: 6px; height: 6px;
  background-color: red;
  position: absolute;
  border-radius: 50%;
  top: -2px; left: -20px;
}

.Check_List-button { font-size: 15px; margin-top: 0; padding: 6px 24px; }
@media screen and (max-width: 390px) { .Check_List-button { padding: 6px 14px; } }

.Check_List-button.open {
  background: none;
  color: var(--button-inactive);
  border: 1px solid var(--button-inactive);
}
.Check_List-button:not(.open):hover { color: #fff; border-color: #fff; }

.Btn_Application { display: flex; align-items: center; justify-content: flex-end; width: 187px; margin-left: auto; }
@media screen and (max-width: 480px) { .Btn_Application { width: auto; } }

/* 10. MODAL & OVERLAY (Gabungan) */
.Lapisan-Bani {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 2500;
  display: none;
}
.Lapisan-Bani.is-active { display: block; }

.Box-Warn {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--popup-bg);
  padding: 30px;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  z-index: 3000;
  display: none;
  flex-direction: column;
  color: var(--theme-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.Box-Warn.visible { display: flex; }

.Box-Warn__title {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.Box-Warn__subtitle {
  white-space: normal;
  margin: 20px 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8em;
}
.Box-Warn__subtitle a { color: var(--theme-color); }

/* 11. DESCRIPTION BOXES (DIREVISI: 2 JAJAR LAPTOP, 1 BARIS HP) */
.Box_Container_Flex {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 20px;
  margin-top: 10px;
}

.Box_App_Desc {
  display: flex;
  flex-direction: column;
  flex: 1 1 calc(50% - 20px);
  min-width: 280px;
  font-size: 16px;
  background-color: var(--content-bg);
  border: 1px solid var(--theme-bg-color);
  padding: 20px;
  transition: 0.3s;
  border-radius: 14px;
}

.Box_App_Desc:hover { transform: scale(1.02); background-color: var(--theme-bg-color); }
.Box_App_Desc svg { width: 28px; border-radius: 6px; margin-right: 12px; flex-shrink: 0; }
.Box_App_Desc span { display: flex; align-items: center; font-weight: 600; }

.App_Desc {
  font-size: 14px; font-weight: 400; line-height: 1.6em;
  margin-top: 20px; border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  flex-grow: 1;
}
.Btn-Desc { display: flex; align-items: center; margin-left: auto; margin-top: 16px; }

/* TABLET & HP: JADI 1 BARIS */
@media screen and (max-width: 768px) {
  .Box_App_Desc { flex: 1 1 100%; }
}

/* 12. DROPDOWN & SEARCH */
.List {
  width: 5px; height: 5px;
  background-color: var(--button-inactive);
  border-radius: 50%;
  box-shadow: 7px 0 0 0 var(--button-inactive), 14px 0 0 0 var(--button-inactive);
  margin: 0 12px;
}

.dropdown {
  position: relative;
  height: 53px;
  width: 40px;
  top: -24px;
  display: flex;
  left: -5px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.dropdown ul {
  position: absolute;
  background: var(--dropdown-bg);
  height: 110px; width: 120px;
  right: 0; top: 20px;
  pointer-events: none;
  opacity: 0;
  transform: translatey(10px);
  transition: all 0.4s ease;
}
.dropdown ul li a { text-decoration: none; color: var(--theme-color); font-size: 12px; }
.dropdown.is-active ul { opacity: 1; pointer-events: all; transform: translatey(25px); }
.dropdown.is-active ul li:hover { background-color: var(--dropdown-hover); }

form#form {
  margin-top: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  width: 220px; min-width: 180px; height: 38px;
  border-radius: 20px;
  display: flex; align-items: center;
  padding: 0 15px; border: 1px solid var(--border-color);
  flex-shrink: 0;
}

#query { all: unset; width: 100%; color: white; font-size: 14px; }
.search-btn { background: none; border: none; color: var(--inactive-color); cursor: pointer; display: flex; align-items: center; padding: 0; margin-left: 5px; }
.search-btn:hover { color: var(--theme-color); }

/* UTILS */
img { max-width: 100%; }
a { text-decoration: none !important; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-bg); border-radius: 10px; }
