/*
Theme Name: Spokoinoi Nochi Bootstrap 5
Theme URI: https://example.com/
Author: Ejin Inc
Author URI: https://example.com/
Description: Темная отзывчивая тема на Bootstrap 5 для сайта с пожеланиями спокойной ночи, картинками и красивыми фразами.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: spokoinoi-nochi
Tags: blog, bootstrap, responsive, dark, one-column, two-columns
*/

/* Базовая типографика и фон */
:root {
--bs-heading-color:#f5f5f5;
--bs-body-color:#f5f5f5;
}

body {
    background: radial-gradient(circle at top, #0f172a 0, #020617 55%, #000000 100%);
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
}

a {
    color: #7cbcfe;
    text-decoration: none;
}

a:hover {
    color: #e0f2fe;
    text-decoration: underline;
}

.bg-night {
    background-color: #020617;
}

.bg-night-soft {
    background: radial-gradient(circle at top, #020617 0, #020617 40%, #000000 100%);
}

.bg-night-opaque {
    background-color: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(10px);
}

.text-night-soft {
    color: #94a3b8;
}

/* Хедер и навигация */
.site-header {
    z-index: 1030;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.04em;
}

.navbar-nav .nav-link {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    font-weight: 500;
}

/* Hero-блок */
.hero-night {
    padding-top: 4rem;
    padding-bottom: 4rem;
    border-radius: 1.75rem;
    background: radial-gradient(circle at top, #1d253b 0, #020617 55%, #000000 100%);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.9);
    position: relative;
    overflow: hidden;
}

.hero-night::before,
.hero-night::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(60px);
    opacity: 0.7;
}

.hero-night::before {
    width: 260px;
    height: 260px;
    background: rgba(129, 140, 248, 0.35);
    top: -60px;
    right: -40px;
}

.hero-night::after {
    width: 260px;
    height: 260px;
    background: rgba(56, 189, 248, 0.3);
    bottom: -80px;
    left: -40px;
}

.hero-title {
    font-size: clamp(2.2rem, 3vw, 2.8rem);
}

.hero-subtitle {
    max-width: 32rem;
}

/* Карточки записей */
.card-night {
    background-color: rgba(15, 23, 42, 0.9);
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.85);
    overflow: hidden;
    position: relative;
}

.card-night:hover {
    border-color: rgba(248, 250, 252, 0.35);
    transform: translateY(-2px);
    transition: all 0.25s ease-out;
}

.card-night .card-body {
    position: relative;
    z-index: 1;
}

/* Метки */
.badge-soft {
    background-color: rgba(148, 163, 184, 0.18);
    color: #e5e7eb;
    border-radius: 999px;
    font-weight: 500;
}

/* Сайдбар */
.widget {
    background-color: rgba(15, 23, 42, 0.95);
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1.5rem;
    box-shadow: 0 14px 45px rgba(15, 23, 42, 0.9);
}

.widget-title {
    font-weight: 600;
}

/* Контент поста */
.entry-title {
    font-size: clamp(2rem, 3vw, 2.6rem);
}

.entry-content h2,
.entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.entry-content p {
    margin-bottom: 1rem;
}

.entry-content blockquote {
    border-left: 3px solid #38bdf8;
    padding-left: 1rem;
    font-style: italic;
    color: #e0f2fe;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.25rem;
}

/* Пагинация */
.pagination .page-link {
    background-color: rgba(15, 23, 42, 0.95);
    border-color: rgba(148, 163, 184, 0.5);
    color: #e5e7eb;
}

.pagination .page-link:hover {
    background-color: rgba(30, 64, 175, 0.8);
    border-color: rgba(129, 140, 248, 0.8);
}

.pagination .page-item.active .page-link {
    background-color: #38bdf8;
    border-color: #38bdf8;
    color: #0f172a;
}

/* Формы */
.form-control.bg-dark {
    background-color: #020617 !important;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #e5e7eb;
}

.form-control.bg-dark:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7);
}

.btn-night-primary {
    border-radius: 999px;
    background-image: linear-gradient(to right, #38bdf8, #818cf8);
    border: none;
    color: #020617;
    font-weight: 600;
    padding-inline: 1.5rem;
}

.btn-night-primary:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Футер */
.site-footer {
    font-size: 0.925rem;
}

/* Мобильные отступы */
@media (max-width: 767.98px) {
    .hero-night {
        padding-top: 2.75rem;
        padding-bottom: 2.75rem;
    }

    .widget {
        margin-bottom: 1.5rem;
    }
}

/* Классическое выпадающее меню на десктопе */
.navbar .dropdown-menu {
    background-color: rgba(15, 23, 42, 0.98);
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.5rem 0;
    min-width: 220px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

.navbar .dropdown-item {
    color: #e5e7eb;
    font-size: 0.95rem;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: rgba(37, 99, 235, 0.25);
    color: #f9fafb;
}

/* Открытие по hover на десктопе */
@media (min-width: 992px) {
    .navbar .dropdown:hover > .dropdown-menu {
        display: block;
    }

    .navbar .dropdown-toggle::after {
        margin-left: 0.25rem;
    }
}

.entry-content ul {padding: 0; margin: 0; list-style: none;}
.entry-content ul li {
    cursor: pointer;

    background: #020617;
    padding: 1em 2em 1em 1em;
    margin-bottom: 1em;
    border-radius: 15px;
}


/* Кнопка копирования в правом верхнем углу */
.copy-li-btn {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;

    /* красная иконка */
    color: #fff;
    background: rgba(0, 0, 0, 0.03);
}

/* Размер иконки и заливка */
.copy-li-btn svg {
    display: inline-block;
    width: 14px;
    height: 14px;
    fill: currentColor; /* наследует цвет от .copy-li-btn (красный) */
}

/* Когда скопировано — зелёная плашка с текстом */
.copy-li-btn.copied {
    background: #4caf50;
    color: #ffffff;
    font-size: 12px;
}

.copy-li-btn.copied svg {
    display: none; /* на всякий случай прячем SVG, когда текст "Скопировано" */
}

#toc_container {border: none; background: #020617;}

.go-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;

 background: #7cbcfe;
  color: #020617;

  font-size: 24px;
  line-height: 48px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.go-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.go-top:hover {
  transform: translateY(-3px);
}


/* Список со стрелками вместо стандартных точек */
#toc_container {
    list-style: none;          /* убираем стандартные маркеры */
    margin-left: 0;
    padding-left: 0;
}

#toc_container li {
    position: relative;
    padding-left: 26px;        /* отступ под стрелку */
    margin-bottom: 8px;
}

/* SVG-стрелка слева */
#toc_container li::before, .ssrp-text:before  {
    content: "";
    position: absolute;
    left: 5px;
    top: 11px;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);

    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;

    /* SVG стрелка вправо, цвет #7cbcfe */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237cbcfe' d='M3 2l5 4-5 4z'/%3E%3C/svg%3E");
}
.ssrp-text:before {
    left: 0px;
    top: 14px;
}
.ssrp-text {
    position: relative;

    padding:0 0 0 20px;
}
