:root {
    --primary: #6f42c1;
    --primary-dark: #5a32a3;
    --primary-light: #8a5fd1;
    --secondary: #f8f9fa;
    --white: #ffffff;
    --text-dark: #343a40;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--secondary);
    color: var(--text-dark);
    font-family: "Montserrat-Medium";
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding-top: 1rem;
}

/* Навигация */
.navbar {
    background-color: var(--white) !important;
    box-shadow: var(--shadow);
}

.navbar-brand {
    color: var(--primary) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: 0.5rem;
}

.navbar .dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--white);
}

h1 {
    margin: 30px;
}

/* Кнопки */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 2rem;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 2rem;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-sm {
    padding: 0.25rem 1rem;
    font-size: 0.875rem;
}

/* Карточки */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: var(--white);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    max-height: 250px;
    width: auto;
    margin: 0 auto;
    display: block;
    object-fit: contain;
    background-color: #f8f9fa;
    border-radius: 0;
}

.card-title {
    color: var(--primary);
    font-weight: 700;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--border-color);
}

/* Формы */
.form-control,
.form-select {
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

/* Комментарии */
.comment-list {
    max-height: 500px;
    overflow-y: auto;
}

.comment-item {
    background-color: var(--secondary);
    border-radius: 1rem;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
}

.comment-author {
    font-weight: 700;
    color: var(--primary);
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-content {
    margin-top: 0.3rem;
    margin-bottom: 0;
}

/* Пагинация */
.pagination .page-link {
    color: var(--primary);
    border: none;
    border-radius: 2rem !important;
    margin: 0 0.2rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.pagination .page-link:hover {
    background-color: var(--primary-light);
    color: var(--white);
}

.pagination .active .page-link {
    background-color: var(--primary);
    color: var(--white);
}

/* Алерты */
.alert {
    border-radius: 1rem;
    border: none;
    box-shadow: var(--shadow);
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    font-weight: 700;
}

/* Ссылки */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

/* Вспомогательные классы */
.text-primary-custom {
    color: var(--primary) !important;
}

.bg-primary-custom {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

.rounded-custom {
    border-radius: 2rem !important;
}

.shadow-custom {
    box-shadow: var(--shadow) !important;
}

.footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 0;
    margin-top: auto;
    color: var(--text-muted);
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .card-img-top {
        height: 150px;
    }

    .btn-primary, .btn-outline-primary {
        padding: 0.4rem 1rem;
    }
}

@font-face {
    font-family: "Montserrat-Medium";
    src: url('./fonts/Montserrat/Montserrat/static/Montserrat-Medium.ttf') format("truetype"); 
    font-style: normal;
    font-weight: normal;
}