* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Анимированные звездочки на фоне */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars::before,
.stars::after {
    content: '✨';
    position: absolute;
    font-size: 20px;
    animation: twinkle 3s infinite;
}

.stars::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.stars::after {
    top: 60%;
    right: 15%;
    animation-delay: 1.5s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 1s ease-out;
}

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

.title {
    font-size: 3.5rem;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

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

.emoji {
    display: inline-block;
    animation: rotate 2s infinite;
}

@keyframes rotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-15deg);
    }
    75% {
        transform: rotate(15deg);
    }
}

.subtitle {
    font-size: 1.5rem;
    color: #f0e6ff;
    font-style: italic;
}

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

.cat-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out backwards;
    cursor: pointer;
}

.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; }

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

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

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.cat-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cat-card:hover .card-overlay {
    transform: translateY(0);
}

.card-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.card-overlay p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.view-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

/* Кнопка входа */
.login-button-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.login-trigger-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.login-trigger-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 5px 30px rgba(102, 126, 234, 0.7);
    }
}

/* Форма авторизации */
.login-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.login-form-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.login-form-container h2 {
    color: white;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.login-subtitle {
    color: #f0e6ff;
    text-align: center;
    margin-bottom: 30px;
    font-style: italic;
}

.close-login {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-login:hover {
    color: #f5576c;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: white;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 1.1rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transform: scale(1.02);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.4);
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.6);
}

.login-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    display: none;
}

.login-message.error {
    background: rgba(255, 59, 48, 0.9);
    color: white;
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

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

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

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

#caption {
    margin: auto;
    display: block;
    text-align: center;
    color: #ccc;
    padding: 20px;
    font-size: 1.2rem;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.close {
    position: absolute;
    top: 30px;
    right: 45px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
}

.close:hover {
    color: #f5576c;
}

/* Кнопка загрузки новых котиков */
.load-more-container {
    text-align: center;
    margin: 40px 0 60px 0;
    animation: fadeIn 1s ease-out 0.8s backwards;
}

.load-more-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.5);
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.load-more-btn:hover::before {
    width: 300px;
    height: 300px;
}

.load-more-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(245, 87, 108, 0.7);
}

.load-more-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    animation: loadingPulse 1s infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.load-info {
    margin-top: 15px;
    color: white;
    font-size: 1rem;
    font-style: italic;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Футер */
footer {
    text-align: center;
    color: white;
    padding: 30px 0;
    animation: fadeIn 1s ease-out 0.8s backwards;
}

footer p {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.paw-prints {
    font-size: 2rem;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.paw-prints span {
    display: inline-block;
    animation: bounce 1s infinite;
}

.paw-prints span:nth-child(1) { animation-delay: 0s; }
.paw-prints span:nth-child(2) { animation-delay: 0.2s; }
.paw-prints span:nth-child(3) { animation-delay: 0.4s; }

/* Адаптивность */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cat-card img {
        height: 250px;
    }
    
    .login-button-container {
        top: 10px;
        right: 10px;
    }
    
    .login-trigger-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .login-form-container {
        padding: 30px 20px;
        width: 95%;
    }
    
    .login-form-container h2 {
        font-size: 1.5rem;
    }
    
    .load-more-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
    
    .load-info {
        font-size: 0.9rem;
        padding: 0 20px;
    }
}
