:root {
   --bg-dark: #0f0c29;
   --sidebar-width: 280px;
   --sidebar-bg: rgba(35, 20, 65, 0.98);
   /* Чуть насыщеннее фиолетовый */
   --accent-glow: #6e45e2;
   --admin-gold: #ffcc33;
   /* Цвет для админ-кнопок */
   --text-main: #e0e0e0;
   --text-bright: #ffffff;
   --border-color: rgba(255, 255, 255, 0.08);
   --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
   background: linear-gradient(135deg, #0f0c29 0%, #1a1a2e 100%);
   background-attachment: fixed;
   color: var(--text-main);
   margin: 0;
   display: flex;
}

/* Sidebar */
#sidebar-wrapper {
   width: var(--sidebar-width);
   height: 100vh;
   background: var(--sidebar-bg);
   border-right: 1px solid var(--border-color);
   position: fixed;
   left: 0;
   top: 0;
   z-index: 1000;
   display: flex;
   flex-direction: column;
   box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

#page-content-wrapper {
   flex: 1;
   margin-left: var(--sidebar-width);
   min-height: 100vh;
   position: relative;
   padding: 100px 50px 50px 50px;
}

/* Кнопки меню */
.list-group-item {
   background: transparent !important;
   color: var(--text-main) !important;
   border: none !important;
   margin: 4px 15px;
   padding: 12px 20px;
   border-radius: 12px !important;
   transition: var(--transition);
   text-decoration: none;
   display: block;
}

.list-group-item:hover {
   background: rgba(110, 69, 226, 0.2) !important;
   color: var(--text-bright) !important;
   padding-left: 30px;
}

/* Специальный цвет для Админ-кнопок */
.admin-link {
   color: var(--admin-gold) !important;
   font-weight: 500;
}

.admin-link:hover {
   background: rgba(255, 204, 51, 0.15) !important;
   color: #fff !important;
}

.list-group-item.active {
   background: linear-gradient(90deg, var(--accent-glow), #8631ff) !important;
   box-shadow: 0 4px 15px rgba(110, 69, 226, 0.3);
}

/* Блок статуса: исправляем читаемость */
.admin-status-sidebar {
   margin-top: auto;
   padding: 25px 20px;
   background: rgba(0, 0, 0, 0.4);
   border-top: 1px solid var(--border-color);
}

.admin-status-sidebar .system-label {
   color: var(--admin-gold);
   font-weight: bold;
   letter-spacing: 1px;
   font-size: 0.85rem;
   margin-bottom: 8px;
   display: block;
}

.admin-status-sidebar .system-info {
   color: #ced4da !important;
   /* Светло-серый, хорошо виден на темном */
   font-size: 0.75rem;
   line-height: 1.6;
}

/* Кнопки авторизации */
.top-auth-bar {
   position: absolute;
   top: 30px;
   right: 50px;
   z-index: 1001;
}

.btn-primary {
   background: linear-gradient(45deg, #6e45e2, #8631ff);
   border: none;
   border-radius: 25px;
   padding: 10px 30px;
   font-weight: 600;
}

/* Фильтр разделов */
.section-nav {
   display: flex;
   gap: 10px;
   margin-bottom: 30px;
   flex-wrap: wrap;
}

.section-link {
   background: rgba(255, 255, 255, 0.05);
   color: var(--text-muted);
   padding: 8px 20px;
   border-radius: 20px;
   text-decoration: none;
   border: 1px solid var(--border-color);
   transition: var(--transition);
}

.text-muted {
   color: #ffffff !important;
}

.section-link:hover,
.section-link.active {
   background: var(--accent-glow);
   color: #fff;
   border-color: var(--accent-glow);
}

/* Улучшенная читаемость текста в карточках */
.card-body {
   color: #e0e0e0;
}

.author-label {
   color: #b0b0b0;
   /* Светло-серый для слова "Автор" */
   font-size: 0.85rem;
}

.author-highlight {
   color: #00d4ff !important;
   /* Яркий голубой для имени */
   font-weight: 600;
   text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

.publish-date {
   color: #888;
   font-size: 0.8rem;
}

.fragment-preview {
   color: #d1d1d1 !important;
   /* Делаем текст превью светлее */
   font-size: 0.95rem;
   line-height: 1.6;
   margin-top: 10px;
   min-height: 3em;
}

/* Кнопка "Читать манускрипт" */
.read-more-link {
   color: #8631ff !important;
   font-weight: bold;
   text-transform: uppercase;
   font-size: 0.75rem;
   letter-spacing: 1px;
   text-decoration: none;
   transition: var(--transition);
}

/* Базовое состояние карточки */
.card {
   background: rgba(30, 30, 50, 0.7);
   backdrop-filter: blur(10px);
   border-radius: 20px;
   border: 1px solid rgba(255, 255, 255, 0.05) !important;
   transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
   /* Пружинистая анимация */
   cursor: pointer;
   position: relative;
   overflow: hidden;
}

/* Эффект при наведении */
.card:hover {
   transform: translateY(-8px) scale(1.02);
   /* Всплытие и легкое увеличение */
   background: rgba(45, 27, 78, 0.8) !important;
   border-color: rgba(110, 69, 226, 0.5) !important;
   box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5),
      0 0 20px rgba(110, 69, 226, 0.3);
   /* Глубокая тень + неоновое свечение */
}

/* Анимация внутренней полоски при наведении */
.card .top-line {
   height: 4px;
   width: 100%;
   background: linear-gradient(90deg, #6e45e2, #8631ff);
   transition: all 0.4s ease;
   opacity: 0.6;
}

.card:hover .top-line {
   opacity: 1;
   filter: brightness(1.3);
}

/* Оживляем текст кнопки при наведении на карточку */
.card:hover .read-more-link {
   color: #00d4ff !important;
   letter-spacing: 2px;
   /* Раздвигаем буквы при наведении */
}