/* terminal.css - Complete Fedora/Linux Theme */
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap');

:root {
    --bg-color: #0c0c0c;
    --term-black: #000000;
    --term-white: #e0e0e0;
    --term-green: #2ecc71;
    --term-cyan: #3498db;
    --term-yellow: #f1c40f;
    --term-magenta: #9b59b6;
    --term-red: #e74c3c;
    --border-color: #444;
    --header-bg: #1e1e1e;
}

/* --- 1. Desktop Environment (Background) --- */
body {
    background-color: #2f343f;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    margin: 0;
    font-family: 'Source Code Pro', 'DejaVu Sans Mono', monospace;
    font-size: 15px;
    line-height: 1.4;
    color: var(--term-white);
    overflow: hidden; 
}

/* --- 2. The Linux Terminal Window Wrapper --- */
.linux-terminal {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    max-height: 900px;
    background-color: var(--bg-color);
    border: 1px solid #3d3d3d;
    box-shadow: 
        0 0 0 1px #000, 
        0 15px 35px rgba(0,0,0,0.6);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* --- 3. Window Header (KDE/Gnome Style) --- */
.terminal-header {
    background-color: var(--header-bg);
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
    user-select: none;
}

.terminal-title {
    color: #cccccc;
    font-size: 13px;
    padding-left: 16px;
    font-weight: bold;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.terminal-title::before {
    content: '>_'; 
    margin-right: 8px;
    color: var(--term-green);
    font-weight: bold;
}

.terminal-controls {
    display: flex;
    height: 100%;
}

.control-btn {
    width: 45px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0a0a0;
    transition: background-color 0.15s, color 0.15s;
    font-family: Arial, sans-serif;
    cursor: default;
}

.minimize::before { content: '−'; font-size: 18px; }
.maximize::before { content: '□'; font-size: 14px; }
.close::before    { content: '×'; font-size: 20px; }

.control-btn:hover { background-color: #3a3a3a; color: #fff; }
.close:hover { background-color: #c0392b; color: #fff; }

/* --- 4. Scrollable Content Area --- */
.terminal-body {
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #555 #1a1a1a;
}

.terminal-body::-webkit-scrollbar { width: 12px; }
.terminal-body::-webkit-scrollbar-track { background: #1a1a1a; }
.terminal-body::-webkit-scrollbar-thumb { 
    background-color: #444; 
    border: 3px solid #1a1a1a; 
    border-radius: 2px;
}
.terminal-body::-webkit-scrollbar-thumb:hover { background-color: #666; }

/* --- 5. TUI Component: "Window" Cards --- */
.tui-window {
    border: 2px solid var(--term-white);
    background-color: var(--bg-color);
    position: relative;
    box-shadow: 8px 8px 0px rgba(40,40,40,0.5);
    margin-bottom: 2rem;
}

.tui-title {
    background-color: var(--term-white);
    color: var(--term-black);
    padding: 2px 10px;
    font-weight: bold;
    display: inline-block;
    position: absolute;
    top: -14px;
    left: 10px;
    text-transform: uppercase;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.85rem;
}

/* --- 6. TUI Component: Buttons --- */
.tui-btn {
    display: inline-block;
    border: 1px solid var(--term-cyan);
    color: var(--term-cyan);
    padding: 4px 12px;
    font-weight: bold;
    transition: none;
    cursor: pointer;
    background: transparent;
    text-transform: uppercase;
    text-align: center; /* Ensure centered text on full width */
    /* Removed margin-bottom so we can control spacing with flex gap */
}
.tui-btn::before { content: '['; margin-right: 5px; color: var(--term-white); }
.tui-btn::after { content: ']'; margin-left: 5px; color: var(--term-white); }

.tui-btn:hover {
    background-color: var(--term-cyan);
    color: var(--term-black);
}
.tui-btn:hover::before, .tui-btn:hover::after { color: var(--term-black); }

/* --- 7. TUI Component: Progress/Skill Bars --- */
.tui-progress-bar {
    background-color: #222;
    color: var(--term-green);
    font-family: monospace;
    font-weight: bold;
    letter-spacing: -2px; 
    overflow: hidden;
    white-space: nowrap;
    height: 100%;
    display: block;
}
.tui-progress-bar::before {
    content: '||||||||||||||||||||||||||||||||||||||||||||||||||';
}

/* --- 8. TUI Component: Timeline Tree --- */
.tui-timeline-item {
    border-left: 2px dashed var(--border-color);
    padding-left: 20px;
    margin-left: 10px;
    position: relative;
    padding-bottom: 30px;
}

/* --- 9. Global Typography & Elements --- */
h1, h2, h3, h4 {
    text-transform: uppercase;
    letter-spacing: 1px;
}

a { text-decoration: none; color: inherit; }

svg {
    filter: drop-shadow(0 0 2px var(--term-green));
}
svg line, svg rect, svg path, svg polygon, svg circle {
    stroke: var(--term-green) !important;
    fill: #000 !important;
    stroke-width: 2px;
}
svg text {
    fill: var(--term-green) !important;
    font-family: 'Source Code Pro', monospace !important;
    font-size: 14px !important;
}

/* --- 10. Status Bar --- */
.status-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    border-top: 1px solid #333;
    color: #aaa;
    padding: 5px 15px;
    display: flex;
    gap: 20px;
    font-size: 13px;
    z-index: 50;
    overflow-x: auto; /* Prevent overflow on very small screens */
    white-space: nowrap;
}
.key-hint span { 
    background-color: #444; 
    color: #fff; 
    padding: 0 5px; 
    margin-right: 5px; 
    border-radius: 2px;
}

/* --- 11. MOBILE RESPONSIVENESS (NEW) --- */
@media (max-width: 768px) {
    body {
        padding: 0; /* Remove body padding to maximize screen usage */
        align-items: flex-start; /* Align top */
    }

    .linux-terminal {
        height: 100dvh; /* Use dynamic viewport height */
        max-height: none;
        width: 100%;
        border: none;
        border-radius: 0;
    }

    .terminal-body {
        padding: 1.5rem 1rem !important; /* Reduce padding from p-8 (2rem) */
    }

    .tui-window {
        box-shadow: 4px 4px 0px rgba(40,40,40,0.5); /* Smaller shadow */
        margin-bottom: 2rem;
    }
    
    .status-bar {
        display: none; /* Hides status bar on mobile */
    }
    
    /* Since the status bar is gone, you might want to remove 
       the bottom padding from the body content so it sits flush */
    .linux-terminal {
        padding-bottom: 0; 
    }
}