* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #8B5A2B;  /* древесно-карий фон */
    background-image: radial-gradient(circle at 10% 30%, #A67B5B 0%, #6B4F3A 100%);
    min-height: 100vh;
    color: #333;
}

header {
    text-align: center;
    padding: 50px 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    margin-bottom: 30px;
    border-bottom: 3px solid #5D3A1A;
}

h1 {
    font-size: 3.5rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.neon {
    background: linear-gradient(45deg, #8B5A2B, #5D3A1A);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(139, 90, 43, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: #5D3A1A;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #D2B48C;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid #8B5A2B;
}

.info {
    padding: 20px;
    background: white;
}

.info h3 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 8px;
}

.date {
    color: #8B5A2B;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.date::before {
    content: '📅';
    font-size: 1rem;
}

/* Кнопки лайка и сохранения */
.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #D2B48C;
}

.like-btn, .save-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background: #F5F0E6;
    color: #5D3A1A;
}

.like-btn i, .save-btn i {
    font-size: 16px;
}

.like-btn:hover {
    background: #fed7d7;
    color: #e53e3e;
}

.like-btn.liked {
    background: #e53e3e;
    color: white;
}

.like-btn.liked i {
    color: white;
}

.save-btn:hover {
    background: #D2B48C;
    color: #5D3A1A;
}

.save-btn.saved {
    background: #5D3A1A;
    color: white;
}

.save-btn.saved i {
    color: white;
}

.count {
    font-weight: 600;
    min-width: 20px;
}

/* Панель сохранённых */
.saved-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background: #F5F0E6;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    border: 2px solid #8B5A2B;
}

.saved-panel h3 {
    color: #5D3A1A;
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #D2B48C;
}

.saved-panel h3 i {
    color: #5D3A1A;
    margin-right: 8px;
}

#saved-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.saved-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    border: 1px solid #D2B48C;
}

.saved-item:hover {
    background: #F5F0E6;
}

.saved-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #8B5A2B;
}

.saved-item span {
    font-size: 14px;
    color: #5D3A1A;
}

.remove-saved {
    margin-left: auto;
    color: #8B5A2B;
    font-size: 14px;
}

.remove-saved:hover {
    color: #e53e3e;
}

footer {
    text-align: center;
    padding: 30px;
    background: rgba(245, 240, 230, 0.9);
    margin-top: 50px;
    color: #5D3A1A;
    border-top: 3px solid #5D3A1A;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .saved-panel {
        width: 250px;
        bottom: 10px;
        right: 10px;
    }
}