/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Анимированный фон с кошачьими лапками */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.cat-paw {
    position: absolute;
    background: rgba(255, 182, 193, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.cat-paw:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.cat-paw:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.cat-paw:nth-child(3) {
    width: 250px;
    height: 250px;
    bottom: 20%;
    left: 15%;
    animation-delay: 10s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Шапка */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 3em;
    color: #FF6B8B;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.logo h1 {
    font-size: 2.8em;
    background: linear-gradient(45deg, #FF6B8B, #FF8E53);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2em;
    color: #666;
    font-weight: 600;
}

/* Статистика */
.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    padding: 15px 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    color: #FF6B8B;
    font-size: 1.2em;
}

/* Фильтры */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn, .refresh-btn {
    padding: 12px 25px;
    border: none;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.filter-btn:hover, .refresh-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.filter-btn.active {
    background: linear-gradient(45deg, #FF6B8B, #FF8E53);
    color: white;
}

.refresh-btn {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    color: white;
}

/* Галерея */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.cat-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s;
    position: relative;
}

.cat-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.cat-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.cat-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.cat-card:hover .cat-image {
    transform: scale(1.1);
}

.cat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s;
}

.cat-card:hover .cat-overlay {
    opacity: 1;
}

.like-btn, .fullscreen-btn {
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s;
}

.like-btn:hover, .fullscreen-btn:hover {
    background: #FF6B8B;
    color: white;
    transform: scale(1.1);
}

.like-btn.liked {
    background: #FF6B8B;
    color: white;
}

.local-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #4ECDC4;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.cat-info {
    padding: 20px;
}

.cat-info h3 {
    margin-bottom: 10px;
    color: #333;
}

.cat-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9em;
}

.cat-meta i {
    margin-right: 5px;
}

/* Кнопка "Показать еще" */
.load-more-container {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    padding: 15px 40px;
    background: linear-gradient(45deg, #FF6B8B, #FF8E53);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 107, 139, 0.3);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background: white;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 15px;
    color: #aaa;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover {
    color: #FF6B8B;
}

#modal-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 10px;
}

.modal-info {
    padding: 20px;
    text-align: center;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.modal-actions button {
    padding: 10px 25px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.download-btn {
    background: #4ECDC4;
    color: white;
}

.share-btn {
    background: #45B7D1;
    color: white;
}

/* Футер */
.footer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-top: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section p {
    color: #666;
    line-height: 1.6;
}

.footer-section a {
    color: #FF6B8B;
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.social-likes {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.copyright {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
}

.cat-counter {
    text-align: center;
    padding: 20px;
    background: linear-gradient(45deg, #FF6B8B, #FF8E53);
    color: white;
    border-radius: 15px;
    font-size: 1.2em;
}

.cat-counter i {
    font-size: 1.5em;
    margin-right: 10px;
    animation: bounce 2s infinite;
}

/* Адаптивность */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .logo h1 {
        font-size: 2em;
    }
    
    .filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn, .refresh-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Анимация появления карточек */
.cat-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.api-controls {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.api-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.api-selector label {
    font-weight: 600;
    color: #333;
}

.api-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 1em;
    min-width: 200px;
}

.small-btn {
    padding: 10px 20px;
    background: #6c5ce7;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.small-btn:hover {
    background: #5b4fcf;
    transform: translateY(-2px);
}

.api-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #6c5ce7;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-btn {
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s;
}

.info-btn:hover {
    background: #3498db;
    color: white;
}

.api-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.api-list li {
    margin: 5px 0;
}

.api-list a {
    color: #6c5ce7;
    text-decoration: none;
}

.api-list a:hover {
    text-decoration: underline;
}

.api-hint {
    margin-top: 15px;
    text-align: center;
    color: #666;
}

.api-hint code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.no-cats ul {
    text-align: left;
    display: inline-block;
    margin: 15px 0;
}

.no-cats li {
    margin: 8px 0;
}

.cat-card:nth-child(1) { animation-delay: 0.1s; }
.cat-card:nth-child(2) { animation-delay: 0.2s; }
.cat-card:nth-child(3) { animation-delay: 0.3s; }
.cat-card:nth-child(4) { animation-delay: 0.4s; }
.cat-card:nth-child(5) { animation-delay: 0.5s; }
.cat-card:nth-child(6) { animation-delay: 0.6s; }
.cat-card:nth-child(7) { animation-delay: 0.7s; }
.cat-card:nth-child(8) { animation-delay: 0.8s; }
