/* --- Общие стили --- */
body {
    font-family: 'Inter', Arial, sans-serif;
    /* применяем Inter */
    background: #f0f0f0;
    /* фон страницы */
    margin: 0;
    padding: 20px 0;
}

.container {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
}

/* --- Лента клуба --- */
.club-list-wrapper {
    margin-bottom: 20px;
}

.club-list .club-item {
    position: relative;
    /* для позиции даты */
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.club-list .club-item:last-child {
    margin-bottom: 0;
}

.club-list .club-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* --- Логотип автора (НОВЫЙ СТИЛЬ) --- */
.post-author-logo {
    position: absolute;
    top: 12px;
    /* было bottom */
    left: 12px;
    /* было right */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    background: #fff;
    z-index: 5;
}

.post-author-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Заголовок поста и дата --- */
.club-item .post-header {
    position: absolute;
    top: -13px;
    right: 10px;
}

.club-item .post-header .date {
    font-size: 12px;
    color: #b0b0b0;
}

/* --- Текст поста (превью) --- */
.post-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.post-link:hover {
    text-decoration: none;
}

/* --- Текст поста (превью) --- */
.post-link .post-preview {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
    text-align-last: left;
}

/* --- если внутри есть <p>, убираем лишние отступы --- */
.post-link .post-preview p {
    margin: 0 0 0.5em 0;
}

/* --- Дата поста --- */
.club-item .date {
    font-size: 12px;
    color: #666;
    display: block;
}

/* --- Изображения в записях клуба (16:9 превью) --- */
.club-item img.club-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    margin: 10px 0;
}

/* --- Футер поста (лайк/дизлайк/комменты) --- */
.club-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.club-footer button {
    border: none;
    background: transparent;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 15px;
    cursor: pointer;
    padding: 7px 14px;
    border-radius: 6px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.club-footer button:hover {
    background: #f2f2f2;
    transform: translateY(-2px);
}

.btn-like {
    color: green;
    flex: 1;
    text-align: left;
}

.btn-dislike {
    color: red;
    flex: 1;
    text-align: center;
}

.btn-comment {
    color: #333;
    flex: 1;
    text-align: right;
}

/* --- Форма регистрации --- */
.register-box {
    max-width: 400px;
    margin: 20px auto 40px auto;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', Arial, sans-serif;
}

.register-box h2 {
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
}

.register-box input[type="text"],
.register-box input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.register-box button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #2a9df4;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.register-box button:hover {
    background: #1c82d1;
}

.register-box .message {
    text-align: center;
    color: red;
    margin-bottom: 10px;
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@media (max-width: 600px) {

    body {
        padding: 0;
        margin: 0;
        background: #f0f0f0;
        font-size: 18px;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        margin: 0 auto;
    }

    .club-item {
        width: 100%;
        margin: 0 0 20px 0;
        border-radius: 8px;
        box-shadow: none;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        background: #fff;
        padding: 20px;
        font-size: 17px;
    }

    .club-item h1,
    .club-item h2,
    .club-item h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .club-item .date {
        font-size: 14px;
        color: #777;
    }

    .post-link .post-preview {
        font-size: 18px;
        line-height: 1.8;
        -webkit-line-clamp: 10;
        text-align: justify;
    }

    .club-item img.club-image {
        width: 100%;
        border-radius: 8px;
        margin: 10px 0;
        aspect-ratio: 16/9;
        object-fit: cover;
        object-position: center;
    }

    /* Мобильный логотип автора */
        .post-author-logo {
            width: 82px;
            height: 82px;
            top: 10px;
            /* было bottom */
            left: 10px;
            /* было right */
            border: 2px solid #fff;
        }

    .club-footer {
        flex-direction: column;
        align-items: stretch;
        margin-top: 15px;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }

    .club-footer button {
        width: 100%;
        font-size: 18px;
        padding: 14px 0;
        margin: 6px 0;
        border-radius: 8px;
        background: #fafafa;
        border: 1px solid #ddd;
    }

    .club-footer button:hover {
        background: #f0f0f0;
    }

    .register-box {
        width: 100%;
        margin: 0;
        border-radius: 8px;
        padding: 25px;
        box-shadow: none;
        font-size: 18px;
    }

    .register-box button {
        font-size: 20px;
        padding: 16px;
        border-radius: 8px;
    }

    .post-link,
    .post-author-logo,
    .club-footer button {
        touch-action: manipulation;
    }
}