/* ==========================================================================
   PlayArcade Pro - Universal Game Playing Stage & Page Styling
   Provides 100% responsive, high-performance styling for game playing pages
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.game-play-page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 10px 0 40px;
    box-sizing: border-box;
}

/* Breadcrumb Navigation */
.game-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.game-breadcrumbs a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s ease;
}
.game-breadcrumbs a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}
.game-breadcrumbs .bc-sep {
    color: #cbd5e1;
    font-size: 0.8rem;
}
.game-breadcrumbs .bc-current {
    color: #0f172a;
    font-weight: 700;
}

/* Above & Below Game Ad Slots */
.ad-game-top, .ad-game-bottom {
    margin: 14px 0;
    text-align: center;
    overflow: hidden;
}

/* Main Game Stage Container (Player + Action Bar) */
.game-stage-container {
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    position: relative;
    transition: all 0.3s ease;
}

/* 16:9 Widescreen Responsive Embed Container */
.game-embed-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 520px;
    max-height: 80vh;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.game-embed-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Action Toolbar Under Game */
.game-action-toolbar {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

/* Left: Thumbnail & Info */
.toolbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.game-meta-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tb-thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    flex-shrink: 0;
}
.tb-info {
    display: flex;
    flex-direction: column;
}
.tb-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 3px;
    line-height: 1.25;
}
.tb-cat {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}

/* Right: Interactive Toolbar Buttons */
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    transition: all 0.18s ease;
    user-select: none;
    line-height: 1;
}
.tb-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
}
.tb-btn:active {
    transform: translateY(0);
}
.tb-btn i {
    font-size: 0.92rem;
}

/* Button Variants & Active States */
.tb-btn.btn-like:hover, .tb-btn.btn-like.voted {
    background: #ecfdf5;
    border-color: #10b981;
    color: #059669;
}
.tb-btn.btn-dislike:hover, .tb-btn.btn-dislike.voted {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}
.tb-btn.btn-fav:hover, .tb-btn.btn-fav.active {
    background: #fdf2f8;
    border-color: #ec4899;
    color: #db2777;
}
.tb-btn.btn-theater:hover {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #d97706;
}
.tb-btn.btn-fullscreen {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}
.tb-btn.btn-fullscreen:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}
.tb-btn.btn-share:hover {
    background: #f5f3ff;
    border-color: #8b5cf6;
    color: #7c3aed;
}

/* Native Fullscreen Mode Overrides */
#gameStage:fullscreen, 
#gameStage:-webkit-full-screen, 
#gameStage:-moz-full-screen, 
#gameStage:-ms-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
}
#gameStage:fullscreen .game-embed-wrapper, 
#gameStage:-webkit-full-screen .game-embed-wrapper,
#gameStage:-moz-full-screen .game-embed-wrapper,
#gameStage:-ms-fullscreen .game-embed-wrapper {
    width: 100vw !important;
    height: calc(100vh - 65px) !important;
    max-height: calc(100vh - 65px) !important;
    aspect-ratio: auto !important;
    flex: 1 !important;
}
#gameStage:fullscreen .game-action-toolbar, 
#gameStage:-webkit-full-screen .game-action-toolbar,
#gameStage:-moz-full-screen .game-action-toolbar,
#gameStage:-ms-fullscreen .game-action-toolbar {
    height: 65px !important;
    border-radius: 0 !important;
    flex-shrink: 0 !important;
}

/* Theater Mode ("Lights Off") Overlay */
.theater-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9998;
}
body.theater-active .theater-overlay {
    display: block;
}
body.theater-active .game-stage-container {
    position: relative;
    z-index: 9999;
    box-shadow: 0 0 60px rgba(0,0,0,0.9);
}

/* Two-Column Details Layout (Guide + Sidebar) */
.game-details-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
.game-main-col {
    min-width: 0;
}
.game-sidebar-col {
    min-width: 0;
}

/* Main Column: In-Depth 800+ Words Guide Card */
.game-guide-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}
.game-guide-body {
    font-size: 0.96rem;
    line-height: 1.75;
    color: #334155;
}
.game-guide-body h2, .game-guide-body h3 {
    color: #0f172a;
    font-weight: 800;
    margin: 20px 0 10px;
}
.game-guide-body h2:first-child, .game-guide-body h3:first-child {
    margin-top: 0;
}
.game-guide-body p {
    margin-bottom: 14px;
}
.game-guide-body ul, .game-guide-body ol {
    margin: 10px 0 16px 20px;
}
.game-guide-body li {
    margin-bottom: 6px;
}

/* Quick Controls Guide Card */
.game-controls-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 20px 0;
}
.game-controls-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.game-controls-card p {
    font-size: 0.9rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

/* Tags Pills */
.game-tags-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}
.tags-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #64748b;
    margin-right: 4px;
}
.game-tag-pill {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.game-tag-pill:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Related Games Recommendation Section */
.related-games-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.related-games-section .section-header {
    margin-bottom: 16px;
}
.related-games-section .section-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.related-games-section .section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.related-games-section .section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.grid-related {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.game-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}
.game-card:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.game-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.game-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.game-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.game-hover-play {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.game-hover-play i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding-left: 2px;
}
.game-card:hover .game-hover-play {
    opacity: 1;
}
.game-card-body {
    padding: 10px 12px;
}
.game-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-card-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    color: #64748b;
}

/* Sidebar Column & Widgets */
.sidebar-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}
.sidebar-widget.widget-ad {
    padding: 10px;
    text-align: center;
    overflow: hidden;
}
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}
.specs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.specs-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.86rem;
    color: #64748b;
}
.specs-list li strong {
    color: #0f172a;
    font-weight: 600;
}
.badge-free {
    background: #ecfdf5;
    color: #059669;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
}
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.trending-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
}
.trending-item:hover {
    background: #f8fafc;
}
.trending-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.trending-meta {
    flex: 1;
    min-width: 0;
}
.trending-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.trending-item:hover .trending-title {
    color: #2563eb;
}
.trending-views {
    font-size: 0.76rem;
    color: #64748b;
}

/* Share Modal & Backdrop */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.modal-backdrop.open {
    display: flex;
}
.modal-dialog {
    background: #ffffff;
    border-radius: 14px;
    max-width: 480px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
    box-sizing: border-box;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    padding: 0;
}
.modal-close:hover {
    color: #0f172a;
}
.modal-body p {
    color: #475569;
    font-size: 0.92rem;
    margin-bottom: 16px;
}
.share-buttons-row {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}
.share-btn {
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.15s ease;
}
.share-btn:hover {
    opacity: 0.9;
}
.share-whatsapp { background: #25D366; }
.share-facebook { background: #1877F2; }
.share-twitter { background: #000000; }

.share-copy-box {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.share-copy-box input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.86rem;
    background: #f8fafc;
    color: #334155;
    outline: none;
}
.share-copy-box input:focus {
    border-color: #2563eb;
}
.share-copy-box .btn-primary {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.share-copy-box .btn-primary:hover {
    background: #1d4ed8;
}
.copy-success-msg {
    display: none;
    font-size: 0.82rem;
    color: #10b981;
    font-weight: 600;
    margin-top: 8px;
}
.copy-success-msg.show {
    display: block;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .game-details-layout {
        grid-template-columns: 1fr;
    }
    .grid-related {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .game-embed-wrapper {
        min-height: 320px;
        aspect-ratio: 16 / 10;
    }
    .game-action-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 14px;
    }
    .toolbar-left, .toolbar-right {
        width: 100%;
    }
    .toolbar-right {
        justify-content: space-between;
    }
    .grid-related {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .game-embed-wrapper {
        min-height: 240px;
    }
    .tb-thumb {
        width: 42px;
        height: 42px;
    }
    .tb-title {
        font-size: 1.05rem;
    }
    .tb-btn {
        padding: 7px 10px;
        font-size: 0.82rem;
    }
    .tb-btn span {
        display: none;
    }
    .tb-btn i {
        margin: 0;
    }
    .grid-related {
        grid-template-columns: 1fr;
    }
}
