:root {
    /* Dark Mode (Default) */
    --bg-color: #0a0a0a;
    --terminal-bg: #121212;
    --text-color: #e0e0e0;
    --accent-color: #888;
    --cursor-color: #fff;
    --prompt-color: #fff;
    --command-color: #fff;
    --error-color: #ff5555;
    --link-color: #3b82f6;
    --timestamp-color: #666;
    --header-bg: #1e1e1e;
    --border-color: #333;
}

[data-theme="light"] {
    --bg-color: #f0f0f0;
    --terminal-bg: #ffffff;
    --text-color: #2e2e2e;
    --accent-color: #666;
    --cursor-color: #000;
    --prompt-color: #000;
    --command-color: #000;
    --error-color: #d32f2f;
    --link-color: #2563eb;
    --timestamp-color: #999;
    --header-bg: #e0e0e0;
    --border-color: #ccc;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

/* Terminal Container */
#terminal-container {
    width: 90%;
    max-width: 900px;
    height: 80vh;
    background: var(--terminal-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

#terminal-header {
    background: var(--header-bg);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    user-select: none;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close {
    background: #ff5f56;
}

.minimize {
    background: #ffbd2e;
}

.expand {
    background: #27c93f;
}

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 500;
}

#theme-toggle {
    background: transparent;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

#theme-toggle:hover {
    color: var(--text-color);
}

#terminal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

#terminal-body::-webkit-scrollbar {
    width: 6px;
}

#terminal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Content Styling */
.ascii-art {
    margin-bottom: 2rem;
    line-height: 1.2;
    font-size: 0.75rem;
    white-space: pre-wrap;
    color: var(--text-color);
}

.welcome-msg {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.last-login {
    margin-bottom: 2rem;
    color: var(--timestamp-color);
    font-size: 0.85rem;
}

.highlight {
    font-weight: bold;
    color: var(--prompt-color);
}

#history {
    margin-bottom: 10px;
}

.command-line {
    margin-bottom: 15px;
}

.response {
    margin-bottom: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.input-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt {
    color: var(--prompt-color);
    font-weight: bold;
    white-space: nowrap;
}

.input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
}

#command-input {
    background: transparent;
    border: none;
    color: var(--command-color);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    padding: 0;
    margin: 0;
    width: 1px;
    caret-color: transparent;
}

.cursor {
    width: 8px;
    height: 1.2rem;
    background: var(--cursor-color);
    animation: blink 0.8s infinite;
    flex-shrink: 0;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.error-text {
    color: var(--error-color);
}

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

@media (max-width: 800px) {
    .ascii-art {
        font-size: 0.4rem;
    }
}

@media (max-width: 600px) {
    #terminal-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .ascii-art {
        font-size: 0.3rem;
    }
}