/* Reset and base styles */
* {
    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;
    padding: 20px;
}
/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}
.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}
/* Main content layout */
.main-content {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}
/* Pet Gallery */
.pet-gallery {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    min-width: 0;
}
/* Responsive grid */
@media (max-width: 1200px) {
    .pet-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .pet-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-content {
        flex-direction: column;
    }
}
@media (max-width: 500px) {
    .pet-gallery {
        grid-template-columns: 1fr;
    }
}
/* Pet Card */
.pet-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.pet-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.pet-card:active {
    transform: scale(0.98);
}
.pet-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}
.pet-card h3 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.3rem;
}
.pet-card .click-count {
    color: #666;
    font-size: 0.9rem;
}
/* Leaderboard */
.leaderboard {
    background: white;
    border-radius: 15px;
    padding: 25px;
    width: 280px;
    height: fit-content;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}
.leaderboard h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}
#leaderboard-list {
    list-style: none;
    padding: 0;
}
#leaderboard-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}
#leaderboard-list li:last-child {
    border-bottom: none;
}
#leaderboard-list li .rank {
    font-weight: bold;
    color: #667eea;
    width: 30px;
}
#leaderboard-list li .name {
    flex: 1;
    color: #333;
}
#leaderboard-list li .clicks {
    color: #666;
    font-weight: bold;
}
/* Top 3 special styling */
#leaderboard-list li:nth-child(1) .rank { color: #FFD700; }
#leaderboard-list li:nth-child(2) .rank { color: #C0C0C0; }
#leaderboard-list li:nth-child(3) .rank { color: #CD7F32; }
/* Emoji container */
#emoji-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}
/* Flying emoji */
.emoji {
    position: fixed;
    font-size: 2rem;
    pointer-events: none;
    animation: flyUp 1.5s ease-out forwards;
    z-index: 1001;
}
@keyframes flyUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-400px) scale(1.5) rotate(360deg);
    }
}
/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}