:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-color: #00ff88;
    --accent-glow: rgba(0, 255, 136, 0.4);
    --glass-bg: rgba(15, 15, 15, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Terminal Container */
.terminal-container {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 800px;
    animation: scaleIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Terminal Window */
.terminal-window {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                0 0 30px rgba(0, 255, 136, 0.05);
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
    transition: box-shadow 0.3s ease;
}

.terminal-window:hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 
                0 0 40px rgba(0, 255, 136, 0.1);
}

/* Header & Controls */
.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

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

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

.control.red { background-color: #ff5f56; }
.control.yellow { background-color: #ffbd2e; }
.control.green { background-color: #27c93f; }

.terminal-title {
    flex-grow: 1;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
    font-weight: 500;
}

/* Body & Content */
.terminal-body {
    padding: 24px;
    height: 400px; /* Fixed height for scroll */
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced gap */
    overflow-y: auto; /* Enable scroll */
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

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

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

.terminal-body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.command-line, .active-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #f8f8f2;
}

.input-container {
    display: inline-flex;
    align-items: center;
    gap: 0; /* Crucial: no gap between text and cursor */
}

.input-text {
    margin: 0;
    padding: 0;
    line-height: normal; /* Ensure no weird line-height gaps */
}

/* Ensure no implicit spaces in blinking cursor */
.blinking-cursor {
    margin: 0;
    padding: 0;
    width: auto; /* Allow it to fit content exactly */
    margin-left: -10px; /* Optical tweak to pull it closer */
}

.prompt { color: #50fa7b; font-weight: bold; } /* Dracula Green */
.directory { color: #8be9fd; font-weight: bold; } /* Dracula Cyan */
.command { color: #f1fa8c; } /* Dracula Yellow */

.output {
    margin-top: 10px;
    margin-bottom: 20px;
    padding-left: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 500;
    min-height: 1.5em; /* Prevent layout shift */
    text-shadow: 0 0 10px var(--accent-glow);
}

.blinking-cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.2em;
    background-color: var(--text-secondary);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .terminal-container {
        width: 95%;
    }
    
    .terminal-body {
        padding: 20px;
        min-height: 350px;
    }

    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .command-line, .active-line {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .terminal-title {
        display: none; /* Hide title on very small screens if needed, or truncate */
    }
}
