:root
{
    /* theme colors */
    --primary-color: #7F00FF;
    --secondary-color: #2c004f;
    --dark-color: #111111;
    --light-color: #f5f5f5;

    /* text colors */
    --menu-text-color: var(--light-color);
    --menu-text-over-color: var(--primary-color);
    --body-text-color: #333333;

    /* basic colors */
    --white: #ffffff;
    --black: #000000;
    --transparent-color: #00000000;

    /* fonts */
    --font-family: 'Poppins', sans-serif;

    /* dimensions */
    --container-width: 960px;
    --menu-height: 70px;
    --menu-height-mobile: 60px;

    /* shadows */
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    --logo-shadow: 0 4px 8px rgba(0, 0, 0, 0.22);
}

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

html
{
    scroll-behavior: smooth;
}

p
{
    font-size: 1.1rem;
}

body
{
    line-height: 1.6;
    color: var(--body-text-color);
    background-color: var(--white);
    font-family: var(--font-family);
    /* Prevent horizontal scroll on small animations */
    overflow-x: hidden;
}

/* Navigation Styles */
header
{
    width: 100%;
    height: var(--menu-height);
    background-color: var(--transparent-color);
    position: fixed;
    z-index: 1000;
    transition: all 0.3s ease;
}

header:hover
{
    background-color: var(--dark-color);
}

header.scrolled
{
    background-color: var(--dark-color);
}

.anchor
{
    display: block;
    position: relative;
    top: calc(var(--menu-height) * -1);
    visibility: hidden;
}

.navbar
{
    width: 100%;
    height: 100%;
    padding: 0 1rem;
}

.nav-container
{
    max-width: var(--container-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo
{
    gap: 1rem;
    display: flex;
    align-items: center;
}

.nav-logo .logo
{
    width: 50px;
    height: auto;
    flex-shrink: 0;
}

.nav-logo a
{
    text-decoration: none;
}

.nav-logo h1
{
    font-size: 1.5rem;
    margin: 0;
    color: var(--menu-text-color);
    font-weight: 600;
}

.nav-menu
{
    gap: 2rem;
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
}

.nav-link
{
    font-size: 1rem;
    margin: 0;
    padding: 0;
    color: var(--menu-text-color);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-link::after
{
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    content: '';
    position: absolute;
    transition: width 0.3s ease;
}

.nav-link:hover::after
{
    width: 100%;
}

.nav-toggle
{
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar
{
    width: 25px;
    height: 3px;
    margin: 3px 0;
    background-color: var(--white);
    transition: 0.3s;
}

.container
{
    max-width: var(--container-width);
    margin: 0 auto;
}

section
{
    padding: 3rem 1rem;
    text-align: center;
}

section h2
{
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
    display: inline-block;
    position: relative;
}

/* Underline effect for section titles */
section h2::after
{
    width: 60px;
    height: 4px;
    margin: 0.5rem auto 0;
    background: var(--primary-color);
    content: '';
    display: block;
    border-radius: 2px;
}

#hero
{
    width: 100vw;
    height: 100vh;
    background-color: var(--transparent-color);
    /* Fallback if video doesn't load */
    display: flex;
    align-items: center;
    position: relative;
    /* To position video background and overlay */
    overflow: hidden;
    /* To clip the video if it's larger */
}

.hero-video-background
{
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: var(--black);
    position: absolute;
    z-index: 1;
    /* Behind overlay and content */
}

.hero-video-background iframe
{
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    position: absolute;
    pointer-events: none;
    /* Allow clicks to pass through to content */
}

.hero-overlay
{
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    /* Adjust darkness/opacity as needed */
    position: absolute;
    z-index: 2;
    /* Above video, below content */
}

#hero .container
{
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    /* Stack content vertically */
    align-items: center;
    /* Center content horizontally */
    justify-content: center;
    /* Center content vertically */
    position: relative;
    /* Ensure content is above video and overlay */
    z-index: 3;
}

#hero h2
{
    font-size: 2.7rem;
    margin-bottom: 0;
    color: var(--white);
    /* Changed for readability over video */
}

#hero h2::after
{
    /* No underline for hero title */
    display: none;
}

#hero p
{
    font-size: 1.4rem;
    max-width: 80vw;
    margin: 0 auto;
    color: var(--white);
    /* Changed for readability over video */
}

/* Games Grid */
.games-grid
{
    gap: 3rem;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* This will create 3 equal-width columns */
}

.game-card
{
    border-radius: 50px;
    padding: 0;
    background-color: var(--white);
    text-align: left;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover
{
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.game-card img.game-logo
{
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Ensures the image container is square */
    border-radius: 50px;
    box-shadow: var(--logo-shadow);
    display: block;
    object-fit: cover;
    /* Ensures image covers the square, cropping if necessary */
}

.game-card .game-info
{
    padding: 1.5rem;
}

.game-card h3
{
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.game-card p.game-genre
{
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-card a.game-link
{
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.game-card a.game-link:hover
{
    background-color: var(--secondary-color);
}

#about-us
{
    background-color: var(--light-color);
}

#about-us p
{
    max-width: 700px;
    margin: 0 auto;
}

#contact .social-links
{
    margin: 1.5rem 0;
}

#contact .social-icon
{
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    margin: 0 0.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#contact .social-icon:hover
{
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

#contact p a
{
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

#contact p a:hover
{
    text-decoration: underline;
}

footer
{
    height: var(--menu-height);
    padding: 1.6rem 0;
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px)
{
    p
    {
        font-size: 1rem;
    }

    header
    {
        height: var(--menu-height-mobile);
    }

    /* Mobile Navigation */
    .nav-container
    {
        padding: 0 1rem;
    }

    .nav-logo h1
    {
        font-size: 1.2rem;
    }

    .nav-logo .logo
    {
        width: 40px;
    }

    .nav-menu
    {
        width: 100%;
        top: var(--menu-height-mobile);
        left: -100%;
        gap: 0;
        padding: 1rem 0;
        background-color: var(--dark-color);
        flex-direction: column;
        text-align: center;
        position: fixed;
        transition: all 0.3s ease;
    }

    .nav-menu.active
    {
        left: 0;
    }

    .nav-item
    {
        margin: 0.5rem 0;
    }

    .nav-link
    {
        font-size: 1.1rem;
        padding: 1rem;
        display: block;
    }

    .nav-toggle
    {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2)
    {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1)
    {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3)
    {
        transform: translateY(-8px) rotate(-45deg);
    }

    section h2
    {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    #hero h2
    {
        font-size: 2.3rem;
    }

    .games-grid
    {
        row-gap: 1rem;
        /* Adjust row gap for smaller screens */
        margin-top: 1rem;
        grid-template-columns: 1fr;
        /* Stack cards on smaller screens */
    }

    /* Game card layout for smaller screens */
    .game-card
    {
        border-radius: 15px;
        /* Adjusted border-radius for row layout */
        padding: 1rem;
        /* Padding inside the card */
        display: flex;
        /* Arrange logo and info side-by-side */
        align-items: center;
        /* Vertically align items in the center */
        /* text-align: left; /* Children are block, will align left by default */
    }

    .game-card:hover
    {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
        /* Adjusted hover shadow */
        transform: translateY(-3px);
        /* More subtle hover for rows */
    }

    .game-card img.game-logo
    {
        width: 80px;
        height: 80px;
        border-radius: 18px;
        /* Rounded corners for the logo */
        margin-right: 1rem;
        /* Space between logo and text info */
        border-bottom: none;
        /* Remove desktop-specific border */
        flex-shrink: 0;
        /* Prevent logo from shrinking */
        object-fit: cover;
        /* aspect-ratio: 1 / 1; is maintained by width/height */
        /* display: block; is not needed due to flex parent */
    }

    .game-card .game-info
    {
        padding: 0;
        /* Remove original padding, card has its own now */
        flex-grow: 1;
        /* Allow info to take remaining space */
    }

    .game-card h3
    {
        font-size: 1.2rem;
        /* Adjust font size for smaller layout */
        margin-bottom: 0.25rem;
        /* Tighter spacing below title */
    }

    .game-card p.game-genre
    {
        font-size: 0.8rem;
        /* Adjust font size for genre */
        margin-bottom: 0;
        /* No margin if it's the last item in game-info */
    }

    .game-card a.game-link
    {
        /* Hide the "View Game" button on smaller screens */
        display: none;
    }

    footer
    {
        height: var(--menu-height-mobile);
        padding: 1.1rem 0;
    }
}

@media (min-aspect-ratio: 16/9)
{
    .hero-video-background
    {
        width: 100%;
        height: 200%;
        top: 50%;
        /* Center the video */
        transform: translateY(-50%);
    }
}

@media (max-aspect-ratio: 16/9)
{
    .hero-video-background
    {
        width: 500%;
        height: 100%;
        left: -200%;
    }
}