/* ===== XP Down Detector — Tema Windows XP (Luna) ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  font-size: 12px;
  color: #000;
  background: #3a6ea5 url("../assets/img/wallpaper.jpg") center/cover no-repeat;
  overflow: hidden;
}
/* fallback wallpaper SVG via canvas-free trick */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: url("../assets/img/wallpaper.svg") center/cover no-repeat;
  z-index: -2;
}

.hidden { display: none !important; }

/* ---------- Ikon desktop ---------- */
/* Kolom melipat otomatis: ikon yang melebihi tinggi layar pindah ke kolom kanan */
#desktop-icons { position: fixed; top: 12px; left: 12px; z-index: 10; display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 10px; column-gap: 14px; max-height: calc(100vh - 76px); }
.desk-icon { text-align: center; cursor: pointer; padding: 4px 2px; border: 1px dotted transparent; width: 86px; box-sizing: border-box; }
.desk-icon img { width: 44px; height: 44px; display: block; margin: 0 auto 3px; }
.desk-icon .desk-emoji { display: block; width: 44px; height: 44px; margin: 0 auto 3px; font-size: 34px; line-height: 44px; text-align: center; filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.5)); }
.desk-icon span { color: #fff; font-size: 11px; text-shadow: 1px 1px 2px #000; line-height: 1.2; display: block; }
.desk-icon:hover { border-color: #fff; background: rgba(0,0,0,0.25); }

/* ---------- Window chrome Luna ---------- */
.xp-window {
  position: fixed;
  background: #ece9d8;
  border: 1px solid #0831d9;
  border-radius: 8px 8px 0 0;
  box-shadow: 4px 4px 18px rgba(0,0,0,0.55);
  display: flex; flex-direction: column;
  min-width: 320px; min-height: 180px;
  z-index: 100;
}
.xp-titlebar {
  height: 28px;
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #06f 88%, #094ade 95%, #0137c8 100%);
  border-radius: 7px 7px 0 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 0 6px;
  cursor: default;
  user-select: none;
  flex-shrink: 0;
}
.tb-left { display: flex; align-items: center; gap: 5px; overflow: hidden; }
.tb-icon { width: 16px; height: 16px; }
.tb-title { color: #fff; font-weight: bold; font-size: 12px; text-shadow: 1px 1px 1px #0f1089; white-space: nowrap; }
.tb-buttons { display: flex; gap: 2px; }
.tb-btn {
  width: 21px; height: 21px;
  border-radius: 3px;
  border: 1px solid #fff;
  background: radial-gradient(circle at 30% 30%, #7ba2e8, #2b5cd5 60%, #1c3fa8);
  cursor: pointer; position: relative; padding: 0;
}
.tb-btn:hover { filter: brightness(1.25); }
.tb-close { background: radial-gradient(circle at 30% 30%, #f3a093, #e04a34 60%, #a72c1a); }
.glyph-min { position: absolute; left: 5px; bottom: 4px; width: 9px; height: 3px; background: #fff; }
.glyph-max { position: absolute; inset: 3px 4px; border: 2px solid #fff; border-top-width: 3px; }
.glyph-x, #balloon-close { color: #fff; }

/* ---------- IE chrome ---------- */
#ie-window { left: 3%; top: 3%; width: 94%; height: calc(100vh - 60px); }
.ie-menubar {
  background: #ece9d8; border-bottom: 1px solid #d4d0c8;
  padding: 2px 8px; display: flex; gap: 14px; flex-shrink: 0;
}
.ie-menubar span { padding: 2px 6px; cursor: default; }
.ie-menubar span:hover { background: #316ac5; color: #fff; }
.ie-toolbar {
  display: flex; gap: 4px; padding: 3px 8px;
  background: linear-gradient(180deg, #fbfbfb, #e9e6d8);
  border-bottom: 1px solid #d4d0c8; flex-shrink: 0;
}
.ie-tb-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid transparent; background: none; padding: 3px 8px;
  font-family: inherit; font-size: 11px; cursor: pointer; border-radius: 3px;
}
.ie-tb-btn:hover { border-color: #b2c4e4; background: #dfeaf9; }
.ie-tb-glyph { width: 16px; height: 16px; display: inline-block; border-radius: 50%; }
.nav-back { background: radial-gradient(circle at 35% 35%, #8ce68c, #1f9b1f); }
.nav-refresh { background: radial-gradient(circle at 35% 35%, #ffe98a, #d8a800); }
.nav-home { background: radial-gradient(circle at 35% 35%, #9db9e8, #2b5cd5); }
.ie-addressbar {
  display: flex; align-items: center; gap: 8px; padding: 3px 8px;
  background: #ece9d8; border-bottom: 1px solid #d4d0c8; flex-shrink: 0;
}
.ie-addressbar label { color: #444; }
.ie-address {
  flex: 1; display: flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid #7f9db9; padding: 2px 6px; height: 24px;
}
#address-text { flex: 1; font-size: 12px; color: #000; white-space: nowrap; overflow: hidden; }
.addr-go { border: 1px solid #7f9db9; background: #ece9d8; cursor: pointer; }

.ie-content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  background: #fff;
  padding: 10px 14px 16px;
}
.ie-statusbar {
  display: flex; justify-content: space-between;
  border-top: 1px solid #d4d0c8; background: #ece9d8;
  padding: 3px 10px; font-size: 11px; color: #444; flex-shrink: 0;
}
.ie-status-zone { border: 1px inset #d4d0c8; padding: 0 8px; }

/* ---------- Konten ---------- */
#banner { width: 100%; height: 130px; object-fit: cover; object-position: left center; border: 1px solid #b8c8de; border-radius: 3px; display: block; background: linear-gradient(180deg, #0c5bb5, #123c78); }

.summary-strip {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 0; padding: 8px 12px;
  background: linear-gradient(180deg, #f4f6fb, #dfe6f4);
  border: 1px solid #b8c8de; border-radius: 3px;
}
.sum-item { display: flex; align-items: center; gap: 8px; padding: 2px 10px; border-right: 1px solid #c3cfe6; }
.sum-item img { width: 30px; height: 30px; }
.sum-item b { font-size: 20px; display: block; line-height: 1; }
.sum-item span { color: #555; }
.sum-ok b { color: #1f9b1f; } .sum-warn b { color: #d8a800; } .sum-down b { color: #d40000; }
.sum-live { margin-left: auto; display: flex; align-items: center; gap: 6px; color: #333; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #d40000; animation: blink 1.2s infinite; }
.live-dot.live { background: #1f9b1f; }
@keyframes blink { 50% { opacity: 0.25; } }

.ticker {
  display: flex; align-items: center; overflow: hidden;
  border: 1px solid #b8c8de; background: #0c2c6b; color: #fff;
  margin-bottom: 10px; height: 26px; border-radius: 3px;
}
.ticker-label {
  flex-shrink: 0; background: linear-gradient(180deg, #3a6ea5, #0c2c6b);
  padding: 0 10px; font-size: 11px; font-weight: bold; height: 100%;
  display: flex; align-items: center; border-right: 2px solid #fff;
}
.ticker-track { flex: 1; overflow: hidden; position: relative; height: 100%; }
#ticker-text {
  position: absolute; white-space: nowrap; line-height: 26px; font-size: 11px;
  animation: tickmove 40s linear infinite;
}
@keyframes tickmove { from { left: 100%; } to { left: -100%; } }

.controls { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
#search {
  flex: 1; min-width: 160px; max-width: 300px;
  border: 1px solid #7f9db9; padding: 4px 8px; font-family: inherit; font-size: 12px;
}
.filter-group { display: flex; gap: 3px; }
.xp-btn {
  font-family: inherit; font-size: 11px; cursor: pointer;
  border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ecebe5 86%, #d8d0c4);
  padding: 3px 12px;
}
.xp-btn:hover { border-color: #e5a622; background: linear-gradient(180deg, #fff, #fdf3d5); }
.xp-btn.active { background: linear-gradient(180deg, #dcebfc, #b6cef5); box-shadow: inset 1px 1px 2px rgba(0,0,0,0.15); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.svc-card {
  border: 1px solid #b8c8de; border-radius: 3px; cursor: pointer;
  background: linear-gradient(180deg, #ffffff, #f0f4fa);
  padding: 8px 10px; display: flex; gap: 10px; align-items: center;
  transition: box-shadow 0.1s;
}
.svc-card:hover { box-shadow: 0 0 0 2px #316ac5; }
.svc-emoji { font-size: 26px; width: 36px; text-align: center; flex-shrink: 0; }
.svc-main { flex: 1; min-width: 0; }
.svc-name { font-weight: bold; font-size: 13px; }
.svc-sub { color: #666; font-size: 10.5px; margin-top: 2px; }
.svc-status-img { width: 30px; height: 30px; flex-shrink: 0; }
.svc-card.st-down { border-color: #d40000; background: linear-gradient(180deg, #fff, #fdeaea); }
.svc-card.st-warn { border-color: #d8a800; background: linear-gradient(180deg, #fff, #fdf5dd); }
.svc-card.st-up .svc-name { color: #14501a; }
.svc-card.url-suggest {
  border: 2px dashed #316ac5; background: linear-gradient(180deg, #f0f7ff, #dcebfc); cursor: pointer;
}
.svc-card.url-suggest .svc-name { color: #0c2c6b; }
.svc-del {
  flex-shrink: 0; width: 18px; height: 18px; line-height: 1;
  border: 1px solid #a72c1a; border-radius: 3px; background: #f7d6d0;
  color: #8a1d10; cursor: pointer; font-size: 10px; padding: 0;
}
.svc-del:hover { background: #e02415; color: #fff; }

.leaderboard { margin-top: 14px; border: 1px solid #b8c8de; border-radius: 3px; background: #f8fafd; padding: 10px 14px; }
.leaderboard h3 { font-size: 12px; color: #0c2c6b; margin-bottom: 6px; }
#lb-list { margin-left: 20px; }
#lb-list li { margin: 3px 0; }
.lb-bar { display: inline-block; height: 10px; background: linear-gradient(180deg, #ff9d92, #e02415); border-radius: 2px; vertical-align: middle; margin: 0 6px; }

.footer-note { margin-top: 12px; color: #777; font-size: 10.5px; text-align: center; }

/* ---------- Dialog XP ---------- */
.xp-dialog .ie-content { padding: 12px 14px; overflow: auto; }
.dlg-question { font-size: 12px; margin-bottom: 10px; line-height: 1.4; }
.dlg-label { display: block; font-weight: bold; font-size: 11px; margin: 8px 0 3px; color: #0c2c6b; }
#rp-service, #rp-comment {
  width: 100%; border: 1px solid #7f9db9; padding: 4px 6px;
  font-family: inherit; font-size: 12px; background: #fff;
}
.rp-options label { display: block; padding: 3px 2px; cursor: pointer; }
.rp-options label:hover { background: #dfeaf9; }
.dlg-buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 14px; }

/* ---------- Speed Test ---------- */
.speedtest .st-meta {
  font-size: 10.5px; color: #555; margin: -4px 0 8px;
  border-bottom: 1px dashed #c3cfe6; padding-bottom: 6px;
}
.speedtest .st-results {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0;
}
.st-box {
  border: 1px solid #b8c8de; border-radius: 3px;
  background: linear-gradient(180deg, #ffffff, #f0f4fa);
  padding: 10px 8px; text-align: center;
}
.st-box b { display: block; font-size: 22px; line-height: 1.1; color: #0c2c6b; }
.st-box span { color: #666; font-size: 10.5px; }
.st-dl b { color: #1f7a1f; }
.st-ul b { color: #b07f00; }
.st-phase { font-size: 11px; color: #333; margin: 6px 0 4px; }
.st-progress {
  height: 18px; border: 1px solid #7f9db9; border-radius: 3px;
  background: #fff; overflow: hidden; padding: 2px;
}
.st-progress > div {
  height: 100%; width: 0;
  background: linear-gradient(180deg, #7ee07e 0%, #37b437 45%, #1f9b1f 55%, #2fdd2f 100%);
  background-size: 24px 100%;
  border-radius: 2px;
  transition: width 0.25s ease-out;
}
.st-verdict { margin-top: 8px; font-size: 11px; color: #0c2c6b; font-weight: bold; min-height: 14px; }

/* ---------- Widget desktop kanan ---------- */
#desktop-widgets {
  position: fixed; top: 12px; right: 12px; z-index: 10;
  width: 316px; display: flex; flex-direction: column;
}
/* berdiri sendiri, bukan .xp-window (yang fixed) — tapi meniru chromenya */
.widget-win {
  background: #ece9d8;
  border: 1px solid #0831d9; border-radius: 8px 8px 0 0;
  box-shadow: 4px 4px 18px rgba(0,0,0,0.45);
  display: flex; flex-direction: column; overflow: hidden;
  max-height: calc(100vh - 76px);
}
.widget-titlebar {
  height: 26px; flex-shrink: 0;
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #06f 88%, #094ade 95%, #0137c8 100%);
  border-radius: 7px 7px 0 0;
  display: flex; align-items: center; gap: 6px; padding: 0 8px;
  color: #fff; font-weight: bold; font-size: 12px; text-shadow: 1px 1px 1px #0f1089;
  user-select: none;
}
.widget-issues {
  list-style: none; margin: 0; padding: 4px 0;
  overflow-y: auto; flex-shrink: 1; min-height: 30px;
}
.widget-issues li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; cursor: pointer; font-size: 11.5px;
}
.widget-issues li:hover { background: #dfeaf9; }
.wi-emoji { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.wi-name { flex: 1; min-width: 0; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wi-status { flex-shrink: 0; font-size: 10px; }
.wi-status.st-down { color: #d40000; }
.wi-status.st-warn { color: #b07f00; }
.widget-empty { color: #666; cursor: default !important; }
.widget-empty:hover { background: none !important; }
.widget-open { margin: 4px 8px; }
.widget-ad {
  margin: 6px 8px 8px; padding-top: 5px;
  border-top: 1px dashed #c3cfe6; flex-shrink: 0;
}
.widget-ad ins.adsbygoogle { display: block; min-height: 250px; background: #fff; border: 1px solid #d4d0c8; }

/* Kotak iklan di dalam dashboard (bawah leaderboard) */
.ad-box { margin: 16px 0; min-height: 120px; }
.ad-box ins.adsbygoogle { display: block; min-height: 120px; background: #fff; border: 1px solid #d4d0c8; }
.ad-label {
  display: block; color: #999; font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px;
}

/* ---------- Taskbar ---------- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 34px; z-index: 5000;
  background: linear-gradient(180deg, #245edb 0%, #3f8cf3 9%, #245edb 18%, #1941a5 92%, #17399e 100%);
  border-top: 1px solid #0f1089;
  display: flex; align-items: stretch; gap: 4px; padding: 0 4px;
  user-select: none;
}
#start-button {
  display: flex; align-items: center; gap: 5px;
  font-family: Tahoma, sans-serif; font-style: italic; font-weight: bold; font-size: 15px; color: #fff;
  background: linear-gradient(180deg, #5eac56 0%, #3c9338 12%, #379a37 50%, #2c892c 100%);
  border-radius: 0 10px 10px 0; border: none; cursor: pointer;
  padding: 0 18px 0 10px; box-shadow: 1px 0 3px rgba(0,0,0,0.4);
}
#start-button:hover { filter: brightness(1.15); }
.start-flag { font-style: normal; font-size: 17px; }
.quick-launch { display: flex; align-items: center; gap: 6px; padding: 0 6px; }
.quick-launch span { cursor: pointer; font-size: 14px; }
.task-sep { width: 2px; margin: 4px 2px; background: rgba(255,255,255,0.35); }
#task-buttons { flex: 1; display: flex; gap: 3px; align-items: center; overflow: hidden; }
.task-btn {
  height: 24px; min-width: 90px; max-width: 170px;
  display: flex; align-items: center; gap: 5px; padding: 0 8px;
  background: linear-gradient(180deg, #4a80e8, #2c5cc5);
  border: 1px solid #1941a5; border-radius: 2px;
  color: #fff; font-size: 11px; cursor: pointer;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.task-btn.active { background: linear-gradient(180deg, #1c3f9e, #2c5cc5); box-shadow: inset 1px 1px 2px rgba(0,0,0,0.4); }
.tray {
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: linear-gradient(180deg, #1290e9 0%, #19b9f3 9%, #117bdb 18%, #0b63c2 92%);
  border-left: 1px solid #1941a5; color: #fff; font-size: 12px;
}
#clock { min-width: 44px; text-align: center; }
#tray-status { cursor: default; }

/* ---------- Start menu ---------- */
#start-menu {
  position: fixed; left: 2px; bottom: 36px; z-index: 6000;
  width: 390px; border-radius: 8px 8px 0 0; overflow: hidden;
  border: 1px solid #0831d9; box-shadow: 3px -3px 14px rgba(0,0,0,0.5);
}
.sm-header {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: linear-gradient(180deg, #1868e4, #1b50c8); color: #fff; font-size: 14px; font-weight: bold;
}
.sm-header img { width: 34px; height: 34px; border: 2px solid #fff; border-radius: 4px; background: #fff; }
.sm-body { display: flex; background: #fff; }
.sm-left { flex: 1.4; background: #fff; padding: 6px; display: flex; flex-direction: column; }
.sm-left button {
  text-align: left; border: none; background: none; padding: 7px 10px;
  font-family: inherit; font-size: 12px; cursor: pointer; border-radius: 2px;
}
.sm-left button:hover { background: #316ac5; color: #fff; }
.sm-sep { height: 1px; background: #d4d0c8; margin: 5px 4px; }
.sm-right {
  flex: 1; background: linear-gradient(180deg, #d3e5fa, #aec9ea);
  border-left: 1px solid #95b3d9; padding: 10px;
}
.sm-ad b { color: #0c2c6b; }
.sm-ad p { font-size: 11px; color: #234; margin-top: 5px; line-height: 1.5; }

/* ---------- Balloon tip ---------- */
#balloon {
  position: fixed; right: 12px; bottom: 44px; z-index: 7000;
  max-width: 300px; background: #ffffe1;
  border: 1px solid #000; border-radius: 8px; padding: 10px 26px 10px 12px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.4); font-size: 11px;
}
#balloon::after {
  content: ""; position: absolute; right: 26px; bottom: -10px;
  border: 10px solid transparent; border-top-color: #ffffe1; border-bottom: 0;
}
.balloon-title { font-weight: bold; margin-bottom: 4px; }
#balloon-close { position: absolute; top: 4px; right: 6px; border: none; background: none; cursor: pointer; font-size: 11px; }

/* ---------- BSOD ---------- */
#bsod {
  position: fixed; inset: 0; z-index: 9000; background: #0000aa;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#bsod img { max-width: 90%; max-height: 80%; }
.bsod-hint { color: #fff; margin-top: 20px; font-family: "Courier New", monospace; }

/* ---------- Scrollbar XP ---------- */
.ie-content::-webkit-scrollbar { width: 16px; }
.ie-content::-webkit-scrollbar-track { background: #f0efe4; }
.ie-content::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #d6e5fb, #a0c0ec); border: 1px solid #6a8cc0; border-radius: 2px;
}

@media (max-width: 700px) {
  #ie-window { left: 2px; top: 2px; width: calc(100vw - 4px); height: calc(100vh - 46px); }
  #desktop-icons { display: none; }
  #desktop-widgets { display: none; }
  #ie-window .tb-title { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 701px) and (max-width: 1080px) {
  /* widget memakan terlalu banyak ruang di layar sedang */
  #desktop-widgets { display: none; }
}

/* ---------- Footer tautan situs + banner consent cookie ---------- */
.site-footer {
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid #b8c8de;
  background: #ece9d8;
  font-size: 11px;
  text-align: center;
  border-radius: 3px;
}
.site-footer a { color: #0b3cc1; text-decoration: none; margin: 0 3px; }
.site-footer a:hover { text-decoration: underline; }
.site-footer-copy { display: block; margin-top: 4px; color: #777; font-size: 10px; }

.consent-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px;
  max-width: 840px; margin: 0 auto;
  background: #ece9d8; border: 1px solid #7f9db9; border-radius: 4px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.4);
  padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; z-index: 9999; font-size: 12px;
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif; color: #1a1a1a;
}
.consent-banner.hidden { display: none; }
.consent-text { flex: 1; min-width: 240px; }
.consent-text p { margin: 4px 0 0; line-height: 1.5; }
.consent-text a { color: #0b3cc1; }
.consent-actions { display: flex; gap: 8px; }
.consent-btn {
  border: 1px solid #7f9db9; border-radius: 3px;
  background: linear-gradient(180deg, #fbfbfb, #e9e6d8);
  padding: 6px 12px; font-family: inherit; font-size: 12px;
  font-weight: bold; cursor: pointer;
}
.consent-btn.primary { background: linear-gradient(180deg, #3f8cf3, #0b50d6); color: #fff; border-color: #0831d9; }
@media (max-width: 640px) { .consent-actions { width: 100%; } .consent-btn { flex: 1; } }
