/* 2 August 2025 */
@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap");

* {
    margin: 0;
    padding: 0;
    font-family: "Fira Code", monospace, monospace;
    box-sizing: border-box;
}

:root {
    /* Dark theme */
    --background: #0d0a1f;
    --primary-text: #d3a3ff;
    --accent-text: #8e44ad;
    --error-text: #ff5da2;
    --glow: #d3a3ff;
    --background-hover: #333;
    --command-highlight: #ff9800;
}

[data-theme="light"] {
    /* Light theme */
    --background: #f5f7fa;
    --primary-text: #333333;
    --accent-text: #007acc;
    --error-text: #d32f2f;
    --glow: #3399ff;
    --background-hover: #ddd;
    --command-highlight: #d84315;
}

body {
    background-color: var(--background);
    color: var(--primary-text);
    overflow: hidden hidden;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.terminal {
    display: flex;
    flex-direction: column;
    gap: 1%;

    width: 60%;
    height: 75%;
    border: 0 solid var(--accent-text);
    position: absolute;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    border-radius: 10px;
    box-shadow: 0 0 8px 0 #a406ff, 0 0 20px 0 #a406ff;

    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.controls {
    display: flex;
    justify-content: flex-start;
    padding-top: 5px;
}

ul {
    list-style-type: none;
}

ul li {
    text-align: center;
    display: inline-block;
}

#hide {
    cursor: pointer;
    padding-top: 4px;
    padding-left: 0.5vw;
    padding-bottom: 6px;
    color: rgba(255, 255, 0, 0.568);
    user-select: none;
}

#hide:hover {
    color: rgb(238, 255, 0);
    transform: scale(1.1);
}

#quit {
    cursor: pointer;
    padding-left: 1.1vw;
    padding-top: 4px;
    padding-bottom: 6px;
    color: rgba(255, 0, 0, 0.589);
    user-select: none;
}

#quit:hover {
    color: red;
    transform: scale(1.1);
}

.quitState {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100%;
    font-size: 2rem;
    text-align: center;
    transform: translateY(-50%);
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.terminalBody {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;

    padding: 0.3rem 0;
}

.terminalBody::-webkit-scrollbar {
    display: none;
}

.userShell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    padding-left: 1rem;
    padding-right: 1rem;
}

.content {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 5px;
    position: relative;
    left: 1.5%;
}

label {
    height: 4vh;
    /* margin-top: 1%; */
    font-size: 1rem;
    display: flex;
    align-items: center;
    height: auto;
    height: 1rem;
    margin: 0;
    padding: 0;
    cursor: text;
}

.userInfo {
    font-size: 1rem;
    white-space: nowrap;
}

.directory {
    color: #50fa7b;
}

.userInput {
    display: flex;
    align-items: center;
    /* Ensures vertical alignment with prompt */
    width: 100%;
    /* white-space: nowrap; */
    white-space: normal;
    word-break: break-all;
}

input {
    background-color: transparent;
    border: none;
    outline: none;
    color: var(--primary-text);
    font-size: 1rem;
    line-height: 1rem;
    width: 100%;
    padding: 0;
    margin: 0;

    box-shadow: none;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.userOutput {
    font-size: 1rem;
    line-height: 1rem;
    padding: 4px 0;
    margin: 0;
    height: auto;
    /* Match the expected height of input */
    /* display: flex; */
    /* align-items: center; */

    display: block;
    white-space: pre-wrap;
    word-break: break-word;

    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.2rem;
}

.welcomeMessage {
    font-size: 1.1rem;
    line-height: 1.5rem;

    margin: 0;
    height: auto;

    display: inline-block;
    text-align: left;
    /* padding: 10px 1rem; */
    padding-top: 0.5%;
    padding-bottom: 5px;
    padding-left: 1rem;
    padding-right: 1rem;
    white-space: normal;
}

.welcomeMessage span {
    color: var(--accent-text);
    cursor: default;
    display: inline;
    /* margin-right: 1px; */
}

.welcomeMessage .command {
    color: var(--command-highlight);
    font-weight: bold;
    cursor: default;
}



.userShell .userOutput a {
    color: var(--accent-text);
    text-decoration: none;
    font-weight: bold;
}

.userShell .userOutput a:hover {
    color: var(--glow);
    text-decoration: underline;
}


.userShell .userOutput a:visited {
    color: var(--primary-text);
}

.restore {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);

    background-color: var(--background);
    color: var(--primary-text);

    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);

    font-size: 16px;
    font-weight: bold;

    display: inline-flex;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    transition: background 0.3s ease;
}

.restore p {
    margin: 0 0 0 10px;
    font-size: 18px;
    transform: translateY(-1px);
}

.restore:hover {
    background-color: var(--background-hover);
    transform-origin: center center;
    transform: translateX(-50%) scale(1.04);
}


footer {
    position: absolute;
    bottom: 0;
    left: 0;
    text-align: center;
    padding: 10px 0;
    font-size: 0.9rem;
    width: 100%;
    background-color: var(--background);
}

footer a {
    text-decoration: none;
    color: var(--primary-text);
}