/* ===========================
   BASE STYLE (Light Default)
   =========================== */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background: #f0f0f0;
  color: #333;
  transition: background 0.3s, color 0.3s;
  
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.card {
  background: #fff;
  padding: 15px;
  margin-top: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: background 0.3s, color 0.3s;
}

input[type="text"] {
  width: 100%;
  padding: 2px 4px;
  border-radius: 8px;
  border: 2px solid #ccc;
  font-size: 16px;
  margin-bottom: 1rem;
  background: #fff;
  color: #222;
  transition: border 0.3s, background 0.3s;
}
input[type="text"]:focus {
  border-color: #0a82c7;
  outline: none;
  background: #fdfdfd;
}

button {
  padding: 3px 10px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}
button:hover {
  opacity: 0.85;
  transform: scale(1.03);
}
button { background: #4caf50; color: #fff; }
button.clear { background: #ffff00; }
button.reset { background: #2196f3; }

.banner {
  background: linear-gradient(135deg, #0a82c7, #ffffff);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s;
}

.clock-container {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin: 10px auto 0;
  padding: 2px 8px;
  color: lime;
  border-radius: 8px;
  width: fit-content;
}

marquee { color: #333; }

/* Default = Light mode */
footer {
  font-size: 12px;
  margin-top: 6px;
  padding: 10px 0;
  text-align: center;
 /* background-color: #f8f9fa; /* abu muda */
  background: transparent; */
  color: #222;              /* teks gelap */
  transition: background 0.3s, color 0.3s;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  footer {
    /*background-color: #222; */
    background-color: transparent;
    color: #ccc;
  }
}

/* ===========================
   TABEL HASIL
   =========================== */
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.result-table th,
.result-table td {
  padding: 8px;
  border: 1px solid #0a82c7;
  text-align: left;
  white-space: nowrap;
}
.result-table th {
  background: #0a82c7;
  color: #fff;
}
.result-table tr:hover {
  background: rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

/* ===========================
   TOAST
   =========================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #4caf50;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 1000;
}
.toast.show { opacity: 1; animation: fadeInOut 3s ease-in-out; }
@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  10%, 90% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* ===========================
   PROGRESS OVERLAY
   =========================== */
#progressOverlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 18px;
  z-index: 9999;
}
.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #0a82c7;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===========================
   DARK MODE (otomatis ikut perangkat)
   =========================== */
@media (prefers-color-scheme: dark) {
  body { background: #121212; color: #eee; }

  .card { background: #2a2a2a; color: #eee; }
  .banner { background: linear-gradient(135deg, #333, #555); }
  marquee { color: #ddd; }


  input[type="text"] {
    background: #333;
    color: #eee;
    border: 2px solid #666;
  }

  input[type="text"]:focus {
    background: #2a2a2a;   /* sedikit lebih terang biar jelas */
    border-color: #4caf50; /* hijau saat fokus */
    color: #fff;           /* teks lebih kontras */
    outline: none;
  }
}

  button { background: #0a82c7; color: #fff; }
  button.clear { background: #ff0077; }
  button.reset { background: #0275d8; }

  .result-table th {
    background: linear-gradient(135deg, #333, #555);
    color: #fff;
    border: 1px solid #666;
  }
  .result-table td { border: 1px solid #555; }
  .result-table tr:hover { background: rgba(255,255,255,0.1); }

  