:root {
    --primary-color: #FF8C00;
    --secondary-color: #FFDAB9;
    --dark-color: #333;
    --light-color: #f4f4f4;
}

/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--light-color);
    color: var(--dark-color);
}

.header-container, .footer-container, main {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-title {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.main-nav li {
    margin-left: 20px;
}

.main-nav a {
    color: var(--dark-color);
    font-weight: bold;
    padding: 5px;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.categories-container {
    display: contents; /* Ensures li items remain as direct flex children */
}

/* Main sections */
.section-title {
    text-align: center;
    margin: 40px 0 20px;
    color: var(--primary-color);
}

/* Featured Game Banner */
.featured-game-banner {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    color: white;
    padding: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.featured-game-banner .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-game-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.play-game-btn:hover {
    background-color: #e67e00;
}

.banner-info {
    z-index: 1;
}

/* Game List */
.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.game-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    padding-bottom: 15px;
    transition: transform 0.3s;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.game-card h3 {
    margin: 10px 0 5px;
    font-size: 1.1em;
}

.game-card p {
    color: #888;
    font-size: 0.9em;
}

/* Game Details Page */
.game-details-section {
    padding-top: 40px;
}

.details-container {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-info {
    text-align: center;
    margin-bottom: 20px;
}

.game-icon {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    margin-bottom: 15px;
}

/* Comments */
.comments-section, .recommended-games-section {
    margin-top: 40px;
}

.comment {
    background-color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.comment h4 {
    margin: 0 0 5px;
    color: var(--primary-color);
}

.comment .rating {
    font-weight: bold;
    color: gold;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    background-color: var(--secondary-color);
    border: 1px solid var(--primary-color);
    color: var(--dark-color);
    padding: 8px 12px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button.active {
    background-color: var(--primary-color);
    color: white;
}

/* Play Page */
#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
}

#game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.back-home-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
}

.back-home-btn svg {
    width: 30px;
    height: 30px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-links a {
    color: var(--light-color);
    margin: 0 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }

    .main-nav li {
        margin: 5px 10px;
    }

    .game-list {
        grid-template-columns: 1fr;
    }

    .featured-game-banner {
        height: 250px;
    }

    .details-container {
        padding: 20px;
    }
}