/* Basic styles and reset */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0; /* Page background color */
    display: flex;
    flex-direction: column; /* Vertical stacking layout */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    overflow-y: auto; /* Allow vertical scrolling */
}

/* Header styles */
.header {
    background-color: #28a745; /* Green background */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo {
    font-size: 1.8em;
    font-weight: bold;
    color: white; /* Ensure logo text is white */
    text-decoration: none; /* Remove underline from logo link */
}

.header .logo:hover {
    text-decoration: underline; /* Add underline on hover for logo */
}

/* Hero Section styles */
.hero-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 50px 20px;
}

.hero-section h1 {
    color: #333;
    font-size: 4em; /* Make H1 more prominent */
    margin-bottom: 20px;
    line-height: 1.1; /* Tighter line height for better display */
}

.hero-section p {
    color: #555;
    font-size: 1.3em; /* Slightly larger for better readability */
    max-width: 700px; /* Wider for more descriptive text */
    margin-bottom: 40px;
    line-height: 1.6; /* Improved line height for readability */
}

/* Buttons styles */
.buttons {
    display: flex;
    gap: 20px; /* Space between buttons */
}

.buttons .play-now-btn {
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 2em;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    background-color: #28a745; /* Green */
    color: white;
    border: none;
    text-decoration: none; /* Remove underline for anchor button */
}

.buttons .play-now-btn:hover {
    background-color: #218838; /* Darker green on hover */
}

.download-game-btn {
    background-color: white;
    color: #28a745; /* Green text */
    border: 2px solid #28a745; /* Green border */
}

.download-game-btn:hover {
    background-color: #f0f0f0; /* Light grey on hover */
}

/* Content Section styles */
.content-section {
    width: 80%;
    max-width: 800px;
    margin: 30px auto;
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    line-height: 1.6;
    color: #444;
}

.content-section h2 {
    color: #007bff; /* Blue color for section titles */
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 2.2em; /* Slightly larger H2 for sections */
    text-align: center; /* Center align H2 for better presentation */
    padding-bottom: 5px; /* Small padding at bottom */
    border-bottom: 1px solid #eee; /* Subtle line under H2 */
}

.content-section p {
    margin-bottom: 15px; /* More spacing between paragraphs */
    font-size: 1.1em; /* Slightly larger font for readability */
    line-height: 1.7; /* Increased line height for comfort */
    text-align: justify; /* Justify text for a cleaner look */
}

.content-section ul {
    list-style-type: disc; /* Ensure consistent list styling */
    margin-left: 20px; /* Indent lists */
    margin-bottom: 15px;
}

.content-section li {
    margin-bottom: 8px; /* Spacing between list items */
    line-height: 1.5;
}

/* Game iframe container inside content section */
.content-section .game-iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
    height: 0;
    overflow: hidden;
    background-color: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,255,255,0.4);
    margin-top: 20px;
    margin-bottom: 20px;
}

.content-section .game-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.content-section .game-iframe-container .loading-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: opacity 0.5s ease-in-out;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }
    .header .logo {
        margin-bottom: 10px;
    }
    .hero-section {
        padding: 30px 15px;
    }
    .hero-section h1 {
        font-size: 2.8em;
    }
    .hero-section p {
        font-size: 1.1em;
    }
    .buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .buttons .play-now-btn {
        width: 100%;
    }
    .content-section {
        width: 95%;
        padding: 15px;
    }
    .content-section h2 {
        font-size: 1.8em;
    }
    .content-section p {
        text-align: left; /* Revert to left align for smaller screens */
    }
}

/* Title style */
h1 {
    color: #333;
    text-align: center;
    margin: 20px 0 10px; /* Top margin 20px, bottom 10px, for game area */
    font-size: 2em;
}

/* Game area container */
.game-area-wrapper {
    flex-grow: 1; /* Allow game area to take remaining space */
    display: flex;
    justify-content: center; /* Horizontally center iframe */
    align-items: center; /* Vertically center iframe */
    width: 100%; /* Occupy full parent width */
    padding: 10px; /* Padding around game area */
    box-sizing: border-box; /* Padding does not add to total width */
}

/* Responsive iframe container, height limited within viewport */
.game-iframe-container {
    position: relative; /* Key: For positioning loading image */
    width: 80%; /* Width 90% of parent */
    max-width: 800px; /* Max width for game area */
    height: calc(100vh - 120px); /* Viewport height minus estimated top title and wrapper padding */
    max-height: 70vw; /* Example: Limit max height to 70% of viewport width to maintain aspect ratio */
    background-color: #1a1a1a; /* Game container background */
    border: 2px solid #555; /* Border */
    border-radius: 8px;
    overflow: hidden; /* Hide overflow content */
    box-shadow: 0 0 15px rgba(0,255,255,0.4);
    display: flex; /* Flexbox to center iframe */
    justify-content: center;
    align-items: center;
}

/* Loading image style */
.game-iframe-container .loading-image {
    position: absolute; /* Absolute positioning, cover entire container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintain aspect ratio, crop to fill container */
    z-index: 1; /* Ensure below iframe, but above background */
    transition: opacity 0.5s ease-in-out; /* Add fade-out animation */
}

.game-iframe-container iframe {
    width: 100%; /* Fill container width */
    height: 100%; /* Fill container height */
    border: none;
    display: block;
    position: relative; /* Ensure iframe is above loading image */
    z-index: 2; /* Ensure iframe is above loading image */
    background-color: transparent; /* Allow background image to show until iframe content loads */
}

/* When iframe is loaded, hide loading image */
.game-iframe-container.loaded .loading-image {
    opacity: 0; /* Fade out effect */
    pointer-events: none; /* No longer respond to mouse events after hidden */
}

/* SEO content area */
.seo-content {
    width: 80%;
    max-width: 800px; /* Max width consistent with game area */
    margin: 30px auto; /* Top spacing 30px, auto for left/right centering */
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    line-height: 1.6;
    color: #444;
}

.seo-content h2 {
    color: #007bff;
    margin-bottom: 15px;
}

.seo-content p {
    margin-bottom: 10px;
}

/* Media queries for mobile devices */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5em;
        margin: 10px 0 5px;
    }
    .game-area-wrapper {
        padding: 5px;
    }
    .game-iframe-container {
        width: 98%; /* Wider for mobile */
        height: calc(100vh - 100px); /* Adjusted reserved height */
        max-height: 100vw; /* Mobile might be more square, adjust as needed */
    }
    .seo-content {
        width: 95%;
        padding: 15px;
    }
}

/* Footer styles */
.site-footer {
    background-color: #1a4f2a; /* Dark green background as in the image */
    color: #fff; /* White text */
    padding: 40px 20px;
    font-size: 0.95em;
}

.site-footer a {
    color: #fff; /* White links */
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer .footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 30px auto; /* Center and add space below */
}

.site-footer .footer-section {
    flex: 1;
    min-width: 250px; /* Minimum width for each section */
    margin: 15px;
}

.site-footer .footer-section h2,
.site-footer .footer-section h3 {
    color: #fff;
    font-size: 1.3em;
    margin-bottom: 20px;
}

.site-footer .footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .footer-section li {
    margin-bottom: 10px;
}

.site-footer .footer-bottom {
    text-align: center;
    border-top: 1px solid #4a7d5a; /* Lighter green line */
    padding-top: 20px;
    margin-top: 20px;
}

.site-footer .footer-legal-links a {
    margin: 0 10px;
}