:root {
    --header-height: 70px;
    --footer-height: 60px;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #0d0d0d;
    color: #f5f5f5;
    font-family: "Poppins", sans-serif;
}

.page-container {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

body.loaded .page-container {
    opacity: 1;
}

/* === MAIN PAGE CONTAINER === */
.page-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem;
}

/* === PAGE HERO === */
.page-hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(to right, #0d0d0d, #111);
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #00aaff;
}

.page-hero p {
    font-size: 1.2rem;
    color: #ccc;
}

/* === GAME GRID & CARDS === */
.games-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.game-card {
    background: linear-gradient(145deg, #141414, #1e1e1e);
    padding: 1.8rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 170, 255, 0.5);
}

.game-icon {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 22%;
    margin: 0 auto 1rem auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

.game-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
    color: #fff;
}

.game-card p {
    font-size: 0.95rem;
    color: #aaa;
    line-height: 1.4;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === SCREENSHOT CAROUSEL === */
.screenshot-carousel {
    position: relative;
    margin: 1rem auto;
    cursor: pointer;
}

.screenshot-carousel img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.5);
    transition: opacity 0.5s ease-in-out;
}

/* === LIGHTBOX === */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

.lightbox-nav .prev,
.lightbox-nav .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: white;
    cursor: pointer;
    user-select: none;
}

.lightbox-nav .prev { left: -50px; }
.lightbox-nav .next { right: -50px; }
