:root {
  --bg-base: #060913;
  --ps-blue: #0070d1;
  --ps-cyan: #00d2ff;
  --ps-glow: rgba(0, 112, 209, 0.35);
  --card-bg: rgba(14, 20, 36, 0.72);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --ok-color: #10b981;
  --ok-bg: rgba(16, 185, 129, 0.14);
  --warn-color: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-base);
  background-image:
    radial-gradient(circle at 15% 15%, rgba(0, 112, 209, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(0, 210, 255, 0.14) 0%, transparent 45%),
    linear-gradient(180deg, #070b17 0%, #04060d 100%);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Layout Khusus Halaman Cache (cache.html) */
body.cache-page {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Layout Khusus Halaman Utama (index.html) */
body.quiet {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 1.5rem;
  position: relative;
}

/* Branding & Komponen Bersama */
.brand-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  padding: 4px;
  background: linear-gradient(135deg, var(--ps-cyan), var(--ps-blue));
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.45), 0 8px 20px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.9rem;
  transition: transform 0.3s ease;
}

body.cache-page .brand-logo {
  width: 92px;
  height: 92px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(0, 112, 209, 0.18);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: var(--ps-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  box-shadow: 0 0 20px rgba(0, 112, 209, 0.25);
}

body.cache-page .badge {
  margin-bottom: 0.65rem;
}

.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hwb(120 9% 0%);
  box-shadow: 0 0 8px var(--ps-cyan);
  animation: pulse 1.6s infinite ease-in-out;
}

.ps-symbols {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
  color: rgba(148, 163, 184, 0.35);
  font-size: 0.95rem;
  user-select: none;
}

/* =========================================
   STYLE KHUSUS CACHE.HTML
   ========================================= */
#cache-box {
  position: relative;
  z-index: 2;
  width: min(720px, 92vw);
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#cache-box::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ps-cyan), var(--ps-blue), transparent);
}

#cache-box h1 {
  margin: 0 0 4px;
  font-size: clamp(1.7rem, 4.5vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#subtitle {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

#status {
  font-size: 1.15rem;
  font-weight: 700;
  color: #e0f2fe;
  margin-bottom: 6px;
}

#detail {
  min-height: 22px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.bar {
  width: 100%;
  height: 20px;
  margin-top: 18px;
  padding: 2px;
  background: rgba(6, 10, 20, 0.78);
  border: 1px solid rgba(0, 210, 255, 0.22);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

#fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ps-blue), var(--ps-cyan));
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.55);
  transition: width 0.18s ease-out;
}

#percent {
  margin-top: 10px;
  color: var(--ps-cyan);
  font-size: 1.05rem;
  font-weight: 800;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  letter-spacing: 0.5px;
}

#back {
  margin-top: 22px;
  display: inline-block;
  padding: 11px 24px;
  border-radius: 10px;
  border: 1px solid rgba(0, 210, 255, 0.35);
  background: rgba(0, 112, 209, 0.22);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

#back:hover, #back:focus {
  outline: none;
  background: rgba(0, 112, 209, 0.42);
  border-color: var(--ps-cyan);
  box-shadow: 0 0 18px var(--ps-glow);
  transform: translateY(-1px);
}

/* =========================================
   STYLE KHUSUS INDEX.HTML
   ========================================= */
#Header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#Header h1 {
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 30%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(0, 112, 209, 0.2);
}

#Header .subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

#main-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#main-content::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ps-cyan), var(--ps-blue), transparent);
}

#console-view h1 {
  display: none;
}

#liveLog {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  background: rgba(6, 10, 20, 0.65);
  border: 1px solid rgba(0, 210, 255, 0.22);
  color: #e0f2fe;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.3px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#stage {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 14px;
  background: rgba(0, 112, 209, 0.15);
  border-left: 5px solid var(--ps-blue);
  color: #e2e8f0;
}

#stage.ok {
  background: var(--ok-bg);
  border-left-color: var(--ok-color);
  color: #a7f3d0;
}

#stage.bad {
  background: rgba(239, 68, 68, 0.15);
  border-left-color: #ef4444;
  color: #fecaca;
}

body.quiet #stage,
body.quiet #wrap,
body.quiet td.d .pu,
body.quiet td.d .ev {
  display: none;
}

#nav, #wrap, #scr, #console {
  display: none !important;
}

#nav a {
  display: inline-block;
  margin: 0 10px 8px 0;
  padding: 10px 18px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  color: #f8fafc;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
}

#nav a:focus, #nav a:hover {
  outline: none;
  border-color: var(--ps-cyan);
  background: rgba(0, 112, 209, 0.35);
  box-shadow: 0 0 15px var(--ps-glow);
}

#arm {
  font-size: 1.25rem;
  padding: 16px;
  text-align: center;
  color: var(--warn-color);
}

footer {
  position: fixed;
  bottom: 35px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  z-index: 2;
  letter-spacing: 0.3px;
}

footer span {
  color: var(--ps-cyan);
  font-weight: 600;
}

/* =========================================
   ANIMASI
   ========================================= */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

