body {
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  font-family: "Courier New", monospace;
  overflow: hidden;
}

.terminal {
  width: 90%;
  max-width: 900px;
  height: 80vh; /* Flexible height for mobile */
  max-height: 600px;
  padding: 15px;
  background: rgba(10, 10, 20, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5),
              inset 0 0 15px rgba(0, 204, 255, 0.2);
  color: #b0e0e6;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 204, 255, 0.3);
  margin-bottom: 10px;
}

.ascii-art {
  font-size: clamp(10px, 2vw, 12px); /* Responsive font size */
  line-height: 1;
  white-space: pre;
  color: #00ccff;
  text-shadow: 0 0 5px rgba(0, 204, 255, 0.5);
}

.buttons {
  display: flex;
  flex-wrap: wrap; /* Wrap buttons on small screens */
  gap: 10px;
  margin-bottom: 10px;
  justify-content: center; /* Center on mobile */
}

button {
  background: linear-gradient(45deg, #1a1a2e, #2a2a4e);
  color: #b0e0e6;
  border: 1px solid rgba(0, 204, 255, 0.5);
  padding: 6px 12px;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: clamp(10px, 2vw, 12px); /* Responsive button text */
  text-transform: uppercase;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  flex: 1 0 auto; /* Flexible button width */
  min-width: 80px; /* Minimum width for readability */
}

button:hover {
  background: linear-gradient(45deg, #00ccff, #1a1a2e);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.8),
              inset 0 0 5px rgba(0, 204, 255, 0.5);
  transform: translateY(-2px);
}

button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(0, 204, 255, 0.1);
  transform: rotate(30deg);
  transition: all 0.5s ease;
}

button:hover::after {
  top: 100%;
  left: 100%;
}

#terminal-output {
  white-space: pre-wrap;
  flex-grow: 1;
  overflow-y: auto;
  font-size: clamp(12px, 2.5vw, 14px); /* Responsive output text */
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.input-area {
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  background: rgba(10, 10, 20, 0.9);
  border-top: 1px solid rgba(0, 204, 255, 0.3);
}

.prompt {
  color: #ff66cc;
  text-shadow: 0 0 3px rgba(255, 102, 204, 0.5);
  font-size: clamp(12px, 2.5vw, 14px); /* Responsive prompt */
}

#command-input {
  background: none;
  border: none;
  color: #b0e0e6;
  font-family: "Courier New", monospace;
  outline: none;
  width: 100%;
  font-size: clamp(12px, 2.5vw, 14px);
}

/* Subtle scanline effect */
.terminal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    transparent 0%,
    rgba(0, 204, 255, 0.03) 50%,
    transparent 100%
  );
  animation: scanline 6s linear infinite;
  pointer-events: none;
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* Media Queries for Mobile */
@media (max-width: 600px) {
  .terminal {
    width: 95%;
    height: 90vh; /* Take more vertical space on mobile */
    padding: 10px;
  }

  .buttons {
    gap: 8px;
    margin-bottom: 8px;
  }

  button {
    padding: 5px 10px;
    min-width: 60px; /* Smaller minimum width on mobile */
  }

  .input-area {
    padding: 8px;
  }
}