/* styles.css - Общие стили для всей документации BuxarTranslate */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    border-radius: 15px;
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 30px 40px;
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 5px;
}

.breadcrumb {
    background: #ecf0f1;
    padding: 15px 40px;
    font-size: 0.9em;
    color: #7f8c8d;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.content {
    padding: 40px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

h2 {
    color: #34495e;
    margin: 30px 0 15px 0;
    padding-left: 15px;
    border-left: 4px solid #3498db;
}

h3 {
    color: #2c3e50;
    margin: 20px 0 10px 0;
}

p {
    margin-bottom: 15px;
    text-align: justify;
}

ul, ol {
    margin: 15px 0;
    padding-left: 30px;
}

li {
    margin-bottom: 8px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

.nav-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1em;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #2980b9;
}

.file-info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.emoji {
    font-size: 1.2em;
    margin-right: 5px;
}

.code-block {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    white-space: pre-wrap; /* Для блоков с кодом */
    word-wrap: break-word;
}

.code-block-links {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    word-wrap: break-word;
    /* БЕЗ white-space: pre-wrap для ссылок */
}

.file-structure {
    background: #34495e;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.step {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #28a745;
}

.step-number {
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.tip {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.toc {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
}

.toc-list {
    columns: 2;
    column-gap: 40px;
}

.toc-item {
    margin-bottom: 12px;
    break-inside: avoid;
}

.toc-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    display: block;
    transition: all 0.3s;
    border-radius: 5px;
    padding-left: 15px;
}

.toc-link:hover {
    color: #2980b9;
    background: #e3f2fd;
    transform: translateX(5px);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.quick-card {
    background: white;
    border: 2px solid #e3f2fd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.quick-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.quick-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.setting-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #ffc107;
}

.setting-name {
    font-weight: bold;
    color: #2c3e50;
}

.setting-default {
    color: #28a745;
    font-family: 'Courier New', monospace;
}

.setting-values {
    color: #6c757d;
    font-size: 0.9em;
}

.api-endpoint {
    background: #27ae60;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.language-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin: 0 2px;
}

.problem-solution {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.problem {
    color: #856404;
    font-weight: bold;
}

.solution {
    color: #0c5460;
    margin-top: 10px;
}

.tip-card {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.tip-header {
    color: #155724;
    font-weight: bold;
    margin-bottom: 10px;
}

.best-practice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.practice-header {
    color: #856404;
    font-weight: bold;
    margin-bottom: 10px;
}

.screenshot {
    background: #2c3e50;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    text-align: center;
}

/* Специальные стили для ссылок */
.code-block a {
    color: #ecf0f1;
    text-decoration: underline;
}

.code-block a:hover {
    color: #ffffff;
    text-decoration: none;
}
/* Добавляем в styles.css новые стили для ссылок */

/* Базовые стили для всех ссылок */
a {
    color: #1a73e8; /* Яркий синий, хорошо видимый на белом фоне */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0d47a1; /* Более темный синий при наведении */
    text-decoration: underline;
}

/* Стили для ссылок в блоках кода (темный фон) */
.code-block a,
.code-block-links a,
.file-structure a,
.api-endpoint a {
    color: #8ab4f8; /* Светло-голубой, хорошо видимый на темном фоне */
    text-decoration: underline;
    font-weight: 500;
}

.code-block a:hover,
.code-block-links a:hover,
.file-structure a:hover,
.api-endpoint a:hover {
    color: #bbdefb; /* Еще светлее при наведении */
    text-decoration: none;
}

/* Стили для ссылок в навигационных кнопках */
.nav-btn {
    color: white !important; /* Белый текст в кнопках */
    text-decoration: none !important;
}

.nav-btn:hover {
    color: white !important;
    text-decoration: none !important;
}

/* Стили для ссылок в хлебных крошках */
.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Стили для ссылок в оглавлении */
.toc-link {
    color: #3498db;
    text-decoration: none;
}

.toc-link:hover {
    color: #2980b9;
    text-decoration: none; /* Подчеркивание уже есть в hover эффекте */
}
/* Цвет для посещенных ссылок на белом фоне */
a:visited {
    color: #6a1b9a; /* Фиолетовый для посещенных ссылок */
}

/* Цвет для посещенных ссылок на темном фоне */
.code-block a:visited,
.code-block-links a:visited,
.file-structure a:visited,
.api-endpoint a:visited {
    color: #ba68c8; /* Светло-фиолетовый для темного фона */
}
/* Новые стили для шапки навигации */
.top-header {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.top-nav {
    display: flex;
    gap: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.top-nav a {
    color: #e3f2fd;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.top-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: #64b5f6;
}

.language-switcher {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.lang-flag {
    font-size: 1.2em;
    margin-right: 5px;
}

.lang-link {
    color: #e3f2fd;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9em;
    border: 1px solid transparent;
}

.lang-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: #4fc3f7;
}

.lang-link.active {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
    color: #a5d6a7;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .top-header {
        padding: 12px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .top-nav {
        gap: 15px;
        justify-content: center;
    }
    
    .language-switcher {
        gap: 8px;
        justify-content: center;
    }
}
