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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 3.5rem;
    color: #ff6b6b;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: case;
}

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.counter {
    display: flex;
    align-items: center;
    gap: 15px;
}

.counter span {
    font-family: 'Fredoka One', cursive;
    font-size: 3rem;
    color: #ff6b6b;
    background: #ffeaa7;
    padding: 10px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.counter p {
    font-size: 1.1rem;
    color: #666;
}

.controls {
    display: flex;
    gap: 15px;
}

button {
    font-family: 'Fredoka One', cursive;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    background: #4ecdc4;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.5);
}

#rainbow-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
}

#night-btn {
    background: #2d3436;
}

#reset-btn {
    background: #ff9ff3;
}

.scene {
    position: relative;
    height: 600px;
    border-radius: 25px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to bottom, #87ceeb, #e0f7ff);
}

.sun {
    position: absolute;
    top: 40px;
    right: 60px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #ffdd59, #ff9f43);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 221, 89, 0.7);
    animation: spin 20s linear infinite;
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.cloud1 {
    top: 100px;
    left: 10%;
    width: 120px;
    height: 60px;
    animation: float 25s linear infinite;
}

.cloud2 {
    top: 150px;
    left: 40%;
    width: 150px;
    height: 70px;
    animation: float 30s linear infinite reverse;
}

.cloud3 {
    top: 80px;
    left: 70%;
    width: 100px;
    height: 50px;
    animation: float 20s linear infinite;
}

.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, #a3d977, #86c270);
}

.flower {
    position: absolute;
    bottom: 30px;
    width: 40px;
    height: 60px;
    background: #ff9ff3;
    border-radius: 50%;
    animation: sway 3s ease-in-out infinite;
}

.flower1 {
    left: 15%;
}

.flower2 {
    left: 35%;
}

.flower3 {
    left: 55%;
}

.flower4 {
    left: 75%;
}

#cats-container {
    position: absolute;
    bottom: 30%;
    left: 0;
    width: 100%;
    height: 300px;
}

footer {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    color: #666;
}

footer p {
    margin-bottom: 10px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0% { transform: translateX(0); }
    50% { transform: translateX(30px); }
    100% { transform: translateX(0); }
}

@keyframes sway {
    0% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
    100% { transform: rotate(-5deg); }
}

/* Cat styling */
.cat {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    user-select: none;
}

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

.cat-name {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.cat:hover .cat-name {
    opacity: 1;
}

/* Sparkle effect */
.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: gold;
    border-radius: 50%;
    animation: sparkle-pop 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes sparkle-pop {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Night mode */
.night-mode {
    background: linear-gradient(135deg, #0c2461 0%, #1e3c72 100%) !important;
}

.night-mode .sky {
    background: linear-gradient(to bottom, #0a1931, #1a1a2e) !important;
}

.night-mode .sun {
    background: radial-gradient(circle, #f8c291, #f5a623) !important;
    box-shadow: 0 0 40px rgba(248, 194, 145, 0.5) !important;
}

.night-mode .ground {
    background: linear-gradient(to top, #2d3436, #636e72) !important;
}

.night-mode header,
.night-mode .stats,
.night-mode footer {
    background: #2d3436 !important;
    color: #dfe6e9 !important;
}

/* Rainbow mode */
.rainbow-mode .cat {
    animation: rainbow-color 2s linear infinite !important;
}

@keyframes rainbow-color {
    0% { background: #ff6b6b; }
    20% { background: #4ecdc4; }
    40% { background: #45b7d1; }
    60% { background: #96ceb4; }
    80% { background: #feca57; }
    100% { background: #ff6b6b; }
}