/* Основные стили приложения IPSC Training Bot */

:root {
    --ipsc-red: #dc3545;
    --ipsc-dark: #343a40;
    --ipsc-light: #f8f9fa;
}

.header-bg {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8));
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
}

/* Создаем текстуру фона с помощью CSS */
.header-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(220, 53, 69, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(220, 53, 69, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 49%, rgba(220, 53, 69, 0.05) 50%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, rgba(220, 53, 69, 0.05) 50%, transparent 51%);
    background-size: 300% 300%, 300% 300%, 50px 50px, 50px 50px;
    animation: bg-move 60s linear infinite;
    z-index: -1;
}

@keyframes bg-move {
    0% { background-position: 0% 0%, 100% 100%, 0 0, 0 0; }
    100% { background-position: 100% 100%, 0% 0%, 100px 100px, 100px 100px; }
}

.sidebar {
    background-color: var(--ipsc-light);
    min-height: calc(100vh - 200px);
    border-right: 1px solid #dee2e6;
}

.nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--ipsc-red);
    color: white;
    transform: translateX(5px);
}

.dropdown-menu {
    background-color: white;
    border: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #495057;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--ipsc-red);
}

.dropdown-item.active {
    background-color: var(--ipsc-red);
    color: white;
}

.sidebar .dropdown-toggle::after {
    margin-left: auto;
}

.main-content {
    background-color: white;
    min-height: calc(100vh - 200px);
}

.article-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid transparent;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-left-color: var(--ipsc-red);
}

.training-badge {
    font-size: 0.8em;
}

.markdown-content h1, .markdown-content h2, .markdown-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--ipsc-dark);
}

.markdown-content h1 {
    border-bottom: 3px solid var(--ipsc-red);
    padding-bottom: 0.5rem;
}

.markdown-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.markdown-content ul, .markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.markdown-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #d63384;
    font-family: 'Courier New', monospace;
}

.markdown-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1rem;
    border-left: 4px solid var(--ipsc-red);
}

.markdown-content blockquote {
    border-left: 4px solid var(--ipsc-red);
    padding-left: 1rem;
    margin-left: 0;
    color: #6c757d;
    font-style: italic;
    background-color: rgba(220, 53, 69, 0.05);
    padding: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.modal-header-ipsc {
    background-color: var(--ipsc-red);
    color: white;
}

.btn-ipsc {
    background-color: var(--ipsc-red);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-ipsc:hover {
    background-color: #c82333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-ipsc-outline {
    background-color: transparent;
    color: var(--ipsc-red);
    border: 2px solid var(--ipsc-red);
    transition: all 0.3s ease;
}

.btn-ipsc-outline:hover {
    background-color: var(--ipsc-red);
    color: white;
    transform: translateY(-2px);
}

.ipsc-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .header-bg::before {
        animation-duration: 120s;
    }
}

