/*
Theme Name: HTML5 Arcade 4D Holographic
Theme URI: https://h5g.online
Author: Web Master
Description: Futuristic 4D holographic gaming theme with real-time mouse-follow dynamic glare, layered 3D depth, and arcade ambient lighting.
Version: 6.0
*/

:root {
    --bg-color: #0b0e17;
    --card-bg: #141c2e;
    --primary: #ff0055;
    --primary-glow: rgba(255, 0, 85, 0.45);
    --secondary: #00e5ff;
    --secondary-glow: rgba(0, 229, 255, 0.4);
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --neon-border: rgba(0, 229, 255, 0.35);
    --radius: 14px;
}

[data-theme="light"],
body:not(.dark-mode) {
    --bg-color: #f4f6fa;
    --card-bg: #ffffff;
    --primary: #ff0055;
    --primary-glow: rgba(255, 0, 85, 0.25);
    --secondary: #0088cc;
    --secondary-glow: rgba(0, 168, 255, 0.25);
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --neon-border: rgba(255, 0, 85, 0.25);
}

.dark-mode {
    --bg-color: #080b12 !important;
    --card-bg: #121826 !important;
    --primary: #ff0055 !important;
    --text-color: #f8fafc !important;
    --text-muted: #94a3b8 !important;
    --border-color: rgba(255, 255, 255, 0.08) !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 4D Cyber Ambient Floor Grid */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px);
    background-size: 45px 45px;
    transform: perspective(600px) rotateX(60deg) translateY(-80px);
    transform-origin: top center;
    z-index: -1;
    pointer-events: none;
}

.site-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    box-sizing: border-box;
}

/* =======================================================
   HEADER SECTION
   ======================================================= */
.site-header {
    background: rgba(20, 28, 46, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 99999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .header-layout {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    .site-logo { order: 1; flex-shrink: 0; }
    .header-search-wrap { order: 2; flex: 1; max-width: 440px; margin: 0 15px; }
    .header-actions { order: 3; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
}

@media (max-width: 767px) {
    .header-layout { display: flex; flex-direction: column; align-items: center; gap: 10px; }
    .site-logo { order: 1; width: 100%; text-align: center; }
    .header-actions { order: 2; display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; }
    .header-search-wrap { order: 3; width: 100%; }
}

.site-logo a {
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 12px var(--primary-glow);
    transition: transform 0.2s ease;
}

.site-logo a:hover {
    transform: scale(1.05);
}

.action-btn, .mobile-menu-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
    transition: all 0.15s ease;
}

.action-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.action-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.mobile-menu-toggle {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2.5px;
    background: var(--text-color);
    border-radius: 2px;
    transition: 0.25s ease;
}

.mobile-menu-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mobile-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.header-search-wrap { position: relative; }
.header-search-wrap input.search-field {
    width: 100%;
    padding: 10px 18px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.25s ease;
}

.header-search-wrap input.search-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: var(--card-bg);
}

.search-dropdown-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    max-height: 350px;
    overflow-y: auto;
    z-index: 100000;
}

.ajax-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.ajax-search-item:hover { background: rgba(255, 0, 85, 0.12); }
.ajax-search-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }

.nav-links {
    display: none;
    width: 100%;
    margin-top: 14px;
    padding: 14px 0 6px;
    border-top: 1px solid var(--border-color);
    order: 4;
}
.nav-links.is-open { display: block !important; }

.header-menu-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    list-style: none;
}
@media (min-width: 600px) { .header-menu-list { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .header-menu-list { grid-template-columns: repeat(4, 1fr); } }

.header-menu-list li a {
    display: block;
    padding: 10px;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
    transition: transform 0.15s, background 0.15s;
}

.header-menu-list li a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--primary-glow);
}

/* =======================================================
   4D HOLOGRAPHIC GAMES GRID & TILT CARDS
   ======================================================= */
.game-filter-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 16px 0 10px;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
}
.game-filter-bar::-webkit-scrollbar { display: none; }

.category-pill {
    background: var(--card-bg);
    padding: 8px 18px;
    border-radius: 25px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 0 rgba(0,0,0,0.12);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.category-pill:hover, .category-pill.active {
    background: linear-gradient(135deg, #ff0055, #ff5252);
    color: #fff;
    border-color: #ff0055;
    box-shadow: 0 5px 15px var(--primary-glow);
    transform: translateY(-2px);
}

.ad-container { margin: 18px 0; text-align: center; }
.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    padding: 16px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 80px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 15px 0 35px;
    perspective: 1200px;
}

@media (min-width: 480px) { .games-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; } }
@media (min-width: 768px) { .games-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; } }

/* 4D Card: Perspective + Holographic Light Sheen */
.game-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    will-change: transform;
}

.game-card:hover {
    border-color: rgba(0, 229, 255, 0.7);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.5), 0 0 25px var(--secondary-glow);
}

/* Holographic Dynamic Glare Overlay */
.game-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.3) 0%, rgba(0, 229, 255, 0.15) 30%, transparent 65%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 10;
}
.game-card:hover::after {
    opacity: 1;
}

.game-thumb-box {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #080b11;
    overflow: hidden;
    transform-style: preserve-3d;
}

.game-thumb-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.game-card:hover .game-thumb-box img {
    transform: scale(1.1) translateZ(12px);
}

/* Layered 3D Floating Play Badge */
.card-floating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #00e5ff;
    transform: translateZ(30px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    z-index: 5;
    transition: transform 0.25s ease;
}

.game-card:hover .card-floating-badge {
    transform: translateZ(40px) scale(1.08);
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.game-meta {
    padding: 10px 10px 12px;
    text-align: center;
    background: var(--card-bg);
    transform-style: preserve-3d;
}

.game-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transform: translateZ(20px);
    transition: color 0.2s ease;
}

.game-card:hover .game-title {
    color: #00e5ff;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* =======================================================
   SINGLE GAME PAGE (Arcade Bezel Ambient 4D View)
   ======================================================= */
.single-game-page { padding: 20px 16px 60px !important; }
.arcade-breadcrumbs { padding: 8px 0 12px; font-size: 0.85rem; color: var(--text-muted); }
.arcade-breadcrumbs a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
.arcade-breadcrumbs a:hover { color: var(--primary); }
.arcade-breadcrumbs .bc-sep { margin: 0 6px; }
.arcade-breadcrumbs .bc-current { color: var(--text-color); font-weight: 700; }

.single-game-title { font-size: 1.6rem; font-weight: 900; margin-bottom: 10px; letter-spacing: -0.5px; }
.game-post-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 22px; }

/* 4D Curved Arcade Cabinet Screen Frame */
.game-box-card {
    background: #0f1626;
    border-radius: 18px;
    padding: 16px;
    border: 2px solid rgba(0, 229, 255, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(0, 229, 255, 0.15);
    margin-bottom: 25px;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.game-box-card iframe {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Action Toolbar with 4D Press Feedback */
.game-action-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-left { display: flex; gap: 10px; flex-wrap: wrap; }

.vote-btn, .tool-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vote-btn:hover, .tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3), 0 0 15px var(--primary-glow);
    border-color: var(--primary);
}

.vote-btn:active, .tool-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.vote-btn.voted-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 0 #b3003c;
}

.social-share-row { display: flex; gap: 10px; margin-bottom: 22px; align-items: center; flex-wrap: wrap; }
.share-btn {
    padding: 7px 14px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
    transition: transform 0.15s;
}
.share-btn:hover { transform: translateY(-2px); }
.share-wa { background: #25D366; }
.share-fb { background: #1877F2; }
.share-tw { background: #111; }

.game-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin: 15px 0 25px;
}

.game-tag-pill {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}
.game-tag-pill:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--primary-glow);
}

.theater-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(10px);
    z-index: 1050;
}
.theater-backdrop.is-visible { display: block; }
.game-box-card.theater-active {
    position: relative;
    z-index: 1100;
    box-shadow: 0 0 70px rgba(0, 229, 255, 0.5);
    border-color: #00e5ff;
}

/* STATIC PAGE & PAGINATION */
.page-content-area { padding: 30px 16px 60px !important; max-width: 900px; margin: 0 auto; }
.standard-page-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.page-main-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}
.page-entry-content { font-size: 0.95rem; line-height: 1.7; color: var(--text-color); }
.page-entry-content p { margin-bottom: 16px; }

.pagination-wrapper { display: flex; justify-content: center; padding: 20px 0 40px; }
.pagination-wrapper ul.page-numbers { display: flex; gap: 6px; list-style: none; }
.pagination-wrapper .page-numbers li a,
.pagination-wrapper .page-numbers li span {
    display: block;
    padding: 8px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 3px 0 rgba(0,0,0,0.15);
}
.pagination-wrapper .page-numbers li span.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 28px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-menu-list { display: flex; justify-content: center; list-style: none; gap: 15px; margin-bottom: 14px; flex-wrap: wrap; }
.footer-menu-list li a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
.footer-menu-list li a:hover { color: var(--primary); }
