body {
  background-color: #2e3436; /* Dark gray khas GNOME/Ubuntu */
  color: #eee;
  font-family: "Ubuntu Mono", monospace;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Tema default */
body.theme-default #terminal {
  background-color: #300a24;
  background-image: none;
}

/* Tema 1 */
body.theme-lonecipher #terminal {
  background-color: #300a24;
  background-image: url("https://firebasestorage.googleapis.com/v0/b/anonymouscode.appspot.com/o/img%2Frohkudus.png?alt=media&token=c45652c4-5dca-4071-a37e-e095e7722c85");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 200px auto;
}

/* Tema 2 */
body.theme-haxorai #terminal {
  background-color: #300a24;
  background-image: url("https://web.haxorai.com/img/favicon.svg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 200px auto; /* Bisa disesuaikan */
}

/* Tema 3 */
body.theme-skull #terminal {
  background-color: #300a24;
  background-image: url("../../img/lonecipher.svg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 200px auto; /* Bisa disesuaikan */
}

/* Menu tema di pojok kanan atas */
#theme-menu {
  position: absolute;
  top: 2px;
  right: 10px;
  background: rgba(34, 34, 34, 0.9);
  border: 1px solid #444;
  padding: 4px 8px;
  border-radius: 6px;
  display: none; /* Muncul saat login */
  font-family: "Ubuntu Mono", monospace;
  z-index: 10;
}

#theme-menu label {
  color: #eee;
  font-size: 0.9rem;
  margin-right: 5px;
}

#theme-select {
  background: #333;
  color: #eee;
  border: none;
  padding: 3px 5px;
  border-radius: 4px;
  font-family: "Ubuntu Mono", monospace;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

#theme-select:hover {
  background: #444;
}

@media (max-width: 768px) {
  #theme-menu {
    top: 3px;
    right: 5px;
    padding: 3px 6px;
  }
  #theme-menu label {
    display: none; /* Hemat ruang di mobile */
  }
}

/* Area layar terminal */
#terminal {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.4em;
  background-color: #300a24; /* Ungu tua khas terminal Ubuntu */
  color: #ffffff;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.8);
  scrollbar-width: thin;
  scrollbar-color: #555 #300a24;
}

/* Scrollbar Chrome/Edge */
#terminal::-webkit-scrollbar {
  width: 8px;
}
#terminal::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 4px;
}
#terminal::-webkit-scrollbar-track {
  background-color: #300a24;
}

/* Blinking cursor */
#command-input::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #4ee44e;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { background: transparent; }
}

/* Tombol login */
button#login-btn {
  background: #4ee44e;
  color: #000;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: bold;
  margin: 10px;
  border-radius: 4px;
  font-family: "Ubuntu Mono", monospace;
}
button#login-btn:hover {
  background: #37b137;
}

/* Container utama terminal */
#console-container {
  display: none;
  flex-direction: column;
  height: 100vh;
  background-color: #1e1e1e;
  border-radius: 6px;
  overflow: hidden; /* Penting agar input tetap di bawah */
  position: relative; /* Untuk positioning input fixed */
}

/* Scrollbar minimalis */
#terminal::-webkit-scrollbar {
  width: 8px;
}
#terminal::-webkit-scrollbar-track {
  background: #1e1e1e;
}
#terminal::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 4px;
}
#terminal::-webkit-scrollbar-thumb:hover {
  background-color: #666;
}

/* Prompt terminal */
#input-prompt {
  color: #e5e5e5;
  font-weight: bold;
  flex-shrink: 0;
}

/* Input field */
#command-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e5e5e5;
  font-family: "Ubuntu Mono", monospace;
  font-size: 1rem;
  margin-left: 8px;
}

/* Kursor fokus hijau */
#command-input:focus {
  caret-color: grey;
}

/* Placeholder abu-abu */
#command-input::placeholder {
  color: #666;
}

/* Responsif untuk mobile */
@media (max-width: 768px) {
  #terminal {
    font-size: 10px;
    padding: 10px;
  }
  #input-line {
    padding: 10px;
    font-size: 0.9rem;
  }
}

/* Header bar ala Ubuntu/Kali */
#console-container::before {
  content: "";
  display: block;
  height: 40px;
  background: linear-gradient(to right, #2c2c2c, #1e1e1e);
  border-bottom: 1px solid #444;
  box-shadow: inset 0 -1px 0 #333;
  position: sticky;  /* tetap di atas saat scroll */
  top: 0;
  z-index: 10;       /* pastikan di atas output terminal */
}

/* Tombol window di header */
#console-container::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  height: 12px;
  width: 12px;
  background: #ff5f56;
  border-radius: 50%;
  box-shadow:
    20px 0 #ffbd2e,
    40px 0 #27c93f;
    z-index: 11;
}

/* Efek transisi tema */
#terminal {
  transition: background-color 0.6s ease, 
              background-image 0.6s ease,
              filter 0.6s ease,
              opacity 0.6s ease;
}

/* Saat sedang ganti tema, beri efek blur+fade */
body.theme-transition #terminal {
  filter: blur(4px);
  opacity: 0.5;
}

/* style.css */
body {
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Consolas', monospace;
  margin: 0;
  padding: 0;
}

#terminal {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 10px 10px;
  white-space: pre-wrap;
  background: #1e1e1e;
  padding-top: 10px; /* beri ruang agar header tidak menutupi output */
}

#input-line {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: #161616;
  border-top: 1px solid #333;
  font-size: 1rem;
  position: sticky; /* tetap visible */
  bottom: 0;
  z-index: 5;
}

#send-command {
  background: #005555;
      border: 1px solid rgb(0 255 204);
      color: #00ffcc;
      font-family: monospace;
      cursor: pointer;
      padding: 7px 7px;
      border-radius: 3px;
      transition: background 0.3s ease;
      white-space: nowrap;
      user-select: none;
    }
    #send-command:hover {
      background: #007777;
    transform: scale(1.05);
    box-shadow: 0 0 6px rgba(0,255,204,0.4);
}

.loading {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 3px;
  background: grey;
  animation: blink 0.8s infinite alternate;
}

@keyframes blink {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}

span.keyword { color: #ffffff; }   /* command keyword */
span.string { color: #00d7ff; }    /* filename / string */
span.number { color: #B5CEA8; }    /* numbers */
span.comment { color: #6A9955; font-style: italic; } /* info / comments */

/* Cek Login */
.infologin {
  position: fixed;
  top:0; left:0; width:100%; height:100%;
  background: #000;
  color: #00ff91;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 14px;
  padding: 20px;
  overflow-y: auto;
  display: none;
  z-index: 9999;
}