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

:root {
    --bg-color: #000;
    --text-color: #fff;
    --prompt-color: #fff;
    --link-color: rgb(0, 208, 255);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    line-height: 1.4;
}

#terminal {
    padding: 10px;
    height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
}

#output {
    white-space: pre-wrap;
    word-break: break-all;
}

#input-line {
    display: flex;
    align-items: center;
    transition: opacity 0.5s ease-in-out;
}

.prompt {
    color: var(--prompt-color);
    margin-right: 8px;
    white-space: nowrap;
}

#command-input {
    flex-grow: 1;
    background-color: transparent;
    border: none;
    color: var(--text-color);
    font-family: inherit;
    font-size: inherit;
    caret-shape: block;
}

#command-input:focus {
    outline: none;
}

.command-output {
    margin-bottom: 10px;
}

.link {
    color: var(--link-color);
    text-decoration: underline;
    cursor: pointer;
}

.link:hover {
    filter: brightness(1.5);
}

.link.clickable-file {
    text-decoration: none;
}

.link.clickable-file:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

/* GUI Window Styles */
.hidden {
    display: none !important;
}

.gui-window {
    position: absolute;
    top: 20%;
    left: 20%;
    width: 30vw;
    height: 50vh;
    max-width: 100vw;
    max-height: 100vh; 
    min-width: 250px;
    min-height: 150px;
    background-color: #fff; 
    border: 2px solid #007bff; 
    box-shadow: 4px 4px 0px rgba(0, 123, 255, 0.5); 
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.gui-title-bar {
    background-color: #007bff; 
    color: #fff;
    padding: 3px 8px;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    user-select: none;
}

.gui-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.gui-content {
    padding: 15px;
    flex-grow: 1;
    overflow-y: auto;
    white-space: pre-wrap;
    overflow-wrap: break-word; 
    word-break: normal; 
    color: #333;
}

.gui-content::-webkit-scrollbar {
    width: 8px;
}
.gui-content::-webkit-scrollbar-track {
    background: #eee;
}
.gui-content::-webkit-scrollbar-thumb {
    background: #007bff;
}

.resize-handle {
    position: absolute;
    width: 15px;
    height: 15px;
    bottom: 0;
    right: 0;
    cursor: se-resize;
}


#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    display: none;
    background: #000;
}

#terminal.matrix-mode {
    background-color: transparent;
}

/* Matrix mode text color override */
#terminal.matrix-mode,
#terminal.matrix-mode .prompt,
#terminal.matrix-mode #command-input,
#terminal.matrix-mode .command-output {
    color: #0f0 !important;
}
