/* Self-hosted so no request leaves for a third party on page load. Inter is a
   variable font: one file serves every weight, hence the 100 900 range. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/Inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/Inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/PressStart2P-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/PressStart2P-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --main-text-color: #fff;
    --primary-color: #3C2D85;
    --bg: #000C24;    
    --purpl: #C300FF;
    --orange: #ff8000;
    --dark-blue: #001133;
    --light-blue: #0a1929;
    --transition-speed: 0.3s;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

p, br {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* Space for fixed navbar */
    width: 100%;
    max-width: 100%;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--purpl);
    color: white;
    padding: 1rem 2rem;
    z-index: 10000;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    text-decoration: none;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

section {
    background: transparent !important;
    width: 100%;
    max-width: 100%;
}

main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif !important;
    background-color: var(--bg) !important;
    color: var(--main-text-color);
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
    padding-top: 70px;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(195, 0, 255, 0.2);
    border-top-color: var(--purpl);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RETRO EFFECTS - CRT & SCANLINES (SUBTLE)
   ============================================ */

/* Noise texture overlay - VERY SUBTLE */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.005;
    pointer-events: none;
    z-index: 999;
    animation: noise 0.5s infinite;
}

@keyframes noise {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, 2%); }
}

/* Scanlines effect - VERY SUBTLE */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.02),
        rgba(0, 0, 0, 0.02) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 998;
    animation: scanlines 15s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(15px); }
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    -webkit-filter: blur(120px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
    will-change: transform;
}

.bg-orb-1 {
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--purpl) 0%, transparent 70%);
    animation-delay: 0s;
}

.bg-orb-2 {
    bottom: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--orange) 0%, transparent 70%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 50px) scale(0.9); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.title-hero {
    font-family: 'Press Start 2P', cursive;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--main-text-color);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(195, 0, 255, 0.5);
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { text-shadow: 0 0 20px rgba(195, 0, 255, 0.5), 0 0 40px rgba(195, 0, 255, 0.3); }
    50% { text-shadow: 0 0 30px rgba(195, 0, 255, 0.8), 0 0 60px rgba(195, 0, 255, 0.5); }
}

.text-hero {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    max-width: 600px;
    margin: 0 auto;
}

.hero-body {
    text-align: left;
    max-width: 800px;
    margin-bottom: 1.25rem;
}

.section-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1.2;
    color: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--purpl), transparent);
    animation: title-line 2s ease-in-out infinite;
}

@keyframes title-line {
    0%, 100% { width: 60%; opacity: 0.5; }
    50% { width: 80%; opacity: 1; }
}

/* ============================================
   NAVIGATION
   ============================================ */

#navbar {
    background: rgba(0, 12, 36, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(195, 0, 255, 0.3);
    padding: 1rem 3%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

#navbar.scrolled {
    background: rgba(0, 12, 36, 0.98);
    border-bottom-color: var(--purpl);
    box-shadow: 0 4px 40px rgba(195, 0, 255, 0.3);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar-brand:focus {
    outline: 2px solid var(--purpl);
    outline-offset: 4px;
    border-radius: 4px;
}

.logonav {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(195, 0, 255, 0.3));
    transition: filter 0.3s ease;
}

.navbar-brand:hover .logonav {
    filter: drop-shadow(0 0 20px rgba(195, 0, 255, 0.6));
    animation: logo-bounce 0.6s ease;
}

@keyframes logo-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.brand-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    line-height: 1.6;
    color: #fff;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
}

.nav-item {
    position: relative;
}

.btn {
    color: var(--main-text-color) !important;
}

.btn-primary {
    background: transparent;
    border: none;
    color: var(--main-text-color);
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-primary::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--purpl);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.btn-primary:hover::before,
.btn-primary:focus::before {
    width: 80%;
}

.btn-primary:hover,
.btn-primary:focus {
    color: var(--purpl);
    transform: translateY(-2px);
}

.btn-primary:focus {
    outline: 2px solid var(--purpl);
    outline-offset: 4px;
    border-radius: 4px;
}

.btn-nav {
    background: var(--purpl);
    border: 2px solid #000;
    box-shadow: inset -3px -3px 0px 0px #a700da, 0 0 20px rgba(195, 0, 255, 0.3);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.875rem 1.5rem;
    color: #fff;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-nav:hover::before {
    left: 100%;
}

.btn-nav:hover,
.btn-nav:focus {
    box-shadow: inset -5px -5px 0px 0px #a700da, 0 0 30px rgba(195, 0, 255, 0.6);
    background: #cc24ff;
    transform: translateY(-2px);
    color: #fff;
}

.btn-nav:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
}

.btn-nav:active {
    transform: translateY(0);
}

.btn-nav img,
.btn-nav .icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.navbar-toggler {
    display: none;
    background: transparent;
    border: 2px solid var(--purpl);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
    background: rgba(195, 0, 255, 0.1);
    box-shadow: 0 0 20px rgba(195, 0, 255, 0.4);
}

.navbar-toggler:focus {
    outline: 2px solid var(--purpl);
    outline-offset: 4px;
}

.navbar-toggler-icon {
    width: 24px;
    height: 20px;
    position: relative;
    display: block;
}

.navbar-toggler-icon span {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--purpl);
    transition: all 0.3s ease;
}

.navbar-toggler-icon span:nth-child(1) { top: 0; }
.navbar-toggler-icon span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.navbar-toggler-icon span:nth-child(3) { bottom: 0; }

.navbar-toggler.active .navbar-toggler-icon span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.navbar-toggler.active .navbar-toggler-icon span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler.active .navbar-toggler-icon span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 5% 60px;
    position: relative;
    text-align: center;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.hero-content {
    max-width: 900px;
    z-index: 10;
    position: relative;

}

.imgcity {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.imgcity img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   BUTTONS - 8-BIT STYLE
   ============================================ */

a:has(.eightbit-btn) {
    text-decoration: none;
}

.eightbit-btn {
    background: var(--orange);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    padding: 1rem 2rem;
    text-decoration: none !important;
    color: white;
    box-shadow: inset -4px -4px 0px 0px #d16800;
    transition: all 0.2s ease;
    cursor: pointer;
    text-transform: uppercase;
    border: none;
    overflow: hidden;
}

.eightbit-btn::before,
.eightbit-btn::after {
    content: '';
    position: absolute;
    box-sizing: content-box;
}

.eightbit-btn::before {
    top: -4px;
    left: 0;
    width: 100%;
    height: 100%;
    border-top: 4px black solid;
    border-bottom: 4px black solid;
}

.eightbit-btn::after {
    left: -4px;
    top: 0;
    width: 100%;
    height: 100%;
    border-left: 4px black solid;
    border-right: 4px black solid;
}

.eightbit-btn span {
    position: relative;
    z-index: 1;
    text-decoration: none !important;
    border: none !important;
}

.eightbit-btn:hover {
    background: #ff8a15;
    box-shadow: inset -6px -6px 0px 0px #e77400;
    transform: translate(-2px, -2px);
    color: white;
}

.eightbit-btn:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 6px;
}

.eightbit-btn:active {
    transform: translate(2px, 2px);
    box-shadow: inset 4px 4px 0px 0px #e77400;
}

.eightbit-btn--proceed {
    background: var(--purpl);
    box-shadow: inset -4px -4px 0px 0px #a700da;
}

.eightbit-btn--proceed:hover {
    background: #c917ff;
    box-shadow: inset -6px -6px 0px 0px #a700da;
    color: white;
}

.eightbit-btn--proceed:active {
    box-shadow: inset 4px 4px 0px 0px #a700da;
}

.btndiv {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   SECTIONS
   ============================================ */

.section-padding {
    padding: 2.5rem 5%;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 100%;
}

.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-divider {
    border: none;
    border-top: 2px solid rgba(195, 0, 255, 0.2);
    margin: 0 5%;
}

/* ============================================
   GAME CARDS - ENHANCED
   ============================================ */

.custom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.cardblog {
    background: rgba(0, 17, 51, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(195, 0, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cardblog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purpl), var(--orange), var(--purpl));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cardblog:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--purpl);
    background: rgba(0, 17, 51, 0.7);
    box-shadow: 0 20px 60px rgba(195, 0, 255, 0.3),
                0 0 40px rgba(195, 0, 255, 0.2);
}

.cardblog:focus-within {
    outline: 3px solid var(--purpl);
    outline-offset: 4px;
}

.cardblog:hover::before {
    opacity: 1;
}

.imgblog {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #000;
}

.imgblog img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.cardblog:hover .imgblog img {
    transform: scale(1.1);
}


.contentblog {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.contentblog h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.titlegames {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contentblog .btn-nav {
    margin-top: auto;
    width: 100%;
    justify-content: center;
}

/* ============================================
   PRODUCT CARDS - ENHANCED
   ============================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.product-card {
    background: rgba(0, 17, 51, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(195, 0, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purpl), var(--orange), var(--purpl));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--purpl);
    background: rgba(0, 17, 51, 0.7);
    box-shadow: 0 20px 60px rgba(195, 0, 255, 0.3),
                0 0 40px rgba(195, 0, 255, 0.2);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:focus-within {
    outline: 3px solid var(--purpl);
    outline-offset: 4px;
}

/* Container de imagem para produtos */
.product-img {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.productsimgs {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.product-card:hover .productsimgs {
    transform: scale(1.1);
}

/* Conteúdo do produto */
.product-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.product-card h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-subtitle {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    color: var(--orange);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.product-card p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.product-content .btn-nav {
    margin-top: auto;
    width: 100%;
    justify-content: center;
}

/* ============================================
   CONTACT FORM - ENHANCED UX
   ============================================ */

.contact-section {
    background: transparent;
    border-top: 2px solid rgba(195, 0, 255, 0.2);
    text-align: center;
}

.emailtext {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
}

.linkemail {
    color: var(--purpl);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.linkemail:hover,
.linkemail:focus {
    border-bottom-color: var(--purpl);
}

.linkemail:focus {
    outline: 2px solid var(--purpl);
    outline-offset: 4px;
    border-radius: 2px;
}

/* ============================================
   FOOTER - ENHANCED
   ============================================ */

.licence-list li {
    cursor: help;
}

.licence-list li:hover strong {
    color: var(--purpl);
}

.licence-list a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(195, 0, 255, 0.5);
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.licence-list a:hover,
.licence-list a:focus {
    color: var(--purpl);
}

#licence-popup {
    position: absolute;
    z-index: 500;
    width: auto;
    max-width: calc(100vw - 2rem);
    max-height: 60vh;
    scrollbar-gutter: stable;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    background: rgba(0, 9, 26, 0.98);
    border: 1px solid rgba(195, 0, 255, 0.5);
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

#licence-popup[hidden] {
    display: none;
}

#licence-popup pre {
    /* Most of these licences are hard-wrapped at 80 columns, so the box is sized in
       ch to fit them whatever monospace font the browser happens to use */
    width: 83ch;
    max-width: 100%;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}

#licence-popup .holders {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(195, 0, 255, 0.3);
    color: #fff;
}

#licence-popup .holders[hidden],
#licence-popup .exception[hidden] {
    display: none;
}

#licence-popup .exception {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(195, 0, 255, 0.3);
    color: #fff;
}

#third-party .section-title,
#core-options .section-title,
#screenshots .section-title {
    font-size: 2rem;
}

.core-options {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 800px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.core-options li {
    padding-left: 1.25rem;
    margin-bottom: 0.9rem;
    position: relative;
}

.core-options li::before {
    content: '\25B8';
    position: absolute;
    left: 0;
    color: var(--purpl);
}

.core-options strong {
    color: #fff;
    font-weight: 600;
}

/* The demo's own attribution, so it sits against the emulator it belongs to rather
   than opening a gap of its own, and centred under it the way the controls are.
   The list is sized to its widest entry and centred as a block, so the entries
   share a left edge and read down rather than sitting ragged about the middle. */
#demo-content {
    padding-top: 0;
}

#demo-content .licence-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: fit-content;
    max-width: 100%;
}

#demo-content .licence-list li {
    margin-bottom: 0;
}

/* ============================================
   SCREENSHOTS
   ============================================ */

.screenshot-note {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.6;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.screenshot {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* Fixed box so the row lines up whatever each machine's picture measures, and so
   the caption does not jump once the lazily loaded image arrives */
.screenshot-frame {
    background: #000;
    border: 3px solid rgba(195, 0, 255, 0.5);
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.screenshot:hover .screenshot-frame {
    border-color: var(--purpl);
    box-shadow: 0 0 20px rgba(195, 0, 255, 0.25);
}

.screenshot-frame img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.screenshot-caption {
    text-align: center;
    line-height: 1.4;
}

.screenshot-game {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.screenshot-copyright {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.footer {
    background: rgba(0, 9, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 1.5rem 5% 1.5rem;
    border-top: 2px solid rgba(195, 0, 255, 0.3);
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: 100%;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.footer-brand:hover,
.footer-brand:focus {
    color: var(--purpl);
}

.footer-brand:focus {
    outline: 2px solid var(--purpl);
    outline-offset: 4px;
    border-radius: 4px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 560px;
    margin-bottom: 0;
}

.footer-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: var(--purpl);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--purpl);
    transform: translateX(5px);
}

.footer-links a:focus {
    outline: 2px solid var(--purpl);
    outline-offset: 4px;
    border-radius: 2px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.social-links a:hover,
.social-links a:focus {
    color: var(--purpl);
}

.social-links a:focus {
    outline: 2px solid var(--purpl);
    outline-offset: 4px;
    border-radius: 2px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2rem !important; }
.mt-auto { margin-top: auto !important; }


/* ============================================
   CATEGORY FILTERS (FOR GAMES PAGE)
   ============================================ */

.category-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.category-btn {
    background: rgba(0, 17, 51, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(195, 0, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.category-btn:hover,
.category-btn:focus {
    background: rgba(195, 0, 255, 0.2);
    border-color: var(--purpl);
    color: var(--purpl);
    transform: translateY(-2px);
}

.category-btn:focus {
    outline: 2px solid var(--purpl);
    outline-offset: 4px;
}

.category-btn.active {
    background: var(--purpl);
    border-color: var(--purpl);
    color: #fff;
    box-shadow: 0 0 20px rgba(195, 0, 255, 0.4);
}

/* ============================================
   GAME DETAIL PAGE (EMULATOR)
   ============================================ */

.game-header {
    padding: 6rem 5% 2rem;
    text-align: center;
}

.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(195, 0, 255, 0.5);
}

.game-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.game-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.game-meta-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    color: var(--purpl);
    text-transform: uppercase;
}

.emulator-container {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 5%;
}

.emulator-wrapper {
    background: rgba(0, 17, 51, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 3px solid rgba(195, 0, 255, 0.4);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(195, 0, 255, 0.3);
}

.emulator-frame {
    width: 100%;
    min-height: 600px;
    border: none;
    border-radius: 8px;
    background: #000;
}

.game-description {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 5%;
    text-align: center;
}

.game-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
}

.game-controls {
    background: rgba(0, 17, 51, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(195, 0, 255, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.game-controls h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.25rem;
    color: var(--purpl);
    margin-bottom: 1.5rem;
    text-align: center;
}

.control-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.control-key {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    color: var(--orange);
}

.control-action {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Back button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--purpl);
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    margin: 2rem 0;
    transition: all 0.3s ease;
}

.back-btn:hover,
.back-btn:focus {
    transform: translateX(-5px);
    color: var(--orange);
}

.back-btn:focus {
    outline: 2px solid var(--purpl);
    outline-offset: 4px;
    border-radius: 4px;
}