/* ==========================================================================
   Typography (Font from C:\xampp\htdocs\ameer)
   ========================================================================== */

@font-face {
    font-family: 'gik';
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    src: url('fonts/gamesinkurdish_v2.woff2') format('woff2');
}

@font-face {
    font-family: 'Geist';
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    src: url('fonts/gamesinkurdish_v2.woff2') format('woff2');
}

@font-face {
    font-family: 'rabar';
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: local('Rabar_021'), local('Rabar 021'), local('Rabar');
}

@font-face {
    font-family: 'Geist Mono';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/geist-mono-variable.woff2') format('woff2'),
         url('fonts/gamesinkurdish_v2.woff2') format('woff2');
}

:root {
    color-scheme: dark;
    --bg: #0c0c0e;
    --panel: #141417;
    --panel-border: #232328;
    --line: #202024;
    --text: #ededef;
    --text-muted: #8e8e96;
    --radius: 6px;
    --font: 'gik', 'Geist', 'rabar', system-ui, -apple-system, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, monospace;
}

/* ==========================================================================
   Custom Sleek Dark Scrollbar
   ========================================================================== */

html {
    scrollbar-width: thin;
    scrollbar-color: #272730 #0c0c0e;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0c0c0e;
}

::-webkit-scrollbar-thumb {
    background: #25252e;
    border-radius: 8px;
    border: 2px solid #0c0c0e;
}

::-webkit-scrollbar-thumb:hover {
    background: #3e3e4d;
}

::-webkit-scrollbar-thumb:active {
    background: #555569;
}

html {
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

header, main, .site-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

img, svg, video, canvas {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ==========================================================================
   Header (Simple, Compact, No Clutter)
   ========================================================================== */

header {
    height: 56px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    background: #141418;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-title {
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #d1d1dc;
}

.nav-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #141418;
    border: 1px solid #2a2a34;
    padding: 4px;
    border-radius: 8px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: #a5a5b0;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.nav-btn svg {
    width: 17px;
    height: 17px;
}

.nav-btn:hover {
    color: #ffffff;
    background: #202028;
}

.nav-btn.active {
    color: #0c0c0e !important;
    background: #ffffff !important;
    border-color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.sfx-btn {
    cursor: pointer;
    padding: 7px 11px;
    background: transparent;
    color: #a0a0ae;
    transition: all 0.2s ease;
}

.sfx-btn svg {
    width: 17px;
    height: 17px;
}

.sfx-btn:hover {
    color: #ffffff;
    background: #202028;
    transform: scale(1.05);
}

.sfx-btn.sfx-active {
    color: #ffffff;
}

.sfx-btn:not(.sfx-active) {
    color: #5d5d6c;
}

/* Tactile recoil animation on buttons & interactive clicks */
button:active,
.button:active,
.nav-btn:active,
.screenshot-item:active,
.tabs a:active {
    transform: scale(0.96) !important;
    transition: transform 0.08s ease !important;
}

/* ==========================================================================
   Main & Category Controls (Prominent, High-Contrast, Easy to See)
   ========================================================================== */

/* Top HUD Progress Bar for seamless instant navigation */
#nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #38bdf8);
    background-size: 200% 100%;
    z-index: 99999;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease, opacity 0.2s ease;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
    pointer-events: none;
}
#nav-progress.loading {
    opacity: 1;
    transform: scaleX(0.75);
    animation: nav-progress-glow 1s linear infinite;
}
#nav-progress.done {
    transform: scaleX(1);
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.25s ease 0.1s;
}
@keyframes nav-progress-glow {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 60px;
    box-sizing: border-box;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

main.page-leaving {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

main.page-entering {
    opacity: 0;
    transform: translateY(12px);
}

main.page-entered {
    opacity: 1;
    transform: translateY(0);
}

.top-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

.top-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-title h1,
.detail h1,
.dashboard-head h1 {
    font-size: 23px;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
    background: linear-gradient(
        105deg,
        #f4f4f7 0%,
        #ffffff 38%,
        #7dd3fc 48%,
        #ffffff 58%,
        #cfcfd6 100%
    );
    background-size: 220% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: re-title-shimmer 7s ease-in-out infinite;
    filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.22));
}

@keyframes re-title-shimmer {
    0%, 25% {
        background-position: 100% 0;
    }
    55%, 75% {
        background-position: -50% 0;
    }
    100% {
        background-position: -50% 0;
    }
}

.top-title .count {
    font-family: var(--font-mono);
    font-size: 11px;
    background: #14151b;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #7dd3fc;
    padding: 2px 8px;
    border-radius: 4px;
}

.filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Category Tabs: Resident Evil Requiem Tactical Cut-Corner Buttons */
.tabs {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.tabs button,
.tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #121318;
    color: #dedee6;
    border: 1px solid rgba(255, 255, 255, 0.16);
    clip-path: polygon(
        7px 0, 
        100% 0, 
        100% calc(100% - 7px), 
        calc(100% - 7px) 100%, 
        0 100%, 
        0 7px
    );
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.5);
    padding: 8px 18px;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.tabs button:hover,
.tabs a:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    background: #1c1d25;
    box-shadow: none !important;
    transform: translateY(-1px);
}

.tabs .active {
    background: #ffffff !important;
    color: #0c0c0e !important;
    border-color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.35) !important;
}

/* Search Input */
.search {
    display: flex;
    align-items: center;
    background: #141417;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 0 12px;
    width: 260px;
    gap: 8px;
}

.search:focus-within {
    border-color: #555560;
}

.search svg {
    width: 15px;
    height: 15px;
    color: var(--text-muted);
}

.search input {
    border: 0;
    background: transparent;
    width: 100%;
    padding: 8px 0;
    font-size: 13px;
    outline: none;
    color: #ffffff;
}

.search input::placeholder {
    color: var(--text-muted);
}

.search-go {
    color: var(--text-muted);
    padding: 0;
    display: grid;
    place-items: center;
}

.search-go svg {
    width: 14px;
    height: 14px;
    transform: rotate(180deg);
}

.search-go:hover {
    color: #ffffff;
}

/* ==========================================================================
   Games Grid (Clean, Simple, Normal Proportions)
   ========================================================================== */

.game-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px 16px;
    perspective: 1200px;
}

.game-card {
    display: flex;
    flex-direction: column;
    animation: card-reveal 0.38s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: calc(var(--i, 0) * 0.038s);
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    will-change: transform;
}

.game-card.is-hovered {
    z-index: 10;
}

@keyframes card-reveal {
    0% {
        opacity: 0;
        transform: translateY(16px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Resident Evil Requiem Tactical Image Framing & Double Strokes */
.cover {
    display: block;
    aspect-ratio: 3/4;
    position: relative;
    overflow: hidden;
    background: #0d0e13;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.85), 0 4px 16px rgba(0, 0, 0, 0.6);
    /* Resident Evil 4-Corner Crosshair Tick Marks */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)), linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)),
        linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)), linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)),
        linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)), linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)),
        linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)), linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45));
    background-repeat: no-repeat;
    background-position: 
        top left, top left,
        top right, top right,
        bottom left, bottom left,
        bottom right, bottom right;
    background-size: 
        9px 1.5px, 1.5px 9px,
        9px 1.5px, 1.5px 9px,
        9px 1.5px, 1.5px 9px,
        9px 1.5px, 1.5px 9px;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

/* Inner hairline stroke */
.cover::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 2;
    transition: all 0.25s ease;
}

.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.game-card:hover .cover,
.game-card.is-hovered .cover {
    border-color: rgba(255, 255, 255, 0.48);
    box-shadow: 
        inset 0 0 0 1px rgba(0, 0, 0, 0.95),
        0 14px 32px rgba(0, 0, 0, 0.85);
    background-size: 
        15px 2px, 2px 15px,
        15px 2px, 2px 15px,
        15px 2px, 2px 15px,
        15px 2px, 2px 15px;
}

.game-card:hover .cover::after,
.game-card.is-hovered .cover::after {
    border-color: rgba(255, 255, 255, 0.22);
}

.game-card:hover .cover img,
.game-card.is-hovered .cover img {
    transform: scale(1.06);
}

/* ==========================================================================
   Broken Glass Tactical Fracture Effect on Card Hover
   ========================================================================== */
.broken-glass-fx {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-card:hover .broken-glass-fx,
.game-card.is-hovered .broken-glass-fx {
    opacity: 1;
}

.broken-glass-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    display: block;
}

.crack-line-main {
    fill: none;
    stroke: rgba(255, 255, 255, 0.92);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.85)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.95));
}

.crack-line-web {
    fill: none;
    stroke: rgba(255, 255, 255, 0.65);
    stroke-width: 0.9;
    stroke-dasharray: 4 2;
}

.crack-line-outer {
    fill: none;
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 0.75;
}

.crack-center {
    fill: rgba(255, 255, 255, 0.98);
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9));
}

.glass-glare {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--glass-x, 50%) var(--glass-y, 50%), rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 35%, transparent 65%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    mix-blend-mode: overlay;
}

.game-card:hover .glass-glare,
.game-card.is-hovered .glass-glare {
    opacity: 1;
}

.cover-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    color: #40404a;
}

.cover-placeholder svg {
    width: 44px;
    height: 44px;
}

.card-info {
    padding-top: 10px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    direction: ltr;
}

.badge-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.2;
    border-radius: 3px;
    text-transform: uppercase;
    background: #1a1a22;
    color: #d4d4dc;
    border: 1px solid #2d2d3a;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    white-space: nowrap;
}

/* Neutral matte badges - absolutely no colored borders or neon glow */
.badge-ps2,
.badge-psp,
.badge-ps4_ps5,
.badge-xbox360,
.badge-pc,
.badge-apk,
.badge-ipa,
.badge-yt {
    background: #1a1a22;
    color: #d4d4dc;
    border-color: #2d2d3a;
    box-shadow: none !important;
}

.card-meta .date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #8e8e98;
    font-weight: 500;
}

.game-card h3 {
    font-size: 14.5px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.35;
}

.game-card h3 a {
    color: #ffffff;
}

.game-card h3 a:hover {
    color: #b5b5be;
}

.game-card p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Empty & Pagination
   ========================================================================== */

.empty {
    text-align: center;
    padding: 60px 20px;
}

.empty svg {
    width: 40px;
    height: 40px;
    color: #44444e;
}

.empty h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 14px 0 6px;
}

.empty p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding-top: 36px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #121318;
    color: #e5e5ec;
    border: 1px solid rgba(255, 255, 255, 0.18);
    clip-path: polygon(
        7px 0, 
        100% 0, 
        100% calc(100% - 7px), 
        calc(100% - 7px) 100%, 
        0 100%, 
        0 7px
    );
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.5);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    text-decoration: none;
}

.button:hover {
    background: #1c1d25;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: none !important;
    transform: translateY(-1px);
}

.button.primary {
    background: #131929;
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff;
}

.button.primary:hover {
    background: #22232c;
    border-color: #444658;
    box-shadow: none !important;
}

.pagination .button {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-family: var(--font-mono);
    font-size: 12.5px;
}

.pagination .selected {
    background: #ffffff !important;
    color: #0c0c0e !important;
    border-color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.35) !important;
}

/* ==========================================================================
   Game Detail View
   ========================================================================== */

.back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 12.5px;
}

.back svg {
    transform: rotate(180deg);
}

.back:hover {
    color: #ffffff;
}

.detail {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.detail-cover {
    aspect-ratio: 3/4;
    background: #0d0e13;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), 0 8px 28px rgba(0, 0, 0, 0.8);
    display: grid;
    place-items: center;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
        linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
        linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
        linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5));
    background-repeat: no-repeat;
    background-position: 
        top left, top left,
        top right, top right,
        bottom left, bottom left,
        bottom right, bottom right;
    background-size: 
        12px 1.5px, 1.5px 12px,
        12px 1.5px, 1.5px 12px,
        12px 1.5px, 1.5px 12px,
        12px 1.5px, 1.5px 12px;
}

.detail-cover::after {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 2;
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-cover svg {
    width: 60px;
    height: 60px;
    color: #444;
}

.detail .eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.detail h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
}

.description {
    color: #b5b5be;
    line-height: 1.8;
    font-size: 14px;
}

.detail h2 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
}

.download-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-list .button {
    font-weight: 600;
    padding: 10px 20px;
}

/* Emulator Tutorial Notice Box (Resident Evil Tactical Hud Style) */
.emu-callout {
    margin-top: 24px;
    padding: 18px 22px;
    background: #0f121a;
    border: 1px solid rgba(56, 189, 248, 0.28);
    clip-path: polygon(
        10px 0, 
        100% 0, 
        100% calc(100% - 10px), 
        calc(100% - 10px) 100%, 
        0 100%, 
        0 10px
    );
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.emu-callout-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e4e4eb;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.emu-callout-header svg {
    width: 18px;
    height: 18px;
    color: #e4e4eb;
    flex-shrink: 0;
}

.emu-callout-text {
    color: #c8cbd6;
    font-size: 13.5px;
    line-height: 1.75;
    margin: 0 0 14px;
}

.emu-callout-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.emu-callout-actions .emu-btn {
    background: #171820;
    border-color: #2e3040;
    color: #ffffff;
    font-size: 12.5px;
    padding: 8px 16px;
    font-weight: 600;
}

.emu-callout-actions .emu-btn:hover {
    background: #222432;
    border-color: #45485f;
    box-shadow: none !important;
}

.emu-callout-actions .emu-btn svg {
    width: 14px;
    height: 14px;
}

.emu-callout-actions .emu-btn-all {
    background: #121318;
    border-color: rgba(255, 255, 255, 0.15);
    color: #b5b5be;
    font-size: 12.5px;
    padding: 8px 14px;
}

.emu-callout-actions .emu-btn-all:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.emu-callout-actions .emu-btn-all svg {
    width: 13px;
    height: 13px;
}

/* Game Screenshots Gallery (Resident Evil Tactical Framing) */
.game-screenshots-section {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    width: 100%;
}

.game-screenshots-section h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #f4f4f6;
    letter-spacing: 0.3px;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 16px;
}

.screenshot-item {
    display: block;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    background: #0d0e13;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.85), 0 4px 16px rgba(0, 0, 0, 0.6);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
        linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
        linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
        linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4));
    background-repeat: no-repeat;
    background-position: 
        top left, top left,
        top right, top right,
        bottom left, bottom left,
        bottom right, bottom right;
    background-size: 
        8px 1.5px, 1.5px 8px,
        8px 1.5px, 1.5px 8px,
        8px 1.5px, 1.5px 8px,
        8px 1.5px, 1.5px 8px;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

.screenshot-item::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 2;
    transition: all 0.25s ease;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.screenshot-item:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        inset 0 0 0 1px rgba(0, 0, 0, 0.95),
        0 8px 24px rgba(0, 0, 0, 0.8);
}

.screenshot-item:hover::after {
    border-color: rgba(255, 255, 255, 0.2);
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   Admin Panel (Clean & Simple)
   ========================================================================== */

.login {
    max-width: 360px;
    margin: 60px auto;
}

.login h1 {
    font-size: 24px;
    margin: 10px 0 6px;
}

.login p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 18px;
}

label {
    display: block;
    font-size: 12.5px;
    color: #b5b5be;
    margin: 14px 0 6px;
}

input:not([type=hidden]), textarea {
    color: #ffffff;
    background: #141417;
    border: 1px solid var(--panel-border);
    padding: 9px 12px;
    border-radius: var(--radius);
    width: 100%;
    font-size: 13px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #555560;
}

.primary {
    background: #ffffff;
    color: #0c0c0e;
    border-color: #ffffff;
    font-weight: 600;
}

.primary:hover {
    background: #d8d8de;
}

.dashboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

.dashboard-head h1 {
    font-size: 22px;
    margin: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.stats > div {
    padding: 16px 20px;
    border-left: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    gap: 14px;
}

.stats > div:last-child {
    border-left: 0;
}

.stats b {
    font-size: 24px;
    font-family: var(--font-mono);
}

.stats span {
    color: var(--text-muted);
    font-size: 12px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.editor {
    border: 1px solid var(--panel-border);
    padding: 22px;
    border-radius: var(--radius);
    background: var(--panel);
}

.editor h2, .entries h2 {
    font-size: 18px;
    margin: 0 0 16px;
}

.entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.entry h3 {
    font-size: 14px;
    margin: 0 0 4px;
}

.entry-actions {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.entry-actions a {
    color: var(--text-muted);
}

.entry-actions button {
    color: #ef4444;
}

.alert, .notice {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
}

.alert {
    border: 1px solid #7f1d1d;
    background: #241111;
    color: #fca5a5;
}

.notice {
    border: 1px solid #14532d;
    background: #0d2215;
    color: #86efac;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--line);
    background: #09090c;
    color: var(--text-muted);
    padding: 28px 0 32px;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

.footer-wrap {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
    background: #141418;
}

.footer-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.footer-desc {
    font-size: 11.5px;
    color: #71717a;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #141418;
    border: 1px solid #27272e;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11.5px;
    color: #a1a1aa;
    transition: all 0.15s ease;
}

.footer-pill svg {
    width: 13px;
    height: 13px;
}

.footer-pill:hover {
    background: #202028;
    color: #ffffff;
    border-color: #3f3f4c;
}



/* ==========================================================================
   Responsive (Refined for Mobile, Tablet & Desktop)
   ========================================================================== */

@media (max-width: 1100px) {
    .game-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px 14px;
    }
}

@media (max-width: 860px) {
    header {
        padding: 0 16px;
    }
    main {
        padding: 18px 16px 48px;
    }
    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .search {
        width: 100%;
        max-width: 100%;
        height: 42px;
    }
    .game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px 12px;
    }
    .detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .detail-cover {
        max-width: 260px;
        margin: 0 auto;
    }
    .admin-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    header {
        height: 52px;
        padding: 0 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    main {
        padding: 16px 12px 48px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .brand-logo {
        width: 28px;
        height: 28px;
    }
    .brand-title {
        font-size: 13.5px;
    }
    .brand-sub {
        font-size: 8.5px;
    }
    .nav-tabs {
        padding: 3px;
        gap: 2px;
    }
    .nav-btn {
        padding: 5px 10px;
        font-size: 12px;
        gap: 5px;
    }
    .nav-btn svg {
        width: 14px;
        height: 14px;
    }

    .top-bar {
        gap: 12px;
        padding-bottom: 14px;
        margin-bottom: 18px;
        width: 100%;
        max-width: 100%;
    }
    .top-title h1 {
        font-size: 19px;
    }

    /* Horizontal smooth scrollable category pill bar without leaking out of screen */
    .tabs {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 6px;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .tabs::-webkit-scrollbar {
        display: none;
    }
    .tabs button, .tabs a {
        flex-shrink: 0;
        padding: 7px 13px;
        font-size: 12px;
        white-space: nowrap;
    }

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 10px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .game-card {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }
    .card-info {
        padding-top: 8px;
    }
    .game-card h3 {
        font-size: 13.5px;
        line-height: 1.3;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    .game-card p {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
    .card-meta {
        font-size: 10px;
        gap: 4px;
        flex-wrap: wrap;
    }
    .card-meta .badge {
        font-size: 10px;
        padding: 2.5px 6px;
    }

    /* Detail page on mobile */
    .detail {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .detail h1 {
        font-size: 20px;
        overflow-wrap: break-word;
    }
    .download-list {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    .download-list .button {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 13.5px;
        box-sizing: border-box;
    }
    .emu-callout {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .emu-callout-actions {
        width: 100%;
    }
    .emu-callout-actions .button {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    /* Footer anchored strictly to bottom on mobile */
    .site-footer {
        padding: 22px 0 28px;
        margin-top: auto;
        width: 100%;
        box-sizing: border-box;
    }
    .footer-wrap {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        padding: 0 14px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .footer-brand {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    .footer-meta {
        align-items: center;
    }
    .footer-links {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }

    /* Admin controls */
    .stats {
        grid-template-columns: 1fr;
    }
    .stats > div {
        border-left: 0;
        border-bottom: 1px solid var(--panel-border);
    }
    .stats > div:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 360px) {
    header {
        padding: 0 8px;
    }
    .brand-title {
        font-size: 12px;
    }
    .nav-btn span {
        display: none;
    }
    .nav-btn {
        padding: 6px 10px;
    }
    .game-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ==========================================================================
   In-Page Interactive Screenshot Lightbox Modal
   ========================================================================== */
html.lightbox-open, body.lightbox-open {
    overflow: hidden !important;
}

.screenshot-item {
    position: relative;
    cursor: zoom-in;
}

.screenshot-expand-icon {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(10, 11, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e4e4eb;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.2s ease;
    z-index: 3;
    pointer-events: none;
}

.screenshot-expand-icon svg {
    width: 14px;
    height: 14px;
}

.screenshot-item:hover .screenshot-expand-icon {
    opacity: 1;
    transform: translateY(0);
}

.lightbox-root {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.lightbox-root.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 7, 10, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.lightbox-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    box-sizing: border-box;
}

.lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(180deg, rgba(10, 12, 18, 0.9) 0%, rgba(10, 12, 18, 0) 100%);
    z-index: 5;
    gap: 16px;
}

.lightbox-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.lightbox-counter {
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    font-weight: 600;
    color: #c8c8d4;
    background: #14151a;
    border: 1px solid #282a35;
    padding: 3px 9px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    box-shadow: none !important;
    text-shadow: none !important;
}

.lightbox-caption {
    font-size: 13.5px;
    font-weight: 500;
    color: #dedee6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-btn {
    background: #14151a;
    border: 1px solid #282a35;
    color: #9e9ea8;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: none !important;
}

.lightbox-btn:hover {
    background: #1e1f26;
    color: #ffffff;
    border-color: #3f4150;
    transform: none;
}

.lightbox-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    min-height: 0;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-view {
    position: relative;
    max-width: 92vw;
    max-height: 76vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 92vw;
    max-height: 76vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9);
    border: 1px solid #23242e;
    transition: opacity 0.2s ease;
}

.lightbox-spinner {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: lbSpin 0.75s linear infinite;
    z-index: 2;
}

@keyframes lbSpin {
    to { transform: rotate(360deg); }
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 19, 25, 0.95);
    border: 1px solid #2c2d3a;
    color: #b5b5c2;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

.lightbox-nav-btn:hover {
    background: #242531;
    border-color: #484a5c;
    color: #ffffff;
    transform: translateY(-50%);
    box-shadow: none !important;
}

.lightbox-prev {
    right: 20px;
}

.lightbox-next {
    left: 20px;
}

.lightbox-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px 18px;
    background: linear-gradient(0deg, rgba(10, 12, 18, 0.95) 0%, rgba(10, 12, 18, 0) 100%);
    z-index: 5;
}

.lightbox-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 4px;
    max-width: 85vw;
    scrollbar-width: thin;
}

.lightbox-thumb {
    width: 60px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid #22232c;
    background: #0e0f14;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.45;
    transition: all 0.2s ease;
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lightbox-thumb:hover {
    opacity: 0.8;
    border-color: #404250;
}

.lightbox-thumb.is-active {
    opacity: 1;
    border-color: #e4e4eb;
    box-shadow: 0 0 0 1px #e4e4eb;
    transform: none;
}

@media (max-width: 640px) {
    .lightbox-header {
        padding: 12px 16px;
    }
    .lightbox-caption {
        max-width: 180px;
        font-size: 13px;
    }
    .lightbox-nav-btn {
        width: 38px;
        height: 38px;
    }
    .lightbox-prev {
        right: 10px;
    }
    .lightbox-next {
        left: 10px;
    }
    .lightbox-thumb {
        width: 52px;
        height: 32px;
    }
}

