/* style.css - Основные стили Flux документации */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --text-color: #334155;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    transition: all 0.3s ease;
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: #cbd5e1;
}

/* Контейнеры */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* Навигация */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.dark-mode .navbar {
    background: var(--dark-card);
    border-color: #334155;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dark-mode .nav-link {
    color: #cbd5e1;
}

.nav-link:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.dark-mode .nav-link:hover {
    background: #334155;
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.dark-mode .btn-secondary {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Карточки */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dark-mode .card {
    background: var(--dark-card);
    border-color: #334155;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.dark-mode .card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 600;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6 {
    color: #e2e8f0;
}

h1 {
    font-size: 2.5rem;
    margin-top: 2rem;
}

h2 {
    font-size: 2rem;
    margin-top: 3rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

/* Контент */
.content {
    padding: 2rem 0;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Списки */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Код */
code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875em;
    color: #dc2626;
}

.dark-mode code {
    background: #1e293b;
    color: #f87171;
}

pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Таблицы */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dark-mode .table {
    background: var(--dark-card);
}

.table th {
    background: var(--light-bg);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #475569;
}

.dark-mode .table th {
    background: #334155;
    color: #cbd5e1;
}

.table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.dark-mode .table td {
    border-color: #334155;
}

.table tr:hover {
    background: var(--light-bg);
}

.dark-mode .table tr:hover {
    background: #334155;
}

/* Бейджи */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Гриды */
.grid {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Футер */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
}

.dark-mode .footer {
    background: var(--dark-card);
    border-color: #334155;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Навигация страниц */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.dark-mode .page-nav {
    background: var(--dark-card);
    border-color: #334155;
}

.page-info {
    text-align: center;
    color: #64748b;
}

/* FAQ */
.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 1.25rem;
    background: var(--light-bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.dark-mode .faq-question {
    background: #334155;
}

.faq-answer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Уведомления */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #1e40af;
}

.dark-mode .alert-info {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
    color: #92400e;
}

.dark-mode .alert-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--secondary-color);
    color: #065f46;
}

.dark-mode .alert-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color);
    color: #991b1b;
}

.dark-mode .alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Хлебные крошки */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 1.5rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb span {
    color: #94a3b8;
}

/* Поиск */
.search-box {
    position: relative;
    margin: 1.5rem 0;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.dark-mode .search-input {
    background: var(--dark-card);
    border-color: #334155;
    color: #cbd5e1;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .page-nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Прогресс бар */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* Тогглер темы */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Логотип */
.logo-placeholder {
    width: 256px;
    height: 256px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    font-weight: bold;
    margin: 2rem auto;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}