/* No-scroll setup with the olive green background */
body {
    background-color: rgb(116, 119, 26); 
    font-family: 'Press Start 2P', cursive;
    color: #FFFFFF;
    margin: 0;
    padding: 0;
    height: 100vh; 
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Changed from flex-start to center vertically */
    box-sizing: border-box; 
    position: relative; 
}

/* Background Image moved entirely to CSS */
body::before {
    content: "";
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100vh; 
    background-image: url('library_hero.webp');
    background-size: cover;
    background-position: center; 
    opacity: 0.25; 
    z-index: -1; 
    pointer-events: none; 
    filter: blur(12px); 
    
    /* Slightly increase scale to prevent "white edges" caused by blur */
    transform: scale(1.05);

    /* Smooth fade */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, black 40%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, black 40%);
}

/* Stack the game and buttons vertically */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3vh;
    width: 95%;
    max-width: 1400px;
    z-index: 1;
}

/* WebGL Game Container */
.game-container {
    height: 65vh; /* Slightly taller now that the logo is gone */
    aspect-ratio: 16 / 10; 
    border: 6px solid #111;
    border-radius: 10px;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.3);
    background-color: #000;
    overflow: hidden;
    position: relative; 
    cursor: pointer;    
}

iframe {
    display: block;
    width: 100%; 
    height: 100%;
    border: none;
}

.game-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(50%) brightness(50%) blur(4px);
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.game-container:hover .game-thumbnail {
    filter: grayscale(10%) brightness(60%) blur(1px);
    opacity: 0.9;
    transform: scale(1.02); /* Slight zoom for extra polish */
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Space between SVG and text */
    background-color: #111; 
    color: #F1F2F6; 
    border: 4px solid #F1F2F6;
    border-radius: 12px;
    padding: 25px 45px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    box-shadow: 8px 8px 0px rgba(0,0,0,1);
    transition: all 0.2s ease;
    z-index: 2;
}

/* Styling the Tabler Icon SVG */
.play-icon-svg {
    width: 80px;  /* Large and prominent */
    height: 80px;
    filter: invert(95%) sepia(5%) saturate(150%) hue-rotate(180deg); /* Makes it off-white to match text */
    transition: transform 0.2s ease;
}

.play-btn-text {
    font-size: 14px;
    margin-top: 5px;
}

/* Horizontal row for the buttons */
.button-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Unified Chunky Pixel Art Buttons */
.btn {
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 10px; 
    padding: 12px 18px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px; 
    text-decoration: none;
    background-color: #F1F2F6; 
    color: #111; 
    border: 4px solid #111;
    border-radius: 8px;
    box-shadow: 6px 6px 0px #111;
    text-transform: uppercase;
    transition: transform 0.1s, box-shadow 0.1s;
    cursor: pointer;
}

.btn-icon {
    width: 1.5em; 
    height: 1.5em;
}

.btn:active {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0px #111;
}

/* Fallback for portrait screens/mobile */
@media (max-width: 1000px) {
    .game-container {
        height: auto;
        width: 100%;
        max-height: 50vh;
    }
	.play-icon-svg {
        width: 50px;
        height: 50px;
    }
    .play-btn {
        padding: 15px 30px;
    }
}