/* ===============================
   БАЗОВЫЕ СТИЛИ
================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Inter", "Segoe UI", sans-serif;
    color: #1F1F1F;
}

/* ===============================
   ГЛАВНАЯ СТРАНИЦА — 100vh, БЕЗ СКРОЛЛА
================================ */
body.home-bg {
    height: 100vh;
    overflow: hidden;

    background-image: url("/img/home-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ===============================
   ШАПКА
================================ */
header {
    height: 80px;
    padding: 0 40px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
    color: white;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* ===============================
   ПЕРВЫЙ ЭКРАН
================================ */
.home {
    height: calc(100vh - 80px);
    max-width: 900px;
    padding: 0 40px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    color: white;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.home h1 {
    font-size: 46px;
    margin-bottom: 20px;
}

.home p {
    font-size: 20px;
    line-height: 1.6;
}

/* ===============================
   АДАПТАЦИЯ ГЛАВНОЙ
================================ */
@media (max-width: 768px) {

    body.home-bg {
        background-position: center top;
    }

    header {
        height: 72px;
        padding: 0 16px;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        text-align: center;
    }

    nav {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    nav a {
        margin: 0;
        font-size: 18px;
    }

    .home {
        height: calc(100vh - 72px);
        padding: 0 20px;
        text-align: center;
    }

    .home h1 {
        font-size: 34px;
    }

    .home p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {

    .logo {
        font-size: 20px;
    }

    nav a {
        font-size: 16px;
    }

    .home h1 {
        font-size: 28px;
    }
}

/* ===============================
   СТИХИ — ОБЩЕЕ
================================ */
.poetry {
    padding: 80px 40px;
    max-width: 900px;
    margin: 0 auto;
    color: white;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.poetry h1 {
    font-size: 38px;
    margin-bottom: 40px;
    font-weight: 600;
    text-align: center;
}

.poetry-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

/* ===============================
   КАРТОЧКИ
================================ */
.category {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    padding: 22px 26px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.35);
    transition: 0.25s;
    cursor: pointer;
    color: white;
    font-size: 20px;
}

.category:hover,
.poem:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.poem {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    padding: 28px 32px;
    border-radius: 18px;
    margin-bottom: 35px;
    border: 1px solid rgba(255,255,255,0.35);
    transition: 0.25s;
    color: white;
}

.poem h2 {
    margin-top: 0;
    font-size: 26px;
    margin-bottom: 12px;
}

.poem p {
    margin: 10px 0 0;
    line-height: 1.7;
    font-size: 18px;
}

/* ===============================
   КНОПКИ НАВИГАЦИИ
================================ */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 25px;
}

.btn-back,
.btn-home {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: #dbe7ff;
    text-decoration: none;
    font-size: 18px;
    transition: 0.25s;
    border: 1px solid rgba(255,255,255,0.35);
}

.btn-back:hover,
.btn-home:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-3px);
}

/* ===============================
   ФОНЫ КАТЕГОРИЙ — ИСХОДНЫЕ
================================ */

body.poetry-bg {
    background: linear-gradient(to bottom, #1E90FF 0%, #00BFFF 100%);
    position: relative;
}

body.poetry-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: -1;
}

body.poetry-bg {
    background: linear-gradient(
        to bottom,
        #1E90FF 0%,   /* глубокий синий сверху */
        #00BFFF 100%  /* светлый голубой снизу */
    );
    position: relative;
}

body.poetry-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.15); /* лёгкое затемнение для глубины */
    z-index: -1;
}

body.poetry-love {
    background: linear-gradient(
        to bottom,
        #FF69B4 0%,   /* яркий розовый сверху */
        #8A2BE2 100%  /* глубокий фиолетовый снизу */
    );
    position: relative;
}

body.poetry-love::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.12); /* лёгкое затемнение, чтобы добавить глубину */
    z-index: -1;
}

body.poetry-life {
    background: linear-gradient(
        to bottom,
        #00688B 0%,   /* глубокий сине-бирюзовый сверху */
        #20B2AA 100%  /* мягкий бирюзово-зелёный снизу */
    );
    position: relative;
}

body.poetry-life::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.12); /* лёгкое затемнение для глубины */
    z-index: -1;
}

body.poetry-philosophy {
    background: linear-gradient(
        to bottom,
        #2F4F4F 0%,   /* глубокий серо-синий сверху */
        #483D8B 100%  /* тёмный фиолетово-синий снизу */
    );
    position: relative;
}

body.poetry-philosophy::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.18); /* чуть глубже, чем в других категориях */
    z-index: -1;
}

/* ===============================
   ЭКЗИСТЕНЦИЯ — УНИКАЛЬНЫЙ СТИЛЬ
================================ */

body.poetry-Existence {
    background: linear-gradient(160deg, #120b1a 0%, #1e0f2b 40%, #0a0610 100%);
    background-attachment: fixed;
    color: #e8dfff;
    font-family: "Georgia", serif;
    text-shadow: 0 0 6px rgba(40, 0, 70, 0.35);
}

/* Блок стихотворения */
.Existence-poem {
    background: rgba(80, 40, 120, 0.12);
    border: 1px solid rgba(180, 120, 255, 0.25);
    padding: 26px;
    border-radius: 16px;
    margin-bottom: 32px;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    box-shadow:
        0 0 28px rgba(120, 60, 200, 0.25),
        inset 0 0 12px rgba(255, 255, 255, 0.05);
}

/* Заголовок стихотворения */
.Existence-poem h2 {
    color: #e6cfff;
    margin-bottom: 14px;
    text-shadow: 0 0 10px rgba(200, 150, 255, 0.35);
}

/* Теги */
.Existence-tags {
    margin-top: 12px;
    color: #bfa6ff;
    opacity: 0.85;
    font-size: 15px;
}

/* Лайк */
.Existence-like {
    margin-top: 14px;
    font-size: 22px;
    cursor: pointer;
    color: #c8b4ff;
    transition: 0.25s;
}

.Existence-like.liked {
    color: #ff6bcb;
    transform: scale(1.25);
}

/* Кнопка назад */
body.poetry-Existence .btn-back {
    background: rgba(150, 80, 230, 0.18);
    border: 1px solid rgba(180, 120, 255, 0.25);
    color: #e8dfff;
}

body.poetry-Existence .btn-back:hover {
    background: rgba(150, 80, 230, 0.32);
}
/* Заголовок раздела */
body.poetry-Existence h1 {
    color: #f0e6ff;
    text-shadow: 0 0 14px rgba(200, 150, 255, 0.45);
}

body.poetry-sad {
    background: linear-gradient(
        to bottom,
        #A7B0C4 0%,   /* светлый серо-голубой */
        #6D7A8A 100%  /* глубокий туманно-серый */
    );
    position: relative;
}

body.poetry-sad::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.10); /* лёгкая дымка */
    z-index: -1;
}

body.poetry-nature {
    background: linear-gradient(
        to bottom,
        #2E8B57 0%,
        #98FB98 100%
    );
    position: relative;
}

body.poetry-nature::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 40, 0, 0.12);
    z-index: -1;
}

body.poetry-night {
    background: linear-gradient(
        to bottom,
        #4169E1 3%,
        #191970 100%
    );
    position: relative;
}

body.poetry-night::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 205, 0.12);
    z-index: -1;
}

/* Заголовки — чуть светлее, как лунное сияние */
body.poetry-night h1,
body.poetry-night h2 {
    color: #dfe4ff;
}

/* Блок стихотворения — лёгкое стекло */
body.poetry-night .poem {
    background: linear-gradient(
        to bottom,
        rgba(40, 50, 100, 0.55) 0%,
        rgba(15, 20, 45, 0.78) 100%
    );
    border: 1px solid rgba(180, 200, 255, 0.35);
    padding: 22px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 35px rgba(150, 170, 255, 0.35);
}

body.poetry-poet {
    background: linear-gradient(
        to bottom,
        #8B6B1F 0%,
        #F1C40F 100%
    );
    position: relative;
}

body.poetry-poet::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255, 215, 0, 0.12);
    z-index: -1;
}

body.poetry-Winter {
    background: linear-gradient(
        to bottom,
        #CFE8FF 0%,
        #8FBDEB 100%
    );
    position: relative;
}

body.poetry-Winter::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.18);
    z-index: -1;
}
/* Заголовки — чуть светлее, как лунное сияние */
body.poetry-Winter h1,
body.poetry-Winter h2 {
    color: #1E90FF;
}

body.poetry-Winter .poem {
    background: linear-gradient(
        to bottom,
        rgba(100, 149, 237, 0.35) 0%,   /* #6495ED — светлый снежный голубой */
        rgba(70, 110, 190, 0.45) 100%  /* чуть темнее, но всё ещё зимний */
    );
    border: 1px solid rgba(200, 220, 255, 0.35);
    padding: 24px;
    border-radius: 14px;

    backdrop-filter: blur(8px) brightness(1.05);
    -webkit-backdrop-filter: blur(8px) brightness(1.05);

    box-shadow:
        0 0 22px rgba(150, 180, 255, 0.28),
        inset 0 0 10px rgba(255, 255, 255, 0.18);
}

body.poetry-Winter .poem h2,
body.poetry-Winter .poem p {
    color: #f8fbff; /* чистый снежный белый */
}

body.poetry-Winter .nav-buttons a {
    background: rgba(100, 149, 237, 0.28); /* мягкий голубой фон */
    padding: 6px 14px;
    border-radius: 8px;

    color: #3A5FCD; /* читаемый, глубокий синий — родственный #6495ED */

    border: 1px solid rgba(180, 200, 255, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    box-shadow:
        0 0 12px rgba(150, 180, 255, 0.25),
        inset 0 0 6px rgba(255, 255, 255, 0.15);
}

body.poetry-Lyrics {
    background: linear-gradient(135deg, #3b1f5e 0%, #1d1233 100%);
    background-attachment: fixed;
    color: #f0e6ff;
    font-family: "Georgia", serif;
}

.Lyrics-poem {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 22px;
    border-radius: 14px;
    margin-bottom: 28px;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.lyrics-poem h2 {
    color: #d8caff;
    text-shadow: 0 0 8px rgba(180, 150, 255, 0.35);
    margin-bottom: 12px;
}

.lyrics-tags {
    margin-top: 10px;
    color: #b8a6ff;
    opacity: 0.85;
}

.lyrics-like {
    margin-top: 12px;
    font-size: 22px;
    cursor: pointer;
    color: #c8b4ff;
    transition: 0.25s;
}

.lyrics-like.liked {
    color: #ff6bcb;
    transform: scale(1.25);
}

body.poetry-The_World {
    background: linear-gradient(
        to bottom,
        #4169E1 3%,
        #191970 100%
    );
    position: relative;
}

body.poetry-The_World::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 205, 0.12); /* ← исправлено */
    z-index: -1;
}

/* Заголовки */
body.poetry-The_World h1,
body.poetry-The_World h2 {
    color: #dfe4ff;
}

/* Блок стихотворения */
body.poetry-The_World .poem { /* ← исправлено */
    background: linear-gradient(
        to bottom,
        rgba(40, 50, 100, 0.55) 0%,
        rgba(15, 20, 45, 0.78) 100%
    );
    border: 1px solid rgba(180, 200, 255, 0.35);
    padding: 22px;
    border-radius: 14px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 35px rgba(150, 170, 255, 0.35);
}

body.poetry-Autumn {
    background: linear-gradient(135deg, #ffb347 0%, #ff7e5f 40%, #d6452f 100%);
    background-attachment: fixed;
    color: #3a1f0f;
    font-family: "Georgia", serif;
}

.Autumn-poem {
    background: rgba(255, 230, 180, 0.15);
    border: 1px solid rgba(255, 200, 120, 0.35);
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 25px;
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 14px rgba(120, 40, 10, 0.25);
}

.Autumn-poem h2 {
    color: #7a2e00;
    margin-bottom: 10px;
}

.Autumn-tags {
    margin-top: 10px;
    color: #b85c00;
    opacity: 0.9;
}

.Autumn-like {
    margin-top: 12px;
    font-size: 22px;
    cursor: pointer;
    color: #7a2e00;
    transition: 0.25s;
}

.Autumn-like.liked {
    color: #ff3b1f;
    transform: scale(1.25) rotate(-8deg);
}

body.poetry-Soul {
    background: linear-gradient(
        to bottom,
        #B7D0F5 0%,   /* светлая небесная синь */
        #8FB4E0 100% /* глубокая небесная синь */
    );
    position: relative;
}

body.poetry-Soul::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.12); /* меньше белого, чем в Winter */
    z-index: -1;
}

/* Блок стихотворения — НЕ прозрачный, мягкий, бумажный */
.Soul-poem {
    background: #1e3a68; /* глубокий небесный синий */
    border: 1px solid rgba(10, 25, 50, 0.55);
    padding: 24px;
    border-radius: 14px;
    margin-bottom: 25px;
    box-shadow: 0 8px 22px rgba(15, 30, 55, 0.35);
    color: #e5efff; /* НЕ белый — мягкий небесно‑светлый */
}

/* Заголовок — глубокий, читаемый */
body.poetry-Soul .Soul-poem h2,
body.poetry-Soul .Soul-poem p,
body.poetry-Soul .Soul-poem {
    color: #E6EEFF; /* мягкий светлый небесный */
    text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}
/* Теги — спокойные */
.Soul-tags {
    margin-top: 10px;
    color: #5f7f9f;
    opacity: 0.9;
}

/* Лайк */
.Soul-like {
    margin-top: 12px;
    font-size: 22px;
    cursor: pointer;
    color: #2a4f7a;
    transition: 0.25s;
}

.Soul-like.liked {
    color: #5bb0ff;
    transform: scale(1.25) rotate(-8deg);
}

body[class^="poetry-"] header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

body[class^="poetry-"] header nav {
    display: flex;
    gap: 20px;
}

body[class^="poetry-"] header .poetry-search {
    margin-left: auto;
}

body[class^="poetry-"] header .poetry-search input {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.poem-tags a {
    margin-right: 8px;
    text-decoration: none;
    color: #00eaff;
    opacity: 0.8;
}

.poem-tags a:hover {
    opacity: 1;
}

/* Заголовок */
.search-title {
    font-size: 32px;
    margin-bottom: 25px;
    color: #e8ecff;
    text-shadow: 0 0 12px rgba(180, 200, 255, 0.4);
}

/* Контейнер результатов */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Один результат */
.search-item {
    padding: 18px 22px;
    border-radius: 12px;
    background: rgba(0, 255, 127, 0.06);
    border: 1px solid rgba(0, 255, 127, 0.15);
    box-shadow: 0 0 25px rgba(150, 170, 255, 0.25);
}

/* Название стихотворения */
.search-item h2 a {
    color: #f0f3ff;
    text-decoration: none;
    transition: 0.2s;
}

.search-item h2 a:hover {
    color: white;
    text-shadow: 0 0 8px rgba(200, 220, 255, 0.8);
}

/* Альбом */
.poem-meta {
    color: #cdd8ff;
    opacity: 0.8;
    font-size: 14px;
}

/* Если ничего не найдено */
.no-results {
    font-size: 20px;
    opacity: 0.8;
    color: #d0d6ff;
}

body.poetry-search-page {
    background: linear-gradient(
        to bottom,
        #2a3b6a 0%,
        #1b2547 100%
    );
    color: #e8ecff;
}

body.poetry-search-page .search-item {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 25px rgba(150, 170, 255, 0.25);
}

