/*
Theme Name: My Next Games
Author: My Next Games
Description: Custom, high-performance one-page theme for My Next Games.
Version: 1.0.9
Text Domain: mynextgames
*/

:root {
    --bg-color: #0d0d0d;
    --text-color: #f2f2f2;
    --accent-color: #e63946;
    --nav-bg: rgba(13, 13, 13, 0.9);
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    padding: 20px 50px;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.site-header.scrolled {
    background-color: var(--nav-bg);
    padding: 15px 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.site-logo img {
    max-height: 50px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    justify-content: center;
}

.main-navigation a {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Category Groups & Sticky Backgrounds */
.category-group {
    position: relative;
    width: 100vw;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Darken bg so panels pop */
    z-index: -1;
    pointer-events: none;
}

/* Individual Game Panels Container */
.game-showcase {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 5% 50px 5%;
    /* No background here anymore, it shines through from .category-group */
}

/* Fallback for old main-bg logic inside uncategorized */
.main-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.main-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.panels-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1600px;
    position: relative;
    z-index: 1;
}

.game-panel {
    background: rgba(15, 15, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, opacity;
}

/* Scroll Reveal Animations */
.game-panel.reveal-init {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.game-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.game-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.panel-inner {
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
}

/* 16:9 Aspect Ratio Container */
.panel-16-9 {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

/* Panel Specifics */
.panel-title {
    text-align: center;
    padding: 0;
}

.cover-image-fit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-title .game-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    z-index: 2;
}

.panel-video {
    padding: 0;
}

.panel-video .panel-inner {
    justify-content: center;
}

.youtube-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.youtube-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: rgba(255, 255, 255, 0.3);
}

.panel-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.panel-info .panel-inner {
    justify-content: space-between;
}

.game-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Buttons & Icons */
.cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.center-buttons {
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid #fff;
    border-radius: 4px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #fff;
    color: #000;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: #fff;
    border-color: #fff;
    color: var(--accent-color);
}

/* Custom Icon Buttons */
.btn-icon-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    min-width: 100px;
    background-color: var(--default-bg, transparent);
    border: none;
    border-radius: 16px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    overflow: hidden;
    padding: 15px;
}

.btn-icon-custom img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.btn-icon-custom:hover {
    background-color: var(--hover-bg, transparent);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.btn-icon-custom:hover img {
    transform: scale(1.1);
}

/* Footer Section */
.site-footer {
    background-color: #050505;
    padding: 80px 5%;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.social-links {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-social {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .panels-wrapper {
        grid-template-columns: 1fr;
        max-width: 800px;
    }

    .game-panel {
        min-height: auto;
    }

    .site-header {
        flex-direction: column;
        padding: 15px;
        background-color: var(--nav-bg);
    }

    .main-navigation ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .game-title {
        font-size: 2.5rem;
    }

    .game-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
}