/* Основной стиль */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #fafafa;
    font-family: 'Arial', sans-serif;
    background-image: url("foneeed.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.logo {
    position: absolute;   /* абсолютное позиционирование */
    top: 10px;            /* отступ сверху */
    left: 10px;           /* отступ слева */
    width: 100px;          /* маленькая ширина (размер логотипа) */
    height: auto;         /* сохраняем пропорциональность */
    z-index: 1000;        /* делаем логотип поверх других элементов */
}

/* Чтобы удостовериться, что никаких глобальных стилей не влияют на логотип */
body, .logo {
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.grid-container {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    vertical-align: middle;
}

.card h2 {
    color: white;
    font-size: 24px;
    margin-top: 10px;
    text-align: center;
    text-shadow: 2px 2px 4px black;
}

.card button {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.card:hover button {
    background-color: rgba(255, 255, 255, 0.1);
}

.card:hover {
    transform: scale(1.05);
}

.search-bar {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px;
    background-color: #fafafa;
    z-index: 1000;
}

.container h1 {
    text-align: center;
}

/* Стиль для кнопок пагинации */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    background-color: #333;
    color: white;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-size: 14px;
    outline: none;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-right: 5px;
}

.pagination button.active,
.pagination button:hover {
    background-color: #ff6b6b;
    transform: scale(1.1);
}

/* Мобильная версия */
@media (max-width: 768px) {
    .card h2 {
        font-size: 20px;
    }

    .card button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Экстра-маленькие экраны */
@media (max-width: 480px) {
    .search-bar input {
        width: 60%;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Новая секция для кнопки комментариев */
.open-chat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ff6b6b;
    color: white;
    border-radius: 50%;
    height: 50px;
    width: 50px;
    font-size: 2em;
    text-decoration: none;
    transition: transform .3s ease-in-out;
    z-index: 1000;
}

.open-chat-btn:hover,
.open-chat-btn:focus {
    transform: scale(1.1);
}

.icon {
    margin-top: 5px;
}

/* Окно комментариев */
.chat-window {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.chat-window.show {
    visibility: visible;
    opacity: 1;
}