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

html {
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    background: url("../images/babs.webp") no-repeat center center fixed;
    background-size: cover;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(20, 8, 2, 0.12);
    z-index: 0;
    pointer-events: none;
}

.game-header,
.game-page,
.game-footer {
    position: relative;
    z-index: 2;
}

/* HEADER */







.game-header {
    width: min(1500px, 96%);
    margin: 26px auto 0;
    position: relative;
    z-index: 20;
}

.game-navbar {
    min-height: 86px;
    padding: 10px 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    background: url("../images/nav-bg-2027.png") center center / 100% 100% no-repeat;

    border-radius: 40px;
    overflow: hidden;

    box-shadow:
        0 0 24px rgba(0, 150, 255, .25),
        0 10px 28px rgba(0, 0, 0, .12);
}

.game-logo {
    display: flex;
    align-items: center;
    min-width: 190px;
}

.game-logo img {
    width: 110px;
    height: auto;
    display: block;
}

.game-nav-links {
    flex: 1;
    margin: 0;
    padding: 0;
    list-style: none;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
}

.game-nav-links a,
.game-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    text-decoration: none;
    border: 0;
    border-radius: 18px;
    padding: 12px 18px;

    background: transparent;
    color: #ffffff;

    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;

    text-shadow: 0 2px 8px rgba(0,0,0,.35);
    cursor: pointer;
    transition: .25s ease;
}

.game-nav-links a:hover,
.game-nav-links a.active {
    color: #ffe86b;
    transform: translateY(-2px);
}

.contact-btn {
    background: rgba(255,255,255,.16) !important;
    border-radius: 22px !important;
    padding-inline: 24px !important;
}

.game-lang-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    font-size: 22px;
}

.game-menu-btn {
    display: none;
}

/* Arabic */
html[dir="rtl"] .game-navbar {
    direction: rtl;
}






/* PAGE */

.game-page {
    min-height: 100vh;
    padding-top: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-hero {
    width: 100%;
    max-width: 1460px;
    min-height: calc(100vh - 125px);
    margin: auto;
    display: grid;
    grid-template-columns: 0.9fr 1.2fr;
    align-items: center;
    gap: 80px;
    padding: 0 6%;
}

/* TITLE */

.game-title-panel {
    position: relative;
    z-index: 7;
}

.game-title {
    text-align: left;
    max-width: 560px;
    text-shadow: 0 8px 25px rgba(0, 0, 0, 0.72);
}

html[dir="rtl"] .game-title {
    text-align: right;
}

.game-title p {
    color: #ffea7a;
    font-size: clamp(18px, 1.5vw, 24px);
    font-weight: 900;
    letter-spacing: 7px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

html[dir="rtl"] .game-title p {
    letter-spacing: 0;
}

.game-title h1 {
    color: #ffffff;
    font-size: clamp(58px, 7vw, 110px);
    font-weight: 900;
    line-height: 0.92;
    margin: 0 0 28px;
}

.game-title span {
    display: block;
    color: #ffffff;
    font-size: clamp(22px, 2.1vw, 34px);
    font-weight: 900;
    letter-spacing: 7px;
    line-height: 1.35;
    text-transform: uppercase;
}

html[dir="rtl"] .game-title span {
    letter-spacing: 0;
    line-height: 1.7;
}

/* CAROUSEL */

.game-carousel-area {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: flex-start;   /* بدل center */
    justify-content: center;
    padding-top: 40px;         /* تحكم بالارتفاع */
    z-index: 5;
}

.carousel-scene {
    width: 400px;
    height: 255px;
    perspective: 1500px;
    position: relative;
    margin-top: -95px;         /* كان -55px */
    z-index: 4;
}
.carousel {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    animation: rotateCarousel2027 32s linear infinite;
}

.carousel:hover {
    animation-play-state: paused;
}

.carousel figure {
    position: absolute;
    width: 215px;
    height: 145px;
    left: 92px;
    top: 48px;
    border-radius: 22px;
    overflow: visible;
    background: rgba(20, 10, 2, 0.38);
    border: 2px solid rgba(255, 223, 108, 0.95);
    box-shadow:
        0 24px 55px rgba(0, 0, 0, 0.62),
        0 0 26px rgba(255, 186, 48, 0.48),
        inset 0 0 18px rgba(255, 255, 255, 0.16);
    transition: 0.35s ease;
    transform: rotateY(calc(var(--i) * 40deg)) translateZ(390px);
}

.carousel figure::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 26px;
    background: linear-gradient(
        135deg,
        rgba(255, 247, 170, 0.95),
        rgba(255, 170, 35, 0.2),
        rgba(255, 230, 120, 0.9)
    );
    z-index: -1;
    filter: blur(8px);
    opacity: 0.55;
}

.carousel figure::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255,255,255,0.28) 45%,
        transparent 70%
    );
    opacity: 0.45;
    pointer-events: none;
}

.carousel figure a {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 19px;
    display: block;
    filter: saturate(1.18) contrast(1.08);
}

.carousel figcaption {
    position: absolute;
    left: 50%;
    bottom: -43px;
    transform: translateX(-50%);
    min-width: 165px;
    padding: 8px 15px;
    border-radius: 999px;
    color: #fff4b0;
    background: rgba(20, 10, 2, 0.78);
    border: 1px solid rgba(255, 218, 92, 0.85);
    box-shadow:
        0 0 20px rgba(255, 190, 48, 0.55),
        inset 0 0 14px rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    opacity: 0;
    transition: 0.35s ease;
    pointer-events: none;
}

.carousel figure:hover {
    transform: rotateY(calc(var(--i) * 40deg)) translateZ(390px) scale(1.12) !important;
    z-index: 20;
    border-color: #fff6a8;
    box-shadow:
        0 30px 75px rgba(0, 0, 0, 0.72),
        0 0 48px rgba(255, 210, 70, 0.95);
}

.carousel figure:hover figcaption {
    opacity: 1;
    bottom: -48px;
}

@keyframes rotateCarousel2027 {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(-360deg);
    }
}

/* PANDA */

.panda-character {
    position: absolute;
    bottom: 12px;
    left: 50%;
    width: 155px;
    transform: translateX(-50%);
    z-index: 3;
    animation: pandaBounce 2.8s ease-in-out infinite, pandaBlink 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pandaBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-9px);
    }
}

@keyframes pandaBlink {
    0%, 92%, 100% {
        filter: brightness(1);
    }
    95% {
        filter: brightness(1.3);
    }
}

/* FOOTER */

.game-footer {
    position: fixed;
    bottom: 16px;
    width: 100%;
    text-align: center;
    z-index: 8;
    padding: 0 12px;
}

.game-footer p {
    display: inline-block;
    color: #fff7c8;
    font-size: 19px;
    font-weight: 900;
    text-shadow: 0 5px 14px rgba(0, 0, 0, 0.75);
}

/* TABLET */

@media (max-width: 1100px) {
    .game-hero {
        gap: 10px;
        grid-template-columns: 1fr;
       min-height: calc(10vh - 15px);
    }

    
/* TITLE */

.game-title-panel {
    position: relative;
    
}
    .game-title h1 {
        font-size: 68px;
    }

    .game-title span {
        font-size: 22px;
        letter-spacing: 4px;
    }

    .carousel-scene {
        transform: scale(0.9);
    }
}

/* MOBILE */
/* ================= GAME HEADER MOBILE FIX ================= */

@media (max-width: 900px) {
.game-page
 {
    min-height: 77vh;
 }
    .game-header {
        width: 94%;
        margin: 14px auto 0;
        padding: 0;
        position: relative;
        z-index: 50;
    }
body {
  
    overflow-x: hidden;
    background: url("../images/babs-mob.webp") no-repeat center top fixed;
    background-size: cover;
}

    .game-navbar {
        width: 100%;
        min-height: auto;
        padding: 12px 14px;
        border-radius: 24px;

        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;

        background: url("../images/nav-bg-2027.png") center center / 100% 100% no-repeat;
        box-shadow:
            0 0 20px rgba(0, 160, 255, .25),
            0 10px 24px rgba(0, 0, 0, .20);
    }

    .game-logo {
        min-width: auto;
        width: auto;
        position: static;
        transform: none;
    }

    .game-logo img {
        width: 78px;
        height: auto;
        display: block;
    }

    .game-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 52px;
        height: 52px;

        border: 0;
        border-radius: 18px;
        background: #ffffff;
        color: #5a3ca7;

        font-size: 28px;
        font-weight: 900;
        cursor: pointer;

        box-shadow: 0 8px 18px rgba(0,0,0,.16);
    }

    .game-nav-links {
        width: 100%;
        flex: 0 0 100%;

        margin: 12px 0 0;
        padding: 0;

        display: none;
        flex-direction: column;
        gap: 8px;

        position: static;
        left: auto;
        right: auto;
        top: auto;

        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .game-nav-links.active,
    .game-nav-links.show {
        display: flex;
    }

    .game-nav-links li {
        width: 100%;
        list-style: none;
    }

    .game-nav-links a,
    .game-lang-btn {
        width: 100%;
        min-height: 48px;

        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;

        border-radius: 16px;
        padding: 12px 14px;

        background: rgba(255,255,255,.14);
        color: #ffffff;

        font-size: 14px;
        font-weight: 900;
        letter-spacing: .5px;

        text-decoration: none;
        border: 0;
        box-shadow: inset 0 1px rgba(255,255,255,.15);
    }

    .game-nav-links a.active {
        color: #ffe86b;
        background: rgba(255,255,255,.20);
    }

    .game-lang-btn {
        cursor: pointer;
        font-size: 20px;
    }
}
/* SMALL MOBILE */

@media (max-width: 520px) {
    .game-title h1 {
        font-size: 38px;
    }

    .game-title span {
        font-size: 15px;
    }

    .game-carousel-area {
        min-height: 165px;
        margin-bottom: 30px;
    }

    .carousel-scene {
        width: 220px;
        height: 160px;
        margin-top: 0px;
        perspective: 900px;
    }
    

    .carousel figure {
        width: 126px;
        height: 88px;
        left: 47px;
        top: 36px;
        border-radius: 14px;
        transform: rotateY(calc(var(--i) * 40deg)) translateZ(178px);
    }

    .carousel img {
        border-radius: 12px;
    }

    .carousel figure:hover {
        transform: rotateY(calc(var(--i) * 40deg)) translateZ(178px) scale(1.03) !important;
    }

    .panda-character {
       width: 86px;
    top:242px;
    }
}

