/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: 
        linear-gradient(180deg, rgba(135, 206, 235, 0.8) 0%, rgba(34, 139, 34, 0.9) 40%, rgba(34, 100, 34, 1) 100%),
        repeating-linear-gradient(90deg, transparent 0px, rgba(46, 125, 50, 0.1) 1px, transparent 2px),
        radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 195, 74, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(102, 187, 106, 0.2) 0%, transparent 50%);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="%23228B22" opacity="0.3"/><circle cx="80" cy="30" r="1.5" fill="%2332CD32" opacity="0.2"/><circle cx="60" cy="70" r="1" fill="%2390EE90" opacity="0.4"/><circle cx="10" cy="60" r="1.8" fill="%234F7942" opacity="0.3"/><circle cx="90" cy="80" r="1.2" fill="%236B8E23" opacity="0.2"/></svg>');
    background-size: 200px 200px;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
.header {
    background: 
        linear-gradient(135deg, rgba(46, 125, 50, 0.95) 0%, rgba(76, 175, 80, 0.9) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><path d="M30 5 L35 15 L30 25 L25 15 Z" fill="%23228B22" opacity="0.3"/><path d="M10 15 L15 25 L10 35 L5 25 Z" fill="%2332CD32" opacity="0.2"/><path d="M50 10 L55 20 L50 30 L45 20 Z" fill="%234F7942" opacity="0.3"/></svg>');
    background-size: 120px 120px;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid rgba(34, 139, 34, 0.6);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(34, 139, 34, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.nav-link:hover {
    background: rgba(34, 139, 34, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 100, 34, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Hero section */
.hero {
    background: 
        linear-gradient(180deg, rgba(135, 206, 235, 0.7) 0%, rgba(102, 187, 106, 0.8) 50%, rgba(76, 175, 80, 0.9) 100%),
        url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=1200&h=600&fit=crop&crop=center'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 100"><ellipse cx="50" cy="80" rx="30" ry="15" fill="%2332CD32" opacity="0.3"/><ellipse cx="150" cy="75" rx="25" ry="20" fill="%234F7942" opacity="0.2"/><ellipse cx="100" cy="85" rx="20" ry="10" fill="%2390EE90" opacity="0.4"/></svg>');
    background-size: cover, cover, 400px 200px;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, repeat;
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid rgba(34, 139, 34, 0.5);
}
.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-text {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.cta-button {
    background: 
        linear-gradient(135deg, rgba(139, 195, 74, 0.95) 0%, rgba(104, 159, 56, 1) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><circle cx="5" cy="5" r="1" fill="%23228B22" opacity="0.3"/><circle cx="15" cy="8" r="0.8" fill="%2332CD32" opacity="0.4"/><circle cx="8" cy="15" r="1.2" fill="%234F7942" opacity="0.2"/></svg>');
    color: white;
    border: 3px solid rgba(34, 139, 34, 0.6);
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    animation: fadeInUp 1s ease-out 0.6s both;
    text-shadow: 1px 1px 2px rgba(34, 100, 34, 0.8);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.6);
    background: linear-gradient(135deg, rgba(104, 159, 56, 1) 0%, rgba(76, 175, 80, 1) 100%);
}

/* Floating dinosaurs */
.floating-dinos {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-dino {
    position: absolute;
    font-size: 3rem;
    animation: float 6s ease-in-out infinite;
}

.floating-dino:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-dino:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-dino:nth-child(3) {
    top: 40%;
    left: 80%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(5deg); }
    66% { transform: translateY(10px) rotate(-3deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section styles */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Dinosaurs section */
.dinosaurs-section {
    background: 
        linear-gradient(135deg, rgba(76, 175, 80, 0.9) 0%, rgba(139, 195, 74, 0.8) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10 80 L15 60 L25 65 L30 50 L40 55 L45 40 L55 45 L60 30 L70 35 L75 20 L85 25 L90 80 Z" fill="%23228B22" opacity="0.2"/><path d="M5 85 L20 70 L35 75 L50 60 L65 65 L80 50 L95 85 Z" fill="%234F7942" opacity="0.3"/></svg>');
    background-size: 300px 300px;
}

.dinosaur-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dinosaur-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dinosaur-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.dinosaur-card:hover::before {
    animation: shine 0.5s ease-in-out;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 0; }
}

.dinosaur-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.dino-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.dinosaur-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.card-emoji {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Fun facts section */
.fun-facts-section {
    background: 
        linear-gradient(135deg, rgba(139, 195, 74, 0.8) 0%, rgba(102, 187, 106, 0.9) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><circle cx="25" cy="25" r="8" fill="%23228B22" opacity="0.2"/><circle cx="75" cy="40" r="12" fill="%234F7942" opacity="0.3"/><circle cx="125" cy="30" r="6" fill="%2332CD32" opacity="0.4"/><circle cx="40" cy="80" r="10" fill="%2390EE90" opacity="0.2"/><circle cx="110" cy="90" r="9" fill="%236B8E23" opacity="0.3"/><circle cx="20" cy="120" r="7" fill="%23228B22" opacity="0.2"/><circle cx="90" cy="130" r="11" fill="%234F7942" opacity="0.3"/></svg>');
    background-size: 250px 250px;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.fact-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.fact-card:hover {
    transform: translateY(-5px) rotate(2deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.fact-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.fact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Games section */
.games-section {
    background: 
        linear-gradient(135deg, rgba(102, 187, 106, 0.9) 0%, rgba(76, 175, 80, 1) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120"><path d="M20 100 L25 85 L35 90 L40 75 L50 80 L55 65 L65 70 L70 55 L80 60 L85 45 L95 50 L100 100 Z" fill="%23228B22" opacity="0.3"/><path d="M10 105 L30 90 L50 95 L70 80 L90 85 L110 105 Z" fill="%234F7942" opacity="0.2"/><circle cx="60" cy="30" r="15" fill="%2390EE90" opacity="0.2"/><circle cx="30" cy="40" r="8" fill="%236B8E23" opacity="0.3"/><circle cx="90" cy="35" r="10" fill="%2332CD32" opacity="0.2"/></svg>');
    background-size: 200px 200px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.game-button {
    background: 
        linear-gradient(135deg, rgba(46, 125, 50, 0.95) 0%, rgba(76, 175, 80, 1) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><circle cx="8" cy="8" r="2" fill="%23228B22" opacity="0.4"/><circle cx="22" cy="12" r="1.5" fill="%2332CD32" opacity="0.3"/><circle cx="15" cy="20" r="1.8" fill="%234F7942" opacity="0.2"/></svg>');
    color: white;
    border: 2px solid rgba(34, 139, 34, 0.5);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-shadow: 1px 1px 2px rgba(34, 100, 34, 0.8);
}

.game-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.5);
    background: linear-gradient(135deg, rgba(76, 175, 80, 1) 0%, rgba(104, 159, 56, 1) 100%);
}

.counting-game {
    font-size: 2rem;
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.count-dino {
    transition: all 0.3s ease;
}

.count-dino:hover {
    transform: scale(1.3);
}

.dance-dino {
    font-size: 4rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.dancing {
    animation: dance 0.5s ease-in-out infinite;
}

@keyframes dance {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* Popup styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: popupAppear 0.3s ease-out;
}

@keyframes popupAppear {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #ff4757;
}

.dino-facts {
    list-style: none;
    margin-top: 1rem;
}

.dino-facts li {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border-radius: 10px;
    font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .floating-dino {
        font-size: 2rem;
    }
}