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

body {
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #0a0a1a 0%, #0c1a2d 100%);
    color: #e0e0f0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1000px;
    background-color: #0a1525;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    border: 1px solid #1a2a3e;
}

/* Заголовок терминала в стиле CachyOS с синей темой */
.terminal-header {
    background: linear-gradient(to bottom, #0c1a2d, #0a1525);
    padding: 12px 20px;
    border-bottom: 1px solid #1a2a3e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    color: #e0e0f0;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.terminal-title i {
    margin-right: 10px;
    color: #4d9fff;
}

.cachyos-text {
    color: #4d9fff;
    font-weight: 700;
    margin-right: 5px;
    text-shadow: 0 0 10px rgba(77, 159, 255, 0.3);
}

.window-controls {
    display: flex;
    align-items: center;
}

.window-control-text {
    color: #8a9fb3;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    background-color: rgba(26, 42, 62, 0.5);
    border-radius: 4px;
    border: 1px solid #2a3a4e;
}

/* Тело терминала */
.terminal-body {
    padding: 25px;
    height: 550px;
    overflow-y: auto;
    background-color: #0a101a;
    font-size: 15px;
    position: relative;
}

/* Стилизация скроллбара */
.terminal-body::-webkit-scrollbar {
    width: 10px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #0a101a;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #1a2a3e;
    border-radius: 5px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #2a3a4e;
}

/* Элементы вывода */
.output-line {
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
    font-weight: 300;
    animation: fadeIn 0.3s ease-out;
}

.prompt {
    color: #4d9fff;
    font-weight: 500;
    margin-right: 12px;
}

.command {
    color: #4d9fff;
    font-weight: 500;
    background-color: rgba(77, 159, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.error {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.success {
    color: #6bff95;
    background-color: rgba(107, 255, 149, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.info {
    color: #6bd4ff;
}

.warning {
    color: #ffcc6b;
}

.highlight {
    color: #4d9fff;
    font-weight: 500;
}

.ascii-art {
    color: #4d9fff;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* Линия ввода */
.input-line {
    display: flex;
    align-items: center;
    margin-top: 15px;
    position: relative;
}

/* Контейнер для поля ввода и курсора */
.input-wrapper {
    position: relative;
    display: inline-block;
    flex-grow: 1;
    height: 30px;
}

.command-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #e0e0f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    outline: none;
    padding: 6px 8px; /* Важно: левый padding 8px */
    line-height: 1.5;
    caret-color: transparent;
}

/* Кастомный курсор */
.cursor {
    position: absolute;
    left: 8px; /* Начальная позиция, совпадает с padding-left поля ввода */
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 18px;
    background-color: #4d9fff;
    pointer-events: none;
    border-radius: 1px;
    transition: left 0.05s ease;
    opacity: 1;
}

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

/* Подвал терминала */
.terminal-footer {
    padding: 10px 20px;
    background-color: #0c1a2d;
    border-top: 1px solid #1a2a3e;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #8a9fb3;
    letter-spacing: 0.5px;
}

.status-item {
    display: flex;
    align-items: center;
}

.status-item i {
    margin-right: 6px;
    font-size: 11px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 16, 26, 0.9);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #0c1a2d, #0a1525);
    width: 90%;
    max-width: 550px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
    border: 1px solid #1a2a3e;
}

.modal-header {
    background: linear-gradient(90deg, #2a6bc6, #4d9fff);
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1a2a3e;
}

.modal-title {
    color: #0a1525;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.modal-title i {
    margin-right: 12px;
}

.modal-close {
    background: none;
    border: none;
    color: #0a1525;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    font-weight: 300;
}

.modal-close:hover {
    color: #1a2a3e;
}

.modal-body {
    padding: 30px;
}

/* Форма регистрации */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #6bd4ff;
    font-weight: 500;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.form-group label i {
    margin-right: 10px;
    width: 16px;
    color: #4d9fff;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    background-color: #0a101a;
    border: 1px solid #2a3a4e;
    border-radius: 8px;
    color: #e0e0f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    transition: all 0.3s;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.form-group input:focus {
    outline: none;
    border-color: #4d9fff;
    box-shadow: 0 0 0 3px rgba(77, 159, 255, 0.2);
}

.form-hint {
    font-size: 13px;
    color: #8a9fb3;
    margin-top: 8px;
    font-weight: 300;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    accent-color: #4d9fff;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 300;
}

.link {
    color: #6bd4ff;
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
    color: #4d9fff;
}

.password-strength {
    margin-top: 12px;
    display: flex;
    align-items: center;
}

.strength-bar {
    height: 6px;
    flex-grow: 1;
    margin-right: 6px;
    background-color: #1a2a3e;
    border-radius: 3px;
    transition: all 0.3s;
}

.strength-bar:last-child {
    margin-right: 0;
}

.strength-text {
    margin-left: 15px;
    font-size: 14px;
    font-weight: 600;
    min-width: 80px;
    letter-spacing: 0.5px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 35px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.btn i {
    margin-right: 10px;
}

.btn-primary {
    background: linear-gradient(90deg, #2a6bc6, #4d9fff);
    color: #0a1525;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(77, 159, 255, 0.3);
}

.btn-secondary {
    background-color: #1a2a3e;
    color: #e0e0f0;
}

.btn-secondary:hover {
    background-color: #2a3a4e;
    transform: translateY(-3px);
}

/* Валидация */
.validation-icon {
    position: absolute;
    right: 18px;
    top: 42px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
}

input:valid + .validation-icon {
    display: block;
    background-color: #6bff95;
}

input:invalid:not(:placeholder-shown) + .validation-icon {
    display: block;
    background-color: #ff6b6b;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px rgba(77, 159, 255, 0.5); }
    50% { text-shadow: 0 0 15px rgba(77, 159, 255, 0.8); }
}

.glow-text {
    animation: glow 2s infinite;
}

/* Адаптивность */
@media (max-width: 768px) {
    .terminal-body {
        height: 450px;
        padding: 20px;
    }
    
    .terminal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .window-controls {
        align-self: flex-end;
    }
    
    .status-bar {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
    }
    
    .status-item {
        margin-right: 15px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Стили для баннера */
.banner {
    background: linear-gradient(90deg, rgba(77, 159, 255, 0.1) 0%, rgba(42, 107, 198, 0.1) 100%);
    border-left: 4px solid #4d9fff;
    padding: 18px;
    margin-bottom: 25px;
    border-radius: 0 8px 8px 0;
}

.banner h3 {
    color: #6bd4ff;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.banner ul {
    padding-left: 22px;
}

.banner li {
    margin-bottom: 8px;
    font-weight: 300;
}

/* Декоративные элементы */
.decorative-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #4d9fff, #2a6bc6, transparent);
    margin: 20px 0;
}

/* Стиль для системной информации */
.system-info {
    background-color: rgba(12, 26, 45, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #1a2a3e;
}

/* Стиль для neofetch ASCII-art */
.ascii-art {
    color: #4d9fff;
    font-family: 'JetBrains Mono', monospace;
    white-space: pre;
    line-height: 1.2;
    letter-spacing: 0.3px;
    display: block;
    margin: 0;
    padding: 0;
}
/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 768px) {
  #linuxTreeWindow {
    max-width: 100% !important;
    margin: 0 0.5rem;
  }

@media (max-width: 850px) {

    .linux-map-grid {
        grid-template-columns: 1fr;
    }

    .path-info-box {
        min-height: auto;
    }
}

@media (max-width: 768px) {

    .linux-card {
        border-radius: 16px;
    }

    .linux-card-body {
        padding: 1rem;
    }

    .dir-name {
        flex-wrap: wrap;

        padding: 0.8rem;
    }

    .dir-desc {
        width: 100%;

        margin-left: 1.5rem;
    }

    .terminal-content {
        font-size: 0.82rem;
    }
}