/* More Web - Main Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000a00;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  color: #00ff41;
}

/* ── Landing / Canvas ── */
#landing {
  position: fixed;
  inset: 0;
  z-index: 10;
  cursor: pointer;
}

#matrix {
  display: block;
  width: 100%;
  height: 100%;
}

/* Grid overlay */
#landing::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Click prompt */
#click-prompt {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: none;
}

#click-prompt span {
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(0, 255, 65, 0.6);
  animation: pulse-prompt 2s ease-in-out infinite;
}

@keyframes pulse-prompt {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── Login Terminal ── */
#login-terminal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000a00;
  background-image:
    linear-gradient(rgba(0, 255, 65, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

#login-terminal.hidden {
  display: none;
}

.terminal-window {
  width: 420px;
  max-width: 90vw;
  border: 1px solid rgba(0, 255, 65, 0.3);
  border-radius: 8px;
  background: rgba(0, 10, 0, 0.95);
  box-shadow:
    0 0 40px rgba(0, 255, 65, 0.1),
    0 0 80px rgba(0, 255, 65, 0.05),
    inset 0 0 40px rgba(0, 255, 65, 0.02);
  opacity: 0;
  transform: scale(0.95);
  animation: terminal-appear 0.6s ease-out forwards;
}

@keyframes terminal-appear {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.terminal-header {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-body {
  padding: 28px 24px;
}

.terminal-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.prompt-label {
  font-size: 18px;
  color: #00ff41;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
  flex-shrink: 0;
}

.terminal-line input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 255, 65, 0.3);
  outline: none;
  font-family: inherit;
  font-size: 18px;
  color: #00ff41;
  padding: 4px 0;
  caret-color: #00ff41;
}

.terminal-line input:focus {
  border-bottom-color: #00ff41;
}

#login-error {
  font-size: 13px;
  color: #ff4444;
  text-shadow: 0 0 6px rgba(255, 68, 68, 0.4);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

#login-error.hidden {
  display: none;
}

#login-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: transparent;
  border: 1px solid rgba(0, 255, 65, 0.4);
  border-radius: 4px;
  color: #00ff41;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#login-btn:hover {
  background: rgba(0, 255, 65, 0.1);
  border-color: #00ff41;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

/* Scanline effect */
#login-terminal::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 31;
}

/* ── Authenticated Terminal Screen ── */
#terminal-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000a00;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

#terminal-screen.hidden {
  display: none;
}

.screen-scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 41;
}

#terminal-output {
  margin-bottom: 8px;
}

.boot-line {
  font-size: 16px;
  line-height: 1.8;
  color: #00ff41;
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
  opacity: 0;
  animation: type-in 0.3s ease-out forwards;
}

.boot-line:nth-child(1) { animation-delay: 0.3s; }
.boot-line:nth-child(2) { animation-delay: 0.9s; }
.boot-line:nth-child(3) { animation-delay: 1.5s; }
.boot-line:nth-child(4) { animation-delay: 2.0s; }

@keyframes type-in {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#terminal-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  opacity: 0;
  animation: type-in 0.3s ease-out 2.4s forwards;
}

.input-prompt {
  color: #00ff41;
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
  white-space: nowrap;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: #00ff41;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
