* {
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 20px;
    transition: background-color 0.5s, color 0.5s;
}

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

/* --- Preloader --- */
#intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.preloader {
    text-align: center;
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
}

.loader-text {
    font-size: 2.5em;
    margin-bottom: 25px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.loader-bar {
    width: 250px;
    height: 3px;
    background-color: #0f0;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #fff;
    animation: loading 3s linear forwards;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* --- Animations --- */
.fade-in {
    animation: fadeInAnimation 1s;
}

.fade-out {
    animation: fadeOutAnimation 1s forwards;
}

@keyframes fadeInAnimation {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOutAnimation {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* --- Themes --- */
.theme-green {
    background-color: #000;
    color: #0F0;
}

.theme-light {
    background-color: #F0F0F0;
    color: #333;
}

.theme-blue {
    background-color: #001F3F;
    color: #7FDBFF;
}

/* --- Terminal --- */
#terminal {
    border-width: 2px;
    border-style: solid;
    padding: 10px;
    height: calc(100vh - 40px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.5s;
    position: relative;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.5);
}

.theme-green #terminal { border-color: #0F0; background-color: rgba(0, 0, 0, 0.5); }
.theme-light #terminal { border-color: #333; background-color: rgba(240, 240, 240, 0.8); }
.theme-blue #terminal { border-color: #7FDBFF; background-color: rgba(0, 31, 63, 0.7); }

#output {
    white-space: pre-wrap;
}

.input-line {
    display: flex;
}

.prompt {
    margin-right: 10px;
}

input {
    background-color: transparent;
    border: none;
    font-family: inherit;
    font-size: inherit;
    width: 100%;
    color: inherit;
}

input:focus {
    outline: none;
}

.command {
    font-weight: bold;
    cursor: pointer;
}

.theme-green .command { color: #0F0; }
.theme-light .command { color: #0000FF; }
.theme-blue .command { color: #FFFFFF; }

.response {
    color: inherit;
}

.error {
    color: #F00;
}

.link {
    text-decoration: underline;
    cursor: pointer;
}

.theme-green .link { color: #0FF; }
.theme-light .link { color: #0000FF; }
.theme-blue .link { color: #7FDBFF; }

/* --- New Themes --- */
.theme-dracula {
    background-color: #282a36;
    color: #f8f8f2;
}
.theme-dracula #terminal { border-color: #bd93f9; background-color: rgba(40, 42, 54, 0.7); }
.theme-dracula .command { color: #50fa7b; }
.theme-dracula .link { color: #8be9fd; }

.theme-solarized {
    background-color: #fdf6e3;
    color: #657b83;
}
.theme-solarized #terminal { border-color: #93a1a1; background-color: rgba(253, 246, 227, 0.8); }
.theme-solarized .command { color: #268bd2; }
.theme-solarized .link { color: #cb4b16; }

.theme-amber {
    background-color: #000;
    color: #FFBF00;
}
.theme-amber #terminal { border-color: #FFBF00; background-color: rgba(0, 0, 0, 0.6); }
.theme-amber .command { color: #FFFFFF; }
.theme-amber .link { color: #FFD700; }

.theme-nord {
    background-color: #2E3440;
    color: #D8DEE9;
}
.theme-nord #terminal { border-color: #88C0D0; background-color: rgba(46, 52, 64, 0.7); }
.theme-nord .command { color: #A3BE8C; }
.theme-nord .link { color: #EBCB8B; }

.theme-monokai {
    background-color: #272822;
    color: #F8F8F2;
}
.theme-monokai #terminal { border-color: #F92672; background-color: rgba(39, 40, 34, 0.7); }
.theme-monokai .command { color: #A6E22E; }
.theme-monokai .link { color: #66D9EF; }

