/* Основные стили в ASCII тематике */
:root {
    --bg-color: #050505;
    --text-color: #00ff00;
    --border-color: #00ff00;
    --hover-bg: #001a00;
    --accent-color: #00cc00;
    --link-color: #00ff00;
    --visited-color: #00aa00;
    --loading-bg: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

/* Экран загрузки */
.loading-screen {
    background-color: var(--loading-bg);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

.loading-logo {
    font-size: 12px;
    line-height: 1.2;
    margin-bottom: 30px;
    animation: glow 1s ease-in-out infinite; /* Ускорена анимация */
}

.loading-animation {
    width: 90%;
    max-width: 800px;
}

#loading-bar {
    font-size: 12px;
    margin-bottom: 20px;
    animation: pulse 0.8s ease-in-out infinite; /* Ускорена анимация */
}

.loading-status {
    font-size: 11px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.loading-details {
    font-size: 10px;
    color: var(--text-color);
    opacity: 0.8;
}

/* Анимации загрузки */
@keyframes glow {
    0%, 100% { 
        text-shadow: 0 0 5px rgba(0, 255, 0, 0.5),
                     0 0 10px rgba(0, 255, 0, 0.3); 
    }
    50% { 
        text-shadow: 0 0 20px rgba(0, 255, 0, 0.8),
                     0 0 40px rgba(0, 255, 0, 0.6),
                     0 0 80px rgba(0, 255, 0, 0.4); 
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { 
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-screen.fade-out {
    animation: fadeOut 0.3s ease-out forwards; /* Ускорено с 0.5s до 0.3s */
}

#main-content {
    animation: slideIn 0.5s ease-out; /* Ускорено с 0.8s до 0.5s */
}

/* Основной контейнер */
.ascii-container {
    max-width: 1200px;
    margin: 0 auto;
}

.ascii-header {
    font-size: 12px;
    line-height: 1.2;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.ascii-subtitle {
    font-size: 14px;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 40px;
}

/* Навигационная сетка */
.navigation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.nav-button {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    transition: all 0.3s ease;
}

.nav-button pre {
    background-color: transparent;
    padding: 0;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.2;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.nav-button:hover pre {
    color: #ffffff;
    background-color: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.nav-button:active pre {
    transform: translateY(0);
}

/* Футер */
.ascii-footer {
    margin-top: 50px;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
}

/* Стили для внутренних страниц */
.content-page {
    background-color: var(--bg-color);
    min-height: 100vh;
}

.back-button {
    display: inline-block;
    text-decoration: none;
    color: var(--text-color);
    margin: 20px 0;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.back-button:hover {
    background-color: var(--hover-bg);
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.page-title {
    font-size: 24px;
    color: var(--accent-color);
    text-align: center;
    margin: 30px 0;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
}

.content-section {
    background-color: rgba(0, 255, 0, 0.03);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin: 20px 0;
    border-radius: 3px;
}

.content-section h2 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.content-section h3 {
    color: var(--text-color);
    margin: 15px 0 10px 0;
    font-size: 16px;
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.content-section ul, 
.content-section ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.content-section li {
    margin-bottom: 8px;
}

.ascii-decoration {
    color: var(--accent-color);
    font-weight: bold;
}

/* Специальные стили для ASCII-таблиц */
.ascii-table {
    color: var(--accent-color);
    background-color: var(--bg-color);
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
    font-size: 11px;
    line-height: 1.4;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navigation-grid {
        grid-template-columns: 1fr;
    }
    
    .ascii-header {
        font-size: 8px;
    }
    
    .nav-button pre {
        font-size: 10px;
    }
    
    .content-section {
        padding: 15px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .loading-logo {
        font-size: 8px;
    }
    
    #loading-bar {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .ascii-header {
        font-size: 6px;
    }
    
    .nav-button pre {
        font-size: 8px;
    }
    
    .loading-logo {
        font-size: 5px;
    }
    
    #loading-bar {
        font-size: 8px;
    }
}

/* Анимации */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cursor {
    animation: blink 1s infinite;
}