@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fira+Code:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap');

:root {
  --primary-bg: linear-gradient(135deg, #0a1a2a 0%, #050d15 100%);
  --panel-bg: #151827;
  --panel-border: #252a3d;
  --text-main: #e5edf9;
  --text-muted: #9fb2d0;
  --accent: #00a2ff;
  --accent-soft: rgba(0, 162, 255, 0.15);
}

/* ---------- базовая тёмная тема для wiki ---------- */

html[data-theme="dark"] body {
  background: #050814;
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] body.home-page,
html[data-theme="dark"] body.login-page,
html[data-theme="dark"] body.profile-page,
html[data-theme="dark"] body.editor-page {
  background: var(--primary-bg);
}

/* контент и сайдбары */

html[data-theme="dark"] body.wiki-dark .td-outer {
  background: transparent;
}

html[data-theme="dark"] body.wiki-dark .td-main {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

html[data-theme="dark"] body.wiki-dark .td-sidebar,
html[data-theme="dark"] body.wiki-dark .td-sidebar-toc {
  background: rgba(7, 12, 26, 0.98);
  border-right: 1px solid rgba(0, 162, 255, 0.18);
  color: var(--text-main);
}

html[data-theme="dark"] body.wiki-dark .td-sidebar-toc .td-toc,
html[data-theme="dark"] body.wiki-dark .td-sidebar-toc .td-toc__title__text {
  color: #f5f7ff !important;
}

html[data-theme="dark"] body.wiki-dark .td-sidebar-toc a {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] body.wiki-dark .td-sidebar-toc a:hover,
html[data-theme="dark"] body.wiki-dark .td-sidebar-toc a.active {
  color: var(--accent) !important;
}

html[data-theme="dark"] body.wiki-dark .td-sidebar-toc ul,
html[data-theme="dark"] body.wiki-dark .td-sidebar-toc li {
  color: var(--text-main) !important;
}

html[data-theme="dark"] body.wiki-dark .td-content {
  background: rgba(15, 20, 35, 0.95);
  border-radius: 18px;
  border: 1px solid rgba(0, 162, 255, 0.16);
  padding: 2.25rem 2.25rem 2.5rem;
  box-shadow: 0 24px 70px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.4);
  color: var(--text-main);
}

html[data-theme="dark"] body.wiki-dark h1,
html[data-theme="dark"] body.wiki-dark h2,
html[data-theme="dark"] body.wiki-dark h3,
html[data-theme="dark"] body.wiki-dark h4 {
  color: #f5f7ff;
}

html[data-theme="dark"] body.wiki-dark .page-meta,
html[data-theme="dark"] body.wiki-dark .lead,
html[data-theme="dark"] body.wiki-dark .reading-time {
  color: var(--text-muted);
}

html[data-theme="dark"] body.wiki-dark a {
  color: var(--accent);
}

html[data-theme="dark"] body.wiki-dark a:hover {
  color: #ffffff;
}

/* таблицы */

html[data-theme="dark"] body.wiki-dark table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: linear-gradient(135deg, rgba(20, 15, 40, 0.9) 0%, rgba(30, 27, 56, 0.9) 100%);
  border-radius: 12px;
  overflow: hidden;
}

html[data-theme="dark"] body.wiki-dark th,
html[data-theme="dark"] body.wiki-dark td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(47,163,255,0.18);
}

html[data-theme="dark"] body.wiki-dark th {
  background: linear-gradient(135deg, rgba(47,163,255,0.24) 0%, rgba(47,163,255,0.14) 100%);
  color: #cfe7ff;
  font-weight: 600;
}

html[data-theme="dark"] body.wiki-dark tr:hover td {
  background: rgba(47,163,255,0.08);
}

/* ---------- кибер фон --------- */

html[data-theme="dark"] .cyber-grid {
  background-image:
    linear-gradient(rgba(0, 162, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 162, 255, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

html[data-theme="dark"] .cyber-radial {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 162, 255, 0.13) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 162, 255, 0.06) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

html[data-theme="dark"] .cyber-scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 162, 255, 0.03) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 0;
}

/* ---------- карточки / инпуты / кнопки --------- */

.cyber-card {
  background: rgba(26, 24, 48, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(45, 43, 66, 0.6);
  border-radius: 14px;
  transition: all 0.25s ease;
}

.cyber-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.cyber-input {
  background: rgba(30, 27, 56, 0.7);
  border: 1px solid rgba(0, 162, 255, 0.3);
  border-radius: 10px;
  color: var(--text-main);
}

.cyber-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.25);
  outline: none;
}

.cyber-button,
.submit-button {
  background: linear-gradient(90deg, #0066CC 0%, #00A2FF 100%);
  border-radius: 10px;
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  width: 100%;
  box-shadow: 0 12px 26px rgba(0,162,255,0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.cyber-button:hover,
.submit-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 16px 32px rgba(0,162,255,0.5);
}

/* ---------- навбар и переключатель темы ---------- */

.nav-blueprint {
  background: #050814;
  border-bottom: 1px solid #1e2537;
  color: #e2ecff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.nav-blueprint .navbar-brand,
.nav-blueprint .nav-link,
.nav-blueprint .dropdown-item,
.nav-blueprint .btn {
  color: #e2ecff;
}

.nav-blueprint .nav-link {
  border-radius: 6px;
  padding: 8px 12px;
}

.nav-blueprint .nav-link.active,
.nav-blueprint .nav-link:hover {
  color: var(--accent);
  background: rgba(0, 162, 255, 0.08);
}

/* Исправление: имя пользователя в dropdown всегда видимо */
.nav-blueprint .dropdown-toggle,
.nav-blueprint .dropdown-toggle.show,
.nav-blueprint .dropdown.show .dropdown-toggle,
.nav-blueprint .nav-link.dropdown-toggle {
  color: #e2ecff !important;
}

.nav-blueprint .dropdown-toggle:hover,
.nav-blueprint .dropdown-toggle:focus {
  color: var(--accent) !important;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(47,163,255,0.5);
  background: radial-gradient(circle at 30% 20%, rgba(47,163,255,0.28), rgba(5,13,21,0.95));
  box-shadow: 0 0 0 1px rgba(5,13,21,0.9), 0 8px 20px rgba(0,0,0,0.6);
  color: #dce7f5;
}

body.home-page .theme-toggle-btn,
body.login-page .theme-toggle-btn,
body.profile-page .theme-toggle-btn,
body.admin-page .theme-toggle-btn,
body.editor-page .theme-toggle-btn {
  display: none !important;
}

/* ---------- страница логина ---------- */

.login-container {
  max-width: 520px;
  margin: 0 auto 64px;
}

.login-form {
  background: rgba(15, 20, 35, 0.95);
  border: 1px solid rgba(47,163,255,0.18);
  border-radius: 18px;
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.65);
}

.login-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo-circle {
  width: 7rem;
  height: 7rem;
  border-radius: 1.25rem;
  background: radial-gradient(circle at 30% 20%, rgba(47,163,255,0.7), rgba(0,184,255,0.35));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(0,0,0,0.9), 0 0 45px rgba(47,163,255,0.8);
}

.login-logo-circle img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* ---------- страница профиля ---------- */

html[data-theme="dark"] body.profile-page {
  background: var(--primary-bg);
}

html[data-theme="dark"] body.profile-page .content-wrapper {
  background: transparent;
}

html[data-theme="dark"] body.profile-page .cyber-card {
  color: var(--text-main);
}

html[data-theme="dark"] body.profile-page .cyber-card h2,
html[data-theme="dark"] body.profile-page .cyber-card h3,
html[data-theme="dark"] body.profile-page .cyber-card h4,
html[data-theme="dark"] body.profile-page .cyber-card .h4,
html[data-theme="dark"] body.profile-page .cyber-card .h5 {
  color: #f5f7ff;
}

html[data-theme="dark"] body.profile-page .cyber-card .small,
html[data-theme="dark"] body.profile-page .cyber-card .text-muted {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] body.profile-page .cyber-card input,
html[data-theme="dark"] body.profile-page .cyber-card textarea {
  color: var(--text-main);
}

/* ---------- blockquote в тёмной теме ---------- */

html[data-theme="dark"] body.wiki-dark blockquote {
  border-left: 3px solid rgba(0,162,255,0.6);
  background: rgba(10, 20, 40, 0.9);
  color: var(--text-main);
}

html[data-theme="dark"] body.wiki-dark blockquote p {
  color: var(--text-main);
}

/* ---------- хлебные крошки (breadcrumb) в тёмной теме ---------- */

html[data-theme="dark"] body.wiki-dark .breadcrumb {
  color: var(--text-muted);
}

html[data-theme="dark"] body.wiki-dark .breadcrumb a {
  color: var(--accent);
}

html[data-theme="dark"] body.wiki-dark .breadcrumb a:hover {
  color: #ffffff;
}

html[data-theme="dark"] body.wiki-dark .breadcrumb .active {
  color: var(--text-main);
}

/* ---------- главная страница: стеклянные карточки и статистика ---------- */

html[data-theme="dark"] body.home-page .glass-card {
  background: rgba(12, 18, 32, 0.9);
  border: 1px solid rgba(0, 162, 255, 0.18);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.5);
  color: var(--text-main);
}

html[data-theme="dark"] body.home-page .glass-card.hoverable:hover {
  border-color: rgba(0, 162, 255, 0.6);
  box-shadow: 0 24px 70px rgba(0,0,0,0.8), 0 0 0 1px rgba(0,162,255,0.4);
  transform: translateY(-4px);
}

html[data-theme="dark"] body.home-page .glass-card .text-muted,
html[data-theme="dark"] body.home-page .glass-card .small {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] body.home-page .glass-card .h3,
html[data-theme="dark"] body.home-page .glass-card h3,
html[data-theme="dark"] body.home-page .glass-card h5 {
  color: #f5f7ff;
}


/* ---------- выпадающее меню профиля в навбаре ---------- */

.nav-blueprint .dropdown-menu {
  background: #050814;
  border: 1px solid #1e2537;
  box-shadow: 0 14px 40px rgba(0,0,0,0.75);
}

.nav-blueprint .dropdown-item {
  color: #e2ecff;
}

.nav-blueprint .dropdown-item:hover {
  background: #111a33;
  color: var(--accent);
}

/* ---------- ссылки внутри плиток поддержки на главной ---------- */

html[data-theme="dark"] body.home-page .support-tile a {
  color: var(--accent);
  text-decoration: none;
}

html[data-theme="dark"] body.home-page .support-tile a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ---------- кнопки-разделы под заголовком на главной ---------- */

html[data-theme="dark"] body.home-page .home-hero .btn-primary {
  background: linear-gradient(90deg, #ffffff 0%, #dfe5ff 100%);
  color: #151827;
  border: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

html[data-theme="dark"] body.home-page .home-hero .btn-outline-primary {
  border-color: rgba(255,255,255,0.6);
  color: #e5edf9;
  background: rgba(5, 8, 20, 0.4);
}

html[data-theme="dark"] body.home-page .home-hero .btn-outline-primary:hover {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}

/* ---------- административная панель (общий фон) ---------- */

html[data-theme="dark"] body.admin-page {
  background: var(--primary-bg);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] body.admin-page .content-wrapper {
  background: radial-gradient(circle at top, rgba(0, 162, 255, 0.18), transparent 55%),
              radial-gradient(circle at bottom, rgba(0, 162, 255, 0.15), transparent 55%);
}

/* Центральная «карта» админки */
html[data-theme="dark"] body.admin-page main.content-wrapper > .container {
  max-width: 1440px;
  background: rgba(10, 16, 32, 0.96);
  border-radius: 24px;
  border: 1px solid rgba(0, 162, 255, 0.35);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.85),
    0 0 60px rgba(0, 162, 255, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.9);
  padding: 2.5rem 2.25rem 2.75rem;
}

/* Тёмная «карта» для блока с таблицей пользователей в админке */
html[data-theme="dark"] body.admin-page section.cyber-card {
  background: linear-gradient(135deg, rgba(18, 20, 40, 0.98), rgba(6, 10, 26, 0.98));
  border-color: rgba(0, 162, 255, 0.32);
  color: var(--text-main);
}

/* Таблица в админке: перекрываем общие wiki-dark стили,
   делаем тёмные строки и светлый текст */
html[data-theme="dark"] body.admin-page section.cyber-card table.table {
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  margin: 0;
}

html[data-theme="dark"] body.admin-page section.cyber-card thead th {
  background: linear-gradient(135deg, rgba(10, 52, 120, 0.95), rgba(0, 116, 217, 0.95));
  color: #f5f7ff;
  border-bottom: 1px solid rgba(0, 162, 255, 0.45);
  font-size: 0.9rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

html[data-theme="dark"] body.admin-page section.cyber-card tbody tr td {
  background: rgba(10, 16, 32, 0.98);
  color: #e2ecff;
  border-bottom: 1px solid rgba(37, 68, 120, 0.9);
  font-size: 0.9rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

html[data-theme="dark"] body.admin-page section.cyber-card tbody tr:nth-child(even) td {
  background: rgba(12, 20, 40, 0.98);
}

html[data-theme="dark"] body.admin-page section.cyber-card tbody tr:hover td {
  background: rgba(14, 32, 70, 0.98);
}

/* Карточки статистики админки */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.admin-page header {
  margin-bottom: 2.5rem;
}

.admin-page header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.1rem;
  letter-spacing: 0.04em;
}

.admin-page header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-stats-card {
  background: linear-gradient(135deg, rgba(26, 24, 48, 0.98), rgba(14, 20, 40, 0.98));
  border-radius: 14px;
  border: 1px solid rgba(0, 162, 255, 0.35);
  padding: 1.25rem 1.5rem;
  box-shadow:
    0 14px 40px rgba(0,0,0,0.7),
    0 0 35px rgba(0,162,255,0.25);
}

.admin-stats-card-title {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-stats-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: #7dd3fc;
}

/* Модальное окно добавления пользователя */
html[data-theme="dark"] body.admin-page #add-user-modal {
  backdrop-filter: blur(10px);
}

html[data-theme="dark"] body.admin-page .admin-modal-form {
  background: radial-gradient(circle at top, rgba(0,162,255,0.18), transparent 65%),
              rgba(10,16,32,0.98);
  border-radius: 20px;
  border: 1px solid rgba(0,162,255,0.5);
  box-shadow:
    0 28px 70px rgba(0,0,0,0.9),
    0 0 40px rgba(0,162,255,0.35);
  max-width: 640px;
  width: 100%;
  color: var(--text-main);
  padding: 2rem 2.25rem 2.25rem;
}

html[data-theme="dark"] body.admin-page .admin-modal-header .cyber-glow {
  font-family: 'Orbitron', sans-serif;
}

/* Кнопки действий в таблице пользователей */
html[data-theme="dark"] body.admin-page td.admin-actions-cell {
  text-align: right;
  white-space: nowrap;
}

html[data-theme="dark"] body.admin-page .admin-actions-group {
  display: inline-flex;
  gap: 0.25rem;
}

html[data-theme="dark"] body.admin-page .admin-icon-btn {
  background: rgba(10, 30, 60, 0.95);
  border-radius: 999px;
  border: 1px solid rgba(0, 162, 255, 0.6);
  color: #e0f0ff;
  padding: 0.2rem 0.55rem;
  font-size: 0.9rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(0, 162, 255, 0.4);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

html[data-theme="dark"] body.admin-page .admin-icon-btn:hover {
  background: rgba(0, 40, 90, 0.95);
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(0, 162, 255, 0.75);
  transform: translateY(-1px);
}

html[data-theme="dark"] body.admin-page .admin-icon-btn:active {
  transform: translateY(0);
  box-shadow: 0 0 6px rgba(0, 162, 255, 0.6);
}

html[data-theme="dark"] body.admin-page .admin-modal-header .text-muted {
  color: #b0c4de !important;
}

html[data-theme="dark"] body.admin-page .admin-modal-form .form-label {
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

html[data-theme="dark"] body.admin-page .admin-modal-form .form-control,
html[data-theme="dark"] body.admin-page .admin-modal-form .form-select {
  background: rgba(20,24,48,0.95);
  border-radius: 10px;
  color: var(--text-main);
  border: 1px solid rgba(0,162,255,0.3);
}

html[data-theme="dark"] body.admin-page .admin-modal-form .form-control:focus,
html[data-theme="dark"] body.admin-page .admin-modal-form .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,162,255,0.35);
}

html[data-theme="dark"] body.admin-page .admin-modal-form .form-control::placeholder,
html[data-theme="dark"] body.admin-page .admin-modal-form .form-select::placeholder {
  color: rgba(229,237,249,0.55);
}

/* Placeholder для всех cyber-input на admin-page */
html[data-theme="dark"] body.admin-page .cyber-input::placeholder,
body.admin-page .cyber-input::placeholder {
  color: rgba(229,237,249,0.6) !important;
}

/* Placeholder для поиска на главной странице */
html[data-theme="dark"] body.home-page .td-search__input::placeholder,
html[data-theme="dark"] body.home-page .form-control::placeholder,
body.home-page .td-search__input::placeholder,
body.home-page .form-control::placeholder {
  color: rgba(229,237,249,0.6) !important;
}

html[data-theme="dark"] body.home-page .td-search__input,
body.home-page .td-search__input {
  color: #ffffff !important;
  background: rgba(10, 20, 35, 0.8) !important;
}

html[data-theme="dark"] body.admin-page .admin-modal-form .row.g-3 {
  row-gap: 1.1rem;
}

/* Блоки массовых действий и настроек системы */
html[data-theme="dark"] body.admin-page .admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

html[data-theme="dark"] body.admin-page .admin-actions-grid .cyber-card {
  background: rgba(26, 24, 48, 0.95);
  border: 1px solid rgba(0, 162, 255, 0.35);
}

html[data-theme="dark"] body.admin-page .admin-actions-grid .cyber-glow {
  color: #ffffff;
  font-weight: 600;
}

html[data-theme="dark"] body.admin-page .admin-actions-grid .fw-semibold {
  color: #ffffff;
}

html[data-theme="dark"] body.admin-page .admin-actions-grid .text-muted {
  color: #b0c4de !important;
}

html[data-theme="dark"] body.admin-page .admin-actions-grid .btn-outline-light {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

html[data-theme="dark"] body.admin-page .admin-actions-grid .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

/* Пагинация и выбор размера страницы */
html[data-theme="dark"] body.admin-page #pagination-info {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] body.admin-page #pagination-controls .btn {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(30, 27, 56, 0.7);
}

html[data-theme="dark"] body.admin-page #pagination-controls .btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

html[data-theme="dark"] body.admin-page #pagination-controls .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

html[data-theme="dark"] body.admin-page #pagination-controls .btn-primary {
  background: linear-gradient(90deg, #0066CC 0%, #00A2FF 100%);
  border-color: #00A2FF;
}

html[data-theme="dark"] body.admin-page #page-size-select {
  color: var(--text-main) !important;
}

html[data-theme="dark"] body.admin-page #page-size-select option {
  background: rgba(30, 27, 56, 0.95);
  color: var(--text-main);
}

/* Чекбоксы в таблице */
html[data-theme="dark"] body.admin-page .user-checkbox,
html[data-theme="dark"] body.admin-page #select-all-users {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #00A2FF;
}

/* ---------- страница редактора ---------- */

/* Стили для editor-page - точно как в шаблоне new-design-editor.html */
html[data-theme="dark"] body.editor-page,
body.editor-page {
  background: linear-gradient(135deg, #0a1a2a 0%, #050d15 100%) !important;
  min-height: 100vh;
  color: #ffffff;
}

html[data-theme="dark"] body.editor-page .nav-blueprint,
body.editor-page .nav-blueprint {
  background: rgba(10, 20, 35, 0.95) !important;
  border-bottom: 1px solid rgba(47, 163, 255, 0.2);
  backdrop-filter: blur(10px);
}

html[data-theme="dark"] body.editor-page .nav-blueprint .navbar-brand,
html[data-theme="dark"] body.editor-page .nav-blueprint .nav-link,
html[data-theme="dark"] body.editor-page .nav-blueprint .dropdown-item,
body.editor-page .nav-blueprint .navbar-brand,
body.editor-page .nav-blueprint .nav-link,
body.editor-page .nav-blueprint .dropdown-item {
  color: #e2ecff !important;
}

html[data-theme="dark"] body.editor-page .nav-blueprint .nav-link.active,
body.editor-page .nav-blueprint .nav-link.active {
  color: var(--accent) !important;
  background: rgba(0, 162, 255, 0.08) !important;
}

html[data-theme="dark"] body.editor-page .td-outer,
body.editor-page .td-outer {
  background: transparent !important;
  padding-top: 0;
}

html[data-theme="dark"] body.editor-page .td-main,
body.editor-page .td-main {
  background: transparent !important;
  padding-top: 0;
  padding-bottom: 0;
}

html[data-theme="dark"] body.editor-page main,
body.editor-page main {
  background: transparent !important;
}

html[data-theme="dark"] body.editor-page .container-fluid,
body.editor-page .container-fluid {
  background: transparent !important;
}

html[data-theme="dark"] body.editor-page .editor-page-container {
  min-height: calc(100vh - 64px);
  position: relative;
}

html[data-theme="dark"] body.editor-page .editor-header {
  background: linear-gradient(135deg, rgba(10, 26, 42, 0.95) 0%, rgba(13, 27, 42, 0.95) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 2px solid rgba(0, 162, 255, 0.3);
  padding: 2rem 0;
  margin-bottom: 2rem;
}

html[data-theme="dark"] body.editor-page .editor-header .cyber-title {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 162, 255, 0.5);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

html[data-theme="dark"] body.editor-page .editor-header .text-muted {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] body.editor-page .editor-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  background: rgba(26, 24, 48, 0.7);
  padding: 1rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 162, 255, 0.2);
}

html[data-theme="dark"] body.editor-page .tab-btn {
  background: rgba(0, 162, 255, 0.1);
  border: 1px solid rgba(0, 162, 255, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  flex: 1;
}

html[data-theme="dark"] body.editor-page .tab-btn:hover {
  background: rgba(0, 162, 255, 0.2);
  border-color: var(--accent);
}

html[data-theme="dark"] body.editor-page .tab-btn.active {
  background: rgba(0, 162, 255, 0.3);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 162, 255, 0.3);
}

html[data-theme="dark"] body.editor-page .tab-content {
  display: none;
}

html[data-theme="dark"] body.editor-page .tab-content.active {
  display: block;
}

html[data-theme="dark"] body.editor-page .cyber-card {
  background: rgba(26, 24, 48, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(45, 43, 66, 0.6);
  border-radius: 14px;
  transition: all 0.25s ease;
}

html[data-theme="dark"] body.editor-page .cyber-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] body.editor-page .cyber-input {
  background: rgba(30, 27, 56, 0.7);
  border: 1px solid rgba(0, 162, 255, 0.3);
  border-radius: 10px;
  color: var(--text-main);
  padding: 0.75rem 1rem;
}

html[data-theme="dark"] body.editor-page .cyber-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.25);
  outline: none;
  background: rgba(30, 27, 56, 0.9);
}

html[data-theme="dark"] body.editor-page .cyber-input::placeholder {
  color: rgba(229, 237, 249, 0.4);
}

html[data-theme="dark"] body.editor-page .form-label {
  color: var(--text-main);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

html[data-theme="dark"] body.editor-page .cyber-button {
  background: linear-gradient(90deg, #0066CC 0%, #00A2FF 100%);
  border-radius: 10px;
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 12px 26px rgba(0,162,255,0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

html[data-theme="dark"] body.editor-page .cyber-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 16px 32px rgba(0,162,255,0.5);
}

html[data-theme="dark"] body.editor-page .cyber-button.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

html[data-theme="dark"] body.editor-page .btn-danger {
  background: linear-gradient(90deg, #CC0000 0%, #FF3366 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(255, 51, 102, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

html[data-theme="dark"] body.editor-page .btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(255, 51, 102, 0.5);
}

html[data-theme="dark"] body.editor-page .preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

html[data-theme="dark"] body.editor-page .preview-content {
  background: rgba(26, 24, 48, 0.98);
  border: 1px solid rgba(0, 162, 255, 0.4);
  border-radius: 16px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  color: var(--text-main);
  box-shadow: 0 24px 70px rgba(0,0,0,0.8);
}

html[data-theme="dark"] body.editor-page .preview-content h1,
html[data-theme="dark"] body.editor-page .preview-content h2,
html[data-theme="dark"] body.editor-page .preview-content h3 {
  color: var(--accent);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

html[data-theme="dark"] body.editor-page .preview-content h1 {
  border-bottom: 2px solid rgba(0, 162, 255, 0.3);
  padding-bottom: 0.3em;
}

html[data-theme="dark"] body.editor-page .preview-content code {
  background: rgba(0, 162, 255, 0.1);
  border: 1px solid rgba(0, 162, 255, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Fira Code', monospace;
  color: #a3d7ff;
}

html[data-theme="dark"] body.editor-page .preview-content pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 162, 255, 0.3);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

html[data-theme="dark"] body.editor-page .preview-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: #e6e6e6;
}

html[data-theme="dark"] body.editor-page .notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  z-index: 10001;
  transform: translateX(150%);
  transition: transform 0.4s ease;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] body.editor-page .notification.show {
  transform: translateX(0);
}

html[data-theme="dark"] body.editor-page .notification.success {
  background: linear-gradient(90deg, #00CC66 0%, #00FF99 100%);
  border-color: rgba(0, 255, 153, 0.3);
}

html[data-theme="dark"] body.editor-page .notification.error {
  background: linear-gradient(90deg, #CC0000 0%, #FF3366 100%);
  border-color: rgba(255, 51, 102, 0.3);
}

html[data-theme="dark"] body.editor-page .notification.warning {
  background: linear-gradient(90deg, #CC9900 0%, #FFCC00 100%);
  border-color: rgba(255, 204, 0, 0.3);
  color: #333;
}

html[data-theme="dark"] body.editor-page .notification.info {
  background: linear-gradient(90deg, #0066CC 0%, #00A2FF 100%);
  border-color: rgba(0, 162, 255, 0.3);
}

html[data-theme="dark"] body.editor-page table,
body.editor-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  --bs-table-bg: transparent !important;
  --bs-table-striped-bg: transparent !important;
  background: transparent !important;
}

html[data-theme="dark"] body.editor-page table th,
html[data-theme="dark"] body.editor-page table td,
body.editor-page table th,
body.editor-page table td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(47,163,255,0.18);
  color: #ffffff !important;
  background: transparent !important;
}

html[data-theme="dark"] body.editor-page table th,
body.editor-page table th {
  background: linear-gradient(135deg, rgba(47,163,255,0.24) 0%, rgba(47,163,255,0.14) 100%) !important;
  color: #cfe7ff !important;
  font-weight: 600;
  text-align: left;
}

html[data-theme="dark"] body.editor-page table tbody tr,
body.editor-page table tbody tr {
  background: transparent !important;
}

html[data-theme="dark"] body.editor-page table tbody tr:nth-child(even),
body.editor-page table tbody tr:nth-child(even) {
  background: rgba(0, 162, 255, 0.05) !important;
}

html[data-theme="dark"] body.editor-page table tbody tr:nth-child(even) td,
body.editor-page table tbody tr:nth-child(even) td {
  background: rgba(0, 162, 255, 0.05) !important;
}

html[data-theme="dark"] body.editor-page table tbody tr:hover,
body.editor-page table tbody tr:hover,
html[data-theme="dark"] body.editor-page table tbody tr:hover td,
body.editor-page table tbody tr:hover td {
  background: rgba(47,163,255,0.15) !important;
}

/* Стили пагинации для редактора */
html[data-theme="dark"] body.editor-page .pagination,
body.editor-page .pagination {
  gap: 4px;
}

html[data-theme="dark"] body.editor-page .page-link,
body.editor-page .page-link {
  background: rgba(0, 162, 255, 0.1) !important;
  border: 1px solid rgba(0, 162, 255, 0.3) !important;
  color: #ffffff !important;
  padding: 6px 12px;
  border-radius: 4px !important;
}

html[data-theme="dark"] body.editor-page .page-link:hover,
body.editor-page .page-link:hover {
  background: rgba(0, 162, 255, 0.25) !important;
  color: #00A2FF !important;
}

html[data-theme="dark"] body.editor-page .page-item.active .page-link,
body.editor-page .page-item.active .page-link {
  background: rgba(0, 162, 255, 0.4) !important;
  border-color: #00A2FF !important;
  color: #ffffff !important;
}

html[data-theme="dark"] body.editor-page .page-item.disabled .page-link,
body.editor-page .page-item.disabled .page-link {
  background: rgba(0, 162, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.4) !important;
  cursor: not-allowed;
}

html[data-theme="dark"] body.editor-page .btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Стили для кнопок тулбара редактора */
html[data-theme="dark"] body.editor-page .editor-toolbar-button {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(30, 27, 56, 0.5);
  border: 1px solid rgba(0, 162, 255, 0.2);
  color: #ffffff;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="dark"] body.editor-page .editor-toolbar-button:hover {
  background: rgba(0, 162, 255, 0.2);
  border-color: #00A2FF;
  transform: translateY(-1px);
}

html[data-theme="dark"] body.editor-page .editor-toolbar-button.active {
  background: rgba(0, 162, 255, 0.3);
  border-color: #00A2FF;
}

html[data-theme="dark"] body.editor-page .editor-toolbar-button i {
  font-size: 0.875rem;
}

/* Стили для предпросмотра Markdown - как в шаблоне */
html[data-theme="dark"] body.editor-page .preview-container,
body.editor-page .preview-container {
  background: rgba(30, 27, 56, 0.5);
  border: 1px solid rgba(0, 162, 255, 0.3);
  border-radius: 8px;
  padding: 20px;
  overflow-y: auto;
  height: 100%;
  min-height: 500px;
  color: #ffffff;
}

html[data-theme="dark"] body.editor-page .preview-container h1,
html[data-theme="dark"] body.editor-page .preview-container h2,
html[data-theme="dark"] body.editor-page .preview-container h3,
html[data-theme="dark"] body.editor-page .preview-container h4,
html[data-theme="dark"] body.editor-page .preview-container h5,
html[data-theme="dark"] body.editor-page .preview-container h6,
body.editor-page .preview-container h1,
body.editor-page .preview-container h2,
body.editor-page .preview-container h3,
body.editor-page .preview-container h4,
body.editor-page .preview-container h5,
body.editor-page .preview-container h6 {
  color: #00A2FF;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

html[data-theme="dark"] body.editor-page .preview-container h1,
body.editor-page .preview-container h1 {
  font-size: 2em;
  border-bottom: 2px solid rgba(0, 162, 255, 0.3);
  padding-bottom: 0.3em;
}

html[data-theme="dark"] body.editor-page .preview-container h2,
body.editor-page .preview-container h2 {
  font-size: 1.5em;
  border-bottom: 1px solid rgba(0, 162, 255, 0.2);
  padding-bottom: 0.3em;
}

html[data-theme="dark"] body.editor-page .preview-container p,
body.editor-page .preview-container p {
  margin-bottom: 1em;
  line-height: 1.6;
}

html[data-theme="dark"] body.editor-page .preview-container code,
body.editor-page .preview-container code {
  background: rgba(0, 162, 255, 0.1);
  border: 1px solid rgba(0, 162, 255, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9em;
  color: #a3d7ff;
}

html[data-theme="dark"] body.editor-page .preview-container pre,
body.editor-page .preview-container pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 162, 255, 0.3);
  border-radius: 6px;
  padding: 15px;
  overflow-x: auto;
  margin: 1em 0;
}

html[data-theme="dark"] body.editor-page .preview-container pre code,
body.editor-page .preview-container pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: #e6e6e6;
}

html[data-theme="dark"] body.editor-page .preview-container blockquote,
body.editor-page .preview-container blockquote {
  border-left: 4px solid #00A2FF;
  padding-left: 15px;
  margin: 1em 0;
  color: #cccccc;
  font-style: italic;
}

html[data-theme="dark"] body.editor-page .preview-container ul,
html[data-theme="dark"] body.editor-page .preview-container ol,
body.editor-page .preview-container ul,
body.editor-page .preview-container ol {
  margin: 1em 0;
  padding-left: 2em;
}

html[data-theme="dark"] body.editor-page .preview-container li,
body.editor-page .preview-container li {
  margin-bottom: 0.5em;
}

html[data-theme="dark"] body.editor-page .preview-container table,
body.editor-page .preview-container table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

html[data-theme="dark"] body.editor-page .preview-container th,
html[data-theme="dark"] body.editor-page .preview-container td,
body.editor-page .preview-container th,
body.editor-page .preview-container td {
  border: 1px solid rgba(0, 162, 255, 0.3);
  padding: 8px 12px;
  text-align: left;
}

html[data-theme="dark"] body.editor-page .preview-container th,
body.editor-page .preview-container th {
  background: rgba(0, 162, 255, 0.1);
  color: #00A2FF;
  font-weight: 600;
}

html[data-theme="dark"] body.editor-page .preview-container tr:nth-child(even) td,
body.editor-page .preview-container tr:nth-child(even) td {
  background: rgba(0, 162, 255, 0.05);
}

html[data-theme="dark"] body.editor-page .preview-container a,
body.editor-page .preview-container a {
  color: #00A2FF;
  text-decoration: none;
  border-bottom: 1px dotted rgba(0, 162, 255, 0.5);
  transition: all 0.2s ease;
}

html[data-theme="dark"] body.editor-page .preview-container a:hover,
body.editor-page .preview-container a:hover {
  color: #66c2ff;
  border-bottom: 1px solid #00A2FF;
}

html[data-theme="dark"] body.editor-page .preview-container img,
body.editor-page .preview-container img {
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(0, 162, 255, 0.3);
  margin: 1em 0;
}

html[data-theme="dark"] body.editor-page .preview-container hr,
body.editor-page .preview-container hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00A2FF, transparent);
  margin: 2em 0;
}

/* Стили для вкладок редактора */
html[data-theme="dark"] body.editor-page .editor-view-tab,
body.editor-page .editor-view-tab {
  background: rgba(0, 162, 255, 0.1);
  border: 1px solid rgba(0, 162, 255, 0.3);
  border-radius: 8px 8px 0 0;
  padding: 10px 20px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  border-bottom: none;
}

html[data-theme="dark"] body.editor-page .editor-view-tab:hover,
body.editor-page .editor-view-tab:hover {
  background: rgba(0, 162, 255, 0.2);
}

html[data-theme="dark"] body.editor-page .editor-view-tab.active,
body.editor-page .editor-view-tab.active {
  background: rgba(0, 162, 255, 0.3);
  border-bottom: 2px solid #00A2FF;
  color: #00A2FF;
}

html[data-theme="dark"] body.editor-page .editor-view,
body.editor-page .editor-view {
  border: 1px solid rgba(0, 162, 255, 0.3);
  border-radius: 0 8px 8px 8px;
  padding: 15px;
  background: rgba(30, 27, 56, 0.5);
}

/* ---------- стили для главной страницы: home-hero, pill, accent-badge, feature-grid ---------- */

.home-hero {
  position: relative;
  min-height: 60vh;
  padding: 4rem 0;
}

.home-hero__grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 162, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 162, 255, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 0;
  pointer-events: none;
}

html[data-theme="dark"] body.home-page .pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: rgba(0, 162, 255, 0.15);
  border: 1px solid rgba(0, 162, 255, 0.3);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

html[data-theme="dark"] body.home-page .accent-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 162, 255, 0.1);
  border: 1px solid rgba(0, 162, 255, 0.25);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}

html[data-theme="dark"] body.home-page .feature-grid {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

html[data-theme="dark"] body.home-page .feature-grid .icon {
  font-size: 2rem;
  color: var(--accent);
  flex-shrink: 0;
}

html[data-theme="dark"] body.home-page .section-title {
  color: #f5f7ff;
  margin-bottom: 0.5rem;
}

html[data-theme="dark"] body.home-page .section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
