/* --- terminal.css (OPTIMIZED) --- */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap');

:root {
    --term-color: #00ff41; /* Zelená */
    --term-bg: #0a0a0a;    /* Černá */
    --term-error: #ff3333; /* Červená */
    --term-dim: #008f11;   /* Tmavší zelená */
}

/* --- ZÁKLADNÍ ROZLOŽENÍ --- */
body {
    background-color: var(--term-bg);
    color: var(--term-color);
    font-family: 'Fira Code', monospace;
    margin: 0;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center; /* Centrování na střed */
    min-height: 100vh;
    box-sizing: border-box;
    font-size: 16px;
}

/* CRT Efekt (proužky přes obrazovku) */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15), rgba(0,0,0,0.15) 1px, transparent 1px, transparent 2px);
    pointer-events: none;
    z-index: 10;
}

/* --- KONTEJNER TERMINÁLU --- */
.terminal-container {
    width: 100%;
    max-width: 800px;
    border: 2px solid var(--term-color);
    padding: 25px;
    background-color: rgba(0, 20, 0, 0.95);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    position: relative;
    box-sizing: border-box;
    margin: 10px 0;
}

.terminal-header {
    position: absolute;
    top: -14px; left: 10px;
    background-color: var(--term-bg);
    padding: 0 10px;
    font-weight: bold;
    color: var(--term-dim);
    font-size: 0.8em;
}

/* --- TEXTY A LOGA --- */
.ascii-logo pre {
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1;
    color: var(--term-color);
}

.system-output p, .motto { margin: 8px 0; line-height: 1.5; }
.motto { font-style: italic; color: var(--term-dim); border-bottom: 1px dashed var(--term-dim); padding-bottom: 10px; margin-bottom: 20px !important; }
.error-message { color: var(--term-error); border: 1px solid var(--term-error); padding: 10px; margin: 15px 0; }

/* --- LOGIN FORMULÁŘ --- */
.command-line { display: flex; flex-wrap: wrap; margin-top: 20px; border-top: 1px solid var(--term-dim); padding-top: 15px; }
.prompt { margin-right: 10px; font-weight: bold; }
.terminal-input { background: transparent; border: none; color: var(--term-color); flex-grow: 1; outline: none; font-family: inherit; font-size: inherit; caret-color: var(--term-color); }
.hidden-submit { display: none; }

/* --- VNITŘNÍ STRÁNKY (NAVIGACE A OBSAH) --- */
.top-bar { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--term-color); padding-bottom: 15px; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.current-path { font-weight: bold; word-break: break-all; font-size: 0.9em; }

.logout-btn { background: transparent; border: 1px solid var(--term-error); color: var(--term-error); padding: 5px 15px; text-decoration: none; font-weight: bold; font-size: 0.85em; transition: 0.3s; }
.logout-btn:hover { background: var(--term-error); color: #000; }

.content-panel { border: 1px solid var(--term-dim); padding: 20px; margin-bottom: 20px; background: rgba(0, 20, 0, 0.3); }
.panel-header { margin-top: 0; border-bottom: 1px dashed var(--term-color); padding-bottom: 10px; margin-bottom: 15px; color: var(--term-color); font-size: 1.2em; text-transform: uppercase; }

/* Seznamy souborů/odkazů */
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { margin-bottom: 5px; }
.file-list a { color: var(--term-color); text-decoration: none; display: block; padding: 8px 10px; background: rgba(0, 255, 65, 0.05); transition: 0.2s; }
.file-list a:hover { background: rgba(0, 255, 65, 0.2); border-left: 3px solid var(--term-color); }
.file-list a::before { content: "[FILE] "; opacity: 0.7; margin-right: 8px; }
.file-list a.dir::before { content: "[DIR]  "; color: #ffff00; }

/* Seznam úkolů (pro sara.php) */
.task-list { padding-left: 20px; color: #ddd; }
.task-list li { margin-bottom: 8px; padding-left: 5px; }
.task-list li::marker { color: var(--term-color); font-weight: bold; }

/* --- BOOT ANIMACE & LOADING (pro index.php) --- */
#boot-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--term-bg); color: var(--term-color); padding: 20px; z-index: 9999; font-family: monospace; }
.boot-line { margin: 2px 0; white-space: pre-wrap; }
.processing-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 20, 0, 0.9); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 100; }
.spinner { border: 4px solid rgba(0, 255, 65, 0.3); border-top: 4px solid var(--term-color); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* --- RESPONZIVITA (MOBIL) --- */
@media (max-width: 600px) {
    body { padding: 5px; align-items: flex-start; font-size: 14px; }
    .terminal-container { padding: 15px; margin-top: 20px; }
    .ascii-logo pre { font-size: 8px; white-space: pre; overflow-x: hidden; }
    .top-bar { flex-direction: column; align-items: flex-start; }
    .logout-btn { width: 100%; text-align: center; margin-top: 5px; }
    .content-panel { padding: 10px; }
}
