/* ==================== GAME PAGE: PRO MAX STYLE ==================== */

/* Custom Scrollbar Styling (Synced with main style) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: content-box;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Sidebar Specific Sync */
.sidebar .sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar .sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

/* Hover handled by global rule in style.css */


.game-details-full {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    animation: fadeIn 0.8s ease-out;
}

/* 1. Header & Breadcrumbs */
.game-header-premium {
    padding: 24px 32px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs .sep {
    opacity: 0.3;
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}

.play-title-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.play-game-icon {
    width: 80px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.play-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #a5a5a5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.play-admin-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
    -webkit-text-fill-color: initial;
}

.play-admin-edit:hover {
    color: var(--accent);
}

/* 2. Main Player Area */
.game-play-area {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.player-container-premium {
    position: relative;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

@media (max-width: 1024px) {
    .player-container-premium {
        padding: 0;
        border-radius: 0;
        margin: 0 -15px;
        /* Pull into page gutters if any */
    }
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    /* Use admin panel dimensions if set, otherwise fallback to standard 16/9 */
    aspect-ratio: var(--game-width, 16) / var(--game-height, 9);
    background: #000;
    border-radius: calc(var(--radius) - 4px);
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FIX: Only apply the scaling logic on mobile/tablet devices in portrait orientation */
@media (max-width: 1024px) {
    .iframe-wrapper.portrait-fix iframe {
        /* This trick is for landscape games in portrait screen */
        width: 1000px !important;
        height: calc(1000px * (var(--game-height, 9) / var(--game-width, 16))) !important;
        max-width: none !important;
        transform: scale(calc(var(--mobile-scale, 1))) !important;
        transform-origin: top center !important;
        /* Center scaling */
        display: block !important;
        position: absolute;
        left: 50% !important;
        transform: translateX(-50%) scale(calc(var(--mobile-scale, 1))) !important;
    }
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.player-fs-btn {
    position: absolute;
    top: 30px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-fs-btn i {
    font-size: 20px;
    /*font-weight: 700;*/
}

.player-fs-btn:hover {
    transform: scale(1.1);
    background: var(--accent);
    color: white;
    /* Ensure icon is white on accent background */
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Fullscreen Mode Refinements (Native & Fallback) */
.player-container-premium:fullscreen,
.player-container-premium:-webkit-full-screen,
.player-container-premium.fullscreen,
.player-container-premium.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.player-container-premium:fullscreen .iframe-wrapper,
.player-container-premium:-webkit-full-screen .iframe-wrapper,
.player-container-premium.fullscreen .iframe-wrapper,
.player-container-premium.is-fullscreen .iframe-wrapper {
    position: absolute !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    aspect-ratio: auto !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 1 !important;
}

.player-container-premium:fullscreen iframe,
.player-container-premium:-webkit-full-screen iframe,
.player-container-premium.fullscreen iframe,
.player-container-premium.is-fullscreen iframe {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    border: none !important;
}



/* Fix for play-overlay reappearing after exit fullscreen */
.player-container-premium.game-started .play-overlay,
.player-container-premium.game-started .mobile-play-gateway {
    display: none !important;
}

.is-fullscreen .play-overlay,
.fullscreen .play-overlay,
.player-container-premium:fullscreen .play-overlay {
    display: none !important;
}

/* 3. Unified Game Header & Meta Premium */
.game-meta-premium {
    position: relative;
    padding: 30px 32px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.game-top-actions-wrapper {
    position: absolute;
    top: 30px;
    right: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    z-index: 100;
}

.game-primary-actions-top {
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: auto !important;
}

.game-ad-area-lite {
    width: 100%;
    min-height: 50px;
}

/* Override existing player-fs-btn absolute position when in meta */
.game-meta-premium .player-fs-btn {
    position: static;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs .sep {
    opacity: 0.4;
    font-size: 0.8rem;
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}

.play-title-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.play-game-icon {
    width: 80px;
    height: 60px;
    /* 4:3 Ratio */
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.play-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #a5a5a5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

/* Moved up - removed from here */

.vote-pill-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: auto !important;
}

.vote-pill-group:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
}

.vote-pill-btn {
    border: none;
    background: none;
    padding: 5px 10px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.vote-pill-btn i {
    font-size: 1.4rem;
}

.vote-pill-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.vote-pill-btn.active,
.vote-pill-btn:active {
    background: none !important;
}

.vote-pill-btn.like-btn.active {
    color: #10B981;
}

.vote-pill-btn.dislike-btn.active {
    color: #EF4444;
}

.vote-pill-separator {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
}

.vote-btn {
    padding: 5px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

.vote-btn i {
    font-size: 1.4rem;
}

.vote-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.vote-btn:active {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-1px);
}

.vote-btn.fav:hover,
.vote-btn.fav.active {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.vote-btn.fav.active i {
    fill: var(--accent);
}

.game-meta-list {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px 20px;
    font-size: 1rem;
    margin-bottom: 30px;
}

.meta-row {
    display: contents;
}

.meta-label {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: capitalize;
}

.meta-value {
    color: var(--text-primary);
    font-weight: 500;
    text-transform: none;
}

.platform-meta-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.platform-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5px 5px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    /* Thinned border */
    transition: all 0.3s ease;
}

.platform-item i {
    font-size: 0.9rem;
    /* Reduced from 1.1rem */
    color: var(--accent);
}

.platform-item:hover {
    background: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-rgb), 0.3);
    color: #fff;
    transform: translateY(-1px);
}

.meta-value strong {
    font-weight: 900;
    font-size: 1.1rem;
}

.meta-muted {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 4px;
}

.accent-text {
    color: var(--accent);
    font-weight: 600;
}

.developer-link {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.developer-link:hover {
    text-decoration: underline;
    filter: brightness(1.2);
}

.game-tags-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 6px 12px;
    /* Reduced from 8px 16px */
    color: var(--text-secondary);
    font-size: 0.8rem;
    /* Reduced from 0.9rem */
    font-weight: 600;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    /* Thinned border */
    transition: var(--transition);
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    color: #fff;
}

.category-pill .count-badge {
    color: var(--accent);
    font-weight: 700;
}

/* 4. Content Grid (About & Related) */
.game-content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--gap);
}

.content-left,
.content-right {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.info-card,
.video-card,
.related-sidebar {
    padding: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.card-header i {
    color: var(--accent);
    width: 20px;
    height: 20px;
}

.card-header h3 {
    margin: 0;

    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-body {
    padding: 24px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.video-wrapper {
    aspect-ratio: 16/9;
    background: #000;
    max-width: 720px;
    /* Reduced width */
    margin: 20px auto;
    /* Centered with top/bottom margin */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe,
.video-wrapper video {
    width: 100%;
    height: 100%;
}

.youtube-placeholder {
    width: 100%;
    height: 100%;
    background-color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.yt-placeholder-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.youtube-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.6) 100%);
    opacity: 0.8;
    z-index: 2;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    /* Let initial click pass to parent's onclick */
}

.youtube-placeholder.is-playing::before {
    opacity: 0;
    visibility: hidden;
}

.youtube-placeholder.is-playing {
    cursor: default;
}

.youtube-placeholder:hover::before {
    opacity: 0.4;
}

.youtube-placeholder.is-playing:hover::before {
    opacity: 0;
}

.play-button-wrapper {
    width: 84px;
    height: 84px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.4);
}

.play-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    /* Changed from #000 to #fff for better visibility */
    font-size: 3rem;
    padding-left: 6px;
    /* Offset to center the play triangle visually */
}

.youtube-placeholder:hover .play-button-wrapper {
    transform: scale(1.15);
    background: #fff;
    box-shadow: 0 0 50px rgba(var(--accent-rgb), 0.6);
}

.youtube-placeholder:hover .play-button-icon {
    color: var(--accent);
}

.youtube-placeholder:active .play-button-wrapper {
    transform: scale(0.95);
}

.related-grid-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    gap: 8px;
    padding: 12px;
}

.related-grid-bento .game-card {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    height: 100% !important;
}

.related-grid-bento .bento-item {
    font-size: 0.7rem;
}

.related-grid-bento .hover-title {
    font-size: 0.75rem !important;
}

.related-grid-bento .hover-category {
    display: none !important;
    /* Hide category on small sidebar cards */
}

.view-more-btn {
    margin: 0 20px 20px;
    padding: 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.view-more-btn:hover {
    background: var(--accent);
    color: white;
}


/* 🚀 Interactive Sidebar Layout Adjustments */
.play-page-wrapper .main-content {
    margin-left: calc(80px + var(--gap));
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1200px) {
    .play-page-wrapper .main-content {
        margin-left: 0;
    }
}

/* 4. New 2-Column Layout */
.play-page-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--gap);
    align-items: flex-start;
}

.play-column-main {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    min-width: 0;
    /* Prevent overflow */
}

.play-column-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

/* Square Ad Case */
.ad-slot-square-wrapper {
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ad-header-small {
    display: flex;
    justify-content: center;
}

.ad-label-small {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
    opacity: 0.6;
}

.ad-slot-square {
    width: 300px;
    height: 250px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Info Sections below player */
.game-info-sections {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

/* Dual Banner Ads */
.game-ads-banner-row {
    display: flex;
    gap: var(--gap);
    margin-bottom: var(--gap);
    width: 100%;
}

.banner-ad-wrapper {
    flex: 1;
    min-width: 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.ad-content-banner {
    width: 100%;
    min-height: 90px;
    background: var(--bg-card);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .game-ads-banner-row {
        flex-direction: column;
    }
}

/* Responsive Overrides */
@media (max-width: 1200px) {
    .play-page-layout {
        grid-template-columns: 1fr;
    }

    .play-column-sidebar {
        position: static;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .ad-slot-square-wrapper {
        display: none;
        /* Hide top right ad on mobile/tablet if needed, or keep it */
    }
}

@media (max-width: 1024px) {
    .game-meta-premium {
        padding: 20px;
    }

    .play-title-wrapper {
        gap: 15px;
    }

    .play-game-icon {
        width: 60px;
        height: 45px;
        border-radius: 10px;
    }

    .play-title {
        font-size: 1.6rem;
    }

    .game-primary-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .game-meta-list {
        grid-template-columns: 90px 1fr;
        font-size: 0.9rem;
    }

    .category-pill {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .vote-group {
        flex-wrap: wrap;
        gap: 8px;
    }

    .related-grid-bento {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .player-fs-btn {
        position: static;
        width: 36px;
        height: 36px;
    }

    .game-top-actions-wrapper {
        position: static;
        width: 100%;
        margin-bottom: 20px;
        align-items: flex-start;
    }

    .game-primary-actions-top {
        width: 100%;
        flex-wrap: wrap;
    }

    .player-fs-btn i {
        font-size: 18px;
    }
}

/* 6. FAQ (SSS) Accordion */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.faq-question {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
}

.faq-answer {
    max-height: none;
    overflow: visible;
    background: rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-top: 1px solid var(--glass-border);
}

.faq-answer p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Share Modal Refined (Pro Max Red Edition) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(5, 5, 12, 0.6) 0%, rgba(5, 5, 12, 0.9) 100%);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 420px;
    padding: 40px 32px;
    position: relative;
    border-radius: 30px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 0, 51, 0.05);
    text-align: center;
    transform: scale(0.9) translateY(30px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(255, 0, 51, 0.2), transparent) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.modal-title {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #a5a5a5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.share-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 35px;
}

.share-item {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 28px;
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(20px);
}

.modal-overlay.active .share-item {
    opacity: 1;
    transform: translateY(0);
}

.modal-overlay.active .share-item:nth-child(1) {
    transition-delay: 0.1s;
}

.modal-overlay.active .share-item:nth-child(2) {
    transition-delay: 0.2s;
}

.modal-overlay.active .share-item:nth-child(3) {
    transition-delay: 0.3s;
}

.share-item:hover {
    transform: scale(1.15) translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.share-item.facebook:hover {
    color: #1877F2;
    box-shadow: 0 10px 20px rgba(24, 119, 242, 0.2);
}

.share-item.x-social:hover {
    color: #fff;
    background: #000;
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.share-item.whatsapp:hover {
    color: #25D366;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.share-link-copy {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 8px;
    gap: 10px;
    transition: var(--transition);
}

.share-link-copy:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.share-link-copy input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0 15px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    width: 100%;
}

.copy-primary-btn {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.copy-primary-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* =========================================
   DEVELOPER GAMES MODAL
   ========================================= */
.developer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.developer-modal.active {
    opacity: 1;
    visibility: visible;
}

.developer-modal-content {
    width: 100%;
    max-width: 800px;
    height: auto;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.developer-modal.active .developer-modal-content {
    transform: translateY(0) scale(1);
}

.dev-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.dev-modal-close:hover {
    background: var(--danger);
    color: #fff;
    transform: rotate(90deg);
}

.dev-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dev-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dev-modal-header h3 i {
    color: var(--accent);
}

.developer-games-grid {
    padding: 24px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.developer-games-grid::-webkit-scrollbar {
    width: 6px;
}

.developer-games-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.developer-games-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    border: 1px solid transparent;
    background-clip: content-box;
}

/* Hover handled by global rule in style.css */

.dev-game-card {
    display: block;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--surface);
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dev-game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.dev-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(239, 68, 68, 0.3);
}

.dev-game-card:hover img {
    transform: scale(1.08);
}

.dev-game-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 10px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
}

.dev-game-info h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dev-modal-loader,
.dev-modal-empty,
.dev-modal-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.dev-modal-loader i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
    color: var(--accent);
}

/* --- High-Priority Layout Fix (Action Buttons) --- */
.game-meta-premium .game-top-actions-wrapper {
    position: absolute !important;
    top: 30px !important;
    right: 32px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 999 !important;
    width: auto !important;
}

.game-meta-premium .game-primary-actions-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    width: auto !important;
    margin: 0 !important;
}

.game-meta-premium .vote-pill-group {
    display: flex !important;
    width: auto !important;
    margin: 0 !important;
}

.game-meta-premium .game-primary-actions-top .player-fs-btn {
    position: static !important;
    margin: 0 !important;
}

@media (max-width: 1024px) {

    .game-content-grid {
        grid-template-columns: 1fr !important;
    }

    /* Full-Width Mobile Page Overrides */
    .site-wrapper,
    .main-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .player-container-premium {
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }

    .iframe-wrapper {
        width: 100vw !important;
        height: auto !important;
        /* Removed hardcoded 9/16 ratio to favor dynamic variables from play.php */
        max-height: 80vh;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .game-play-area {
        gap: 0 !important;
    }

    .game-meta-premium {
        padding: 20px !important;
        border-radius: 0 !important;
    }

    /* Fixed existing bottom styles */
    .game-meta-premium .game-top-actions-wrapper {
        position: static !important;
        width: 100% !important;
        align-items: flex-start !important;
        margin-bottom: 20px !important;
    }

    .game-meta-premium .game-primary-actions-top {
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
}

@keyframes rotateHint {
    0% {
        transform: rotate(0deg);
    }

    30% {
        transform: rotate(-90deg);
    }

    70% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@media (max-width: 1024px) {
    .orientation-hint {
        top: 12px;
        right: 12px;
        padding: 6px;
        border-radius: 10px;
    }

    .orientation-hint i.rotate-icon {
        font-size: 1.1rem;
    }
}

/* Mobile Edge-to-Edge Utility */
@media (max-width: 1024px) {
    .player-container-premium {
        width: 100vw !important;
        max-width: 100vw !important;
        min-height: 500px;
        /* Fallback for gateway visibility */
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #000 !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
    }

    /* Fixed Height for Gateway (Pre-play) */
    .player-container-premium:not(.game-started) {
        height: 70vh !important;
        min-height: 480px !important;
    }

    /* Immersive Mode when game is active & fullscreen */
    body.game-fullscreen-active .player-container-premium {
        height: 100dvh !important;
        width: 100vw !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 999999 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .iframe-wrapper {
        width: 100vw !important;
        height: 100% !important;
        max-height: none !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .iframe-wrapper iframe {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        /* Preserve aspect ratio within the black container */
    }

    .player-container-premium .game-play-area {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    .mobile-play-gateway {
        width: 100vw !important;
        height: 100% !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        padding: 20px !important;
        z-index: 999999 !important;
    }
}