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

body {
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    background: #05070f;
    color: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    padding: 1rem;
}


body::before {
    content: '';
    position: fixed;
    top: -100px;
    left: -100px;
    width: calc(100% + 200px);
    height: calc(100% + 200px);
    background-image: 
        linear-gradient(rgba(168, 85, 247, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    animation: gridMove 40s linear infinite;
    will-change: transform;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(5, 7, 15, 0.95) 100%);
    z-index: -1;
    pointer-events: none;
}

.bg-scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(
        to bottom,
        rgba(168, 85, 247, 0) 0%,
        rgba(168, 85, 247, 0.03) 50%,
        rgba(168, 85, 247, 0) 100%
    );
    z-index: -1;
    pointer-events: none;
    animation: scan 15s linear infinite;
    will-change: transform;
}

@keyframes scan {
    0% { transform: translateY(-120px); }
    100% { transform: translateY(100vh); }
}

.container {
    width: 1400px;
    max-width: 95%;
    margin: auto;
    padding: 1.5rem 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr 280px; /* Боковые панели по 280px, центр забирает всё свободное место */
    gap: 1.5rem;
    align-items: flex-start;
}

.mini-pane {
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mini-body {
    padding: 1.25rem;
    font-size: 0.85rem;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.5rem 0;
}

.stat-label {
    width: 35px;
    font-weight: bold;
    color: #4ade80;
}

.bar-container {
    flex-grow: 1;
    height: 8px;
    background: #0e1322;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 2px;
    margin: 0 0.75rem;
    overflow: hidden;
}

.bar {
    display: block;
    height: 100%;
    background: #a855f7;
    border-radius: 1px;
    transition: width 0.8s ease-in-out;
}

.stat-val {
    width: 35px;
    text-align: right;
    color: #cbd5e1;
}

.stat-line {
    margin-top: 0.25rem;
}

.calendar-pre {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-top: 0.75rem;
    color: #94a3b8;
}

.log-pane {
    height: 380px;
}

.log-body {
    height: calc(100% - 35px); 
    overflow-y: hidden;
    font-size: 0.8rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.log-line {
    margin-bottom: 0.4rem;
    color: #94a3b8;
    word-break: break-all;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.log-time {
    color: #a855f7;
    margin-right: 0.4rem;
}


@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr; 
        max-width: 850px;
    }
    
    .sidebar-left, .sidebar-right {
        display: none;
    }
}

.terminal-window {
    background: #090d16;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(168, 85, 247, 0.03);
    overflow: hidden;
    position: relative;
}

.terminal-header {
    background: #0e1322;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
    position: relative;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.term-btn.close { background: #ef4444; }
.term-btn.minimize { background: #eab308; }
.term-btn.maximize { background: #22c55e; }

.terminal-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

.terminal-body {
    padding: 2rem;
}

.system-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed rgba(168, 85, 247, 0.2);
    padding-bottom: 1.5rem;
}

.sys-banner-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.sys-logo {
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
}

.sys-title h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.sys-title p {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 0.1rem;
}

.sys-banner-video {
    display: flex;
    align-items: center;
}

.sys-banner-video video {
    width: 64px;   
    height: 64px;  
    border-radius: 8px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
    object-fit: cover;
}

.term-line {
    margin-bottom: 0.3rem;
}

.term-dim {
    color: #475569;
    font-size: 0.85rem;
}

.term-prompt {
    color: #38bdf8;
    font-size: 0.95rem;
    margin: 0.75rem 0;
}

.term-prompt .user {
    color: #4ade80;
}

.term-prompt .path {
    color: #818cf8;
}

.term-prompt .cmd {
    color: #f1f5f9;
}

.motd-output {
    margin: 0.5rem 0 1.5rem 0;
    padding-left: 1.25rem;
    border-left: 2px solid rgba(168, 85, 247, 0.4);
}

.motd-output p {
    font-size: 0.9rem;
    color: #94a3b8;
    font-style: italic;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.term-card {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #cbd5e1;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.term-card:hover {
    background: rgba(168, 85, 247, 0.05);
    border-color: rgba(168, 85, 247, 0.25);
    color: #f1f5f9;
}

.terminal-arrow {
    color: #475569;
    margin-right: 0.75rem;
    font-weight: bold;
    transition: transform 0.2s, color 0.2s;
}

.term-card:hover .terminal-arrow {
    color: #a855f7;
    transform: translateX(4px);
}

.service-details {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.service-name {
    font-size: 1rem;
    font-weight: 600;
}

.service-desc {
    font-size: 0.85rem;
    color: #64748b;
}

.dots-spacer {
    flex-grow: 1;
    border-bottom: 2px dotted rgba(71, 85, 105, 0.4);
    margin: 0 1rem;
    height: 10px;
    align-self: center;
}

.term-card:hover .dots-spacer {
    border-bottom-color: rgba(168, 85, 247, 0.3);
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.status::before {
    content: '[';
    color: #475569;
}

.status::after {
    content: ']';
    color: #475569;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 1px;
    background: #22c55e;
    display: inline-block;
    animation: pulse 2s infinite;
}

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

.neofetch-output {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    padding-left: 1rem;
}

.term-accent {
    color: #a855f7;
    font-weight: bold;
}

.blink-cursor {
    animation: blink 1s step-end infinite;
    color: #a855f7;
}

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

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #090d16;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
    border: 1px solid rgba(168, 85, 247, 0.2);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.4);
}

@media (max-width: 600px) {
    .terminal-body {
        padding: 1.25rem;
    }
    
    .system-banner {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
    }

    .sys-banner-video video {
        width: 48px;
        height: 48px;
    }

    .term-card {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid rgba(168, 85, 247, 0.1);
    }

    .terminal-arrow {
        display: none;
    }

    .service-details {
        flex-direction: column;
        gap: 0.25rem;
    }

    .dots-spacer {
        display: none;
    }

    .status {
        margin-left: auto;
    }
}


.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #05070f; /* Точно такой же цвет фона, как у body */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Поверх абсолютно всего на странице */
    animation: preloaderFadeOut 0.5s ease 2s both; /* Исчезает ровно через 2 секунды */
    pointer-events: none; /* Пропускает клики сквозь себя после исчезновения */
}

/* Анимация растворения заставки */
@keyframes preloaderFadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Круговой неоновый спиннер */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(168, 85, 247, 0.1);
    border-top: 3px solid #a855f7; /* Наш фирменный фиолетовый */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



.terminal-window {
    animation: windowSpawn 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes windowSpawn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(40px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


.main-content .terminal-window {
    animation-delay: 2.1s;
}

.sidebar-left .terminal-window:nth-child(1) {
    animation-delay: 2.35s;
}

.sidebar-left .terminal-window:nth-child(2) {
    animation-delay: 2.5s;
}

.sidebar-right .terminal-window {
    animation-delay: 2.65s;
}