/* Game detail page styles */
body{background:#fff;overflow-x:hidden;width:100%}

.container{max-width:1200px;margin:0 auto;padding:15px;width:100%}

.section{background:#fff;padding:20px;border-radius:12px;margin-bottom:20px;border:1px solid #e0e0e0;overflow:hidden}
.section-title{font-size:20px;font-weight:700;margin-bottom:15px;color:#1a1a1a}
/* Rich HTML content (editor review, how to play) */
.rich-content{font-size:15px;line-height:1.8;color:#555}
.rich-content p{margin-bottom:12px}
.rich-content p:last-child{margin-bottom:0}
.rich-content h2{font-size:18px;font-weight:700;color:#1a1a1a;margin:20px 0 10px}
.rich-content h3{font-size:16px;font-weight:700;color:#1a1a1a;margin:18px 0 8px}
.rich-content h4{font-size:15px;font-weight:600;color:#333;margin:16px 0 6px}
.rich-content ul,.rich-content ol{margin:10px 0 14px 24px;color:#555}
.rich-content li{padding:4px 0;line-height:1.7}
.rich-content strong,.rich-content b{color:#333;font-weight:600}
.rich-content a{color:#6267FA;text-decoration:none;font-weight:500}
.rich-content a:hover{text-decoration:underline}
.rich-content img{max-width:100%;height:auto;border-radius:8px;margin:12px 0}
.rich-content blockquote{margin:14px 0;padding:12px 18px;border-left:3px solid #6267FA;background:#f8f8ff;border-radius:0 8px 8px 0;color:#444;font-style:italic}
.rich-content table{width:100%;border-collapse:collapse;margin:14px 0;font-size:14px}
.rich-content th,.rich-content td{padding:10px 14px;border:1px solid #e0e0e0;text-align:left}
.rich-content th{background:#f5f5f5;font-weight:600;color:#333}
.rich-content tr:nth-child(even){background:#fafafa}
.rich-content hr{border:none;height:1px;background:#e0e0e0;margin:20px 0}
.rich-content pre{background:#f5f5f5;padding:14px;border-radius:8px;overflow-x:auto;font-size:13px;margin:12px 0}
.rich-content code{background:#f0f0f0;padding:2px 6px;border-radius:4px;font-size:13px}


.screenshots-container{position:relative;margin:20px -20px;padding:0 20px}
.screenshots{display:flex;gap:15px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;padding:10px 0;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#667eea #f0f0f0}
.screenshots::-webkit-scrollbar{height:8px}
.screenshots::-webkit-scrollbar-track{background:#f0f0f0;border-radius:10px}
.screenshots::-webkit-scrollbar-thumb{background:#667eea;border-radius:10px}
.screenshots::-webkit-scrollbar-thumb:hover{background:#764ba2}
.screenshot-wrapper{flex-shrink:0;height:220px;border-radius:12px;overflow:hidden;border:1px solid #e0e0e0;cursor:pointer;transition:transform .3s,box-shadow .3s;background:#f5f5f5}
.screenshot-wrapper:hover{transform:scale(1.03);box-shadow:0 8px 25px rgba(0,0,0,0.15)}
.screenshot{height:100%;width:auto;max-width:none;display:block;object-fit:contain;border-radius:0;border:none}
.scroll-hint{text-align:center;color:#888;font-size:13px;margin-top:10px;font-style:italic}
.scroll-hint::before{content:'\2190 ';font-size:16px}
.scroll-hint::after{content:' \2192';font-size:16px}

/* Ratings Section */
.ratings-section{padding:25px 30px}
.ratings-content{display:flex;gap:40px;align-items:flex-start}
.ratings-summary{display:flex;flex-direction:column;align-items:center;min-width:100px}
.ratings-score{font-size:56px;font-weight:300;color:#333;line-height:1}
.ratings-stars{display:flex;gap:2px;margin-top:8px}
.ratings-stars .star{font-size:20px}
.ratings-stars .star.filled{color:#ffc107}
.ratings-stars .star.empty{color:#d0d0d0}
.ratings-bars{flex:1;display:flex;flex-direction:column;gap:10px;padding-top:8px}
.rating-row{display:flex;align-items:center;gap:12px}
.rating-label{font-size:14px;color:#666;width:12px;text-align:right;font-weight:500}
.rating-bar-container{flex:1;height:10px;background:#e8e8e8;border-radius:5px;overflow:hidden}
.rating-bar{height:100%;background:#4dabf7;border-radius:5px;min-width:4px;transition:width 0.5s ease}

/* Submit Review Button */
.ratings-section .section-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.btn-submit-review{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;background:#fff;color:#667eea;border:1.5px solid #667eea;border-radius:20px;font-size:13px;font-weight:600;cursor:pointer;transition:all 0.25s ease;margin:0}
.btn-submit-review:hover{background:#667eea;color:#fff;transform:scale(1.02);box-shadow:0 4px 12px rgba(102,126,234,0.3)}
.btn-submit-review span:first-child{font-size:14px;line-height:1}

/* Review Modal */
.review-modal{background:#fff;border-radius:16px;padding:30px;max-width:450px;width:90%;position:relative;box-shadow:0 10px 40px rgba(0,0,0,0.2);animation:modalSlideIn 0.2s ease}
.review-modal-close{position:absolute;top:15px;right:15px;width:32px;height:32px;background:#f0f0f0;border:none;border-radius:50%;font-size:24px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.2s}
.review-modal-close:hover{background:#e0e0e0}
.review-modal-title{font-size:22px;font-weight:700;color:#1a1a1a;margin-bottom:5px}
.review-modal-subtitle{font-size:14px;color:#666;margin-bottom:25px}
.review-form-group{margin-bottom:20px}
.review-form-label{display:block;font-size:14px;font-weight:600;color:#333;margin-bottom:8px}
.star-rating{display:flex;gap:8px}
.rating-star{font-size:32px;color:#d0d0d0;cursor:pointer;transition:color 0.2s,transform 0.2s}
.rating-star:hover,.rating-star.active{color:#ffc107}
.rating-star:hover{transform:scale(1.1)}
.review-textarea{width:100%;padding:12px 15px;border:1px solid #e0e0e0;border-radius:8px;font-size:14px;font-family:inherit;resize:vertical;transition:border-color 0.2s;box-sizing:border-box}
.review-textarea:focus{outline:none;border-color:#667eea}
.review-textarea::placeholder{color:#999}
.review-form-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:25px}
.review-btn{padding:12px 24px;border-radius:8px;font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s;border:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:120px}
.review-btn-cancel{background:#f0f0f0;color:#333}
.review-btn-cancel:hover{background:#e5e5e5}
.review-btn-submit{background:#667eea;color:#fff}
.review-btn-submit:hover{background:#5a6fd6}
.review-btn-submit:disabled{opacity:0.6;cursor:not-allowed}
.btn-loader{width:16px;height:16px;border:2px solid rgba(255,255,255,0.3);border-top-color:#fff;border-radius:50%;animation:spin 0.8s linear infinite}
.review-success{text-align:center;padding:20px 0}
.success-icon{width:60px;height:60px;background:#4caf50;color:#fff;border-radius:50%;font-size:32px;display:flex;align-items:center;justify-content:center;margin:0 auto 20px}
.review-success h3{font-size:20px;color:#1a1a1a;margin-bottom:8px}
.review-success p{color:#666;margin-bottom:20px}

/* Screenshot Lightbox */
.lightbox-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.92);display:none;justify-content:center;align-items:center;z-index:10000;padding:20px;box-sizing:border-box}
.lightbox-overlay.active{display:flex}
.lightbox-content{position:relative;max-width:95vw;max-height:90vh;display:flex;flex-direction:column;align-items:center}
.lightbox-image{max-width:100%;max-height:85vh;object-fit:contain;border-radius:8px;box-shadow:0 10px 50px rgba(0,0,0,0.5);animation:lightboxFadeIn 0.25s ease;transition:opacity 0.1s ease}
@keyframes lightboxFadeIn{from{opacity:0;transform:scale(0.95)}to{opacity:1;transform:scale(1)}}
.lightbox-close{position:fixed;top:20px;right:20px;width:44px;height:44px;background:rgba(255,255,255,0.15);border:none;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s,transform .2s;z-index:10001}
.lightbox-close:hover{background:rgba(255,255,255,0.25);transform:scale(1.1)}
.lightbox-close::before,.lightbox-close::after{content:'';position:absolute;width:20px;height:2px;background:#fff}
.lightbox-close::before{transform:rotate(45deg)}
.lightbox-close::after{transform:rotate(-45deg)}
.lightbox-nav{position:fixed;top:50%;transform:translateY(-50%);width:50px;height:50px;background:rgba(255,255,255,0.15);border:none;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s,transform .2s;z-index:10001}
.lightbox-nav:hover{background:rgba(255,255,255,0.25);transform:translateY(-50%) scale(1.1)}
.lightbox-nav.prev{left:20px}
.lightbox-nav.next{right:20px}
.lightbox-nav::before{content:'';width:12px;height:12px;border-top:2px solid #fff;border-right:2px solid #fff}
.lightbox-nav.prev::before{transform:rotate(-135deg);margin-left:4px}
.lightbox-nav.next::before{transform:rotate(45deg);margin-right:4px}
.lightbox-counter{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);color:rgba(255,255,255,0.8);font-size:14px;font-weight:500;background:rgba(0,0,0,0.5);padding:8px 16px;border-radius:20px}

.sidebar{background:#fff;padding:15px;border-radius:12px;border:1px solid #e0e0e0;height:fit-content;position:sticky;top:64px}
.sidebar-title{font-size:20px;font-weight:700;margin-bottom:12px;padding:0 5px;color:#1a1a1a}
.top-game{display:flex;gap:12px;padding:10px 5px;border-radius:10px;transition:background .2s;text-decoration:none;color:inherit;align-items:center}
.top-game:hover{background:#f5f5f5}
.top-game-icon{width:65px;height:65px;border-radius:14px;object-fit:cover;flex-shrink:0}
.top-game-info{flex:1;min-width:0;overflow:hidden}
.top-game-name{font-size:14px;font-weight:600;color:#1a1a1a;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3}
.top-game-dev{font-size:12px;color:#9e9e9e;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top-game-rating{display:flex;align-items:center;gap:3px;font-size:13px;font-weight:500;color:#9e9e9e}
.top-game-rating .star{color:#9e9e9e;font-size:13px}

.ad-container{margin:20px 0;text-align:center;min-height:100px;background:#f9f9f9;border-radius:8px;padding:10px}

.featured-apps{display:grid;grid-template-columns:repeat(5,1fr);gap:15px;margin:15px 0}
.featured-app{text-align:center;text-decoration:none;color:inherit;transition:transform .2s}
.featured-app:hover{transform:translateY(-3px)}
.featured-app-icon{width:100%;aspect-ratio:1;border-radius:16px;object-fit:cover;margin:0 auto 8px;display:block;border:1px solid #e0e0e0}
.featured-app-name{font-size:12px;font-weight:500;color:#333;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

/* Game detail footer override */
.footer{border-top:1px solid #e0e0e0;padding:30px 20px 20px;margin-top:40px}
.footer-content{max-width:1200px}
.footer-links{gap:30px;margin-bottom:20px}
.footer-link:hover{color:#2196f3}
.footer-copyright{margin-bottom:8px;color:#666}
.footer-brand{color:#2196f3}

/* Modal styles */
.modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.6);display:none;justify-content:center;align-items:center;z-index:9999}
.modal-overlay.active{display:flex}
@keyframes modalSlideIn{from{opacity:0;transform:scale(0.95)}to{opacity:1;transform:scale(1)}}
@keyframes spin{to{transform:rotate(360deg)}}

/* Game Player */
.game-player-section{margin-bottom:20px;padding-bottom:4px}
.game-player-container{position:relative;width:100%;aspect-ratio:16/9;border-radius:16px;overflow:hidden;background:#0a1628}
.game-player-poster{position:absolute;inset:0;width:100%;height:100%;background-size:cover;background-position:center;filter:blur(2px) brightness(0.45);z-index:1}
.game-player-poster::after{content:'';position:absolute;inset:0;background:linear-gradient(to top,rgba(10,22,40,0.95) 0%,rgba(10,22,40,0.5) 40%,rgba(10,22,40,0.15) 100%)}

/* Play overlay — bottom-aligned game info */
.play-overlay{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;justify-content:flex-end;padding:24px 28px}
.play-overlay-info{display:flex;gap:18px;align-items:center}
.play-overlay-icon{width:80px;height:80px;border-radius:18px;object-fit:cover;border:2px solid rgba(255,255,255,0.15);flex-shrink:0;box-shadow:0 6px 24px rgba(0,0,0,0.4)}
.play-overlay-details{flex:1;min-width:0}
.play-overlay-title{font-size:22px;font-weight:800;color:#fff;margin:0 0 4px;line-height:1.2;text-shadow:0 2px 8px rgba(0,0,0,0.4)}
.play-overlay-desc{font-size:13px;color:rgba(255,255,255,0.6);margin:0 0 8px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}

/* Category + Played count — inside overlay below title */
.play-overlay-meta{display:flex;align-items:center;gap:10px}
.overlay-category{display:inline-block;padding:3px 12px;background:rgba(255,255,255,0.15);color:#fff;border-radius:20px;font-size:11px;font-weight:600;letter-spacing:0.3px;backdrop-filter:blur(4px)}
.overlay-separator{width:3px;height:3px;border-radius:50%;background:rgba(255,255,255,0.35)}
.overlay-rating{font-size:12px;color:#ffc107;font-weight:600}

/* Ad-style CTA Play Button — outside the box */
.cta-play-btn{display:flex;align-items:center;gap:12px;width:100%;padding:14px 20px 14px 16px;margin-top:12px;background:linear-gradient(135deg,#ff6b35 0%,#f7c948 100%);color:#fff;border:none;border-radius:14px;cursor:pointer;transition:transform 0.2s,box-shadow 0.2s;box-shadow:0 4px 20px rgba(255,107,53,0.35);position:relative;overflow:hidden;text-decoration:none}
.cta-play-btn::before{content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.25),transparent);transition:left 0.6s ease}
.cta-play-btn:hover::before{left:100%}
.cta-play-btn:hover{transform:translateY(-2px) scale(1.01);box-shadow:0 8px 30px rgba(255,107,53,0.5)}
.cta-play-btn:active{transform:translateY(0) scale(0.98)}
.cta-play-icon{width:44px;height:44px;background:rgba(255,255,255,0.2);border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.cta-play-text{display:flex;flex-direction:column;text-align:left;flex:1;min-width:0}
.cta-play-label{font-size:18px;font-weight:800;line-height:1.2;letter-spacing:0.3px}
.cta-play-sub{font-size:11px;font-weight:500;opacity:0.85;margin-top:2px}
.cta-play-arrow{flex-shrink:0;opacity:0.7;display:flex;align-items:center}

/* Shimmer animation on the button */
@keyframes ctaShimmer{0%{left:-100%}100%{left:100%}}
.cta-play-btn::after{content:'';position:absolute;top:0;left:-100%;width:60%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.15),transparent);animation:ctaShimmer 3s ease-in-out infinite}


/* Layout */
@media(min-width:768px){
    .layout{display:grid;grid-template-columns:1fr 300px;gap:20px}
    main{min-width:0;overflow:visible}
    .screenshot-wrapper{height:280px}
    .play-overlay-icon{width:100px;height:100px}
    .play-overlay-title{font-size:26px}
    .play-overlay-desc{font-size:14px;-webkit-line-clamp:2;margin-bottom:10px}
    .overlay-category{font-size:12px;padding:4px 14px}
    .overlay-rating{font-size:13px}
    .cta-play-btn{max-width:100%}
}
@media(max-width:767px){
    .container{padding:10px}

    /* Game player */
    .game-player-section{margin-bottom:12px}
    .game-player-container{aspect-ratio:16/10;border-radius:12px}
    .play-overlay{padding:14px 16px}
    .play-overlay-info{gap:12px}
    .play-overlay-icon{width:60px;height:60px;border-radius:14px}
    .play-overlay-title{font-size:17px;margin-bottom:3px}
    .play-overlay-desc{font-size:11px;margin-bottom:6px}
    .play-overlay-meta{gap:8px}
    .overlay-category{font-size:10px;padding:2px 10px}
    .overlay-rating{font-size:11px}

    /* CTA button mobile */
    .cta-play-btn{margin-top:10px;padding:12px 16px 12px 14px;border-radius:12px}

    /* Sections - tighter spacing */
    .section{padding:16px;margin-bottom:12px;border-radius:10px}
    .section-title{font-size:18px;margin-bottom:12px}
    .description{font-size:14px;line-height:1.7}

    /* Screenshots - contained sizing */
    .screenshots-container{margin:12px -16px;padding:0 16px}
    .screenshot-wrapper{height:180px;min-width:240px}
    .scroll-hint{margin-top:8px;font-size:12px}

    /* Ratings */
    .ratings-section{padding:16px}
    .ratings-content{flex-direction:column;gap:16px;align-items:stretch}
    .ratings-summary{flex-direction:row;gap:12px;align-items:center;justify-content:center}
    .ratings-score{font-size:42px}
    .ratings-stars .star{font-size:18px}

    /* Featured apps */
    .featured-apps{grid-template-columns:repeat(4,1fr);gap:12px}

    /* Sidebar becomes horizontal on mobile */
    aside{position:static;margin-top:12px}
    .sidebar{border-radius:10px;padding:12px}
    .sidebar-title{font-size:18px;margin-bottom:10px}
    .top-game{padding:8px 4px}
    .top-game-icon{width:52px;height:52px;border-radius:12px}
    .top-game-name{font-size:13px}

    /* Lightbox */
    .lightbox-nav{width:40px;height:40px}
    .lightbox-nav.prev{left:10px}
    .lightbox-nav.next{right:10px}
    .lightbox-close{top:15px;right:15px;width:40px;height:40px}

    /* Ad containers */
    .ad-container{margin:12px 0;padding:8px;border-radius:6px;min-height:60px}

    /* Footer tighter */
    .footer{padding:20px 15px 15px;margin-top:20px}
}
@media(max-width:480px){
    .container{padding:8px}
    .game-player-container{border-radius:10px}
    .play-overlay{padding:12px 14px}
    .play-overlay-info{gap:10px}
    .play-overlay-icon{width:52px;height:52px;border-radius:12px}
    .play-overlay-title{font-size:15px}
    .play-overlay-desc{font-size:10px;margin-bottom:5px}
    .overlay-category{font-size:9px;padding:2px 8px}
    .overlay-rating{font-size:10px}
    .cta-play-btn{padding:11px 14px 11px 12px;margin-top:8px;border-radius:10px}
    .cta-play-icon{width:36px;height:36px}
    .cta-play-label{font-size:15px}
    .cta-play-sub{font-size:10px}

    .section{padding:14px;margin-bottom:10px}
    .section-title{font-size:16px;margin-bottom:10px}

    .screenshot-wrapper{height:160px;min-width:210px}
    .featured-apps{grid-template-columns:repeat(3,1fr);gap:10px}
    .featured-app-name{font-size:11px}

    .ratings-section{padding:14px}
    .ratings-score{font-size:36px}

    .top-game-icon{width:48px;height:48px}

    .btn-submit-review{padding:6px 12px;font-size:12px}
}