﻿/* ==========================================================================
   WinSphere Mobile Pages Layout & Components
   ========================================================================== */

.winsphere-page {
    --wp-bg-top: #150829;
    --wp-bg-mid: #1c0b33;
    --wp-bg-bottom: #0a0413;
    --wp-purple: #8b3ffb;
    --wp-purple-dark: #5b21b6;
    --wp-pink: #ff4fd0;
    --wp-gold: #ffc94a;
    --wp-card-bg: #1d1233;
    --wp-card-bg-2: #241541;
    --wp-text: #ffffff;
    --wp-text-dim: #b6a6d6;
    --wp-text-faint: #8a7aad;
    --wp-pill: linear-gradient(90deg, var(--wp-purple), var(--wp-pink));

    max-width: 480px;
    margin: 0 auto;
    background: radial-gradient(120% 40% at 50% 0%, var(--wp-bg-mid) 0%, var(--wp-bg-bottom) 60%, var(--wp-bg-bottom) 100%);
    color: var(--wp-text);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* Matches wp-footer-container's height (110px + the iPhone home-indicator
       safe area) so the last row of cards always clears the floating footer
       instead of being hidden behind it. */
    padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 24px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.winsphere-page * {
    box-sizing: border-box;
}

.winsphere-page a {
    text-decoration: none;
    color: inherit;
}

/* ---------- Status Bar ---------- */
.wp-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wp-text);
}

.wp-statusbar .wp-status-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--wp-text);
}

/* ---------- Header: Logo + Balances ---------- */
.wp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px 14px;
}

.wp-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--wp-text);
}

.wp-logo .wp-logo-accent {
    color: var(--wp-gold);
}

.wp-balances {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wp-balance-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px 6px 4px 8px;
    font-size: 13px;
    font-weight: 700;
}

.wp-balance-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    flex: 0 0 auto;
}

.wp-balance-icon.wp-coin-icon {
    background: radial-gradient(circle at 35% 30%, #ffe89a, var(--wp-gold) 60%, #d69a1c 100%);
    color: #8a5a00;
}

.wp-balance-icon.wp-gem-icon {
    background: radial-gradient(circle at 35% 30%, #ff9a7a, #ff5a3d 60%, #c22a12 100%);
    color: #fff;
}

.wp-balance-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: var(--wp-pill);
    font-size: 11px;
    color: #fff;
    flex: 0 0 auto;
}

/* ---------- Spin & Win Banner ---------- */
.spin-win-banner {
    width: 100%;
    margin: 4px auto 18px;
    position: relative;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spin-win-banner img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    animation: foxAnimation 2s ease-in-out infinite;
}

@keyframes foxAnimation {
    0%   { transform: translateY(0) scale(1); }
    20%  { transform: translateY(-5px) scale(1.015); }
    40%  { transform: translateY(0) scale(1); }
    60%  { transform: translateY(-7px) scale(1.02); }
    80%  { transform: translateY(-2px) scale(1.01); }
    100% { transform: translateY(0) scale(1); }
}

/* ---------- Section Headers ---------- */
.wp-section {
    margin: 20px 0 10px;
}

.wp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    margin-bottom: 12px;
}

.wp-all-games-head {
    margin-top: 18px;
}

.wp-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--wp-text);
}

.wp-section-title .fa-fire {
    color: #ff7a45;
}

.wp-section-title .fa-gamepad {
    color: var(--wp-pink);
}

.wp-section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Glossy Slanted Purple "View All" Button (Matches btn.JPG) */
.wp-viewall-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.3px;
    
    /* Slanted Trapezoid/Parallelogram Pill Shape */
    transform: skewX(-8deg);
    border-radius: 12px;
    
    /* Layered Purple Gradient Background */
    background: linear-gradient(180deg, #b038ff 0%, #850ed6 60%, #5d01a3 100%);
    
    /* Shiny Glossy Border & Outer Glow Effects */
    border: 1px solid #d47aff;
    box-shadow: 
        0 4px 0px #350060,                   /* Bottom Dark Rim/Depth */
        0 6px 12px rgba(133, 14, 214, 0.6),  /* Outer Purple Glow */
        inset 0 1px 2px rgba(255, 255, 255, 0.8), /* Top Inner Highlight */
        inset 0 -2px 4px rgba(0, 0, 0, 0.4);      /* Inner Dark Shadow */
        
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Top Curved Gloss/Glass Light Reflection */
/* Straight-Edged Slanted Glossy Purple "View All" Button -- also used by
   .wp-play-btn (wp-game-list-item's Play button) so both share one design. */
.wp-viewall-btn,
.wp-play-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.2px;

    /* Slanted Parallelogram Shape */
    transform: skewX(-10deg);

    /* Straight sides with slightly rounded corners (NOT pill shape) */
    border-radius: 6px !important;

    /* Deep Purple Gradient */
    background: linear-gradient(180deg, #b33bff 0%, #830bd8 55%, #58009f 100%);

    /* Glass Border & Outer Glow */
    border: 1px solid #d982ff;
    box-shadow:
        0 3px 0px #34005e,                   /* Bottom 3D Bevel Edge */
        0 4px 10px rgba(131, 11, 216, 0.5),  /* Soft Outer Purple Glow */
        inset 0 1px 1px rgba(255, 255, 255, 0.8), /* Top Inner Highlight */
        inset 0 -2px 3px rgba(0, 0, 0, 0.3);      /* Bottom Inner Shadow */

    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Play sits in a flex row with the thumb/title and shouldn't get squeezed. */
.wp-play-btn {
    flex-shrink: 0;
}

/* Curved Top Reflection Overlay */
.wp-viewall-btn::before,
.wp-play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 48%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    pointer-events: none;
}

/* Keep inner text upright */
.wp-viewall-btn .wp-btn-text,
.wp-viewall-btn span,
.wp-play-btn .wp-btn-text,
.wp-play-btn span {
    display: inline-block;
    transform: skewX(10deg);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Hover and Press States */
.wp-viewall-btn:hover,
.wp-play-btn:hover {
    transform: skewX(-10deg) translateY(-1px);
    box-shadow:
        0 4px 0px #34005e,
        0 6px 14px rgba(179, 59, 255, 0.7),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.wp-viewall-btn:active,
.wp-play-btn:active,
.wp-game-list-item:active .wp-play-btn {
    transform: skewX(-10deg) translateY(2px);
    box-shadow:
        0 1px 0px #34005e,
        0 2px 4px rgba(131, 11, 216, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.wp-nav-arrow {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--wp-text-dim);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
}

/* ---------- Game Rows & Carousel Layout (3 Cards per Row) ---------- */
.winsphere-page .wp-game-row-outer {
    width: 100%;
    overflow: hidden;
    padding: 2px 16px 12px;
}

.winsphere-page .wp-game-row {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    /* "proximity" (not "mandatory"): mandatory forces a hard snap the moment
       you lift your finger, which on iOS feels like the whole row jumping to
       the next stop instead of tracking your finger and settling one card at
       a time. Proximity only snaps once you're already close to a stop. */
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* pan-x pan-y (not pan-x alone): lets the browser natively disambiguate
       the gesture direction per-touch instead of hard-locking this row to
       horizontal-only, which was blocking a straight vertical scroll
       whenever it started on a card. The clip-path/GPU-layer fix below and
       scroll-snap: proximity above already handle the original "row jumps
       during a horizontal swipe" bug, so this no longer needs to be so
       restrictive. */
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
    padding: 5px 0 !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.winsphere-page .wp-game-row::-webkit-scrollbar {
    display: none !important;
}

.winsphere-page .wp-game-card {
    flex: 0 0 calc((100% - 20px) / 3) !important;
    min-width: calc((100% - 20px) / 3) !important;
    max-width: calc((100% - 20px) / 3) !important;
    scroll-snap-align: start;
}

/* Re-assert horizontal-only panning all the way down to the card/image
   itself. touch-action is meant to be inherited from .wp-game-row via
   ancestor intersection, but iOS Safari's own default touch handling for
   <img> and <a> (long-press callout, native drag-to-copy preview) can still
   intercept the gesture and visually "lift" the image, which reads as the
   whole card moving up/down instead of just sliding left/right. Locking
   every element in the chain removes that ambiguity. */
.winsphere-page .wp-game-card,
.winsphere-page .wp-game-card a,
.winsphere-page .wp-game-card img,
.winsphere-page .game-card-frame,
.winsphere-page .game-card,
.winsphere-page .game-card img {
    touch-action: pan-x pan-y;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ---------- Game Cards: Gold Frame & Polygon Shapes ---------- */
.winsphere-page .game-card-frame {
    width: 100%;
    aspect-ratio: 64 / 88;
    position: relative;
    padding: 3px;
    background: linear-gradient(145deg, #f9e27c, #d4af37, #8b6b1b);
    clip-path: polygon(
        15% 0%, 85% 0%,
        100% 10%, 100% 90%,
        85% 100%,
        60% 100%, 50% 96%, 40% 100%,
        15% 100%,
        0% 90%, 0% 10%
    );
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
    /* iOS Safari has a known repaint bug where clip-path shapes inside a
       -webkit-overflow-scrolling: touch row flash their background (black)
       instead of their content mid-scroll. Promoting the shape to its own
       GPU layer avoids that repaint entirely. */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.winsphere-page .game-card {
    width: 100%;
    height: 100%;
    background: #17152f;
    clip-path: polygon(
        15% 0%, 85% 0%,
        100% 10%, 100% 90%,
        85% 100%,
        60% 100%, 50% 96%, 40% 100%,
        15% 100%,
        0% 90%, 0% 10%
    );
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.winsphere-page .game-card img,
.winsphere-page .wp-game-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* ==========================================================================
   Wavy Bottom Navigation & Floating Star Badge (Matches footer_5.JPG)
   ========================================================================== */

/* Main Floating Container */
.wp-footer-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    /* Grows on iPhones with a home-indicator safe area so the nav bar itself
       sits above it instead of being tucked underneath (box-sizing: border-box
       keeps the flex content area exactly 110px, matching the original design,
       with the extra height going entirely into the bottom padding below). */
    height: calc(110px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.wp-footer-container * {
    pointer-events: auto;
}

/* ---------- Wavy Dark Purple Nav Bar Background (Transparent Glassmorphism) ---------- */
.wp-bottom-nav-bar {
    width: 100%;
    height: 80px;
    /* Semi-transparent dark background with glassmorphism blur */
    background: rgba(24, 10, 46, 0.75); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    position: relative;
}

/* Rounded Notch Shoulders (Matches Transparent Background) */
.wp-bottom-nav-bar::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 14px;
    background: rgba(24, 10, 46, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    z-index: 1;
}

/* Navigation Link Icons
   Each glyph sits in its own fixed 38x38 glossy chip. The FontAwesome glyphs
   used here (home / file / question-circle / user) all have different
   intrinsic widths and heights, so sizing them by font-size alone left the
   row looking uneven -- the chip gives every icon an identical box. */
.wp-nav-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: 100%;
    z-index: 2;
    transition: transform 0.2s ease;
}

.wp-nav-link i {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    box-sizing: border-box;
    border-radius: 12px;
    font-size: 18px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.6);

    /* Glass chip: top-lit gradient + inner highlight, same language as the
       .wp-viewall-btn / .wp-play-btn buttons. */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 55%, rgba(0, 0, 0, 0.14) 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* The glyph itself is FontAwesome's ::before, so it has to clear the sheen. */
.wp-nav-link i::before {
    position: relative;
    z-index: 2;
}

/* Curved top reflection -- ::after, because ::before carries the glyph. */
.wp-nav-link i::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 48%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
    pointer-events: none;
    z-index: 1;
}

.wp-nav-link.active,
.wp-nav-link:hover {
    transform: translateY(-2px);
}

/* Active chip: the same glossy purple as the app's buttons. */
.wp-nav-link.active i,
.wp-nav-link:hover i {
    color: #ffffff;
    background: linear-gradient(180deg, #b33bff 0%, #830bd8 55%, #58009f 100%);
    border-color: #d982ff;
    box-shadow:
        0 3px 0px #34005e,
        0 4px 10px rgba(131, 11, 216, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.8),
        inset 0 -2px 3px rgba(0, 0, 0, 0.3);
}

/* Center Text Slot */
.wp-nav-center-slot {
    flex: 1.2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100%;
    padding-bottom: 6px;
    z-index: 2;
    text-decoration: none;
}

.wp-nav-center-text {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.4px;
}

/* Floating Center Star Badge Container */
.wp-floating-star-badge {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 62px;
    height: 62px;
    border-radius: 50%;
    text-decoration: none;
    z-index: 10;
    display: block;
}

/* Outer Gradient Ring with Multi-Layer Glow */
.wp-star-outer-glow {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    background: linear-gradient(135deg, #d855ff 0%, #5900cc 100%);
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(184, 65, 255, 0.9), inset 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Inner Core Circle Frame */
.wp-star-inner-core {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    background: radial-gradient(circle at 50% 30%, #9e2bf5 0%, #1a003f 85%);
    border: 2px solid #e29eff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glowing Yellow Star Icon */
.wp-star-inner-core i {
    color: #ffdc33;
    font-size: 24px;
    filter: drop-shadow(0 0 10px #ffbd00);
}

/* Mobile Responsive Tweaks */
@media (max-width: 480px) {
    .wp-floating-star-badge,
    .wp-star-outer-glow {
        width: 56px;
        height: 56px;
    }

    .wp-star-inner-core i {
        font-size: 21px;
    }

    .wp-nav-link i {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
}

/* ---------- Contents.aspx Page Specifics ---------- */
.winsphere-contents-page {
    padding-bottom: 20px;
}

.wp-back-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--wp-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    padding: 0;
    flex: 0 0 auto;
}

.wp-legacy-hidden {
    display: none !important;
}
/* ==========================================================================
   All Games List View Component (Matches HTML Repeater Markup)
   ========================================================================== */

/* Main Container */
.wp-game-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
    margin-top: 10px;
}

/* Individual Game Row Card */
.wp-game-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #170d2b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 14px 16px;
    text-decoration: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: background 0.15s ease;
}

.wp-game-list-item:hover {
    background: #20133b;
}

/* Thumbnail Container & Image */
.wp-game-list-thumb {
    width: 78px;
    height: 78px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.wp-game-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Middle Text & Meta Stack */
.wp-game-list-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0; /* Prevents long text from overflowing */
    margin: 0 14px;
}

/* Coin Meta Tag */
.wp-game-list-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}

.wp-game-list-meta .wp-coin-icon {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    font-size: 10px;
}

/* Game Title */
.wp-game-list-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Subtitle / Reward Text */
.wp-game-list-sub {
    font-size: 12px;
    color: #a497c2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* wp-play-btn's actual styling now lives with .wp-viewall-btn earlier in this
   file, so both buttons share one design -- see the shared rule block above. */

/* ---------- Card Caption (used under game-card-frame thumbnails) ---------- */
.wp-game-name {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--wp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-game-stars {
    margin-top: 2px;
    font-size: 10px;
    color: var(--wp-text-faint);
}

.wp-game-stars .fa-star.wp-star-on {
    color: var(--wp-gold);
}

/* ==========================================================================
   GameDesc.aspx Page Specifics
   ========================================================================== */
.winsphere-gamedesc-page {
    padding-bottom: 20px;
}

.wp-detail-hero {
    padding: 4px 16px 22px;
    text-align: center;
}

/* Square frame sized for the actual 500x500 preview asset GameDesc.aspx.cs
   sources -- deliberately NOT the grid card's tall 64:88 game-card-frame,
   which is built for cropped grid thumbnails, not a single feature image.
   object-fit: contain below guarantees the whole image always shows,
   whatever its real proportions turn out to be, instead of being cropped
   or stretched to fill a mismatched shape. */
.wp-detail-cover {
    position: relative;
    width: 55%;
    max-width: 220px;
    margin: 0 auto 16px;
    padding: 6px;
    border-radius: 20px;
    background: linear-gradient(145deg, #f9e27c, #d4af37, #8b6b1b);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Classic padding-top percentage trick: forces a reliable 1:1 box from WIDTH
   alone. Swapped in for the aspect-ratio property, which this iOS Safari
   version was rendering inconsistently (frame stayed tall/portrait instead
   of square, with the image pinned to the bottom edge). padding-top percent
   has been resolved from the containing block's width consistently since
   CSS2.1, with no known engine-specific quirks. */
.wp-detail-cover::before {
    content: '';
    display: block;
    padding-top: 100%;
}

.wp-detail-cover-inner {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border-radius: 14px;
    overflow: hidden;
    background: #17152f;
}

.wp-detail-cover-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wp-detail-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--wp-text);
    margin-bottom: 6px;
}

.wp-detail-stars {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--wp-text-faint);
}

.wp-detail-stars .fa-star.wp-star-on {
    color: var(--wp-gold);
}

.wp-detail-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 0;
    margin-bottom: 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.3px;
    background: linear-gradient(180deg, #f34aff 0%, #b812f0 100%);
    border: 1px solid #ff9eff;
    box-shadow:
        0 3px 0px #630283,
        0 4px 10px rgba(184, 18, 240, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wp-detail-cta:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0px #630283,
        0 2px 4px rgba(184, 18, 240, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.wp-detail-desc {
    text-align: left;
    font-size: 13px;
    line-height: 1.6;
    color: var(--wp-text-dim);
    padding: 0 4px;
}

.wp-detail-desc strong {
    display: block;
    margin-bottom: 4px;
    color: var(--wp-text);
    font-size: 13px;
}

/* ==========================================================================
   MyAccount.aspx Page Specifics
   ========================================================================== */
.winsphere-myaccount-page {
    padding-bottom: 20px;
}

.wp-account-card {
    margin: 4px 16px 20px;
    padding: 16px;
    background: var(--wp-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wp-account-info {
    font-size: 13px;
    line-height: 1.7;
    color: var(--wp-text-dim);
}

.wp-account-info span {
    display: block;
}

.wp-unsub-block {
    display: block;
    margin-top: 14px;
    font-size: 12px;
    color: var(--wp-text-faint);
}

.wp-unsub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 8px 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #ffffff;
    text-decoration: none;
    background: linear-gradient(180deg, #ff6a6a 0%, #c81e3d 100%);
    border: 1px solid #ff9e9e;
    box-shadow:
        0 3px 0px #7a0f22,
        0 4px 10px rgba(200, 30, 61, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wp-unsub-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0px #7a0f22,
        0 2px 4px rgba(200, 30, 61, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Global Search Bar (MasterPage.master)
   Rendered directly in the master, above .content_body, so it shows on every
   page automatically. Kept outside .winsphere-page's scope, so colors are
   hardcoded to the same palette instead of that div's CSS variables.
   ========================================================================== */
.wp-search-bar-outer {
    position: relative;
    max-width: 480px;
    margin: 10px auto 0;
    padding: 0 16px;
    box-sizing: border-box;
}

.wp-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1d1233;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 6px 8px 6px 16px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 4px 14px rgba(0, 0, 0, 0.35);
}

.wp-search-bar .fa-search {
    color: #b6a6d6;
    font-size: 14px;
    flex: 0 0 auto;
}

.wp-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
}

.wp-search-input::placeholder {
    color: #8a7aad;
}

.wp-search-submit {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(90deg, #8b3ffb, #ff4fd0);
    box-shadow: 0 3px 10px rgba(255, 79, 208, 0.35);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wp-search-submit:active {
    transform: translateY(1px) scale(0.96);
}

/* ---------- Live match-as-you-type dropdown ---------- */
.wp-search-suggestions {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 6px);
    z-index: 500;
    max-height: 320px;
    overflow-y: auto;
    background: #170d2b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 6px;
}

.wp-search-suggestions.active {
    display: block;
}

.wp-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.15s ease;
}

.wp-suggest-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.wp-suggest-thumb {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #0a0413;
}

.wp-suggest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wp-suggest-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Language switcher (both MasterPage.master files)
   ONE button, showing the language you can switch TO and labelled in that
   language: the English master renders "عربي", the Arabic master "English".
   Rendered above the search bar, outside .winsphere-page -- so, like
   .wp-search-bar, the palette is hardcoded instead of read from that div's
   CSS variables. The matching RTL mirroring lives in css/rtl.css, which only
   the Arabic master loads.
   ========================================================================== */
.wp-lang-bar {
    display: flex;
    justify-content: flex-end;
    max-width: 480px;
    margin: 8px auto 0;
    padding: 0 16px;
    box-sizing: border-box;
}

.wp-lang-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    color: #ffffff;
    background: linear-gradient(90deg, #8b3ffb, #ff4fd0);
    border: 1px solid #d982ff;
    box-shadow: 0 2px 8px rgba(255, 79, 208, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wp-lang-pill .fa-globe {
    font-size: 13px;
    opacity: 0.9;
}

.wp-lang-pill:hover,
.wp-lang-pill:focus {
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 79, 208, 0.5);
}

.wp-lang-pill:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(255, 79, 208, 0.35);
}

/* ==========================================================================
   Subscription Options panel (MasterPage.master)
   Rendered by the master above .content_body -- so it sits OUTSIDE the
   .winsphere-page wrapper and, like .wp-search-bar, cannot read that div's
   CSS variables: the palette is hardcoded to the same values. The outer
   wrapper repeats .winsphere-page's 480px / auto-margin / 16px gutter so the
   card lines up with the page content underneath it instead of running the
   full width of the browser.
   ========================================================================== */
.wp-subopts-outer {
    max-width: 480px;
    margin: 12px auto 0;
    padding: 0 16px;
    box-sizing: border-box;
}

.wp-subopts-outer * {
    box-sizing: border-box;
}

.wp-subopts-card {
    padding: 16px;
    background: linear-gradient(135deg, rgba(139, 63, 251, 0.28), rgba(255, 79, 208, 0.12) 60%, #1d1233);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.wp-subopts-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.wp-subopts-title .fa {
    color: #ffc94a;
}

.wp-subopts-text {
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: #b6a6d6;
}

.wp-subopts-plan {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #ffc94a;
}

/* Breathing room for the glossy CTA: its 3D bevel/glow sits below the box. */
.wp-subopts-cta {
    margin-top: 14px;
    padding-bottom: 4px;
}

/* Same glossy slanted purple button the rest of the app uses -- the shared
   .wp-viewall-btn / .wp-play-btn rules above are not scoped to
   .winsphere-page, so this panel can use them as-is. Only the size is bumped,
   since this is a full CTA rather than an inline row action. */
.wp-subopts-cta .wp-viewall-btn {
    padding: 10px 26px;
    font-size: 14px;
}

/* ---------- Category Filter Tabs (Contents.aspx "All Games") ---------- */
.wp-category-tabs-scroll {
    display: flex;
    gap: 8px;
    padding: 18px 16px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.wp-category-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.wp-tab-pill {
    flex: 0 0 auto;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--wp-text-dim);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.wp-tab-pill.active {
    color: #ffffff;
    background: var(--wp-pill);
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(255, 79, 208, 0.35);
}

/* ==========================================================================
   SearchResult.aspx Page Specifics
   ========================================================================== */
.winsphere-searchresult-page {
    padding-bottom: 20px;
}
/* ==========================================================================
   LeaderBoard.aspx Page Specifics
   ========================================================================== */
.winsphere-leaderboard-page {
    padding-bottom: 20px;
}

/* Same width as .wp-back-btn so the title stays centred in the header. */
.wp-lb-header-spacer {
    width: 34px;
    flex: 0 0 auto;
}

.wp-lb-tabs {
    display: flex;
    gap: 8px;
    padding: 4px 16px 14px;
}

.wp-lb-tabs .wp-tab-pill {
    flex: 1 1 0;
    padding: 9px 0;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.wp-lb-panel {
    display: none;
}

.wp-lb-panel.active {
    display: block;
}

.wp-lb-list-head,
.wp-lb-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
}

.wp-lb-list-head {
    padding: 0 30px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--wp-text-faint);
}

.wp-lb-list-head span:last-child {
    text-align: right;
}

.wp-lb-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
}

.wp-lb-row {
    background: #170d2b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wp-lb-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    color: var(--wp-text-dim);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.wp-lb-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wp-lb-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex: 0 0 auto;
    font-size: 14px;
    color: #fff;
    background: var(--wp-pill);
}

.wp-lb-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--wp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-lb-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 800;
    color: var(--wp-gold);
}

.wp-lb-score .fa-star {
    font-size: 12px;
}

/* Top 3: gold / silver / bronze medals */
.wp-lb-rank-1 {
    border-color: rgba(255, 201, 74, 0.55);
    background: linear-gradient(90deg, rgba(255, 201, 74, 0.16), #170d2b 70%);
}

.wp-lb-rank-1 .wp-lb-rank {
    color: #8a5a00;
    border-color: transparent;
    background: radial-gradient(circle at 35% 30%, #ffe89a, #ffc94a 60%, #d69a1c 100%);
    box-shadow: 0 0 12px rgba(255, 201, 74, 0.5);
}

.wp-lb-rank-2 {
    border-color: rgba(214, 222, 235, 0.45);
    background: linear-gradient(90deg, rgba(214, 222, 235, 0.12), #170d2b 70%);
}

.wp-lb-rank-2 .wp-lb-rank {
    color: #4a5566;
    border-color: transparent;
    background: radial-gradient(circle at 35% 30%, #ffffff, #cfd8e3 60%, #95a3b5 100%);
}

.wp-lb-rank-3 {
    border-color: rgba(230, 145, 80, 0.45);
    background: linear-gradient(90deg, rgba(230, 145, 80, 0.14), #170d2b 70%);
}

.wp-lb-rank-3 .wp-lb-rank {
    color: #5c2c0a;
    border-color: transparent;
    background: radial-gradient(circle at 35% 30%, #ffc49a, #e69150 60%, #a8581f 100%);
}

.wp-lb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 32px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--wp-text-faint);
    background: var(--wp-card-bg);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;
}

.wp-lb-empty .fa-trophy {
    font-size: 28px;
    color: var(--wp-purple);
}

/* Pills rendered as <a> (winners pages) -- beat ".winsphere-page a { color: inherit }". */
.wp-lb-tabs .wp-tab-pill {
    color: var(--wp-text-dim);
    text-align: center;
}

.wp-lb-tabs .wp-tab-pill.active {
    color: #ffffff;
}

/* ==========================================================================
   Daily / Weekly / MonthlyWinners.aspx Page Specifics
   (winner rows reuse the .wp-lb-row / .wp-lb-rank styles above)
   ========================================================================== */
.winsphere-winners-page {
    padding-bottom: 20px;
}

.wp-win-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

.wp-win-container > .wp-lb-empty {
    margin: 0;
}

.wp-win-card {
    background: var(--wp-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wp-win-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    color: var(--wp-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.wp-win-card.open .wp-win-card-head {
    background: linear-gradient(90deg, rgba(139, 63, 251, 0.35), rgba(255, 79, 208, 0.18));
}

.wp-win-date {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.wp-win-date .fa-calendar {
    color: var(--wp-pink);
}

.wp-win-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--wp-text-dim);
}

.wp-win-count .fa-chevron-down {
    transition: transform 0.25s ease;
}

.wp-win-card.open .wp-win-count .fa-chevron-down {
    transform: rotate(180deg);
}

.wp-win-card-body {
    display: none;
    padding: 12px;
}

.wp-win-card.open .wp-win-card-body {
    display: flex;
}

/* ---------- MyAccount.aspx: profile card, info rows, menu list ---------- */
.wp-profile-card {
    background: linear-gradient(135deg, rgba(139, 63, 251, 0.28), rgba(255, 79, 208, 0.12) 60%, var(--wp-card-bg));
}

.wp-profile-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wp-profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    flex: 0 0 auto;
    font-size: 24px;
    color: #fff;
    background: var(--wp-pill);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 4px 14px rgba(255, 79, 208, 0.35);
}

.wp-profile-id {
    min-width: 0;
}

.wp-profile-caption {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--wp-gold);
}

.wp-profile-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--wp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-account-info .wp-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.wp-info-row::before {
    font-family: FontAwesome;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--wp-pink);
    background: rgba(255, 255, 255, 0.06);
}

.wp-info-start::before {
    content: "\f073"; /* fa-calendar */
}

.wp-info-renew::before {
    content: "\f021"; /* fa-refresh */
}

.wp-empty-section {
    margin: 0 16px;
    font-size: 13px;
    text-align: center;
    color: var(--wp-text-faint);
}

.wp-menu-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
}

.wp-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #170d2b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: border-color 0.15s ease;
}

.wp-menu-item:hover,
.wp-menu-item:active {
    border-color: rgba(255, 79, 208, 0.45);
}

.wp-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    flex: 0 0 auto;
    font-size: 15px;
    color: #fff;
    background: var(--wp-pill);
}

.wp-menu-label {
    flex: 1 1 auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--wp-text);
}

.wp-menu-arrow {
    font-size: 12px;
    color: var(--wp-text-faint);
}

/* ==========================================================================
   Welcome Popup (Default.aspx): T&C step -> Enter MSISDN step
   Rendered outside .winsphere-page, so colors are hardcoded to the same
   palette (like .wp-search-bar) instead of that div's CSS variables.
   ========================================================================== */
body.wp-modal-lock {
    overflow: hidden;
}

.wp-modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 200000; /* above the floating footer (99999) and spin toast (100000) */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(6, 2, 14, 0.78);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wp-modal-backdrop.open {
    display: flex;
    animation: wp-modal-fade 0.25s ease;
}

.wp-modal-backdrop * {
    box-sizing: border-box;
}

.wp-modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 448px;
    max-height: 100%;
    background: #1d1233;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(139, 63, 251, 0.25);
    color: #ffffff;
    overflow: hidden;
    animation: wp-modal-pop 0.3s ease;
}

.wp-modal[hidden] {
    display: none;
}

.wp-modal-sm {
    max-width: 380px;
}

.wp-modal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(90deg, rgba(139, 63, 251, 0.45), rgba(255, 79, 208, 0.25));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex: 0 0 auto;
}

.wp-modal-head .fa {
    color: #ffc94a;
    font-size: 18px;
}

.wp-modal-body {
    padding: 16px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}

.wp-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    flex: 0 0 auto;
}

/* ---------- T&C content ---------- */
.wp-tnc-content {
    font-size: 13px;
    line-height: 1.6;
    color: #b6a6d6;
}

.wp-tnc-content h1 {
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
    color: #ffffff;
}

.wp-tnc-content h2 {
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffc94a;
}

.wp-tnc-content h3 {
    margin: 14px 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.wp-tnc-content p {
    margin: 0 0 10px;
}

.wp-tnc-content ul,
.wp-tnc-content ol {
    margin: 0 0 10px;
    padding-left: 18px;
}

.wp-tnc-content ol {
    list-style: none;
    padding-left: 0;
}

.wp-tnc-content li {
    margin-bottom: 6px;
}

.wp-tnc-content strong {
    color: #ffffff;
}

.wp-tnc-content a {
    color: #ff4fd0;
    text-decoration: underline;
    word-break: break-all;
}

/* ---------- Accept checkbox ---------- */
.wp-accept-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
}

.wp-accept-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #ff4fd0;
    cursor: pointer;
}

/* ---------- Buttons ---------- */
.wp-modal-btn {
    min-width: 110px;
    padding: 11px 24px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #ffffff;
    background: linear-gradient(90deg, #8b3ffb, #ff4fd0);
    box-shadow: 0 4px 14px rgba(255, 79, 208, 0.4);
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.wp-modal-btn:active {
    transform: translateY(1px);
}

.wp-modal-btn:disabled {
    opacity: 0.4;
    box-shadow: none;
    cursor: not-allowed;
}

.wp-modal-btn-full {
    width: 100%;
}

/* ---------- MSISDN field ---------- */
.wp-field-label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #b6a6d6;
}

.wp-phone-field {
    display: flex;
    align-items: center;
    background: #120a22;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.wp-phone-field:focus-within {
    border-color: #ff4fd0;
}

.wp-phone-prefix {
    padding: 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #ffc94a;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    line-height: 46px;
}

.wp-phone-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
    border: 0;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 16px; /* 16px stops iOS zooming into the field */
    letter-spacing: 0.5px;
    color: #ffffff;
}

.wp-phone-input::placeholder {
    color: #8a7aad;
}

.wp-field-error {
    display: block;
    min-height: 18px;
    margin-top: 8px;
    font-size: 12px;
    color: #ff6a6a;
}

@keyframes wp-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wp-modal-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

/* T&C popup: exactly half the screen height (width unchanged); the terms
   scroll inside .wp-modal-body. dvh follows the visible area on mobile
   browsers whose toolbars resize the viewport; vh is the fallback. */
#wpModalTnc {
    height: 50vh;
    height: 50dvh;
}

/* MSISDN popup footer: Cancel + Submit side by side, equal width. */
#wpModalMsisdn .wp-modal-foot .wp-modal-btn {
    flex: 1 1 0;
    min-width: 0;
}

.wp-modal-btn-secondary {
    color: #b6a6d6;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

/* ==========================================================================
   TC.aspx Page Specifics (text styles reuse .wp-tnc-content from the popup)
   ========================================================================== */
.winsphere-tc-page {
    padding-bottom: 20px;
}

.wp-tc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wp-tnc-content .wp-tc-list li {
    position: relative;
    margin: 0;
    padding: 12px 0 12px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wp-tc-list li:last-child {
    border-bottom: 0;
}

.wp-tc-list li::before {
    content: "\f00c"; /* fa-check */
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    top: 13px;
    font-size: 12px;
    color: #ff4fd0;
}

.wp-tc-plan {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #ffc94a;
    background: rgba(255, 201, 74, 0.1);
    border: 1px solid rgba(255, 201, 74, 0.35);
}

/* ==========================================================================
   FAQ.aspx Page Specifics (answer text reuses .wp-tnc-content)
   ========================================================================== */
.winsphere-faq-page {
    padding-bottom: 20px;
}

.wp-faq-intro {
    padding: 0 16px 12px;
    font-size: 13px;
    color: #8a7aad;
}

.wp-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
}

.wp-faq-item {
    background: #1d1233;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wp-faq-item[open] {
    border-color: rgba(255, 79, 208, 0.35);
}

.wp-faq-item summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    -webkit-tap-highlight-color: transparent;
}

.wp-faq-item summary::-webkit-details-marker {
    display: none;
}

.wp-faq-item[open] summary {
    background: linear-gradient(90deg, rgba(139, 63, 251, 0.35), rgba(255, 79, 208, 0.18));
}

.wp-faq-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(90deg, #8b3ffb, #ff4fd0);
}

.wp-faq-q {
    flex: 1 1 auto;
    min-width: 0;
}

.wp-faq-item summary .fa-chevron-down {
    flex: 0 0 auto;
    font-size: 12px;
    color: #b6a6d6;
    transition: transform 0.25s ease;
}

.wp-faq-item[open] summary .fa-chevron-down {
    transform: rotate(180deg);
}

.wp-faq-answer {
    padding: 14px 16px 6px;
}

.wp-faq-answer ul ul {
    margin: 6px 0 4px;
}

.wp-faq-answer li::marker {
    color: #ff4fd0;
}

/* Q4 prize tiles */
.wp-faq-prizes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.wp-faq-prize {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-faq-prize-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #8a7aad;
}

.wp-faq-prize-amount {
    font-size: 16px;
    font-weight: 800;
    color: #ffc94a;
}

.wp-faq-prize-note {
    font-size: 11px;
    color: #b6a6d6;
}

.wp-faq-prize-grand {
    border-color: rgba(255, 201, 74, 0.5);
    background: linear-gradient(135deg, rgba(255, 201, 74, 0.16), rgba(255, 255, 255, 0.04));
}
