/* ===== STYLE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Consolas, monospace;
}

body {
  background: #2e2e2e;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ff9c;
}

/* ===== LOGO DI TENGAH ===== */
#logo-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#boot-logo {
  position: relative;
  color: #00ff00;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;

  text-shadow: 0 0 8px #00ff00;
}

/* LAYER GLITCH */
#boot-logo::before,
#boot-logo::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;

  white-space: pre;
  pointer-events: none;
}

/* MERAH */
#boot-logo::before {
  color: red;
  animation: glitchTop 0.6s infinite linear;
}

/* CYAN */
#boot-logo::after {
  color: rgb(94, 10, 250);
  animation: glitchBottom 0.6s infinite linear;
}

@keyframes glitchTop {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, -2px); }
  40% { transform: translate(2px, 0); }
  60% { transform: translate(-1px, 1px); }
  100% { transform: translate(0); }
}

@keyframes glitchBottom {
  0% { transform: translate(0); }
  20% { transform: translate(2px, 2px); }
  40% { transform: translate(-2px, 0); }
  60% { transform: translate(1px, -1px); }
  100% { transform: translate(0); }
}

/* ===== LOADING ===== */
#loading {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,100% { opacity: 1 }
  50% { opacity: .3 }
}

/* ===== TERMINAL WINDOW ===== */
#terminal {
  position: center;
  top: 60px;
  left: 60px;
  width: 700px;
  height: 400px;

  background: black;
  border: 2px solid #00ff00;
  border-radius: 4px;
  color: #00ff00;

  box-shadow: 0 0 10px #00aaff;

  transition:
    width 0.35s ease,
    height 0.35s ease,
    top 0.35s ease,
    left 0.35s ease,
    border-radius 0.35s ease;
}

/* ===== MINIMIZED ===== */
#terminal-body.minimized {
  display: none;
}

/* ===== CLOSED ===== */
#terminal.closed {
  display: none;
}

/* ===== MAXIMIZED ===== */
#terminal.maximized {
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  border-radius: 0;
}

/* ===== TITLE BAR ===== */
.title-bar {
  height: 32px;
  background: #0ccce6;
  display: flex;
  align-items: center;
  justify-content: space-between; /* kiri & kanan */
  padding: 0 8px;
}

.title {
  color: #000000;
  font-family: monospace;
  font-size: 13px;
}

.window-controls {
  display: flex;
  gap: 6px;
}

.title-bar button {
  background: #222;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

/* ===== TERMINAL BODY ===== */
#terminal-body {
  height: calc(100% - 32px);
  padding: 10px;

  display: flex;              /* 🔑 KUNCI UTAMA */
  flex-direction: column;

  overflow: hidden;           /* 🔑 JANGAN AUTO */
}

/* ===== OUTPUT ===== */
#output {
  flex: 1;                    /* ambil sisa tinggi */
  overflow-y: auto;           /* scroll di sini */
  white-space: pre-wrap;
}

/* ===== INPUT ===== */
.input-line {
  display: flex;
  align-items: flex-start; /* ⬅ kiri atas */
  gap: 8px;

  flex-shrink: 0;
}

.prompt {
  color: #00ff00;
  font-family: monospace;
  white-space: nowrap;
  line-height: 1.2;
}

#commandInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;

  color: #00ff00;
  font-family: monospace;
  font-size: 14px;
  line-height: 1.2;
}
