
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Courier New',monospace;
    image-rendering:pixelated;
}

html{scroll-behavior:smooth;}

body{
    background-color:#0f0f23;
    background-image:
        linear-gradient(rgba(15,15,35,0.95),rgba(15,15,35,0.95)),
        repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,255,204,0.03) 2px,rgba(0,255,204,0.03) 4px);
    min-height:100vh;
    overflow-x:hidden;
    color:#ffffff;
    line-height:1.6;
}

a{color:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent;}

::selection{background:rgba(0,255,204,0.3);color:#fff;}

/* Touch optimization */
button, .pixel-category-item, .pixel-card-link, .pixel-game-card{
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
}

::-webkit-scrollbar{width:8px;height:8px;}
::-webkit-scrollbar-track{background:#191935;}
::-webkit-scrollbar-thumb{background:#00ffcc;border-radius:0;}
::-webkit-scrollbar-thumb:hover{background:#ffcc00;}

/* ========== PIXEL HEADER ========== */
.pixel-header{
    width:100%;
    height:80px;
    background:#191935;
    border-bottom:3px solid #00ffcc;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 50px;
    position:sticky;
    top:0;
    z-index:999;
}

.pixel-logo{
    font-family:'Press Start 2P',monospace;
    font-size:18px;
    font-weight:900;
    color:#ffcc00;
    letter-spacing:2px;
    text-shadow:2px 2px 0 #00ffcc;
    cursor:pointer;
    white-space:nowrap;
    transition:all 0.2s linear;
}

.pixel-logo:hover{
    text-shadow:2px 2px 0 #ff6b6b;
}

.pixel-logo:active{
    transform:translate(2px,2px);
    text-shadow:0 0 0 transparent;
}

.pixel-nav{
    display:flex;
    gap:40px;
}

.pixel-nav-link{
    color:#fff;
    font-size:15px;
    font-weight:bold;
    padding:6px 12px;
    border:2px solid transparent;
    transition:all 0.2s linear;
    letter-spacing:1px;
}

.pixel-nav-link:hover{
    border:2px solid #00ffcc;
    color:#00ffcc;
    background:rgba(0,255,204,0.1);
}

.pixel-nav-link.active{
    border:2px solid #ffcc00;
    color:#ffcc00;
}

.pixel-header-right{
    display:flex;
    align-items:center;
    gap:12px;
}

.pixel-search{
    width:300px;
    height:38px;
    background:#0f0f23;
    border:2px solid #00ffcc;
    color:#fff;
    padding:0 15px;
    font-size:14px;
    font-family:'Courier New',monospace;
    outline:none;
    transition:all 0.2s linear;
}

.pixel-search:focus{
    border-color:#ffcc00;
    box-shadow:0 0 10px rgba(255,204,0,0.3);
}

.pixel-search::placeholder{
    color:#8888bb;
}

.pixel-shuffle-btn{
    height:38px;
    padding:0 18px;
    background:#0f0f23;
    border:2px solid #ffcc00;
    color:#ffcc00;
    font-family:'Press Start 2P',monospace;
    font-size:10px;
    font-weight:bold;
    cursor:pointer;
    transition:all 0.2s linear;
    letter-spacing:1px;
}

.pixel-shuffle-btn:hover{
    background:#ffcc00;
    color:#0f0f23;
}

.pixel-shuffle-btn:active{
    transform:translate(2px,2px);
}

/* ========== PIXEL TOAST ========== */
.pixel-toast{
    position:fixed;
    top:100px;
    left:50%;
    transform:translateX(-50%) translateY(-10px);
    background:#191935;
    color:#00ffcc;
    padding:10px 24px;
    font-family:'Press Start 2P',monospace;
    font-size:11px;
    border:2px solid #00ffcc;
    z-index:2000;
    opacity:0;
    pointer-events:none;
    transition:all 0.2s linear;
    letter-spacing:1px;
}

.pixel-toast.show{
    opacity:1;
    transform:translateX(-50%) translateY(0);
}

/* ========== PIXEL CATEGORY BANNER ========== */
.pixel-category-banner{
    display:flex;
    gap:20px;
    padding:20px 50px;
    overflow-x:auto;
    scrollbar-width:none;
}

.pixel-category-banner::-webkit-scrollbar{display:none;}

.pixel-category-item{
    min-width:150px;
    height:100px;
    background:#191935;
    border:2px solid #ffcc00;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-weight:bold;
    gap:8px;
    cursor:pointer;
    transition:all 0.2s linear;
    font-family:'Courier New',monospace;
    flex-shrink:0;
}

.pixel-category-item:hover{
    background:#ffcc00;
    color:#0f0f23;
    border-color:#00ffcc;
}

.pixel-category-item.active{
    background:#00ffcc;
    color:#0f0f23;
    border-color:#ffcc00;
}

.pixel-category-item:active{
    transform:translate(2px,2px);
}

.pixel-cat-icon{
    font-size:24px;
}

.pixel-cat-label{
    font-size:12px;
    letter-spacing:1px;
}

/* ========== PIXEL MAIN ========== */
.pixel-main{
    min-height:calc(100vh - 80px);
}

/* ========== PIXEL SECTION ========== */
.pixel-section{
    margin:40px 0;
}

.pixel-section-header{
    padding:0 50px;
    margin-bottom:20px;
}

.pixel-section-title{
    font-family:'Press Start 2P',monospace;
    font-size:14px;
    font-weight:700;
    color:#ffcc00;
    letter-spacing:2px;
    text-shadow:1px 1px 0 #00ffcc;
}

/* ========== PIXEL GAMES GRID ========== */
.pixel-games-grid{
    display:grid;
    width:100%;
    padding:0 50px;
    gap:25px;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
}

/* ========== PIXEL GAME CARD ========== */
.pixel-game-card{
    background:#191935;
    border:2px solid #00ffcc;
    border-radius:0;
    overflow:hidden;
    opacity:0;
    transform:translateY(8px);
    transition:all 0.2s linear;
    cursor:pointer;
}

.pixel-game-card.card-revealed{
    opacity:1;
    transform:translateY(0);
}

.pixel-game-card:hover{
    transform:translateY(-4px);
    border-color:#ffcc00;
    box-shadow:0 6px 0 #00ffcc;
    background:#252550;
}

.pixel-game-card:active{
    transform:translateY(-2px);
    box-shadow:0 3px 0 #00ffcc;
}

.pixel-card-link{
    display:block;
    text-decoration:none;
    color:inherit;
}

.pixel-card-image{
    position:relative;
    width:100%;
    overflow:hidden;
}

.pixel-card-img{
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    image-rendering:pixelated;
    border-bottom:2px solid #00ffcc;
    display:block;
    transition:transform 0.2s linear;
}

.pixel-game-card:hover .pixel-card-img{
    transform:scale(1.03);
}

.pixel-badge{
    position:absolute;
    top:8px;left:8px;
    padding:3px 8px;
    color:#fff;
    font-size:10px;
    font-weight:bold;
    border:1px solid #fff;
    font-family:'Press Start 2P',monospace;
    letter-spacing:1px;
    z-index:2;
}

.pixel-card-info{
    padding:15px;
}

.pixel-card-title{
    color:#fff;
    font-size:14px;
    font-weight:bold;
    letter-spacing:0.5px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* ========== PIXEL AD CONTAINER ========== */
.pixel-ad-container{
    text-align:center;
    padding:20px;
    display:flex;
    flex-direction:column;
    align-items:center;
    max-width:900px;
    margin:24px auto 0;
    background:#191935;
    border:2px solid #00ffcc;
}

.pixel-ad-label{
    color:#8888bb;
    font-size:11px;
    font-weight:bold;
    margin-bottom:12px;
    letter-spacing:2px;
    font-family:'Courier New',monospace;
}

/* ========== DETAIL PAGE ========== */
.detail-page{
    padding:24px 50px 80px;
}

.detail-back{
    margin-bottom:20px;
}

.pixel-back-btn{
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:#00ffcc;
    font-size:14px;
    font-weight:bold;
    padding:8px 18px;
    background:#191935;
    border:2px solid #00ffcc;
    cursor:pointer;
    transition:all 0.2s linear;
    letter-spacing:1px;
}

.pixel-back-btn:hover{
    background:#00ffcc;
    color:#0f0f23;
}

.pixel-back-btn:active{
    transform:translate(2px,2px);
}

.detail-hero{
    display:flex;
    gap:24px;
    background:#191935;
    border:2px solid #00ffcc;
    padding:24px;
    margin-bottom:24px;
}

.detail-thumb{
    flex-shrink:0;
    width:280px;
    overflow:hidden;
    border:2px solid #ffcc00;
}

.detail-thumb img{
    width:100%;
    height:auto;
    display:block;
    image-rendering:pixelated;
}

.detail-info{
    flex:1;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:14px;
}

.detail-title-bar{
    border-bottom:2px solid #00ffcc;
    padding-bottom:10px;
}

.detail-title{
    font-family:'Press Start 2P',monospace;
    font-size:16px;
    color:#ffcc00;
    font-weight:700;
    line-height:1.4;
    letter-spacing:1px;
    text-shadow:1px 1px 0 #00ffcc;
}

.detail-desc-box{
    background:#0f0f23;
    border:2px solid #191935;
    padding:14px;
}

.detail-desc{
    color:#8888bb;
    font-size:14px;
    line-height:1.75;
}

.detail-stats{
    display:flex;
    gap:16px;
    flex-wrap:wrap;
}

.stat-block{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:13px;
}

.stat-label{
    color:#8888bb;
    font-weight:bold;
    letter-spacing:1px;
}

.stat-value{
    color:#00ffcc;
    font-weight:bold;
    letter-spacing:1px;
}

.detail-actions{
    margin-top:4px;
}

.pixel-play-btn{
    display:inline-flex;
    align-items:center;
    padding:10px 24px;
    background:#0f0f23;
    border:2px solid #ffcc00;
    color:#ffcc00;
    font-family:'Press Start 2P',monospace;
    font-size:11px;
    font-weight:bold;
    cursor:pointer;
    transition:all 0.2s linear;
    letter-spacing:1px;
}

.pixel-play-btn:hover{
    background:#ffcc00;
    color:#0f0f23;
}

.pixel-play-btn:active{
    transform:translate(2px,2px);
}

.pixel-iframe-container{
    width:100%;
    height:650px;
    border:2px solid #00ffcc;
    overflow:hidden;
    margin-bottom:24px;
    background:#191935;
}

.pixel-iframe-container iframe{
    width:100%;
    height:100%;
    border:none;
}

.related-section{
    margin-top:40px;
}

.pixel-related-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
    gap:25px;
    margin-top:20px;
}

/* ========== GAME MODAL ========== */
.pixel-modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    z-index:10000;
}

.pixel-modal.active{
    display:flex;
    align-items:center;
    justify-content:center;
}

.pixel-modal-overlay{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.9);
    cursor:pointer;
}

.pixel-modal-content{
    position:relative;
    width:90%;
    max-width:1000px;
    height:80%;
    max-height:700px;
    background:#191935;
    border:3px solid #00ffcc;
    z-index:10001;
    display:flex;
    flex-direction:column;
}

.pixel-modal-close{
    position:absolute;
    top:-15px;
    right:-15px;
    width:40px;
    height:40px;
    background:#ff6b6b;
    border:2px solid #fff;
    color:#fff;
    font-size:24px;
    font-weight:bold;
    cursor:pointer;
    z-index:10002;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all 0.2s linear;
}

.pixel-modal-close:hover{
    background:#ff4444;
    transform:scale(1.1);
}

.pixel-modal-iframe-container{
    flex:1;
    width:100%;
    overflow:hidden;
    background:#0f0f23;
}

.pixel-modal-iframe-container iframe{
    width:100%;
    height:100%;
    border:none;
}

/* ========== STATIC PAGE ========== */
.static-page{
    padding:24px 50px 80px;
}

.static-back{
    margin-bottom:20px;
}

.static-title{
    font-family:'Press Start 2P',monospace;
    font-size:16px;
    color:#ffcc00;
    font-weight:700;
    margin-bottom:24px;
    letter-spacing:2px;
    text-shadow:1px 1px 0 #00ffcc;
}

.static-content{
    background:#191935;
    border:2px solid #00ffcc;
    padding:32px;
    color:#fff;
    line-height:1.75;
    font-size:14px;
}

.static-content p{margin-bottom:16px;}
.static-content strong{color:#ffcc00;font-weight:bold;}
.static-content ul{margin:12px 0 12px 24px;}
.static-content ol{margin:12px 0 12px 24px;}
.static-content li{margin-bottom:8px;color:#fff;}
.static-content a{color:#00ffcc;text-decoration:underline;}
.static-content a:hover{color:#ffcc00;}

/* ========== PIXEL FOOTER ========== */
.pixel-footer{
    background:#191935;
    border-top:3px solid #00ffcc;
    padding:32px 50px;
}

.pixel-footer-inner{
    max-width:1400px;
    margin:0 auto;
    text-align:center;
}

.pixel-footer-links{
    display:flex;
    justify-content:center;
    gap:24px;
    flex-wrap:wrap;
    margin-bottom:16px;
}

.pixel-footer-links a{
    color:#fff;
    font-size:14px;
    font-weight:bold;
    padding:6px 14px;
    border:2px solid transparent;
    letter-spacing:1px;
    transition:all 0.2s linear;
}

.pixel-footer-links a:hover{
    border:2px solid #00ffcc;
    color:#00ffcc;
    background:rgba(0,255,204,0.1);
}

.pixel-footer-copyright{
    color:#8888bb;
    font-size:12px;
    font-weight:400;
    letter-spacing:1px;
}

/* ========== RESPONSIVE ========== */
@media(max-width:1024px){
    .pixel-header{
        padding:0 20px;
    }
    .pixel-nav{
        gap:20px;
    }
    .pixel-games-grid{
        padding:0 20px;
    }
    .pixel-section-header{
        padding:0 20px;
    }
    .pixel-category-banner{
        padding:15px 20px;
    }
    .detail-page{
        padding:24px 20px 80px;
    }
    .static-page{
        padding:24px 20px 80px;
    }
    .detail-hero{
        flex-direction:column;
    }
    .detail-thumb{
        width:100%;
        max-width:400px;
    }
}

@media(max-width:640px){
    .pixel-header{
        height:auto;
        min-height:60px;
        padding:10px 12px;
        flex-wrap:wrap;
        gap:8px;
    }
    .pixel-logo{
        font-size:11px;
        letter-spacing:1px;
    }
    .pixel-nav{
        display:none;
    }
    .pixel-header-right{
        flex:1;
        justify-content:flex-end;
        gap:8px;
        min-width:200px;
    }
    .pixel-search{
        width:140px;
        height:32px;
        font-size:12px;
        padding:0 10px;
    }
    .pixel-shuffle-btn{
        height:32px;
        padding:0 10px;
        font-size:7px;
    }
    .pixel-games-grid{
        grid-template-columns:repeat(2,1fr);
        gap:12px;
        padding:0 12px;
    }
    .pixel-related-grid{
        grid-template-columns:repeat(2,1fr);
        gap:12px;
    }
    .pixel-category-banner{
        padding:10px 12px;
        gap:10px;
        -webkit-overflow-scrolling:touch;
        scroll-snap-type:x mandatory;
    }
    .pixel-category-item{
        min-width:100px;
        height:70px;
        scroll-snap-align:start;
    }
    .pixel-cat-icon{
        font-size:18px;
    }
    .pixel-cat-label{
        font-size:9px;
    }
    .pixel-section-header{
        padding:0 12px;
    }
    .pixel-section-title{
        font-size:10px;
    }
    .pixel-card-title{
        font-size:11px;
    }
    .pixel-card-info{
        padding:10px;
    }
    .pixel-badge{
        font-size:8px;
        padding:2px 6px;
    }
    .detail-page{
        padding:12px 12px 50px;
    }
    .detail-hero{
        padding:12px;
        gap:16px;
    }
    .detail-thumb{
        width:100%;
        max-width:100%;
    }
    .detail-title{
        font-size:11px;
    }
    .pixel-iframe-container{
        height:300px;
        min-height:250px;
    }
    .static-page{
        padding:12px 12px 50px;
    }
    .static-content{
        padding:16px;
        font-size:13px;
    }
    .static-title{
        font-size:11px;
    }
    .pixel-ad-container{
        padding:12px;
        margin:16px 12px 0;
    }
    .pixel-back-btn{
        font-size:11px;
        padding:6px 12px;
    }
    .pixel-footer{
        padding:20px 12px;
    }
    .pixel-footer-links{
        gap:8px;
    }
    .pixel-footer-links a{
        font-size:11px;
        padding:4px 10px;
    }
    .pixel-footer-copyright{
        font-size:10px;
    }
    .related-section{
        margin-top:24px;
    }
    .pixel-play-btn{
        padding:8px 16px;
        font-size:10px;
    }
    .detail-stats{
        gap:12px;
    }
    .stat-block{
        font-size:12px;
    }
    .pixel-modal-content{
        width:100%;
        height:100%;
        max-width:none;
        max-height:none;
        border:none;
    }
    .pixel-modal-close{
        display:none;
    }
}

@media(max-width:375px){
    .pixel-header{
        padding:8px 10px;
    }
    .pixel-logo{
        font-size:10px;
    }
    .pixel-header-right{
        min-width:160px;
    }
    .pixel-search{
        width:110px;
        height:30px;
        font-size:11px;
    }
    .pixel-shuffle-btn{
        height:30px;
        padding:0 8px;
        font-size:6px;
    }
    .pixel-games-grid{
        grid-template-columns:repeat(2,1fr);
        gap:10px;
        padding:0 10px;
    }
    .pixel-category-item{
        min-width:90px;
        height:65px;
    }
    .pixel-cat-icon{
        font-size:16px;
    }
    .pixel-cat-label{
        font-size:8px;
    }
    .pixel-section-title{
        font-size:9px;
    }
    .pixel-card-title{
        font-size:10px;
    }
    .pixel-iframe-container{
        height:250px;
    }
    .static-content{
        padding:12px;
        font-size:12px;
    }
}
