@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
    image-rendering: pixelated;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.star {
    position: absolute;
    color: white;
    font-size: 24px;
    animation: twinkle 2s infinite;
}

.star:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.star:nth-child(2) { top: 25%; right: 15%; animation-delay: 0.5s; }
.star:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 1s; }
.star:nth-child(4) { bottom: 20%; right: 25%; animation-delay: 1.5s; }

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.pixel-header {
    margin-bottom: 40px;
}

.pixel-title {
    font-size: 32px;
    color: white;
    text-shadow: 
        4px 0 0 #000,
        -4px 0 0 #000,
        0 4px 0 #000,
        0 -4px 0 #000,
        4px 4px 0 #000,
        -4px -4px 0 #000,
        4px -4px 0 #000,
        -4px 4px 0 #000;
    letter-spacing: 4px;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px #00ff00); }
    to { filter: drop-shadow(0 0 20px #00ff00); }
}

.game-area {
    position: relative;
    height: 200px;
    margin: 40px 0;
}

.dino-characters {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 150px;
    margin-bottom: 20px;
}

.dino {
    font-size: 48px;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(2px 2px 0 #000);
    position: relative;
}

.dino.green { 
    animation-delay: 0s; 
    color: #7ED321;
}

.dino.blue { 
    animation-delay: 0.5s; 
    color: #50E3C2;
}

.dumpling { 
    font-size: 32px;
    animation: spin 4s linear infinite;
    color: #F5A623;
    align-self: center;
}

.dino.fire { 
    animation-delay: 1s; 
    color: #D0021B;
}

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

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

.platform {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: #7ED321;
    border: 4px solid #000;
    box-shadow: inset 0 -4px 0 #5BA617;
}

.warning-modal {
    background: #E8E8E8;
    border: 4px solid #000;
    border-radius: 0;
    max-width: 400px;
    margin: 30px auto;
    color: #000;
    box-shadow: 8px 8px 0 #000;
}

.modal-header {
    background: #C4C4C4;
    border-bottom: 2px solid #000;
    padding: 8px;
    text-align: right;
}

.close-btn {
    background: #FF5F56;
    border: 2px solid #000;
    color: #000;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
}

.close-btn:hover {
    background: #FF3B30;
}

.modal-content {
    padding: 20px;
}

.warning-title {
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

.warning-text {
    font-size: 10px;
    line-height: 1.6;
    text-align: left;
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pixel-btn {
    background: #7ED321;
    border: 4px solid #000;
    color: #000;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.1s;
    text-transform: uppercase;
    box-shadow: 4px 4px 0 #000;
}

.pixel-btn:hover {
    background: #9AE82F;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

.pixel-btn:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

.download-btn {
    background: #F5A623;
}

.download-btn:hover {
    background: #FFB84D;
}

.gallery-btn {
    background: #50E3C2;
}

.gallery-btn:hover {
    background: #7CEBD7;
}

.stats-bar {
    background: #000;
    border: 2px solid #7ED321;
    padding: 15px;
    display: flex;
    justify-content: space-around;
    margin-top: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 8px;
    color: #7ED321;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 14px;
    color: white;
}

.retro-gallery {
    background: #000;
    padding: 40px 20px;
    border-top: 4px solid #7ED321;
    margin-top: 40px;
}

.section-title {
    text-align: center;
    font-size: 24px;
    color: #7ED321;
    margin-bottom: 30px;
    text-shadow: 2px 2px 0 #000;
}

.retro-dino-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.retro-dino-card {
    background: #1a1a1a;
    border: 2px solid #7ED321;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.retro-dino-card:hover {
    background: #2a2a2a;
    border-color: #9AE82F;
    transform: scale(1.05);
}

.retro-dino-emoji {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
    filter: drop-shadow(1px 1px 0 #000);
}

.retro-dino-name {
    font-size: 10px;
    color: #7ED321;
    margin-bottom: 8px;
}

.retro-dino-status {
    font-size: 8px;
    color: #50E3C2;
    margin-bottom: 5px;
}

.retro-dino-stats {
    font-size: 8px;
    color: #F5A623;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .pixel-title {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .dino {
        font-size: 32px;
    }
    
    .dumpling {
        font-size: 24px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .pixel-btn {
        font-size: 10px;
        padding: 12px 20px;
    }
    
    .stats-bar {
        flex-direction: column;
        text-align: center;
    }
    
    .warning-text {
        font-size: 8px;
    }
}

/* Loading animation for dinos */
.loading-dino {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Retro footer */
.retro-footer {
    background: #000;
    border-top: 4px solid #7ED321;
    padding: 30px 20px;
    text-align: center;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-link {
    background: #7ED321;
    border: 3px solid #000;
    color: #000;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    padding: 12px 20px;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.1s;
    box-shadow: 3px 3px 0 #000;
}

.footer-link:hover {
    background: #9AE82F;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

.footer-link:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}