@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/manrope-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/manrope-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/manrope-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/manrope-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/manrope-800-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/manrope-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF;
}

/* Тема «Glass» — аврора-градиент и матовое стекло (backdrop-filter)
   Движок блога стихов «Герман Парло». Файл самодостаточен (включая стили плеера). */

:root {
    --bg: #eef1fb;
    --fg: #1c2033;
    --muted: #6d7494;
    --accent: #5b5bd6;
    --link: #4a4ac4;
    --border: rgba(255,255,255,0.6);
    --card-bg: rgba(255,255,255,0.55);
    --mark-bg: #ffe9a8;
    --player-bg: rgba(255,255,255,0.5);
    --player-fg: #1c2033;
    --player-track: rgba(28,32,51,0.15);
    --font-body: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Manrope', sans-serif;
    --title-size: 1.6rem;
    --poem-size: 1.02rem;
    --content-pad: 0;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Шапка ─────────────────────────────────────────── */
.site-header {
    border-bottom: 1px solid rgba(255,255,255,0.55);
    padding: 1.1rem 0;
    margin-bottom: 2.2rem;
    background: rgba(238,241,251,0.72);
    backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); position: sticky; top: 0; z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.site-brand { display: flex; flex-direction: column; }
.site-brand:hover { text-decoration: none; }
.site-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--fg);
    letter-spacing: 0.01em;
    text-transform: none;
    
}
.site-subtitle {
    color: var(--muted);
    font-size: 0.85rem;
    font-style: normal;
}
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.site-nav > a {
    color: var(--muted);
    font-size: 0.9rem;
    
}
.site-nav > a:hover { color: var(--accent); text-decoration: none; }

/* ─── Раскладка: контент + сайдбар ──────────────────── */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 720px) 300px;
    gap: 56px;
    justify-content: center;
    align-items: start;
}
.site-main .container:not(.layout-with-sidebar) { max-width: calc(720px + 48px); }
@media (max-width: 980px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 720px); }
    .sidebar { order: 2; position: static; }
}

/* ─── Карточка стиха ────────────────────────────────── */
.poem-card {
    max-width: 720px;
    margin: 0 0 3.5rem;
    padding: 0 0 2.5rem;
    border-bottom: none;
    
}
.poem-card:last-of-type { border-bottom: none; }
.poem-title {
    font-family: var(--font-heading);
    font-size: var(--title-size);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 0.5rem;
    letter-spacing: 0;
    text-wrap: balance;
}
.poem-title a { color: var(--fg); }
.poem-title a:hover { color: var(--accent); text-decoration: none; }
.poem-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 1.4rem;
    font-family: inherit;
}
.poem-text {
    font-size: var(--poem-size);
    line-height: 1.75;
    padding: var(--content-pad);
    text-wrap: pretty;
    
}
.poem-text .epigraph {
    font-style: italic;
    color: var(--muted);
    display: inline-block;
    padding-left: 1.2em;
}
.poem-text .subheading {
    letter-spacing: 0.06em;
    color: var(--muted);
    font-size: 0.92em;
}
.poem-cycles { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 8px; }
.cycle-chip {
    display: inline-block;
    background: rgba(255,255,255,0.6);
    color: #4a4ac4;
    border: 1px solid rgba(91,91,214,0.25);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-family: inherit;
    
}
.cycle-chip:hover { background:rgba(255,255,255,0.9); text-decoration: none; }
.views, .plays { white-space: nowrap; }

/* ─── Пагинация и навигация по стихам ───────────────── */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    max-width: 720px;
    margin: 2rem 0 3rem;
    font-size: 0.95rem;
}
.pager-info { color: var(--muted); font-size: 0.85rem; }
.pager-link { font-weight: 500; }
.poem-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    max-width: 720px;
    margin: 1rem 0 3rem;
    padding-top: 1.2rem;
    border-top: none;
    font-size: 0.92rem;
}
.poem-nav .pager-link { max-width: 46%; }

/* ─── Сайдбар ───────────────────────────────────────── */
.sidebar { font-size: 0.92rem; position: sticky; top: 20px; }
.sidebar-block { margin-bottom: 2rem;  }
.sidebar-block h3 {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    margin: 0 0 0.7rem;
    color: var(--fg);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: none;
    padding-bottom: 6px;
}
.sidebar-list { list-style: none; margin: 0; padding: 0; }
.sidebar-list li { padding: 3px 0; }
.sidebar-list .muted, .muted { color: var(--muted); font-size: 0.85em; }
.sidebar-search { margin-bottom: 2rem; display: flex; gap: 6px; }
.sidebar-search input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid rgba(28,32,51,0.15);
    border-radius: 12px;
    background: rgba(255,255,255,0.65);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 0.9rem;
}
.sidebar-search button, .search-form button, .play-all-btn {
    padding: 7px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: linear-gradient(135deg,#6d5df6,#8f6df6);
    color: #fff;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
}
.sidebar-search button:hover, .search-form button:hover, .play-all-btn:hover {
    background: linear-gradient(135deg,#5b4bf0,#7d5bf0);
    text-decoration: none;
}

/* ─── Архив ─────────────────────────────────────────── */
.page-title {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    margin: 0 0 1.5rem;
}
.archive-year { margin-bottom: 2.5rem; }
.archive-year-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent);
    border-bottom: none;
    padding-bottom: 6px;
    margin: 0 0 0.8rem;
}
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 0;
    border-bottom: 1px solid #f2f2f2;
}
.archive-list .muted { white-space: nowrap; }

/* ─── Список циклов /cycles/ ────────────────────────── */
.cycles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
    margin-bottom: 3rem;
}
.cycle-card {
    display: block;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    background: rgba(255,255,255,0.5); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(28,32,51,0.10);
}
.cycle-card:hover { transform: translateY(-3px); text-decoration: none; box-shadow: 0 18px 44px rgba(28,32,51,0.16); }
.cycle-card-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg,#8f7bf8,#5d8ef8);
    color: #fff;
}
.cycle-card-cover.fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
}
.cycle-card-body { padding: 14px 16px 16px; }
.cycle-card-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--fg);
    margin-bottom: 4px;
    text-wrap: balance;
}
.cycle-card-meta { color: var(--muted); font-size: 0.8rem; }

/* ─── Поиск ─────────────────────────────────────────── */
.search-form { display: flex; gap: 8px; margin-bottom: 1.5rem; max-width: 560px; }
.search-form input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid rgba(28,32,51,0.15);
    border-radius: 12px;
    background: rgba(255,255,255,0.65);
    color: var(--fg);
    font-size: 1rem;
    font-family: var(--font-body);
}
.search-summary { color: var(--muted); font-size: 0.9rem; }
.search-result { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: none; max-width: 720px; }
.search-result h3 { font-family: var(--font-heading); margin: 0 0 4px; font-size: 1.15rem; }
.search-snippet { color: var(--fg); font-size: 0.95rem; margin: 8px 0 0; }
mark { background: var(--mark-bg); color: inherit; padding: 0 2px; border-radius: 2px; }

/* ─── Страница цикла ────────────────────────────────── */
.cycle-header { max-width: 720px; margin-bottom: 2rem; }
.cycle-cover {
    display: block;
    width: 100%;
    max-width: 340px;
    border-radius: 18px;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255,255,255,0.6);
}
.cycle-title {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    margin: 0 0 0.4rem;
    text-wrap: balance;
}
.cycle-description { color: var(--muted); margin-bottom: 0.8rem; font-style: normal; }
.cycle-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; margin-bottom: 1rem; }
.cycle-play-all { margin-bottom: 1.5rem; }
.play-all-btn { font-size: 0.95rem; padding: 9px 18px; }
.play-all-icon { font-size: 0.85em; }
.playlist {
    list-style: none;
    margin: 0 0 3rem;
    padding: 0;
    max-width: 720px;
}
.album-title-block { margin-bottom: 0.5rem; }

/* ─── Стилизованный аудио-плеер ─────────────────────── */
.custom-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--player-bg);
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 16px;
    padding: 10px 16px;
    max-width: 480px;
    margin: 1rem 0;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(28,32,51,0.10);
}
.custom-audio-player .play-btn {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg,#6d5df6,#8f6df6);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.08s ease, opacity 0.15s ease;
}
.custom-audio-player .play-btn:hover { opacity: 0.85; }
.custom-audio-player .play-btn:active { transform: scale(0.94); }
.custom-audio-player.is-playing .play-btn { background: linear-gradient(135deg,#5b4bf0,#7d5bf0); }
.custom-audio-player .progress-bar {
    flex: 1 1 auto;
    height: 4px;
    background: var(--player-track);
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    min-width: 60px;
}
.custom-audio-player .progress-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: 999px;
    position: relative;
}
.custom-audio-player .progress-fill::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
}
.custom-audio-player .time-display {
    flex: 0 0 auto;
    font-size: 0.75rem;
    color: var(--player-fg);
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.custom-audio-player .volume-btn {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--player-fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.7;
    border-radius: 12px;
}
.custom-audio-player .volume-btn:hover, .custom-audio-player .volume-btn.active { opacity: 1; }
.custom-audio-player .volume-slider {
    flex: 0 0 80px;
    width: 80px;
    accent-color: var(--accent);
    cursor: pointer;
}
.custom-audio-player .resume-btn {
    flex: 0 0 auto;
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(91,91,214,0.35);
    background: rgba(255,255,255,0.75);
    color: #4a4ac4;
    cursor: pointer;
    white-space: nowrap;
}
.custom-audio-player .resume-btn:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .custom-audio-player { max-width: 100%; flex-wrap: wrap; }
    .custom-audio-player .progress-bar { flex-basis: 100%; order: 5; }
    .custom-audio-player .time-display { order: 6; }
    .poem-audio .custom-audio-player { width: 100%; }
}

/* ─── Служебное ─────────────────────────────────────── */
.flash {
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}
.flash-ok { background: #dff5e6; }
.flash-error { background: #ffdede; }
.empty-state { color: var(--muted); padding: 2rem 0; }

.site-footer {
    border-top: none;
    margin-top: 3rem;
    padding: 1.5rem 0 2rem;
    color: var(--muted);
    font-size: 0.85rem;
}
.site-footer .container { display: flex; flex-direction: column; gap: 4px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.footer-copy { font-size: 0.78rem; opacity: 0.8; }
.admin-gear { opacity: 0.45; font-size: 0.95rem; transition: opacity 0.2s; }
.admin-gear:hover { opacity: 1; }


body {
    background:
        radial-gradient(1000px 600px at 12% -8%, rgba(147,112,255,0.30), transparent 60%),
        radial-gradient(900px 700px at 105% 12%, rgba(72,170,255,0.28), transparent 55%),
        radial-gradient(800px 800px at 45% 115%, rgba(255,120,200,0.18), transparent 55%),
        var(--bg);
    background-attachment: fixed;
}
::selection { background: rgba(109,93,246,0.28); }
.poem-card {
    background: rgba(255,255,255,0.52);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 22px;
    padding: 30px 34px 24px;
    margin-bottom: 26px;
    box-shadow: 0 10px 34px rgba(28,32,51,0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.poem-card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(28,32,51,0.16); }
.poem-title a {
    background: linear-gradient(120deg, #3f3fc9 20%, #8f56e8 60%, #d05cc0 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.poem-title a:hover { filter: brightness(1.12); }
.sidebar-block, .sidebar-search {
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 18px;
    padding: 18px 20px;
}
.album, .album-player { --album-radius: 20px; }
.album-player {
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 26px rgba(28,32,51,0.12);
}
.album-cover { border-radius: 20px; box-shadow: 0 18px 44px rgba(60,50,160,0.30); }
.album-play { background: linear-gradient(135deg,#6d5df6,#a56df6); box-shadow: 0 8px 22px rgba(109,93,246,0.45); }
.track-play { border-color: rgba(91,91,214,0.4); color: #4a4ac4; }
.track-play.is-playing { background: linear-gradient(135deg,#6d5df6,#a56df6); border-color: transparent; }
.mini-player-bar { --mini-bg: rgba(240,242,255,0.82); --mini-fg: #1c2033; --mini-accent: #6d5df6;
    border-top: 1px solid rgba(255,255,255,0.7); }
.mini-cover { background: linear-gradient(135deg,#8f7bf8,#5d8ef8); }
.site-footer { border-top: 1px solid rgba(255,255,255,0.55); background: rgba(255,255,255,0.35); backdrop-filter: blur(10px); }
@media (max-width: 640px) { .poem-card { padding: 22px 20px 18px; border-radius: 18px; } }

