/* === Переменные темы === */
:root {
    --bg: #f9f9f9;
    --text: #111;
    --accent: #2a5885;
    --card-bg: #ffffff;
    --border: #ddd;
    --shadow: rgba(0, 0, 0, 0.05);
    --banner-height: 168px; /* Высота баннера для десктопов */
    --banner-width: 800px; /* Максимальная ширина баннера */
    --content-offset: 0px; /* Отступ от баннера */
	--accent-hover: #104a93;
}

html[data-theme="dark"] {
    --bg: #111;
    --text: #eee;
    --accent: #81cfff;
    --card-bg: #1c1c1c;
    --border: #444;
    --shadow: rgba(255, 255, 255, 0.05);
	--hover-bg: #2a2a2a;
    --repost-bg: #181818;
    --repost-text: #aaa;
    --text-muted: #ccc;
    --success: #6fe26f;
}

html[data-theme="light"] {
    --bg: #fdfdfd;
    --text: #121212;
    --accent: #1a5cb8;            /* Более насыщенный синий */
    --card-bg: #ffffff;
    --border: #ccc;               /* Чуть темнее для лучшего разделения */
    --shadow: rgba(0, 0, 0, 0.06);
	--hover-bg: #e2eaff;
    --repost-bg: #f0f9ff;
    --repost-text: #555;
    --text-muted: #444;
    --success: #1aaf1a;
}
html[data-theme="light"] .show-more-btn {
    color: #1aaf1a;
    box-shadow: 0px 0px 6px 0px #1aaf1a inset;
}
html[data-theme="light"] .vk-audio {
    margin-bottom: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 16px;
    color: #000;
}

html[data-theme="light"] .vk-audio-title {
    margin-bottom: 4px;
    color: #2a5885;
    font-weight: 500;
}

html[data-theme="light"] .vk-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f2f3f5;
    padding: 4px 8px;
    border-radius: 4px;
}

html[data-theme="light"] .vk-play-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #2a5885;
}

html[data-theme="light"] .vk-progress {
    flex: 1;
    height: 6px;
    background: #d3d9de;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

html[data-theme="light"] .vk-progress-bar {
    background: #2a5885;
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
}

html[data-theme="light"] .vk-time {
    font-size: 12px;
    color: #555;
    width: 40px;
    text-align: right;
}

html[data-theme="light"] .vk-volume {
    width: 60px;
    cursor: pointer;
}
html[data-theme="light"] .vk-download-btn:hover {
    background: #e2eaff;
}
html[data-theme="dark"] .vk-audio {
    margin-bottom: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 16px;
    color: #eee;
}

html[data-theme="dark"] .vk-audio-title {
    margin-bottom: 4px;
    color: var(--accent); /* #81cfff — акцентный цвет тёмной темы */
    font-weight: 500;
}

html[data-theme="dark"] .vk-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2a2a2a;
    padding: 4px 8px;
    border-radius: 4px;
}

html[data-theme="dark"] .vk-play-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--accent);
}

html[data-theme="dark"] .vk-progress {
    flex: 1;
    height: 6px;
    background: #444;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

html[data-theme="dark"] .vk-progress-bar {
    background: var(--accent);
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
}

html[data-theme="dark"] .vk-time {
    font-size: 12px;
    color: #bbb;
    width: 40px;
    text-align: right;
}

html[data-theme="dark"] .vk-volume {
    width: 60px;
    cursor: pointer;
}
html[data-theme="dark"] .vk-download-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* === Базовая разметка === */
body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0px auto;
    padding-left: 0px;
    padding-right: 0px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px; /* отступ между постами */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Ссылки === */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

/* === Пост === */
.post {
    margin: 12px; /* убираем margin снизу */
    padding: 15px 12px;
    background: var(--card-bg);
    border-radius: 6px;
    box-shadow: 0 2px 5px var(--shadow);
    border: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
}

/* Остальное твое стилизованное содержание */

.post-header .info .name {
    color: var(--accent);
    font-weight: bold;
}

.post-header img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    margin-right: 12px;
}

.post-header .date {
    color: #777;
    font-size: 13px;
}

.show-more-btn {
    margin-top: 6px;
    margin-bottom: 10px;
    background: none;
    color: #00ff00;
	box-shadow:0px 0px 10px 0px #00ff00 inset;
	border-style:none;
	border-radius:5px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    padding: 2px 6px;
    display: inline-block;
}

.post-photo img {
    max-width: 100%;
    max-height: 500px; /* или меньше, по вкусу */
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    margin: 6px 0;
}
.post-photo,
.post-doc,
.post-link,
.post-audio {
    margin-top: 12px;
/*	text-align: center; */
}
.post-video {
    margin-top: 12px;
	display: flex;
    justify-content: center;
    align-items: center;
	text-align: center;
}
.post-video iframe {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    height: 360px; /* или 400px, на вкус */
}

.post-link a {
    display: inline-block;
    padding: 6px 8px;
    background: #eef3f7;
    border-radius: 5px;
    margin-bottom: 6px;
	background: #eaf1f8; /* Чуть мягче, но с контрастом */
    color: var(--accent);
}
.repost {
    margin-top: 10px;
    padding: 8px;
    font-size: 14px;
    background-color: var(--repost-bg, var(--bg));
    color: var(--repost-text, #555);
    border-left: 3px solid var(--accent);
}

.repost .repost-author {
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 6px;
    display: block;
}

.repost-header {
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 4px;
}

.repost-link {
    font-size: 14px;
    color: var(--text-muted, #444);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.repost-link a {
    color: var(--success, #1aaf1a);
    text-decoration: none;
}

.repost-link a:hover {
    text-decoration: underline;
}

.photo-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-height: 80vh;
}

.photo-track {
    display: flex;
    transition: transform 0.3s ease;
}

.carousel-photo {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 80vh; /* или меньше, например 400px */
    object-fit: contain;
    display: block;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.pagination {
    margin: 20px auto;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
}

.pagination-link,
.pagination-current,
.pagination-disabled {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--accent);
    background: var(--card-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    min-width: 24px;
    text-align: center;
}

.pagination-link:hover {
	background: var(--hover-bg, #e2eaff); /* Можно задать через кастомную переменную */
}

.pagination-current {
    background: var(--accent);
    color: var(--card-bg);
    border-color: var(--accent);
}

.pagination-disabled {
    color: #777;
    border-color: var(--border);
    background: var(--card-bg);
    cursor: not-allowed;
}
.vk-download-btn {
    display: inline-block;
    padding: 4px 10px;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--card-bg);
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.vk-download-btn:hover {
    background: rgba(0, 0, 0, 0.05); /* для светлой темы по умолчанию */
    box-shadow: 0 0 0 2px var(--accent);
    color: var(--text);
}

/* === Медиа === */
@media (max-width: 600px) {
    :root {
        --banner-height: 100px; /* Меньшая высота для мобильных */
        --content-offset: 15px; /* Меньший отступ */
    }

    .fixed-banner {
        max-width: 100%; /* Баннер занимает всю ширину экрана */
    }

    .fixed-banner img {
        max-height: var(--banner-height); /* Уменьшаем высоту изображения */
    }

    .post-header img {
        width: 36px;
        height: 36px;
        margin-right: 8px;
    }

    .carousel-prev,
    .carousel-next {
        padding: 6px 10px;
/*        font-size: 16px; */
    }

    .show-more-btn {
/*        font-size: 13px; */
        padding: 2px 5px;
    }

    .vk-audio-player {
        padding: 8px;
    }

    .pagination-link,
    .pagination-current,
    .pagination-disabled {
/*        font-size: 12px; */
        padding: 5px 8px;
    }
	.post-video iframe {
/*        height: 200px; */
    }
}

@media (max-width: 480px) {
    :root {
        --banner-height: 100px; /* Ещё меньшая высота */
        --content-offset: 10px; /* Ещё меньший отступ */
    }
}

/* === Переносы слов === */
.post-text a,
.repost-link a,
.post-text,
.repost {
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Тема переключатель */
.theme-toggle {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10001;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    text-align: center;
    line-height: 38px;
    box-shadow: 0 2px 8px var(--shadow);
    opacity: 0.6; /* Полупрозрачность */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle:hover {
    opacity: 1; /* Полностью видима при наведении */
    transform: scale(1.05); /* Немного увеличивается при наведении */
}

/* Фиксированный баннер */
.fixed-banner {
    position: fixed;
    top: 0;
    left: 51%;
    transform: translateX(-50%);
    width: var(--banner-width);
    max-width: 100vw;
    height: var(--banner-height);
    background: var(--card-bg);
    box-shadow: 0 2px 6px var(--shadow);
    border-bottom: 1px solid var(--border);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    box-sizing: border-box;
}

.fixed-banner img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.banner-spacer {
  height: calc(var(--banner-height) + var(--content-offset));
}
body, html, .container, .post, .comment-block, .pagination-link, a, button, input {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.post-text,
.post-text-short,
.post-text-full {
    white-space: pre-line;
    line-height: 1.4;
    margin: 0;
    padding: 0;	
	font-size: 16px; /* ← Добавьте это */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
