:root {
    --bg-color: #0a0a0a;
    --text-main: #ffffff;
    --text-dim: #777777;
    --border-color: #333333;
    --accent-color: #ffffff;
    --alert-color: #ff3333;
    --font-mono: 'Courier New', Courier, monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Настройки для картинки-логотипа */
.logo {
    display: flex;
    align-items: center;
    gap: 10px; /* Расстояние между картинкой и текстом */
}

.logo-img {
    height: 30px; /* Высота картинки (подгони под свой дизайн, высота панели у нас 60px) */
    width: auto;
    object-fit: contain;
}

.top-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; border-bottom: 1px solid var(--border-color); height: 60px;
}

.logo { font-size: 20px; font-weight: bold; letter-spacing: 2px; }
.logo .icon { font-size: 16px; margin-right: 5px; }
.logo .subtitle { color: var(--text-dim); font-size: 14px; font-weight: normal; letter-spacing: 1px;}

.status-indicator {
    border: 1px solid var(--border-color); padding: 5px 15px;
    font-size: 14px; color: var(--text-dim); display: flex; align-items: center; gap: 10px;
}
.status-indicator.connected { color: var(--text-main); border-color: var(--text-main); }
.status-indicator .dot { width: 8px; height: 8px; background-color: var(--text-dim); border-radius: 50%; }
.status-indicator.connected .dot { background-color: #00ff00; }

.dashboard { display: flex; flex: 1; height: calc(100vh - 60px); }

.left-panel, .right-panel { width: 280px; padding: 20px; display: flex; flex-direction: column; }
.left-panel { border-right: 1px solid var(--border-color); }
.right-panel { border-left: 1px solid var(--border-color); }

.telemetry { flex: 1; }
.tel-item { margin-bottom: 30px; }
.tel-label {
    font-size: 12px; color: var(--text-dim); border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px; margin-bottom: 10px; text-transform: uppercase;
}
.tel-value { font-size: 32px; font-weight: bold; }
.tel-value .unit { font-size: 16px; font-weight: normal; margin-left: 5px; }
.tel-sub { font-size: 12px; color: var(--text-dim); margin-top: 5px; }
.tel-bar { height: 4px; border: 1px solid var(--border-color); margin-top: 5px; width: 100%; }
.tel-bar-fill { height: 100%; background-color: var(--text-main); transition: width 0.3s; }

.controls-wasd { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; }
.key-row { display: flex; gap: 10px; }
.key {
    width: 45px; height: 45px; border: 1px solid var(--border-color);
    display: flex; justify-content: center; align-items: center;
    font-size: 18px; color: var(--text-dim); transition: all 0.1s;
}
.key.active { background-color: var(--text-main); color: var(--bg-color); border-color: var(--text-main); transform: scale(0.95); }

/* === НАСТРОЙКИ ЭКРАНА ВИДЕО (ЦЕНТРАЛЬНАЯ ПАНЕЛЬ) === */
.center-panel {
    flex-grow: 1; /* Заставляет центральную панель занимать всё свободное место между боковыми */
    position: relative;
    display: flex;
    flex-direction: column;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%; /* Растягиваем контейнер на всю центральную панель */
    background: #000; /* Черный фон на случай обрывов */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#rover-video {
    width: 100%;
    height: 100%;
    /* 'cover' растягивает видео так, чтобы не было черных полос (может чуть срезать края). 
       Если хочешь видеть кадр целиком с полями, замени 'cover' на 'contain' */
    object-fit: cover; 
    border-radius: 8px; /* Немного скругляем углы для красоты (по желанию) */
}

/* === ТУРБО-ЭФФЕКТ ДЛЯ КНОПКИ 'W' === */

/* Когда нажат Shift (body.turbo-mode) И нажата кнопка W (.active) */
body.turbo-mode #key-w.active {
    background: #dc3545 !important; /* Ярко-красный цвет */
    color: #fff !important;
    border-color: #ff4444 !important;
    /* Сильное огненное свечение вокруг и внутри кнопки */
    box-shadow: 0 0 25px rgba(220, 53, 69, 0.9), inset 0 0 15px rgba(255, 255, 255, 0.4) !important;
    /* Легкое вдавливание */
    transform: scale(0.92) !important; 
    /* Тряска от перегрузки (эффект работающего на пределе движка) */
    animation: key-w-turbo-shake 0.15s infinite alternate;
}

@keyframes key-w-turbo-shake {
    0% { transform: scale(0.92) translate(0px, 0px); }
    100% { transform: scale(0.92) translate(0px, 2px); }
}

.overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    border: 2px solid var(--text-main); padding: 15px 30px; font-size: 24px;
    letter-spacing: 3px; z-index: 10; background-color: rgba(10, 10, 10, 0.8);
}

.log-header { font-size: 12px; color: var(--text-dim); border-bottom: 1px solid var(--border-color); padding-bottom: 5px; margin-bottom: 15px; }
.log-content { flex: 1; overflow-y: auto; font-size: 12px; color: var(--text-dim); display: flex; flex-direction: column; gap: 8px; }
.log-entry { word-wrap: break-word; }
.log-time { color: var(--text-main); margin-right: 5px; }


/* === СТИЛИ ОКНА АВТОРИЗАЦИИ === */
.login-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.98); /* Почти полностью скрывает фон */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Поверх всего сайта */
}

.login-box {
    background: #1e1e1e;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #333;
    text-align: center;
    width: 320px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.15);
}

.login-box h2 {
    color: #fff;
    margin-bottom: 25px;
    font-family: sans-serif;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: #000;
    border: 1px solid #555;
    color: #0f0; /* Зеленый хакерский текст */
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s;
}

.login-box button:hover {
    background: #218838;
}

.error-msg {
    color: #ff4444;
    margin-top: 15px;
    min-height: 20px;
    font-family: sans-serif;
}

/* === ПРИБОРНАЯ ПАНЕЛЬ СКОРОСТИ (В левой панели) === */
.speed-panel {
    background: rgba(20, 20, 20, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 20px; /* Отступ снизу до клавиш WASD */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.speed-panel h3 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    text-transform: uppercase;
    font-family: monospace;
}

.speed-mode {
    padding: 8px 12px;
    margin: 6px 0;
    border-radius: 4px;
    background: #111;
    font-size: 14px;
    font-family: monospace;
    transition: all 0.2s ease;
    text-align: center;
    color: #666;
    border: 1px solid #222;
}

/* Активный обычный режим (Зеленый) */
.speed-mode.active {
    background: #1a4d2e; /* Темно-зеленый фон */
    border-color: #28a745;
    color: #0f0;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
}

/* Активный режим ТУРБО (Красный пульсирующий) */
.speed-mode.turbo.active {
    background: #4d1a1a; /* Темно-красный фон */
    border-color: #dc3545;
    color: #ff4444;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.5);
    animation: turbo-mode-pulse 0.4s infinite alternate;
}

@keyframes turbo-mode-pulse {
    from { transform: scale(1); }
    to { transform: scale(1.03); }
}   