/* Mobile play experience — VibeX Games v2.7.0 */

.v-engine-start {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.v-engine-start__label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0b0b10;
}

.v-mobile-blocked,
.v-mobile-blocked__inner {
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 280px;
    padding: 28px 20px;
    background: linear-gradient(165deg, #14141c 0%, #09090f 100%);
}

.v-mobile-blocked__inner {
    max-width: 420px;
    gap: 12px;
}

.v-mobile-blocked__inner > i {
    font-size: 2.4rem;
    color: #d7ff45;
}

.v-mobile-blocked__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #f7f4ff;
}

.v-mobile-blocked__text {
    margin: 0;
    color: #a39aad;
    line-height: 1.55;
}

.v-mobile-blocked__btn {
    display: inline-flex;
    margin-top: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    background: #d7ff45;
    color: #0b0b10;
    font-weight: 800;
    text-decoration: none;
}

/* Orientation gate */
.v-orient-gate {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    background: rgba(6, 6, 10, 0.92);
    backdrop-filter: blur(8px);
    padding: 24px;
}

.v-orient-gate[hidden] { display: none !important; }

.v-orient-gate__card {
    text-align: center;
    max-width: 320px;
}

.v-orient-phone {
    width: 64px;
    height: 110px;
    margin: 0 auto 18px;
    border: 3px solid #d7ff45;
    border-radius: 12px;
    position: relative;
    animation: v-phone-tilt 1.6s ease-in-out infinite;
}

.v-orient-phone__screen {
    position: absolute;
    inset: 10px 8px 14px;
    background: linear-gradient(145deg, rgba(215, 255, 69, 0.35), rgba(215, 255, 69, 0.08));
    border-radius: 4px;
}

.v-orient-phone--landscape {
    animation-name: v-phone-to-landscape;
}

.v-orient-phone--portrait {
    width: 110px;
    height: 64px;
    animation-name: v-phone-to-portrait;
}

@keyframes v-phone-to-landscape {
    0%, 20% { transform: rotate(0deg); }
    45%, 70% { transform: rotate(90deg); }
    100% { transform: rotate(0deg); }
}

@keyframes v-phone-to-portrait {
    0%, 20% { transform: rotate(90deg); }
    45%, 70% { transform: rotate(0deg); }
    100% { transform: rotate(90deg); }
}

.v-orient-gate__title {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #f7f4ff;
}

.v-orient-gate__text {
    margin: 0 0 16px;
    color: #a39aad;
}

.v-orient-gate__skip {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: #f7f4ff;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
}

.v-mobile-playbar {
    display: none;
}

.game-card__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 0 12px 10px;
    color: #d7ff45;
    font-size: 0.82rem;
    font-weight: 700;
}

.game-card__rating i { font-size: 0.9rem; }

@media (max-width: 900px) {
    .v-play-context--mobile .v-play-engine {
        border-radius: 16px;
    }

    .v-play-context--mobile .v-player-wrapper {
        aspect-ratio: 9 / 14;
        max-height: min(72vh, 640px);
        border-radius: 16px 16px 0 0;
        overflow: hidden;
        touch-action: none;
        -webkit-touch-callout: none;
    }

    .v-play-context--mobile .v-player-wrapper iframe {
        touch-action: none;
    }

    .v-play-context--mobile .v-engine-hud {
        padding: 12px 14px 14px;
        gap: 12px;
    }

    .v-play-context--mobile .v-game-title {
        font-size: 1.15rem;
        line-height: 1.2;
    }

    .v-play-context--mobile .v-hud-actions {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .v-play-context--mobile .v-action-node {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    .v-play-context--mobile .breadcrumbs {
        margin-bottom: 10px;
    }
}

/* Immersive play shell — non-Playgama only */
body.is-playing-immersive {
    overflow: hidden;
    overscroll-behavior: none;
    background: #000;
    /* Do NOT set touch-action:none — it breaks cross-origin iframe input on Android */
}

body.is-playing-immersive .site-header,
body.is-playing-immersive .site-footer,
body.is-playing-immersive .v-play-chrome,
body.is-playing-immersive .game-tooltip {
    display: none !important;
}

body.is-playing-immersive .site-main,
body.is-playing-immersive .site-container,
body.is-playing-immersive .v-play-context,
body.is-playing-immersive .v-play-engine {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #000 !important;
}

body.is-playing-immersive .v-player-wrapper.v-game-running {
    position: fixed;
    inset: 0;
    z-index: 4000;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    aspect-ratio: unset;
    border-radius: 0;
    background: #111;
    -webkit-overflow-scrolling: touch;
}

body.is-playing-immersive .v-player-wrapper.v-game-running iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

/* Playgama mobile: tall inline player — never fixed black fullscreen shell */
body.is-playgama-mobile {
    overscroll-behavior: contain;
}

body.is-playgama-mobile .site-header,
body.is-playgama-mobile .site-footer,
body.is-playgama-mobile .v-play-chrome,
body.is-playgama-mobile .game-tooltip,
body.is-playgama-mobile .breadcrumbs {
    display: none !important;
}

body.is-playgama-mobile .site-main,
body.is-playgama-mobile .site-container,
body.is-playgama-mobile .v-play-context,
body.is-playgama-mobile .v-play-engine {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

body.is-playgama-mobile .v-player-wrapper.v-playgama-running {
    position: relative;
    z-index: 20;
    width: 100%;
    min-height: calc(100dvh - 56px);
    height: calc(100dvh - 56px);
    max-height: none;
    aspect-ratio: unset;
    border-radius: 0;
    background: #0b0b10;
    overflow: hidden;
}

body.is-playgama-mobile .v-player-wrapper.v-playgama-running iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

body.is-playgama-mobile .v-engine-overlay[hidden],
body.is-playgama-mobile .v-engine-overlay[style*="display: none"] {
    display: none !important;
    pointer-events: none !important;
}

body.is-playgama-mobile .v-mobile-playbar {
    display: flex;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    align-items: center;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(9, 9, 14, 0.92);
    color: #fff;
}

body.is-playgama-mobile .v-mobile-playbar__btn {
    pointer-events: auto;
}

body.is-playing-immersive .v-mobile-playbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4010;
    align-items: center;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78) 35%);
    color: #fff;
    pointer-events: none;
}

body.is-playing-immersive .v-mobile-playbar > * {
    pointer-events: auto;
}

body.is-playing-immersive .v-mobile-playbar__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.is-playing-immersive .v-mobile-playbar__meta strong {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.is-playing-immersive .v-mobile-playbar__meta span {
    font-size: 0.78rem;
    color: #d7ff45;
}

body.is-playing-immersive .v-mobile-playbar__btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 20, 28, 0.85);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
}

body.is-playing-immersive .v-orient-gate {
    position: fixed;
    inset: 0;
    z-index: 4020;
}

html.v-orient-locked,
html.v-orient-locked body {
    overflow: hidden;
}

@supports (padding: max(0px)) {
    body.is-playing-immersive .v-player-wrapper.v-game-running {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
        box-sizing: border-box;
    }
}
