@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg-primary: #1a1b26;
    --bg-secondary: #24283b;
    --bg-tertiary: #414868;
    --accent-primary: #7aa2f7;
    --accent-secondary: #bb9af7;
    --accent-tertiary: #7dcfff;
    --success: #9ece6a;
    --warning: #e0af68;
    --error: #f7768e;
    --text-primary: #c0caf5;
    --text-secondary: #a9b1d6;
    --text-muted: #565f89;
    --border-color: #414868;
}

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

html, body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: fixed;
}

/* Layout Container */
.container {
    display: grid;
    grid-template-rows: 1fr;
    height: 100vh;
    width: 100vw;
}

/* Main Content Area */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    background: var(--bg-primary);
}

/* Terminal Window */
.terminal-window {
    background: var(--bg-secondary);
    margin: 0;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

/* Terminal Header */
.terminal-header {
    background: var(--bg-tertiary);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

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

.control-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control-btn.close { background: var(--error); }
.control-btn.minimize { background: var(--warning); }
.control-btn.maximize { background: var(--success); }

.terminal-title {
    font-size: 12px;
    color: var(--text-secondary);
}

.terminal-tabs {
    display: flex;
    gap: 5px;
}

.terminal-tab {
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    cursor: pointer;
}

.terminal-tab.active {
    background: var(--bg-primary);
    color: var(--accent-primary);
}

/* Terminal Content */
.terminal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-size: 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.terminal-content::-webkit-scrollbar {
    width: 8px;
}

.terminal-content::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Loading Screen */
#loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.loading-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 600px;
}

#loading-ascii-art {
    color: var(--accent-primary);
    font-size: clamp(8px, 1.5vw, 12px);
    line-height: 1.2;
    text-align: center;
}

#loading-text {
    color: var(--text-secondary);
    font-size: 13px;
}

#fill {
    color: var(--accent-primary);
    font-size: 10px;
}

/* Command Interface */
#command-interface {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ascii {
    color: var(--accent-primary);
    text-align: center;
    font-size: clamp(6px, 1vw, 10px);
    line-height: 1.2;
    margin-bottom: 15px;
}

#output {
    margin-bottom: 15px;
}

.output, .output-project {
    margin: 15px 0;
    padding-left: 12px;
    border-left: 2px solid var(--accent-primary);
}

.output-project {
    border-left-color: var(--accent-secondary);
}

/* Command Line */
#command-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

#prompt {
    color: var(--accent-primary);
    font-size: 14px;
    white-space: nowrap;
}

.input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    outline: none;
    width: 1ch;
    caret-color: transparent;
}

#cursor {
    color: var(--accent-primary);
    font-size: 14px;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Color Classes */
.text-green { color: var(--success); }
.text-blue { color: var(--accent-primary); }
.text-yellow { color: var(--warning); }
.text-pink { color: var(--accent-secondary); }
.text-red { color: var(--error); }
.text-orange { color: #ff9e64; }
.text-gray { color: var(--text-muted); }

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.output, .output-project {
    animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.command-echo {
    animation: fadeIn 0.2s ease-out;
}

.terminal-content > div {
    animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Selection */
::selection {
    background: rgba(122, 162, 247, 0.3);
    color: var(--text-primary);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .terminal-content {
        padding: 15px;
        font-size: 13px;
    }
    
    #command-line {
        padding: 10px 15px;
    }
}

@media screen and (max-width: 480px) {
    .terminal-content {
        padding: 10px;
        font-size: 12px;
    }
}

/* Smooth Transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
