:root {
  --bg: #020404;
  --panel: #07100a;
  --accent: #00ff62;
  --muted: #7a8b7a;
  --glass: rgba(255, 255, 255, 0.03);
  --mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New",
    monospace;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: var(--mono);
  background: var(--bg);
  color: var(--accent);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overflow-x: hidden;
  font-size: 16px;
}

/* Mobile Baseline */
img,
video {
  max-width: 100%;
  height: auto;
}

/* Centered card */
.terminal-wrap {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.terminal {
  width: min(760px, 94vw);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(5, 10, 6, 0.85));
  border: 1px solid;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  animation: smoothRainbow 8s linear infinite;
  transition: all 0.3s ease;
}

/* Header */
.term-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.25),
    rgba(255, 255, 255, 0.02)
  );
  border-bottom: 1px solid rgba(0, 255, 127, 0.03);
}
.dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.dot.red {
  background: #ff5f56;
}
.dot.yellow {
  background: #ffbd2e;
}
.dot.green {
  background: #27c93f;
}
.title {
  font-size: 1.1rem;
  color: var(--muted);
  letter-spacing: 1px;
}

/* Body */
.term-body {
  padding: 22px 28px;
  min-height: 260px;
}
.log {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 12px;
  white-space: pre-wrap;
  opacity: 0.95;
  min-height: 36px;
}

/* Form */
.login-form {
  display: grid;
  gap: 14px;
  max-width: 520px;
}
.field {
  display: block;
}
.label-text {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.input-wrap {
  position: relative;
  background: var(--glass);
  border: 1px solid rgba(0, 255, 127, 0.06);
  padding: 12px 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.input-wrap input {
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--accent);
  font-size: 1.15rem;
  width: 100%;
  caret-color: var(--accent);
  font-family: var(--mono);
}
.caret {
  width: 2px;
  height: 18px;
  background: var(--accent);
  margin-left: 8px;
  opacity: 0.6;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Buttons */
.actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}
.btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 255, 127, 0.04);
  border-width: 2px;
  animation: smoothRainbow 8s linear infinite;
}
.btn.ghost {
  opacity: 0.7;
  border-style: dashed;
}

/* status */
.status {
  margin-top: 14px;
  min-height: 24px;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.4px;
}

/* Footer */
.term-footer {
  border-top: 1px solid rgba(0, 255, 127, 0.02);
  padding: 10px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Visual effects */
.terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    transparent,
    rgba(0, 0, 0, 0.18) 50%,
    transparent 100%
  );
  mix-blend-mode: overlay;
}

/* Glowing animated border for terminal box */
@keyframes smoothRainbow {
  0% {
    border-color: #ff0000;
  }
  16.666% {
    border-color: #ffff00;
  }
  33.333% {
    border-color: #00ff00;
  }
  50% {
    border-color: #800080;
  }
  66.666% {
    border-color: #00ffff;
  }
  83.333% {
    border-color: #0000ff;
  }
  100% {
    border-color: #ff0000;
  }
}

.terminal:hover {
  border-width: 2px;
  animation: smoothRainbow 6s linear infinite;
}

/* Mobile Breakpoint - Core Mobile Styles */
@media (max-width: 768px) {
  /* Terminal adjustments for mobile only */
  .terminal {
    margin: 1rem;
  }

  .term-body {
    padding: 16px;
  }

  /* Hide title on very small screens */
  .title {
    display: none;
  }
}

/* Small screens - true mobile only */
@media (max-width: 520px) {
  .term-body {
    padding: 12px;
  }
  .title {
    display: none;
  }
  .terminal {
    margin: 0.5rem;
  }

  /* Stack buttons on small mobile only */
  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }

  /* Stack inputs on small mobile only */
  .login-form input {
    width: 100%;
  }
}
