@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

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

body {
    background: #0a0a0a;
    font-family: 'JetBrains Mono', monospace;
    color: #00ff00;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal {
    width: 90vw;
    height: 80vh;
    background: #000;
    display: flex;
    flex-direction: column;
    position: relative;
}

.terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(0, 255, 0, 0.1) 50%, transparent 51%);
    background-size: 4px 4px;
    pointer-events: none;
    z-index: 1;
}

/* .terminal-header, .terminal-buttons, .terminal-button, .terminal-title { display: none; } */

.terminal-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}

#output {
    margin-bottom: 16px;
    line-height: 1.4;
}

/* Smaller, unified font size for all terminal text */
.terminal, .terminal-body, #output, .output-line, .command-line, .prompt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  line-height: 1.2;
}

/* Mobile Safari specific fixes */
@media (max-width: 768px) {
    .input-line {
        min-height: 2em;
        padding: 0.5em 0;
    }
    
    #command-input {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 2em;
        padding: 0.5em 0;
    }
    
    #fake-input {
        min-height: 2em;
        padding: 0.5em 0;
    }
}

/* Ensure input is properly positioned for mobile */
.input-line {
    display: flex;
    align-items: baseline;
    font-family: inherit;
    font-size: inherit;
    gap: 0.2em;
    margin-bottom: 8px;
    position: relative;
    min-height: 1.2em;
    cursor: text;
}

.prompt, .command-line {
    color: #00ff00;
    font-weight: bold;
    white-space: nowrap;
    font-family: inherit;
    font-size: inherit;
}

#command-input {
    background: transparent;
    border: none;
    color: transparent;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    width: 100%;
    min-width: 2ch;
    line-height: 1;
    padding: 0;
    margin: 0;
    caret-color: transparent; /* Hide default caret */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

/* Block cursor styling */
#block-cursor {
    display: inline-block;
    width: 0.65em;
    height: 1.2em;
    vertical-align: bottom;
    background: #00ff00;
    animation: blink 1s steps(1) infinite;
    pointer-events: none;
    user-select: none;
    margin-left: 0.05em;
}

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

/* For Firefox block caret */
@-moz-document url-prefix() {
    #command-input {
        caret-color: #00ff00;
    }
}

/* Remove .cursor class if present */
.cursor {
    display: none;
}

.output-line {
    margin-bottom: 8px;
    word-wrap: break-word;
}

.command-line {
    color: #00ff00;
    margin-bottom: 8px;
}

.response-line {
    color: #ffffff;
    margin-bottom: 8px;
}

.error-line {
    color: #ff4444;
    margin-bottom: 8px;
}

.success-line {
    color: #44ff44;
    margin-bottom: 8px;
}

.warning-line {
    color: #ffaa00;
    margin-bottom: 8px;
}

/* Scrollbar styling */
.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* Subtle background effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
}

.matrix-char {
    position: absolute;
    color: #00ff00;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    animation: matrix-fall 4s linear infinite;
}

@keyframes matrix-fall {
    0% {
        transform: translateY(-100vh);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
} 

#fake-input {
  font-family: inherit;
  font-size: inherit;
  color: #00ff00;
  letter-spacing: 0.05em;
  display: inline-block;
  vertical-align: baseline;
}
.block-cursor {
  display: inline-block;
  width: 1ch;
  height: 1.2em;
  background: #00ff00;
  animation: blink 1s steps(1) infinite;
  vertical-align: baseline;
  color: transparent;
  overflow: hidden;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
} 