/* Глобальные переменные для цветов */
:root {
    --background-dark: #1a1a1a;
    --text-light: #e0e0e0;
    --card-background: #2a2a2a;
    --primary-color: #ff9800;
    --primary-color-light: #ffb74d;
    --text-muted: #b0b0b0;
    --border-color: #444;
}

/* Базовые стили с принудительным темным режимом */
html, body {
    background-color: var(--background-dark);
    color: var(--text-light);
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-size: 16px;
}

/* Заголовки */
h1 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    font-size: 2rem;
    margin-top: 1.5rem;
}

h2 {
    color: var(--primary-color);
    margin-top: 30px;
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
    margin-top: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

/* Ссылки */
a {
    color: var(--primary-color-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Предупреждения и заметки */
.warning {
    background-color: rgba(255, 152, 0, 0.15);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.step {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.step h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.note {
    background-color: rgba(255, 152, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

/* Изображения */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid var(--border-color);
    display: block;
}

.screenshot {
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.screenshot-container {
    text-align: center;
    margin: 25px 0;
}

.screenshot-caption {
    font-style: italic;
    color: var(--text-muted);
    margin-top: 8px;
    font-size: 0.9em;
}

/* Списки */
ul, ol {
    padding-left: 25px;
}

li {
    margin-bottom: 10px;
}

/* Блоки кода */
code {
    background-color: var(--card-background);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Monaco, 'Courier New', monospace;
    font-size: 0.9em;
}

pre {
    background-color: var(--card-background);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* Футер */
.footer {
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Навигация */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin: 40px 0 20px;
}

.nav-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: center;
}

.nav-button:hover {
    background-color: var(--primary-color-light);
    text-decoration: none;
}

/* Оглавление */
.table-of-contents {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.toc-mobile-button {
    display: none;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}

.toc-mobile-button:hover {
    background-color: var(--primary-color-light);
}

/* Кнопка "Наверх" */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

.back-to-top:hover {
    background-color: var(--primary-color-light);
    text-decoration: none;
}

/* Переключатель языков */
.language-toggle {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.language-toggle a {
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 20px;
    text-decoration: none;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    transition: background-color 0.3s;
}

.language-toggle a:hover {
    background-color: var(--primary-color-light);
    text-decoration: none;
}

/* Главная страница */
.container {
    display: flex;
    flex-direction: column;
    min-height: 80vh;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.language-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.language-card {
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 300px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.language-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.language-title {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.language-desc {
    margin-bottom: 25px;
    color: var(--text-muted);
}

.language-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.language-btn:hover {
    background-color: var(--primary-color-light);
    text-decoration: none;
}

.logo {
    max-width: 100px;
    margin-bottom: 20px;
    filter: brightness(0.8) contrast(1.2);
}

/* Анимация выделения секции */
.highlight-section {
    animation: highlight-fade 2s ease-in-out;
}

@keyframes highlight-fade {
    0% { background-color: rgba(255, 152, 0, 0.25); }
    100% { background-color: transparent; }
}

/* Мобильные стили */
@media (max-width: 768px) {
    body {
        padding: 15px;
        font-size: 16px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .step, .warning, .note {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .screenshot {
        max-width: 100%;
    }
    
    .language-card {
        width: 100%;
        margin-bottom: 20px;
        padding: 20px;
    }
    
    .language-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-button {
        width: 100%;
        padding: 12px 0;
    }
    
    .table-of-contents {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0 15px;
        margin: 0;
    }
    
    .table-of-contents.open {
        max-height: 800px;
        padding: 15px;
        margin: 15px 0;
    }
    
    .toc-mobile-button {
        display: block;
    }
    
    a {
        padding: 5px 0;
        display: inline-block;
    }
    
    code {
        word-break: break-word;
    }
    
    pre {
        white-space: pre-wrap;
    }
    
    .back-to-top {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 15px;
        right: 15px;
    }
    
    ul, ol {
        padding-left: 20px;
    }
    
    li {
        margin-bottom: 15px;
    }
}

/* Скроллбар для webkit-браузеров */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--card-background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color-light);
}