/* Game Pages-Specific Styles (globber & snailrace) */

/* Header Animation */
header {
    animation: flicker 0.1s infinite alternate;
}

/* Game Overlay Styles */
#gameOver h2 {
    color: #e53e3e;
    margin: 0 0 10px 0;
    font-size: 14px;
}

#gameWon h2, #levelComplete h2, #startScreen h2 {
    color: #38a169;
    margin: 0 0 10px 0;
    font-size: 14px;
}

#startScreen h2 {
    color: #a3a3ff;
    font-size: 16px;
}

#gameOver p, #gameWon p {
    font-size: 10px;
    margin: 5px 0;
}

/* Button Styles */
button {
    background: #7c70da;
    color: #3e31a2;
    border: 2px solid #a3a3ff;
    padding: 8px 15px;
    font-size: 9px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    margin-top: 10px;
}

button:hover {
    background: #a3a3ff;
}

/* Top Navigation Bar */
.top-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.category-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.category-nav .nav-btn {
    padding: 10px 18px;
    font-size: 10px;
    text-decoration: none;
}

.category-nav .nav-btn.active {
    background: #a3a3ff;
    color: #3e31a2;
    cursor: default;
    pointer-events: none;
}

/* Code Screenshot Images */
.code-image-content {
    padding: 0;
    text-align: center;
    background: #1a1a2e;
}

.code-image-content.open {
    max-height: 500px;
}

.code-screenshot {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}


/* Image Gallery */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
}

.image-gallery img {
    flex: 1 1 300px;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    border: 3px solid #7c70da;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(124, 112, 218, 0.3);
}


.image-gallery .gallery-item {
    position: relative;
    flex: 1 1 400px;
    max-width: 400px;
}

.image-gallery .gallery-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border: 3px solid #7c70da;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(124, 112, 218, 0.3);
}

.image-gallery .filename {
    position: absolute;
    top: 100%;
    transform: translate(0%, -70%);
    background: rgba(26, 26, 26, 0.85);
    color: #a3a3ff;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid #7c70da;
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
}

@media (max-width: 600px) {
    .image-gallery img {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Download Overrides */
.download-item:hover {
    transform: translateX(5px);
}

.download-icon {
    width: 32px;
    height: 32px;
}

.download-link {
    font-size: 11px;
}

.download-filename {
    font-weight: bold;
}

.download-description {
    font-size: 9px;
    color: #7c70da;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .monitor-container {
        margin: 10px;
        padding: 20px 10px 30px;
    }
    
    .screen {
        padding: 10px;
        border-width: 5px;
    }
    
    h1 {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .nav-btn {
        font-size: 9px;
        padding: 10px 15px;
    }
    
    .content-box {
        font-size: 9px;
        padding: 10px;
    }
    
    h2 {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    p {
        margin-bottom: 8px;
    }
    
    .mini-monitor {
        padding: 8px 6px 15px;
    }
    
    .mini-screen {
        border-width: 2px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .monitor-container {
        margin: 5px;
        padding: 20px 10px 40px;
    }
    
    .screen {
        padding: 10px;
        border-width: 5px;
    }
    
    h1 {
        font-size: 10px;
        letter-spacing: 0.5px;
    }
    
    h2 {
        font-size: 10px;
    }
    
    .nav-btn {
        font-size: 7px;
        padding: 8px 12px;
    }
    
    .content-box {
        font-size: 8px;
        padding: 12px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .coming-soon-text {
        font-size: 36px;
    }
    
    img[alt="Sönke Schultz"] {
        max-width: 100px !important;
        width: 100px !important;
    }
    
    .download-icon {
        font-size: 20px;
        width: 28px;
        height: 28px;
    }
    
    .download-link {
        font-size: 8px;
    }
    
    .download-description {
        font-size: 7px;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .lightbox-caption {
        font-size: 10px;
    }
}

/* Stats Grid Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px;
}

.stat-item {
    background: rgba(124, 112, 218, 0.1);
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #7c70da;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-item .stat-label {
    font-size: 0.7em;
}

.stat-item .stat-value {
    font-size: 1.2em;
    color: #a29bff;
}

.stat-item .stat-unit {
    font-size: 0.6em;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

.lightbox-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: zoomIn 0.3s;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border: 5px solid #7c70da;
    box-shadow: 0 0 50px rgba(124, 112, 218, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #a3a3ff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transition: all 0.2s;
}

.lightbox-close:hover {
    color: #7c70da;
    transform: scale(1.2);
}

.lightbox-caption {
    text-align: center;
    color: #a3a3ff;
    font-size: 14px;
    margin-top: 15px;
    text-shadow: 2px 2px 0 #5050c8;
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.gallery-item img {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(124, 112, 218, 0.4);
}
