@font-face {
    font-family: 'Courier Prime';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/courier-prime-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Courier Prime';
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/courier-prime-latin-700-normal.woff2') format('woff2');
}

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

body {
    background-color: #282828;
    color: #98971a;
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

#terminal {
    padding: 20px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
}

@media (max-width: 768px) {
    #terminal {
        padding: 10px;
        font-size: 14px;
    }
}

.line {
    margin-bottom: 5px;
}

.prompt {
    display: inline;
    white-space: nowrap;
}

#input-line {
    display: flex;
    align-items: center;
    position: relative;
}

#user-input {
    background: transparent;
    border: none;
    color: #98971a;
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-size: 16px;
    outline: none;
    flex: 1;
    caret-color: transparent;
    padding-left: 1.0ch;
    position: relative;
    min-width: 0;
}

@media (max-width: 768px) {
    #user-input {
        font-size: 14px;
    }
}

#cursor {
    position: absolute;
    width: 0.6em;
    height: 1.2em;
    background-color: #98971a;
    pointer-events: none;
    animation: blink 1s step-end infinite;
}

@media (max-width: 768px) {
    #cursor {
        height: 1.1em;
    }
}

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

.error {
    color: #cc241d;
}

.directory {
    color: #458588;
}

.file {
    color: #98971a;
}

.completion-hint {
    color: #666;
    font-style: italic;
}

#mobile-keyboard {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1d2021;
    border-top: 2px solid #98971a;
    padding: 8px;
    gap: 8px;
    justify-content: center;
    z-index: 1000;
}

@media (max-width: 768px) {
    #mobile-keyboard {
        display: flex;
    }

    #terminal {
        padding-bottom: 60px;
    }
}

.key-btn {
    background-color: #3c3836;
    color: #98971a;
    border: 1px solid #98971a;
    border-radius: 4px;
    padding: 10px 16px;
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    min-width: 60px;
    transition: background-color 0.1s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.key-btn:active {
    background-color: #504945;
    transform: scale(0.95);
}

.key-btn:focus {
    outline: none;
}
