/* ========== ОСНОВНЫЕ ЦВЕТА (VK-стиль) ========== */
:root {
    --vk-blue: #f3f0e9;
    --vk-light-blue: #f3f0e9;
    --vk-bg: #f3f0e9;
    --vk-border: #ebe8e0;
    --vk-text: #a28372;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #423f3f;
}

body {
    background: var(--vk-bg);
    padding-top: 60px; /* отступ под фиксированную шапку */
}

/* ========== ШАПКА (FIXED) ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--vk-bg); /* чтобы не просвечивал контент */
    border-bottom: 1px solid var(--vk-border);
}

.header .logo {
    display: flex;
    height: 90%;
    text-decoration: none;
    color: black;
}

.header .logo img {
    height: 100%;
    width: auto;
}

.header .nav a {
    color: #423f3f;
    margin-left: 20px;
    text-decoration: none;
    opacity: 0.8;
    transition: 0.2s;
}

.header .nav a:hover {
    opacity: 1;
}

/* ========== КОНТЕЙНЕР (ОСНОВНОЙ БЛОК) ========== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== ЗАГОЛОВОК СТРАНИЦЫ (INDEX) ========== */
.page-header {
    text-align: left;
    margin-bottom: 30px;
    padding: 0;
}

.page-header h1 {
    font-size: 42px;
    color: #423f3f;
    margin-bottom: 10px;
    font-weight: 800;
}

.page-description {
    font-size: 16px;
    color: #5e5e5e;
    max-width: 600px;
    margin: 0;
    line-height: 1.5;
    text-align: left;
}

/* ========== КАРТОЧКА ПОСТА ========== */
.post {
    background: #fffefb;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--vk-border);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--vk-light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

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

.post-author {
    font-weight: 600;
    color: var(--vk-text);
}

.post-author a {
    color: inherit;
    text-decoration: none;
}

.post-author a:hover {
    text-decoration: underline;
}

.post-date {
    font-size: 13px;
    color: #939393;
    margin-top: 4px;
}

.post-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #423f3f;
}

.post-title a {
    text-decoration: none;
    color: inherit;
}

.post-title a:hover {
    text-decoration: underline;
}

.post-content {
    line-height: 1.4;
    margin-bottom: 15px;
}

.post-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    border-top: 1px solid var(--vk-border);
    padding-top: 15px;
    margin-top: 10px;
}

/* Кнопки в футере поста (комментарии, лайк, поделиться, слушать) */
.comment-button,
.like-button,
.share-button,
.speak-button {
    background:#f3f0e9;
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #5e5e5e;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    border:0;
}

.comment-button:hover,
.like-button:hover,
.share-button:hover,
.speak-button:hover {
    background: #FFCC3F;
}

.like-button:disabled {
    opacity: 0.5;
    cursor: default;
}

.like-button .likes-count,
.comments-count {
    font-weight: 500;
}

.speak-button {
    margin-left: auto; /* прижимает к правому краю */
}

/* ========== ШАПКА АВТОРА (СТРАНИЦА AUTHOR) ========== */
.author-header {
    display: flex;
    flex-direction: column; /* вертикальное расположение дочерних блоков */
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--vk-border);
}

.author-header-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-info h1 {
    font-size: 28px;
    margin-bottom: 5px;
    color: #423f3f;
}

.author-stats {
    color: #939393;
    font-size: 16px;
}

.author-seo-text {
    border-top: 1px solid var(--vk-border);
    padding-top: 20px;
    font-size: 15px;
    line-height: 1.5;
    color: #5e5e5e;
}

.author-seo-text h2,
.author-seo-text h3 {
    color: #423f3f;
    margin: 0 0 10px 0;
}

.author-seo-text h2 {
    font-size: 20px;
}

.author-seo-text h3 {
    font-size: 18px;
}

.author-seo-text a {
    color: var(--vk-text);
    text-decoration: none;
}

.author-seo-text a:hover {
    text-decoration: underline;
}

/* ========== ДРУГИЕ ПОСТЫ АВТОРА (НА СТРАНИЦЕ ПОСТА) ========== */
.author-posts {
    margin: 40px 0 20px;
    padding: 20px 0;
    border-top: 1px solid var(--vk-border);
}

.author-posts h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #423f3f;
}

.author-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.author-post-item {
    background: #fffefb;
    border: 1px solid var(--vk-border);
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.2s;
}

.author-post-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.author-post-item h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 1.3;
}

.author-post-item h4 a {
    color: #423f3f;
    text-decoration: none;
}

.author-post-item h4 a:hover {
    text-decoration: underline;
}

.author-post-item p {
    font-size: 14px;
    color: #5e5e5e;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.author-post-item small {
    font-size: 12px;
    color: #939393;
}

/* ========== КОММЕНТАРИИ ========== */
.comments-section {
    margin-top: 30px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--vk-border);
}

.comments-section h3 {
    padding-bottom: 20px;
}

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--vk-border);
}

.comment:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--vk-light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: var(--vk-text);
    margin-bottom: 5px;
}

.comment-text {
    line-height: 1.5;
}

.comment-date {
    font-size: 12px;
    color: #939393;
    margin-top: 5px;
}

/* ========== ПАГИНАЦИЯ ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination-pages {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-page,
.pagination-current,
.pagination-prev,
.pagination-next {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: 0.2s;
}

.pagination-page {
    background: white;
    color: var(--vk-text);
    border: 1px solid var(--vk-border);
}

.pagination-page:hover {
    background: var(--vk-light-blue);
    border-color: var(--vk-blue);
}

.pagination-current {
    background: var(--vk-blue);
    color: white;
    border: 1px solid var(--vk-blue);
}

.pagination-prev,
.pagination-next {
    background: white;
    color: var(--vk-text);
    border: 1px solid var(--vk-border);
    font-weight: 500;
}

.pagination-prev:hover,
.pagination-next:hover {
    background: var(--vk-light-blue);
    border-color: var(--vk-blue);
}

.pagination-dots {
    display: inline-block;
    padding: 8px 12px;
    color: #939393;
}

/* ========== КНОПКА "ПОКАЗАТЬ ЕЩЁ" ========== */
.load-more {
    display: block;
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px solid var(--vk-border);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--vk-text);
    cursor: pointer;
    transition: 0.2s;
    margin: 20px 0;
}

.load-more:hover {
    background: var(--vk-light-blue);
}

.load-more:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ========== SEO-ТЕКСТ НА ГЛАВНОЙ ========== */
.seo-text {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    border: 1px solid var(--vk-border);
}

.seo-text h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #423f3f;
}

.seo-text h3 {
    font-size: 18px;
    margin: 20px 0 10px;
    color: #5e5e5e;
}

.seo-text ul {
    margin-left: 20px;
    line-height: 1.8;
}

.seo-text a {
    color: var(--vk-text);
    text-decoration: none;
}

.seo-text a:hover {
    text-decoration: underline;
}

/* ========== СТИЛИ ДЛЯ МЕМОВ (ЕСЛИ БУДУТ) ========== */
.meme-post .meme-container {
    position: relative;
    margin: 15px 0;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.meme-post .meme-image {
    width: 100%;
    height: auto;
    display: block;
}

.meme-post .meme-text {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 28px;
    font-weight: 600;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
    padding: 10px;
    word-wrap: break-word;
    font-family: 'Montserrat', 'Arial Black', sans-serif;
}

.meme-post .meme-text.top {
    top: 10px;
}

.meme-post .meme-text.bottom {
    bottom: 10px;
}

/* ========== ФОН (ЕСЛИ ИСПОЛЬЗУЕТСЯ) ========== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.background-animation svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ ========== */
@media (max-width: 600px) {
    .page-header h1 {
        font-size: 24px;
    }
    .page-description {
        font-size: 14px;
    }

    .author-header-top {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .author-avatar {
        width: 80px;
        height: 80px;
    }
    .author-info h1 {
        font-size: 24px;
    }

    .author-posts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .meme-post .meme-text {
        font-size: 18px;
    }
}
/* ========== СТРАНИЦА ВСЕХ АВТОРОВ ========== */
.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.author-card {
    background: #fff;
    border: 1px solid var(--vk-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.author-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.author-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.author-card-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--vk-light-blue);
}

.author-card-info {
    flex: 1;
}

.author-card-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #423f3f;
}

.author-card-stats {
    font-size: 14px;
    color: #939393;
}

.author-card-description {
    font-size: 14px;
    line-height: 1.5;
    color: #5e5e5e;
    margin-bottom: 20px;
    flex: 1;
}

.author-card-description p {
    margin: 0;
}

.author-card-button {
    display: inline-block;
    background: #b3a58b;
    color: white;
    text-align: center;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.author-card-button:hover {
    background: #C9B797; 
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
    .authors-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
/* ========== ШАПКА (обновлённая) ========== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
    background: var(--vk-bg);
    border-bottom: 1px solid var(--vk-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-left .logo {
    display: block;
    height: 40px;
}

.header-nav {
    display: flex;
    gap: 20px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-nav a {
    color: #423f3f;
    text-decoration: none;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.header-nav a:hover {
    opacity: 1;
}

.header-right {
    display: flex;
    align-items: center;
}

.login-button {
    background: var(--vk-blue);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: #423f3f;
    transition: background 0.2s;
}

.login-button:hover {
    background: #FFCC3F;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== МОДАЛЬНОЕ ОКНО ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--vk-border);
    border-radius: 12px;
    width: 300px;
    text-align: center;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.social-btn {
    padding: 10px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    color: white;
}

.social-btn.vk { background: #4C75A3; }
.social-btn.tg { background: #0088cc; }
.social-btn.ya { background: #FC3F1D; }

/* ========== МОБИЛЬНОЕ НИЖНЕЕ МЕНЮ ========== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid var(--vk-border);
    z-index: 99;
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #5e5e5e;
    font-size: 12px;
    gap: 4px;
}

.mobile-bottom-nav a svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
}

.mobile-bottom-nav a:hover {
    color: #FFCC3F;
}

/* Адаптация для мобильных */
@media (max-width: 600px) {
    .header-nav {
        display: none;
    }
    .header-right {
        margin-left: auto;
    }
    .mobile-bottom-nav {
        display: flex;
    }
    body {
        padding-bottom: 60px;
    }
    .header {
        padding: 0 15px;
    }
}
/* Обертка для изображения в посте */
.post-image {
    margin: 15px 0;
    text-align: center;
}

.post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}