:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #f43f5e;
    --card-bg: #111111;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-color);
    letter-spacing: 1px;
}

.logo .highlight {
    color: var(--primary-color);
}

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

.nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav a:hover,
.nav a.active {
    color: var(--text-color);
}

.contact-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--text-color);
}



.social-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    /* Icons expand to the left of the button */
    gap: 0;
}

.nav-link-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    white-space: nowrap;
}

.nav-link-btn:hover,
.nav-link-btn.active {
    color: var(--text-color);
}

.social-menu {
    /* Horizontal Inline Expansion (Desktop default) */
    position: relative;
    top: auto;
    left: auto;
    transform: none;

    /* Frame Styling - aligned with request */
    background: transparent;
    backdrop-filter: none;
    border: 1px solid transparent;
    /* Transparent when inactive */
    border-radius: 50px;
    /* Pillow shape for inline */
    padding: 0;
    /* Zero padding when inactive */

    margin: 0;

    display: flex;
    align-items: center;
    gap: 1.2rem;

    max-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;

    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;

    /* Initially hidden border */
    border-color: transparent;
}

.social-menu.active {
    opacity: 1;
    pointer-events: all;
    max-width: 400px;
    /* Expands to fit icons */
    transform: none;
    margin-right: 0.5rem;
    padding: 0.25rem 1rem;
    /* Apply padding only when active */

    /* Describe Frame Active State */
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(5px);
}

/* Language Dropdown (Mirrors Social Dropdown) */
.language-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

#lang-btn {
    padding: 0 8px;
    /* Added horizontal padding for text */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    /* Fixed height for consistency */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    /* Pill shape for text */
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}

#lang-btn:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.lang-text {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.language-menu {
    position: absolute;
    top: 150%;
    left: 50%;
    /* Center relative to parent */
    right: auto;

    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;

    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(-10px);
    /* Center align X and offset Y */
    transition: all 0.3s ease;

    min-width: 60px;
    align-items: center;
    z-index: 1000;
}

.language-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
    /* Keep X centered */
}

.lang-option {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    /* Adjusted padding for text */
    border-radius: 6px;
    /* Rounded rect for text items */
    transition: transform 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    /* Subtle lift instead of scale */
}

.lang-option .lang-text {
    font-size: 0.85rem;
    /* Slightly smaller in menu */
}

/* Mobile Language Menu */
@media (max-width: 768px) {
    .language-dropdown {
        position: static;
    }

    .language-menu {
        top: 100%;
        left: 50%;
        right: auto;
        width: max-content;
        max-width: 90vw;
        min-width: unset;

        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 1rem;
        gap: 0.5rem;

        transform: translateX(-50%) translateY(-10px);
    }

    .language-menu.active {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Active state handled in block above to ensure override */

.social-menu a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    display: flex;
    /* Fix alignment */
}

.social-menu a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Mobile Social Menu Override */
@media (max-width: 768px) {
    .social-dropdown {
        position: static;
        /* Allows absolute child to reference body or header-relative if needed, but we want fixed or absolute below */
    }

    .social-menu {
        position: absolute;
        top: 100%;
        /* Below the header */
        left: 50%;
        transform: translateX(-50%) translateY(-10px);

        flex-direction: row;
        width: auto;
        min-width: 280px;
        justify-content: center;

        /* Stronger Frame for Mobile "Panel" feel */
        background: rgba(10, 10, 10, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 1rem 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

        max-width: none;
        /* Don't animate width on mobile */
        margin: 0;
        margin-top: 10px;

        /* Reset transition needed for width */
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;

        opacity: 0;
        visibility: hidden;
        /* Hide cleanly */
        pointer-events: none;
    }

    .social-menu.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transform: translateX(-50%) translateY(0);

        max-width: none;
        margin-right: 0;

        /* Ensure background/border stay consistent in active state */
        border-color: rgba(255, 255, 255, 0.1);
        background: rgba(10, 10, 10, 0.95);
    }
}

.btn-primary {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50px;
    color: white !important;
    font-weight: 600 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    overflow: hidden;
    background: #000;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(20, 20, 40, 0.8) 0%, rgba(5, 5, 5, 0.95) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
}

.hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dynamic Gradient Overlay */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(600px circle at var(--x, 50%) var(--y, 50%), rgba(59, 130, 246, 0.15), transparent 40%);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--bg-color), transparent);
    z-index: 1;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -2px;
    position: relative;
    z-index: 2;
}

.gradient-text {
    /* Red-Orange gradient for NIGHTMARES. */
    background: linear-gradient(45deg, #ff4d4d, #ff9f43, #ff3f34);
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.btn-hero {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 2;
}

.btn-hero:hover {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

/* Games Section */
.games-section {
    padding: 8rem 0;
    background-color: var(--bg-color);
    transition: background 0.8s ease;
    /* Smooth fade transition */
    position: relative;
    z-index: 1;
}

/* Dynamic backgrounds for Games Section */
.games-section.bg-inferno {
    /* Purplish gradient for Inferno Protocol */
    background: radial-gradient(circle at center, #2c0b36 0%, #050505 80%);
}

.games-section.bg-phantom {
    /* Maroon/Burgundy gradient for Phantom Void */
    background: radial-gradient(circle at center, #3d0c11 0%, #050505 80%);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 4rem;
    text-align: center;
    letter-spacing: -1px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.game-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.game-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.game-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.game-image {
    width: 100%;
    aspect-ratio: 920/430;
    position: relative;
    overflow: hidden;
    background: #000;
}

.game-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 1;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.game-card:hover .game-image img {
    transform: none;
}

.game-info {
    padding: 2rem;
}

.game-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* Features Grid Layout */
.features-grid {
    display: flex;
    gap: 2rem;
    position: relative;
    margin-top: 2rem;
}

.features-col-left,
.features-col-right {
    flex: 1;
}

.features-divider {
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

@media (max-width: 900px) {
    .features-grid {
        flex-direction: column;
    }

    .features-divider {
        display: none;
        /* Hide vertical line on mobile */
    }

    .features-col-left {
        margin-bottom: 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 2rem;
    }
}

/* Game Info Updates */
.main-content h3 {
    margin-top: 5rem;
    /* Force spacing between About text and Features heading */
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: white;
}

.hero-text-container-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align items */
    text-align: left;
    /* Left align text content */
    margin: 0 auto 2rem auto;
    /* Center the block itself horizontally if needed, or remove auto to keep it strictly left */
    max-width: 800px;
    /* Match subtitle width */
    width: 100%;
}

.hero-slogan {
    font-size: 2rem;
    /* Increased size */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    /* Reduced gap between slogan and subtitle */
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 1;
    /* Fully visible */
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    line-height: 1.2;
}

.hero-subtitle-large {
    font-size: 1.2rem;
    /* Decreased size */
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    line-height: 1.5;
}

.video-section {
    padding: 3rem 0;
    /* Symmetrical padding, reduced top space */
    position: relative;
    z-index: 10;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.feature-block {
    margin-bottom: 4rem;
    /* Increased from 2.5rem */
}

.feature-block h4 {
    font-size: 1.3rem;
    /* Slightly larger */
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    /* Increased from 1rem */
    border-left: 4px solid var(--primary-color);
    /* Thicker border */
    padding-left: 1.5rem;
    /* Increased padding */
    letter-spacing: 0.5px;
}

.feature-list-detailed {
    list-style: none;
    padding: 0;
}

.feature-list-detailed li {
    padding: 1rem 0;
    /* Increased padding from 0.5rem */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-gray);
    position: relative;
    padding-left: 2rem;
    /* Increased from 1.5rem */
    line-height: 1.8;
    /* Better readability */
}

.feature-list-detailed li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-light);
    font-size: 1.2rem;
    top: 0.8rem;
    /* Align vertical center approx */
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.specs-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table td:first-child {
    font-weight: 600;
    color: var(--text-light);
    width: 30%;
}

.specs-table td:last-child {
    color: var(--text-gray);
}

.press-contact {
    margin-top: 2rem;
    padding: 3rem;
    /* Increased padding for better spacing */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* White border like Game Info */
    border-radius: 8px;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center vertically if needed */
}

.press-contact h3 {
    margin-top: 0;
    /* Remove top margin to fix alignment */
    margin-bottom: 1rem;
}

.contact-email {
    display: inline-block;
    margin-top: 1rem;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-email:hover {
    text-decoration: underline;
}

.game-info p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    /* Increased from 1.5rem */
    font-size: 1.05rem;
    /* Slightly larger */
    line-height: 1.8;
    /* Increased line height */
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}

.mobile-only-info {
    display: none;
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #020202;
}

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

.footer-brand h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Steam Button */
.steam-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: 2;
}

.steam-btn:hover {
    background: #171a21;
    color: #66c0f4;
    transform: scale(1.1);
    border-color: #66c0f4;
    box-shadow: 0 0 15px rgba(102, 192, 244, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

/* Contact Panel */
.contact-panel {
    position: fixed;
    top: 90px;
    right: 20px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
}

.contact-panel.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.contact-panel p {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

/* RTL Support */
[dir="rtl"] .steam-btn {
    right: auto;
    left: 20px;
}

[dir="rtl"] .contact-panel {
    right: auto;
    left: 20px;
}

/* Ensure text aligns correctly if not handled by default */
[dir="rtl"] .game-info,
[dir="rtl"] .footer-brand {
    text-align: right;
}

/* --- Inferno Page Styles --- */
.page-inferno {
    background-color: #050505;
}

.game-hero {
    height: 80vh;
    display: flex;
    align-items: center;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8)),
        url('assets/images/inferno protocol/inferno_top_background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: -80px;
    z-index: 1;
}

.game-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, #050505, transparent);
    pointer-events: none;
}

.hero-title-large {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(234, 88, 12, 0.5);
    line-height: 1;
}

.btn-steam-large {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, #1b2838, #2a475e);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.2rem;
}

.btn-steam-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(42, 71, 94, 0.5);
    border-color: #66c0f4;
}

.game-info-section {
    padding: 6rem 0;
}

.layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.feature-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.feature-list li::before {
    content: '>';
    color: var(--primary-color);
    margin-right: 1rem;
    font-weight: bold;
}

.sidebar .info-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.info-list li {
    margin-bottom: 1rem;
    color: var(--text-gray);
    display: flex;
    justify-content: space-between;
}

.info-list li strong {
    color: var(--text-light);
}

/* Media Grid Updates */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    /* Smaller thumbnails */
    gap: 1.5rem;
    margin-top: 2rem;
}

.media-item {
    aspect-ratio: 16/9;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
}

.media-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 2rem;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* Features Grid Layout */
@media (max-width: 768px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }

    .hero-title-large {
        font-size: 3rem;
    }
}

/* Background Slideshow */
#background-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    background-color: #000;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.bg-slide.active {
    opacity: 0.15;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .game-hero {
        padding: 8rem 0 4rem 0;
        /* More top padding for nav */
    }

    /* Hide sidebar Game Info on mobile, show the mobile duplicate */
    .sidebar .info-card {
        display: none;
    }

    .mobile-only-info {
        display: block !important;
        margin-bottom: 2rem;
        background: var(--card-bg);
        padding: 1.5rem;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }


    .hero-title-large {
        font-size: 2.5rem;
        /* Smaller title */
        line-height: 1.1;
        text-align: center;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 0 1rem;
    }

    .hero-text-container-left {
        align-items: center;
        /* Center align on mobile */
        text-align: center;
        margin: 0 auto 2rem auto;
        padding: 0 1rem;
        /* Ensure side padding */
    }

    .hero-slogan {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    .hero-subtitle-large {
        font-size: 1rem;
    }

    .video-section {
        padding: 2rem 0;
        /* Slightly less padding on mobile */
    }

    .main-content h3 {
        margin-top: 3rem;
        font-size: 1.5rem;
    }

    .btn-steam-large {
        display: flex;
        /* Force block-level flex container for auto margins to work properly */
        margin: 0 auto;
        /* Center it */
        width: auto;
        /* Let it size to content or set max-width */
        max-width: 90%;
        /* Prevent overflow */
        padding: 1rem 2rem;
        /* Reduce padding slightly */
        font-size: 1.1rem;
        /* Reduce font size slightly */
        justify-content: center;
    }

    .media-section {
        padding-top: 2rem;
        /* Reduce top padding */
        margin-top: -2rem;
        /* Pull it up slightly if needed */
    }

    .game-info-section {
        padding-bottom: 2rem;
        /* Reduce bottom padding of previous section */
    }
}