:root {
    /* Light Theme */
    --bg-light: #f0f2f5;
    --text-light: #333;
    --primary-light: #00bcd4; /* Cyan */
    --secondary-light: #ff4081; /* Pink */
    --accent-light: #4caf50; /* Green */
    --code-bg-light: #e0e0e0;
    --terminal-header-light: #d5d5d5;
    --terminal-title-light: #555;
    --terminal-shadow-light: rgba(0, 0, 0, 0.1);

    /* Dark Theme */
    --bg-dark: #1a1a2e;
    --text-dark: #e0e0e0;
    --primary-dark: #00f2ff; /* Electric Blue */
    --secondary-dark: #ff6b6b; /* Reddish */
    --accent-dark: #4CAF50; /* Green */
    --code-bg-dark: #2c3e50;
    --terminal-header-dark: #282828; /* Slightly different dark header */
    --terminal-title-dark: #abb2bf;
    --terminal-shadow-dark: rgba(0, 0, 0, 0.5);
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    background-color: var(--bg-light); /* Default to light */
    color: var(--text-light); /* Default to light */
}

body[data-theme="dark"] {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.container {
    width: 90%;
    max-width: 1200px;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 10px 20px;
    background-color: var(--terminal-header-light); /* Use terminal header color for header */
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--terminal-shadow-light);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body[data-theme="dark"] header {
    background-color: var(--terminal-header-dark);
    box-shadow: 0 4px 15px var(--terminal-shadow-dark);
}

.logo {
    font-size: 2.2em;
    font-weight: bold;
    color: var(--primary-light);
    text-shadow: 0 0 10px var(--primary-light), 0 0 20px var(--primary-light);
    letter-spacing: 2px;
}

body[data-theme="dark"] .logo {
    color: var(--primary-dark);
    text-shadow: 0 0 10px var(--primary-dark), 0 0 20px var(--primary-dark);
}

.terminal-symbol {
    color: var(--accent-light);
}

body[data-theme="dark"] .terminal-symbol {
    color: var(--accent-dark);
}

nav button {
    padding: 10px 15px;
    background-color: var(--secondary-light);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 64, 129, 0.4);
}

body[data-theme="dark"] nav button {
    background-color: var(--secondary-dark);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

nav button:hover {
    background-color: #e03a71; /* Darker shade for hover */
    transform: translateY(-2px);
}

body[data-theme="dark"] nav button:hover {
    background-color: #e05858; /* Darker shade for hover */
}

.terminal-window {
    background-color: var(--code-bg-light);
    border-radius: 10px;
    box-shadow: 0 10px 30px var(--terminal-shadow-light);
    overflow: hidden;
    width: 100%;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

body[data-theme="dark"] .terminal-window {
    background-color: var(--code-bg-dark);
    box-shadow: 0 10px 30px var(--terminal-shadow-dark);
}

.terminal-header {
    background-color: var(--terminal-header-light);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ccc;
    position: sticky;
    top: 0;
    z-index: 1;
    transition: background-color 0.3s ease;
}

body[data-theme="dark"] .terminal-header {
    background-color: var(--terminal-header-dark);
    border-bottom: 1px solid #444;
}

.dots {
    display: flex;
    margin-right: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    display: inline-block;
}

.dot.red { background-color: #ff605c; }
.dot.yellow { background-color: #ffbd44; }
.dot.green { background-color: #00ca4e; }

.terminal-title {
    font-size: 0.9em;
    color: var(--terminal-title-light);
    font-family: 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace;
    transition: color 0.3s ease;
}

body[data-theme="dark"] .terminal-title {
    color: var(--terminal-title-dark);
}

.terminal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    font-family: 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace;
    text-align: left;
    line-height: 1.6;
}

.prompt, .command-output {
    margin: 8px 0;
    white-space: pre-wrap; /* Preserve whitespace and wrap lines */
}

.prompt::before {
    content: "\203A\00A0"; /* Greater-than sign and a non-breaking space */
    color: var(--primary-light);
    font-weight: bold;
}

body[data-theme="dark"] .prompt::before {
    color: var(--primary-dark);
}

.command-output {
    color: #aaa; /* Lighter gray for output */
    margin-left: 15px; /* Indent output slightly */
}

.command-output:nth-child(odd) { /* Subtle alternation for readability */
    opacity: 0.9;
}

footer {
    margin-top: 40px;
    font-size: 0.8em;
    color: #888;
    transition: color 0.3s ease;
}

body[data-theme="dark"] footer {
    color: #777;
}

/* Typing Animation */
.typing-animation {
    animation: blinkCursor 0.7s infinite steps(1);
}

@keyframes blinkCursor {
    50% {
        opacity: 0;
    }
}

/* Subtle background glow/animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(42, 57, 176, 0.2) 0%, rgba(26, 26, 46, 0) 70%);
    z-index: -1;
    opacity: 0.6;
    transition: background 0.3s ease;
}

body[data-theme="dark"]::before {
    background: radial-gradient(circle, rgba(15, 27, 115, 0.4) 0%, rgba(26, 26, 46, 0) 70%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo {
        font-size: 1.8em;
    }
    header {
        flex-direction: column;
        margin-bottom: 20px;
    }
    nav {
        margin-top: 15px;
    }
    .terminal-window {
        max-height: 60vh;
    }
    .terminal-body {
        padding: 15px;
    }
    footer {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5em;
    }
    nav button {
        font-size: 0.9em;
        padding: 8px 12px;
    }
    .terminal-title {
        font-size: 0.8em;
    }
    .terminal-body {
        font-size: 0.9em;
    }
}