/* ============================================
   XI ROYALE — PERFORMANCE LAYER
   GPU-accelerated transitions & containment
   ============================================ */

/* === GPU COMPOSITING HINTS === */

/* Main content screens — promote to GPU layer */
main,
.screen-container,
#ds-center,
[data-page-content] {
    will-change: transform, opacity;
    contain: content;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Cards — GPU hint for hover transforms */
.premium-card,
.glass-card,
.stadium-card,
.competition-card-stadium {
    will-change: transform;
    contain: layout style;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* === GPU-ACCELERATED PAGE TRANSITIONS (SLIDE) === */

/* The page body during transition */
body {
    overflow-x: hidden; /* prevent horizontal scrollbar during slide */
}

/* Exit: current page slides out left */
body.page-exit {
    animation: slideOutLeft 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

/* Enter: new page slides in from right */
body.page-enter {
    animation: slideInRight 0.2s cubic-bezier(0.0, 0, 0.2, 1) forwards;
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-8%);
        opacity: 0;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(5%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Back navigation — reverse direction */
body.page-exit-back {
    animation: slideOutRight 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

body.page-enter-back {
    animation: slideInLeft 0.2s cubic-bezier(0.0, 0, 0.2, 1) forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(8%);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-5%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === REDUCED MOTION SAFEGUARD === */
@media (prefers-reduced-motion: reduce) {
    body.page-exit,
    body.page-exit-back {
        animation: none;
        opacity: 0;
        transition: opacity 0.1s;
    }
    body.page-enter,
    body.page-enter-back {
        animation: none;
        opacity: 1;
        transition: opacity 0.1s;
    }
    .premium-card,
    .glass-card,
    .stadium-card,
    .competition-card-stadium,
    main {
        will-change: auto;
    }
}

/* === SCROLL PERFORMANCE === */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Force GPU for scrolling containers */
[class*="overflow-y"],
[class*="overflow-x"] {
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
}

/* === OPERATION HONEST START === */
.hits-pill {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: #0F172A; /* Pitch background */
    color: #ef4444; /* red-500 */
    font-size: 9px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 6px; /* rounded-md */
    border: 1px solid rgba(239, 68, 68, 0.3); /* border-red-500/30 */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    z-index: 10;
}

.d-none {
    display: none !important;
}

/* [OPERATION HONEST START] - Arena Mobile Refinement (Subtle Shrink) */
@media (max-width: 576px) {
    .arena-inner-container {
        padding: 1.25rem !important;
    }

    .arena-card-title {
        font-size: 1.5rem !important;
        /* Shrunk from 2xl */
    }

    .deadline-label {
        font-size: 8px !important;
        /* Shrunk from 9px */
        letter-spacing: 1px;
    }

    .countdown-timer {
        padding: 0.75rem !important;
    }

    .countdown-timer span[id^="cd-"] {
        font-size: 1.5rem !important;
        /* Shrunk from 2xl */
    }

    .countdown-timer span.text-xl {
        font-size: 1.25rem !important;
        /* Shrunk from xl */
        margin-bottom: 2px !important;
    }
}