* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #000;
    color: #0f0;
    height: 100vh;
    overflow: hidden;
}

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.terminal {
    position: relative;
    width: 80%;
    height: 80vh;
    margin: 50px auto;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 10px;
    z-index: 2;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-header {
    background-color: rgba(45, 45, 45, 0.9);
    padding: 10px;
    border-radius: 10px 10px 0 0;
}

.terminal-button {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

.terminal-content {
    flex: 1;
    overflow-y: scroll;
    padding: 20px;
    position: relative;
    height: 100%;
}

#output {
    padding-bottom: 60px;
}

.input-line {
    position: sticky;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    padding: 10px 20px;
    z-index: 2;
}

.prompt {
    color: #0f0;
    margin-right: 10px;
    white-space: nowrap;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #0f0;
    flex: 1;
    outline: none;
    font-size: 16px;
    min-width: 0;
}

.mobile-enter {
    background: transparent;
    border: none;
    color: #0f0;
    padding: 0 10px;
    font-size: 20px;
    cursor: pointer;
    outline: none;
}

/* Mobile Styles - Updated */
@media screen and (max-width: 768px) {
    .terminal {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        background-color: rgba(0, 0, 0, 0.9);
    }

    .terminal-content {
        padding: 10px;
        font-size: 12px;
        line-height: 1.4;
        width: 100%;
        overflow-x: hidden;
    }

    #output {
        padding: 5px;
        width: 100%;
        overflow-x: hidden;
    }

    #output pre {
        font-size: 8px;
        white-space: pre-wrap;
        word-break: break-all;
        max-width: 100%;
        overflow-x: hidden;
    }

    .input-line {
        padding: 8px;
        background-color: rgba(0, 0, 0, 0.95);
        position: sticky;
        bottom: 0;
        width: 100%;
        overflow: hidden;
    }

    .prompt {
        font-size: 12px;
        padding-right: 5px;
    }

    #terminal-input {
        font-size: 12px;
        padding: 4px 0;
        width: auto;
        min-width: 0;
    }

    .mobile-enter {
        padding: 0 8px;
        font-size: 16px;
    }

    /* Force content to fit width */
    * {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* Explicit scrollbar styling */
.terminal-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.terminal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.terminal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.3);
    border-radius: 5px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.5);
}

/* Firefox scrollbar */
.terminal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 0, 0.3) rgba(0, 0, 0, 0.3);
}

/* Text selection */
::selection {
    background: rgba(0, 255, 0, 0.3);
    color: #fff;
} 