@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@500;700&family=Share+Tech+Mono&display=swap');

:root {
    /* --- HARDCORE MECHA PALETTE --- */
    --void-black: #020203;
    --armor-dark: #0a0a12;
    --armor-light: #14141e;
    --armor-trim: #2a2a35;
    
    --energy-cyan: #1e3a8a;
    --energy-blue: #2563eb;
    --warning-red: #60a5fa;
    --caution-yellow: #dbeafe;
    
    --text-main: #e0e0e0;
    --text-dim: #6c7a89;
    
    --font-display: 'Orbitron', sans-serif;
    --font-ui: 'Rajdhani', sans-serif;
    --font-data: 'Share Tech Mono', monospace;
    
    --clip-angle: 20px;
    --border-glow: 0 0 10px rgba(30, 58, 138, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #ffffff;
    color: #333333;
    font-family: var(--font-ui);
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: 0px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    background: #f0f0f0;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border: 1px solid #aaa;
}
::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* --- UTILITIES --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* --- NAVBAR: COCKPIT HUD --- */
.navbar {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid #e0e0e0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
}

/* Bottom Progress Bar Decoration */
.navbar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--energy-cyan) 20%, 
        var(--energy-cyan) 80%, 
        transparent 100%);
    box-shadow: 0 0 10px var(--energy-cyan);
    animation: scan-line 4s linear infinite;
}

@keyframes scan-line {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: #333;
    letter-spacing: 2px;
    text-shadow: none;
    position: relative;
    padding-left: 20px;
}

/* Logo Decoration */
.logo h1::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--warning-red);
    animation: blink 1s steps(2) infinite;
}

.nav-links {
    display: flex;
    gap: 5px;
}

.nav-links a {
    position: relative;
    color: #555;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    padding: 8px 20px;
    background: #f0f0f0;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
    background: var(--energy-cyan);
    box-shadow: 0 0 15px var(--energy-cyan);
    text-shadow: none;
    border-color: var(--energy-cyan);
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
}
.hamburger .bar {
    width: 30px;
    height: 3px;
    background: var(--energy-cyan);
    margin: 6px 0;
    transition: 0.4s;
    box-shadow: 0 0 5px var(--energy-cyan);
}

/* --- CATEGORIES: SECTOR HEADERS --- */
.category h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 8px solid var(--warning-red);
    background: linear-gradient(90deg, #f0f0f0 0%, transparent 100%);
    padding: 10px 20px;
    display: inline-block;
    position: relative;
    clip-path: polygon(0 0, 95% 0, 100% 100%, 0 100%);
}

.category h3::after {
    content: '';
    font-family: var(--font-data);
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-left: 10px;
    vertical-align: middle;
}

/* --- GAME CARDS: UNIT DISPLAY --- */
.games-grid.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 20px 10px;
    padding-bottom: 40px; /* Space for hover effects */
    scrollbar-width: none;
}
.games-grid.scroll-container::-webkit-scrollbar { display: none; }

.game-card {
    flex: 0 0 300px;
    height: 420px;
    background: #ffffff;
    position: relative;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid #e0e0e0;
    
    /* Complex Mecha Shape */
    clip-path: polygon(
        20px 0, 100% 0, 
        100% calc(100% - 20px), 
        calc(100% - 20px) 100%, 
        0 100%, 
        0 20px
    );
}

/* Image Container */
.card-img-wrapper {
    height: 220px;
    overflow: hidden;
    position: relative;
    border-bottom: 4px solid #e0e0e0;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    filter: none;
}

/* Scanline Overlay on Image - REMOVED */

/* Content Area */
.game-card-content {
    padding: 20px;
    height: calc(100% - 220px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #f5f5f5;
    position: relative;
}

/* Caution Stripes Background for Content - REMOVED */

.game-card h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

/* Status Bar */
.card-status {
    height: 6px;
    background: #e0e0e0;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.card-status::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 30%;
    background: var(--warning-red);
    transition: width 0.3s;
}

/* --- HOVER EFFECTS: SYSTEM ACTIVATION --- */
.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.2);
    border-color: var(--energy-cyan);
    z-index: 10;
}

.game-card:hover img {
    filter: none;
    transform: scale(1.1);
}

.game-card:hover .card-status::after {
    width: 100%;
    background: var(--energy-cyan);
    box-shadow: 0 0 10px var(--energy-cyan);
}

.game-card:hover h4 {
    color: var(--energy-blue);
    text-shadow: none;
}

/* --- BUTTONS: PHYSICAL SWITCHES --- */
.scroll-btn {
    position: absolute;
    top: 50%;
    width: 50px; height: 80px;
    background: #f5f5f5;
    border: 2px solid #ccc;
    color: #555;
    font-size: 2rem;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s;
    /* Chevron Shape */
    clip-path: polygon(25% 0%, 100% 0%, 100% 100%, 25% 100%, 0% 50%);
}
.scroll-right { right: -25px; clip-path: polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%); }
.scroll-left { left: -25px; }

.scroll-btn:hover {
    background: var(--energy-blue);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 20px var(--energy-cyan);
}

/* --- FOOTER: SYSTEM SHUTDOWN --- */
.footer {
    margin-top: 80px;
    border-top: 4px solid #e0e0e0;
    background: #ffffff;
    padding: 60px 0;
    position: relative;
}

/* Footer stripe decoration - REMOVED */

.footer-content p {
    font-family: var(--font-data);
    color: #666;
}

.footer-links a {
    color: #555;
    text-transform: uppercase;
    font-weight: bold;
    margin: 0 15px;
    transition: 0.3s;
}
.footer-links a:hover {
    color: var(--energy-blue);
    text-shadow: none;
}

/* --- PAGE SPECIFIC: DETAIL & AUXILIARY --- */
.auxiliary-page, .game-detail {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    padding: 40px;
    position: relative;
    clip-path: polygon(
        40px 0, 100% 0, 
        100% calc(100% - 40px), 
        calc(100% - 40px) 100%, 
        0 100%, 
        0 40px
    );
    margin-bottom: 60px;
}

/* Detail Image Optimization */
.game-detail-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-detail-image {
    width: 100%;
    max-width: 900px;
    margin: 40px 0;
    position: relative;
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    clip-path: polygon(
        40px 0, 100% 0, 
        100% calc(100% - 40px), 
        calc(100% - 40px) 100%, 
        0 100%, 
        0 40px
    );
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* HUD Decoration for Detail Image */
.game-detail-image::before {
    content: 'TARGET_VIEW_PORT // 4K_ENHANCED';
    position: absolute;
    top: -25px;
    left: 40px;
    font-family: var(--font-data);
    font-size: 0.8rem;
    color: var(--energy-cyan);
    letter-spacing: 2px;
}

.game-detail-image::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 40px;
    width: 100px;
    height: 4px;
    background: var(--warning-red);
    box-shadow: 0 0 10px var(--warning-red);
}

.game-detail-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: none;
    border: 1px solid #e0e0e0;
}

/* Related Recommendations Section */
.may-like {
    margin-top: 80px;
    padding-bottom: 60px;
}

.may-like h3 {
    margin-bottom: 40px;
}

/* Make images fill the card frame in recommendations */
#related-games .game-card {
    height: 380px;
    overflow: hidden;
}

#related-games .game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    filter: none;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

#related-games .game-card .game-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.95) 40%);
    padding: 30px 20px 20px;
    border: none;
    z-index: 2;
}

#related-games .game-card:hover img {
    filter: none;
    transform: scale(1.1);
}

#related-games .game-card h4 {
    margin: 0;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Corner Brackets Decoration */
.auxiliary-page::before, .game-detail::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        linear-gradient(to right, var(--energy-cyan) 2px, transparent 2px) 0 0,
        linear-gradient(to bottom, var(--energy-cyan) 2px, transparent 2px) 0 0,
        linear-gradient(to left, var(--energy-cyan) 2px, transparent 2px) 100% 0,
        linear-gradient(to bottom, var(--energy-cyan) 2px, transparent 2px) 100% 0,
        linear-gradient(to left, var(--energy-cyan) 2px, transparent 2px) 100% 100%,
        linear-gradient(to top, var(--energy-cyan) 2px, transparent 2px) 100% 100%,
        linear-gradient(to right, var(--energy-cyan) 2px, transparent 2px) 0 100%,
        linear-gradient(to top, var(--energy-cyan) 2px, transparent 2px) 0 100%;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.5;
}

h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 30px;
    text-transform: uppercase;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Play Button: Reactor Core */
.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 60px;
    background: transparent;
    border: 2px solid var(--energy-cyan);
    color: var(--energy-cyan);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.play-btn:hover {
    background: var(--energy-cyan);
    color: var(--void-black);
    box-shadow: 0 0 50px var(--energy-cyan);
    transform: scale(1.05);
}

.play-btn span {
    position: relative;
    z-index: 2;
}

/* Contact/Back Buttons */
.contact-btn, .back-button {
    display: inline-block;
    padding: 12px 30px;
    background: #f5f5f5;
    border: 1px solid var(--energy-blue);
    color: var(--energy-blue);
    font-family: var(--font-ui);
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.contact-btn:hover, .back-button:hover {
    background: var(--energy-blue);
    color: #fff;
    box-shadow: 0 0 20px var(--energy-blue);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .navbar { height: 60px; }
    .hero-glitch { font-size: 2.5rem; }
    .nav-links {
        position: absolute;
        top: 100%;
        right: -100%;
        height: calc(100vh - 60px);
        width: 80%;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        border-left: 2px solid var(--energy-cyan);
        clip-path: none;
    }
    .nav-links.active { right: 0; }
    .hamburger { display: block; }
    
    .games-grid.scroll-container {
        scroll-snap-type: x mandatory;
        padding-left: 20px;
    }
    .game-card {
        scroll-snap-align: center;
        flex: 0 0 85vw;
    }
    .scroll-btn { display: none !important; }

    /* Mobile Detail Image */
    .game-detail { padding: 20px; }
    .game-detail-image { 
        margin: 20px 0; 
        padding: 5px; 
        clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    }
    .game-detail-image::before { left: 20px; font-size: 0.6rem; top: -18px; }
    
    #related-games .game-card { height: 300px; }

    /* Strict Mobile Fit Rules */
    body, html {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    /* Fix potential ad container overflow */
    #adv1, #adv2, #adv3 {
        padding: 5px !important;
        width: 100% !important;
        box-sizing: border-box;
        overflow: hidden !important;
    }
    
    div[id^="div-gpt-ad-banner"] {
        max-width: 100%;
        overflow: hidden;
        margin: 0 auto;
    }
}
