/* ============================================================
   ROOT & ПЕРЕМЕННЫЕ (общие для всего)
   ============================================================ */
:root {
    /* Основные цвета */
    --color-bg: #f8f7f4;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #4a4a4a;
    --color-text-muted: #8a8a8a;
    --color-border: #e6e4df;
    --color-border-light: #f0efeb;
    --color-accent: #1a1a1a;
    --color-accent-hover: #333333;
    
    /* Алиасы (для совместимости) */
    --bg: #f8f7f4;
    --surface: #ffffff;
    --text: #1a1a1a;
    --muted: #8a8a8a;
    --line: #e6e4df;
    --soft: #f0efeb;
    --hover: #f7f7f5;
    
    /* Sidebar */
    --sidebar-bg: #ffffff;
    --sidebar-text: #1a1a1a;
    --sidebar-muted: #9aa0a6;
    --sidebar-border: #e6e4df;
    --sidebar-hover: #f7f7f5;
    --sidebar-radius: 10px;
    
    /* Специальные цвета */
    --danger: #963f3f;
    --danger-bg: #fff0f0;
    --green: #2e6b3d;
    --green-bg: #edf8ef;
    
    /* Размеры */
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08);
    --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-base);
    line-height: 1.7;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.page {
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-trigger {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 28px;
    height: 28px;
    border: none;
    background: #f3f2ef;
    color: #1a1a1a;
    cursor: pointer;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.sidebar-trigger:hover {
    background: #ecebe6;
    transform: scale(1.03);
}

.sidebar-trigger svg {
    stroke: #1a1a1a;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 320px;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 12px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
}

.sidebar-brand {
    font-size: 14px;
    font-weight: 700;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.sidebar-brand:hover {
    opacity: 0.75;
}

.sidebar-header-nav {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.sidebar-header-link {
    font-size: 12px;
    color: var(--sidebar-muted);
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
    padding: 4px 6px;
    border-radius: 6px;
}

.sidebar-header-link:hover {
    color: var(--sidebar-text);
    background: var(--sidebar-hover);
}

.sidebar-user {
    font-size: 11px;
    color: var(--sidebar-muted);
    background: var(--sidebar-border);
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 500;
    white-space: nowrap;
}

.sidebar-close {
    padding: 4px;
    border: none;
    background: transparent;
    color: var(--sidebar-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-close:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.sidebar-fixed-action {
    padding: 12px 16px 10px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.action-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 0;
    border: 1px solid var(--sidebar-border);
    border-radius: var(--sidebar-radius);
    background: transparent;
    color: var(--sidebar-text);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.action-primary:hover {
    background: var(--sidebar-hover);
    border-color: #d6d4cf;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0 12px;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 3px;
}
.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
    background: #d6d4cf;
    border-radius: 4px;
}

.sidebar-section-title {
    padding: 8px 16px 4px;
    color: var(--sidebar-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 12px;
    transition: background 0.12s ease;
}

.sidebar-item:hover {
    background: var(--sidebar-hover);
}

.sidebar-item-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
    font-weight: 500;
    background: var(--sidebar-border);
    color: var(--sidebar-muted);
}

.status-badge.active {
    background: #eef4fb;
    color: #2c5282;
}

.sidebar-empty {
    padding: 10px 16px;
    color: var(--sidebar-muted);
    font-size: 11px;
}

.sidebar-empty a {
    color: var(--sidebar-text);
    font-weight: 500;
    text-decoration: underline;
}

.sidebar-divider {
    height: 1px;
    background: var(--sidebar-border);
    margin: 14px 16px;
}

.sidebar-contacts-title {
    padding: 8px 16px 4px;
    color: var(--sidebar-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sidebar-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 11px;
    transition: background 0.12s ease;
    border-radius: 6px;
}

.sidebar-contact:hover {
    background: var(--sidebar-hover);
}

.sidebar-contact-label {
    padding: 7px 16px;
    color: var(--sidebar-muted);
    font-size: 10px;
    opacity: 0.7;
    border-top: 1px solid var(--sidebar-border);
    margin-top: 8px;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.lira-avatar {
    width: 40px;
    height: 40px;
    display: block;
    border: 0;
    border-radius: 50%;
    background: #eef3f5;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lira-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(95, 150, 175, .18);
}

.welcome-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    padding: 3px;
    display: grid;
    place-items: center;
    border: 1px solid #dfe8ed;
    border-radius: 50%;
    background: #eef3f5;
    box-shadow: 0 4px 16px rgba(95, 150, 175, .18), 0 0 0 5px rgba(205, 225, 232, .3);
}

.welcome-avatar .lira-avatar {
    width: 100%;
    height: 100%;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: -0.01em;
    text-decoration: none;
}

.topbar-link {
    font-size: 13px;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
    text-decoration: none;
}

.topbar-link:hover {
    color: var(--color-text);
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
}

.breadcrumbs a {
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}
.breadcrumbs a:hover {
    color: var(--color-text);
}
.breadcrumbs-separator {
    color: var(--color-border);
}
.breadcrumbs-current {
    color: var(--color-text);
    font-weight: 500;
}

/* ============================================================
   ARTICLE
   ============================================================ */
.article {
    max-width: 680px;
    margin: 0 auto;
}

.category-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--color-border-light);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.2s ease, color 0.2s ease;
}

.category-badge:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.article-title {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.article-lead {
    margin: 0 0 20px;
    color: var(--color-text-secondary);
    font-size: 19px;
    line-height: 1.6;
    font-weight: 400;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.article-meta-separator {
    color: var(--color-border);
}

.article-cover {
    width: 100%;
    max-height: 480px;
    margin: 28px 0 32px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--color-border-light);
}

/* ============================================================
   CONTENT (основной контент статьи)
   ============================================================ */
.content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text);
}

.content-paragraph {
    margin: 0 0 1.2em;
}

.content-heading {
    margin: 1.8em 0 0.6em;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.content-heading:first-child {
    margin-top: 0;
}
h1.content-heading { font-size: 32px; }
h2.content-heading { font-size: 26px; }
h3.content-heading { font-size: 20px; }
h4.content-heading { font-size: 18px; font-weight: 600; }

.content-list {
    margin: 0 0 1.2em;
    padding-left: 24px;
}
.content-list-bullet { list-style-type: disc; }
.content-list-ordered { list-style-type: decimal; }
.content-list-item { margin-bottom: 0.3em; }

.content-inline-code {
    padding: 2px 6px;
    background: var(--color-border-light);
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, monospace;
}

.content-code {
    margin: 1.2em 0;
    padding: 16px 20px;
    background: #1a1a1a;
    color: #f0f0f0;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    font-family: ui-monospace, monospace;
}
.content-code code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.content-link {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-color: #c5c5c0;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}
.content-link:hover {
    text-decoration-color: var(--color-text);
}

.content-tag-link {
    color: var(--color-text);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0 2px;
}
.content-tag-link:hover {
    color: #6c63ff;
    text-decoration-color: #6c63ff;
    text-underline-offset: 1px;
}
.content-tag-link:active {
    transform: scale(0.96);
}

/* ============================================================
   ЦИТАТЫ
   ============================================================ */
.content-blockquote {
    margin: 1.5rem 0;
    padding: 16px 20px 16px 24px;
    background: var(--soft);
    border-left: 4px solid #6c63ff;
    border-radius: 0 8px 8px 0;
    color: var(--text);
    font-style: italic;
    transition: all 0.2s ease;
}

.content-blockquote p {
    margin: 4px 0;
    line-height: 1.7;
}
.content-blockquote p:first-child { margin-top: 0; }
.content-blockquote p:last-child { margin-bottom: 0; }

.content-blockquote .quote-author {
    display: block;
    margin-top: 8px;
    font-style: normal;
    font-weight: 600;
    color: var(--muted);
    font-size: 0.9rem;
}

/* ============================================================
   ТАБЛИЦЫ
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: var(--surface);
}

.content-table thead {
    background: var(--soft);
}

.content-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--line);
    white-space: nowrap;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.content-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.content-table tbody tr:last-child td {
    border-bottom: none;
}
.content-table tbody tr:hover {
    background: var(--hover);
}

/* ============================================================
   РАЗДЕЛИТЕЛИ
   ============================================================ */
.content-separator {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--line), transparent);
    margin: 2.5rem 0;
    opacity: 0.6;
}

/* ============================================================
   MEDIA (изображения, видео, аудио)
   ============================================================ */
.content-figure {
    margin: 1.8em 0;
}

.content-image {
    width: 100%;
    border-radius: 10px;
    background: var(--color-border-light);
}

.content-figcaption {
    margin-top: 8px;
    color: var(--color-text-muted);
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
}

.content-video-player {
    width: 100%;
    border-radius: 10px;
    background: var(--color-border-light);
}

.content-audio-player {
    width: 100%;
    border-radius: 8px;
}

.content-download {
    margin: 1.2em 0;
    padding: 14px 18px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.content-download:hover {
    border-color: var(--color-text);
    background: var(--color-border-light);
}

.content-download-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}




/* ============================================================
   МИНИМАЛИСТИЧНЫЙ АУДИО-ПЛЕЕР (в стиле видео)
   ============================================================ */
.custom-audio-player {
    margin: 24px 0;
    padding: 20px 24px 18px;
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.95), rgba(10, 10, 15, 0.98));
    border-radius: 16px;
    color: #fff;
    text-align: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.custom-audio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.audio-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.05);
}

.audio-btn-play {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 18px;
}

.audio-btn-play:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}

.audio-speed-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.audio-time {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-family: ui-monospace, monospace;
}

.audio-speed-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-speed-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.audio-speed-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-weight: 600;
}

.custom-audio-visualizer {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin: 0 auto 12px;
    display: block;
}

.custom-audio-now-playing {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}





/* ============================================================
   TAGS
   ============================================================ */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
}

.article-tag {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--color-border-light);
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.article-tag:hover {
    background: var(--color-border);
    color: var(--color-text);
}

/* ============================================================
   ACTIONS (лайки)
   ============================================================ */
.article-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 16px 0;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.like-form { margin: 0; }

.like-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.like-button:hover {
    border-color: var(--color-text);
    background: var(--color-border-light);
}
.like-button:active { transform: scale(0.96); }
.like-count { font-weight: 500; }
.action-muted { color: var(--color-text-muted); font-size: 13px; }

/* ============================================================
   NOTICES
   ============================================================ */
.notice {
    margin: 16px 0;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
}

.notice-success {
    background: #edf8ef;
    color: #2d5a3d;
    border: 1px solid #d5ecd9;
}

.notice-error {
    background: #fff0f0;
    color: #8a4a4a;
    border: 1px solid #efd2d2;
}

/* ============================================================
   БЛОК "ЗАДАЧА ПО СТАТЬЕ"
   ============================================================ */
.article-task-block {
    margin: 32px 0 24px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #f8f7f4, #eef3f5);
    border-radius: 16px;
    border: 1px solid #dfe8ed;
    text-align: center;
}

.article-task-inner {
    max-width: 480px;
    margin: 0 auto;
}

.article-task-icon {
    font-size: 32px;
    margin-bottom: 6px;
    line-height: 1;
}

.article-task-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a1a1a;
}

.article-task-text {
    color: #4a4a4a;
    font-size: 14px;
    margin: 0 0 16px;
    line-height: 1.6;
}

.article-task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.btn-task-primary {
    display: inline-block;
    padding: 10px 24px;
    background: #1a1a1a;
    color: #ffffff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-task-primary:hover {
    background: #333333;
}

.btn-task-secondary {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    color: #1a1a1a;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #d6d4cf;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-task-secondary:hover {
    background: #f0efec;
    border-color: #1a1a1a;
}

/* ============================================================
   БЛОК ПОДПИСКИ
   ============================================================ */
.newsletter-subscribe-block {
    margin: 40px 0 20px;
    padding: 32px 28px;
    background: linear-gradient(135deg, #f8f7f4, #f0efeb);
    border-radius: 16px;
    border: 1px solid #e6e4df;
    text-align: center;
}

.newsletter-subscribe-inner {
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-subscribe-icon {
    font-size: 32px;
    margin-bottom: 8px;
    line-height: 1;
}

.newsletter-subscribe-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.newsletter-subscribe-text {
    color: #4a4a4a;
    font-size: 15px;
    margin: 0 0 16px;
    line-height: 1.6;
}

.newsletter-subscribe-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #1a1a1a;
    color: #ffffff;
    border-radius: 10px;
    font-weight: 500;
    font-size: 15px;
    border: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.newsletter-subscribe-btn:hover {
    background: #333333;
}

.newsletter-subscribe-count {
    color: #8a8a8a;
    font-size: 12px;
    margin: 10px 0 0;
}

/* ============================================================
   КОММЕНТАРИИ
   ============================================================ */
.comments-section {
    margin-top: 56px;
}

.comments-title {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.comments-title-count {
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: 18px;
}

.comments-empty {
    color: var(--color-text-muted);
    font-size: 15px;
}

.comment {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--color-border-light);
}

.comment:first-child {
    border-top: 0;
}

.comment-child {
    margin-left: 28px;
    padding-left: 20px;
    border-left: 2px solid var(--color-border-light);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--color-border-light);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.comment-avatar .avatar-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: 600;
    font-size: 15px;
}

.comment-author .admin-badge {
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 12px;
    margin-left: 4px;
}

.comment-author-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.comment-author-link:hover {
    color: #6c63ff;
    text-decoration: underline;
}

.comment-date {
    color: var(--color-text-muted);
    font-size: 12px;
}

.comment-body {
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.comment-reply {
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.comment-reply:hover {
    color: var(--color-text);
}

.comment-form {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.comment-form-title {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 600;
}

.comment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-text);
}

.comment-form textarea {
    min-height: 110px;
    resize: vertical;
}

.comment-form-full {
    grid-column: 1 / -1;
}

.comment-form-submit {
    padding: 10px 24px;
    border: 0;
    border-radius: 8px;
    background: var(--color-accent);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.comment-form-submit:hover {
    background: var(--color-accent-hover);
}

/* ============================================================
   RELATED (похожие статьи)
   ============================================================ */
.related-section {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border-light);
}

.related-title {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.related-card {
    padding: 18px 20px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
    border-color: var(--color-text);
    background: var(--color-border-light);
    transform: translateY(-2px);
}

.related-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.related-card-excerpt {
    margin: 6px 0 0;
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 820px) {
    .page { padding: 16px 16px 40px; }
    .topbar { margin-bottom: 24px; padding-bottom: 12px; }
    body { font-size: 16px; }
    .article-title { font-size: clamp(28px, 6vw, 36px); }
    .article-lead { font-size: 17px; }
    .content { font-size: 16px; line-height: 1.75; }
    .content-heading { margin-top: 1.4em; }
    h1.content-heading { font-size: 26px; }
    h2.content-heading { font-size: 22px; }
    h3.content-heading { font-size: 18px; }
    .comment-form-grid { grid-template-columns: 1fr; }
    .comment-form-full { grid-column: auto; }
    .related-grid { grid-template-columns: 1fr; }
    .comment-child { margin-left: 12px; padding-left: 12px; }
    .article-cover { max-height: 320px; margin: 20px 0 24px; border-radius: 8px; }
    .lira-avatar { width: 32px; height: 32px; }
    .comment { gap: 10px; padding: 12px 0; }
    .comment-avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 12px; }
    .comment-child { margin-left: 16px; padding-left: 12px; }
    .content-blockquote { padding: 12px 16px 12px 18px; font-size: 0.95rem; }
    .content-table { font-size: 0.85rem; }
    .content-table th,
    .content-table td { padding: 8px 12px; }
    .content-separator { margin: 1.8rem 0; }
    .article-task-block { padding: 18px 16px; margin: 24px 0 16px; }
    .article-task-actions { flex-direction: column; align-items: center; }
    .btn-task-primary,
    .btn-task-secondary { width: 100%; text-align: center; }
    .newsletter-subscribe-block { margin: 32px 0 16px; padding: 24px 16px; border-radius: 12px; }
    .newsletter-subscribe-title { font-size: 18px; }
    .newsletter-subscribe-text { font-size: 14px; }
    .newsletter-subscribe-btn { padding: 10px 24px; font-size: 14px; width: 100%; }
    .sidebar { width: 100%; max-width: 300px; }
    .sidebar-trigger { top: 12px; left: 12px; width: 28px; height: 28px; }
    .sidebar-trigger svg { width: 18px; height: 18px; }
    .sidebar-header { gap: 8px; padding: 12px 12px 10px; }
    .sidebar-brand { font-size: 13px; }
    .sidebar-header-link { font-size: 11px; }
    .sidebar-user { font-size: 10px; }
}

@media (max-width: 480px) {
    .page { padding: 12px 12px 32px; }
    .topbar { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
    .article-title { font-size: 26px; }
    .article-meta { font-size: 12px; gap: 4px 12px; }
    .comment { padding: 12px 0; }
    .comment-form { padding: 16px; }
    .content-blockquote { padding: 12px 16px; }
    .content-code { padding: 12px 14px; font-size: 12px; }
    .related-card { padding: 14px 16px; }
    .related-card-title { font-size: 15px; }
    .lira-avatar { width: 28px; height: 28px; }
    .newsletter-subscribe-block { padding: 20px 12px; margin: 24px 0 12px; }
    .newsletter-subscribe-icon { font-size: 28px; }
    .newsletter-subscribe-title { font-size: 16px; }
    .newsletter-subscribe-text { font-size: 13px; }
}

@media (max-width: 400px) {
    .breadcrumbs { font-size: 12px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .topbar { display: none; }
    .article-actions { display: none; }
    .comments-section { display: none; }
    .related-section { display: none; }
    .article-task-block { display: none; }
    .newsletter-subscribe-block { display: none; }
    .sidebar { display: none; }
    .sidebar-trigger { display: none; }
    .sidebar-overlay { display: none; }
    .article-cover { max-height: 300px; }
    .page { padding: 20px; }
    .content-code { background: #f0f0f0; color: #1a1a1a; }
}


/* ============================================================
   БЛОГ — ГЛАВНАЯ СТРАНИЦА
   ============================================================ */

/* Герой-блок */
.hero {
    text-align: center;
    padding: 8px 0 24px;
    animation: fadeUp 0.5s ease;
}

.hero-eyebrow {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.hero-title {
    font-size: clamp(32px, 7vw, 48px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.045em;
    margin-bottom: 12px;
}

.hero-description {
    max-width: 560px;
    margin: 0 auto;
    color: var(--color-text-secondary);
    font-size: 17px;
    line-height: 1.6;
}

.hero-count {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--color-border-light);
    color: var(--color-text-muted);
    font-size: 13px;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Поиск */
.search-section {
    max-width: 520px;
    margin: 4px auto 24px;
}

.search-form {
    display: flex;
    gap: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form:focus-within {
    border-color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.06);
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--color-text);
    outline: none;
}

.search-input::placeholder {
    color: var(--color-text-muted);
}

.search-button {
    padding: 12px 20px;
    border: 0;
    border-radius: calc(var(--radius) - 4px);
    background: var(--color-accent);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.search-button:hover {
    background: var(--color-accent-hover);
}

/* Категории */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 0px solid var(--color-border-light);
}

.category-nav-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-right: 4px;
    display: flex;
    align-items: center;
}

.category-chip {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-border-light);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-chip:hover {
    color: var(--color-text);
    background: var(--color-border);
}

.category-chip.active {
    color: #fff;
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.category-chip .count {
    font-weight: 400;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-left: 4px;
}

.category-chip.active .count {
    color: rgba(255, 255, 255, 0.6);
}

/* Фильтры */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 28px;
}

.filter-link {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.filter-link:hover {
    color: var(--color-text);
    background: var(--color-border-light);
}

.filter-link.active {
    color: #fff;
    background: var(--color-accent);
    border-color: var(--color-accent);
}

/* Список постов */
.posts {
    display: grid;
    gap: 16px;
}

.post-card {
    background: var(--color-surface);
    border: 0px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0;
    transition: all 0.25s ease;
    overflow: hidden;
    animation: fadeUp 0.5s ease;
}

.post-card:hover {
    border-color: var(--color-text);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.post-card-cover {
    position: relative;
    width: 100%;
    padding-bottom: 30%;
    overflow: hidden;
    background: var(--color-border-light);
}

.post-card-cover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-cover-image {
    transform: scale(1.02);
}

.post-card-content {
    padding: 20px 28px 24px;
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.post-card-type {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.post-card-category {
    font-size: 11px;
    color: var(--color-text-muted);
}

.post-card-category a {
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.post-card-category a:hover {
    color: var(--color-text);
}

.post-card-title {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.post-card-title a {
    transition: color 0.2s ease;
}

.post-card-title a:hover {
    color: var(--color-text-secondary);
}

.post-card-featured {
    display: inline-block;
    margin-left: 6px;
    font-size: 13px;
    color: #326d43;
}

.post-card-excerpt {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.post-card-tag {
    font-size: 12px;
    color: var(--color-text-muted);
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--color-border-light);
    transition: all 0.2s ease;
}

.post-card-tag:hover {
    color: var(--color-text);
    background: var(--color-border);
}

.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.post-card-meta-separator {
    color: var(--color-border);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    min-width: 38px;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination a {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
}

.pagination a:hover {
    border-color: var(--color-text);
    background: var(--color-border-light);
}

.pagination span.current {
    background: var(--color-accent);
    color: #fff;
    border: 1px solid var(--color-accent);
}

.pagination .disabled {
    opacity: 0.3;
    cursor: default;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

/* ============================================================
   БЛОГ — АДАПТИВ
   ============================================================ */
@media (max-width: 600px) {
    .hero {
        padding: 4px 0 16px;
    }
    .hero-title {
        font-size: clamp(26px, 6vw, 32px);
    }
    .hero-description {
        font-size: 15px;
    }
    .search-section {
        margin: 4px auto 16px;
    }
    .search-input {
        font-size: 13px;
        padding: 10px 14px;
    }
    .search-button {
        font-size: 13px;
        padding: 10px 16px;
    }
    .category-nav {
        gap: 4px;
        margin-bottom: 16px;
        padding-bottom: 14px;
    }
    .category-chip {
        font-size: 12px;
        padding: 4px 10px;
    }
    .filters {
        gap: 4px;
        margin-bottom: 16px;
    }
    .filter-link {
        font-size: 12px;
        padding: 4px 12px;
    }
    .post-card-content {
        padding: 16px 18px 18px;
    }
    .post-card-cover {
        padding-bottom: 35%;
    }
    .post-card-title {
        font-size: 18px;
    }
    .post-card-excerpt {
        font-size: 14px;
    }
    .pagination a,
    .pagination span {
        min-width: 34px;
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .search-form {
        flex-direction: column;
    }
    .search-button {
        width: 100%;
    }
    .post-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .category-nav-label {
        width: 100%;
        justify-content: center;
        margin-bottom: 2px;
    }
}








/* ============================================================
   МИНИМАЛИСТИЧНЫЙ ВИДЕО-ПЛЕЕР (белые кнопки)
   ============================================================ */

.custom-video-player {
    margin: 24px 0;
    border-radius: 16px;
    overflow: hidden;
    background: #0a0a0f;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.custom-video-element {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    background: #0a0a0f;
    cursor: pointer;
}

/* ============================================================
   КОНТРОЛЫ — МИНИМАЛИСТИЧНЫЙ СТИЛЬ
   ============================================================ */
.custom-video-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

/* ============================================================
   ОБЩИЙ СТИЛЬ ДЛЯ ВСЕХ КНОПОК
   ============================================================ */
.video-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.video-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.05);
}

.video-btn:active {
    transform: scale(0.92);
}

/* ============================================================
   PLAY/PAUSE — ГЛАВНАЯ КНОПКА
   ============================================================ */
.video-btn-play {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.video-btn-play:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}

.video-btn-play.paused {
    background: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   КНОПКА FULLSCREEN
   ============================================================ */
.video-btn-fullscreen-enter,
.video-btn-fullscreen-exit {
    font-size: 16px;
    width: 38px;
    height: 38px;
}

/* ============================================================
   ПРОГРЕСС-БАР
   ============================================================ */
.video-progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 120px;
}

.video-progress-bg {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s ease;
}

.video-progress-bg:hover {
    height: 5px;
}

.video-progress-fill {
    height: 100%;
    background: #ffffff;
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
}

.video-progress-bg:hover .video-progress-fill {
    background: #ffffff;
}

/* ============================================================
   ВРЕМЯ
   ============================================================ */
.video-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-family: ui-monospace, monospace;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

/* ============================================================
   КНОПКИ СКОРОСТИ
   ============================================================ */
.video-speed-buttons {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.video-speed-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.video-speed-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.video-speed-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-weight: 600;
}

/* ============================================================
   ПОЛНОЭКРАННЫЙ РЕЖИМ
   ============================================================ */
.custom-video-player:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-video-player:fullscreen .custom-video-element {
    flex: 1;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 80px);
    object-fit: contain;
    background: #000000;
}

.custom-video-player:fullscreen .custom-video-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 28px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    border-top: 0;
    backdrop-filter: blur(0);
    animation: fadeInControls 0.3s ease;
}

@keyframes fadeInControls {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* В fullscreen кнопки чуть крупнее */
.custom-video-player:fullscreen .video-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.custom-video-player:fullscreen .video-btn-play {
    width: 52px;
    height: 52px;
    font-size: 20px;
}

.custom-video-player:fullscreen .video-progress-bg {
    height: 4px;
}

.custom-video-player:fullscreen .video-progress-bg:hover {
    height: 6px;
}

.custom-video-player:fullscreen .video-time {
    font-size: 14px;
}

.custom-video-player:fullscreen .video-speed-btn {
    font-size: 12px;
    padding: 6px 14px;
}

/* ============================================================
   ПОДДЕРЖКА БРАУЗЕРОВ
   ============================================================ */
.custom-video-player:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-video-player:-webkit-full-screen .custom-video-element {
    flex: 1;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 80px);
    object-fit: contain;
    background: #000000;
}

.custom-video-player:-webkit-full-screen .custom-video-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 28px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    border-top: 0;
    animation: fadeInControls 0.3s ease;
}

.custom-video-player:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-video-player:-moz-full-screen .custom-video-element {
    flex: 1;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 80px);
    object-fit: contain;
    background: #000000;
}

.custom-video-player:-moz-full-screen .custom-video-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 28px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    border-top: 0;
    animation: fadeInControls 0.3s ease;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 600px) {
    .custom-video-controls {
        gap: 10px;
        padding: 10px 14px;
    }
    
    .video-btn {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
    
    .video-btn-play {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
    
    .video-time {
        font-size: 11px;
    }
    
    .video-speed-btn {
        font-size: 10px;
        padding: 3px 10px;
    }
}

@media (max-width: 480px) {
    .video-speed-buttons {
        display: none;
    }
    
    .custom-video-controls {
        gap: 8px;
        padding: 10px 12px;
    }
}





