html, body {
    margin: 0;
    height: 100%;
}

a { color: cyan; }
a:visited { color: teal; }

/* Arcade cabinet scaling */
:root {
    --scale: 1;
    --corner-width: calc(24px * var(--scale));
    --corner-height: calc(48px * var(--scale));
}
@media (min-width: 600px) { :root { --scale: 2; } }
@media (min-width: 1300px) { :root { --scale: 3; } }

/* Main scene container */
.scene {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #222222;
}

/* ===================================================== */

/* Bar counter on the side */
.side-bg {
    position: relative;
    top: 0;
    left: 0;
    z-index: 3;
    height: 100vh;
    width: calc(100vh * 724 / 1350);
}
.bar-counter { position: absolute; z-index: 3; height: 100%; image-rendering: pixelated; }
/* Tv */
.bar-tv { position: absolute; isolation: isolate; top: 3%; left: 10%; width: 80%; height: 24%; }
.bar-tv::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 50%, rgba(0,0,0,0.9) 90%, rgba(0,0,0,1) 100%); }
/* Tv content */
.bar-tv img { position: absolute; width: 100%; height: 100%; }
.tv-image { z-index: 1; object-fit: contain; background: #000000; }
.tv-static { z-index: 2; opacity: 0.17; pointer-events: none; mix-blend-mode: screen; object-fit: fill; }

/* ===================================================== */

/* Arcade cabinet container */
.cabinet {
    position: absolute;
    top: 0;
    right: 0;
    width: calc(100vw - clamp(0px, calc(100vw - 700px), calc(100vh * 724 / 1350)));
    max-width: 100%;
    z-index: 4;
    height: 100%;
    display: grid;
    grid-template-columns: var(--corner-width) 1fr var(--corner-width);
    grid-template-rows: var(--corner-height) 1fr var(--corner-height);
}
/* Corners */
.corner { image-rendering: pixelated; width: 100%; height: 100%; }
.corner-img { width: 100%; height: 100%; object-fit: fill; }
/* Edges */
.edge { image-rendering: pixelated; width: 100%; height: 100%; position: relative; }
.edge-img { width: 100%; height: 100%; object-fit: fill; }
/* Decoration */
.bottom-logo { image-rendering: pixelated; width: auto; height: 100%; position: absolute; z-index: 1; top: 0; left: 50%; transform: translateX(-50%); }

/* ===================================================== */

/* Navigation button strips */
.nav-buttons {
    position: absolute;
    display: flex;
    align-items: center;
    transform: translate(-50%, -50%);
    z-index: 1;
}
/* Buttons positions and alignment */
.btn-group { display: flex; gap: calc(8px * var(--scale)); }
.top-buttons { top: 38%; left: 50%; }
.bottom-buttons { top: 24%; left: 50%; }
/* Buttons images */
.button-link { display: inline-block; overflow: hidden; background: transparent; }
.button-link-top img { image-rendering: pixelated; height: calc(32px * var(--scale)); display: block; }
.button-link-top:active img { transform: translateY(calc(-1.5px * var(--scale))); filter: brightness(1.5); }
.button-link-bottom img { image-rendering: pixelated; height: calc(16px * var(--scale)); display: block; }
.button-link-bottom:active img { transform: translateY(calc(1.5px * var(--scale))); filter: brightness(2.0); }
.button-selected img { filter: brightness(2.0); }
.button-pulse img { animation: brightnessPulse 5s ease-in-out infinite; }
@keyframes brightnessPulse { 0% { filter: brightness(2.5); } 50% { filter: brightness(1.5); } 100% { filter: brightness(2.5); } }

/* ===================================================== */

/* CRT effects */
@keyframes flicker { 0% { background: #000000; } 50% { background: #010101; } 100% { background: #000000; } }
.crt {
    position: relative;
    background: #000000;
    overflow: hidden;
    animation: flicker 0.1s infinite;
}
/* Scanlines */
@keyframes scanlines { from { background-position: 0 0; } to { background-position: 0 10px; } }
.crt::before { content: ""; position: absolute; pointer-events: none; inset: 0;
    background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.03) 0px, rgba(0,0,0,0.03) 1px, rgba(0,0,0,0.06) 2px);
    animation: scanlines 1s linear infinite; }
/* Ellipsis gradient */
.crt::after { content: ""; position: absolute; pointer-events: none; inset: 0; filter: blur(5px);
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.05) 50%, rgba(0,0,0,0.3) 100%); }

/* ===================================================== */

/* Tab-like links */
.tabs { display: flex; flex-direction: column; flex-grow: 1; overflow: hidden; }
.tab-row { display: flex; flex-wrap: wrap; flex-shrink: 0; }
/* Style of tab label */
.tab-label {
    display: inline-flex;
    text-align: center;
    cursor: pointer;
    border-style: dotted;
    border-color: rgba(255,255,255,0.5);
    border-width: 3px 2px;
    border-bottom: none;
    padding: 5px 10px;
    color: lightgrey;
    text-decoration: none;
    font-family: sans-serif;
}
.tab-label:visited { color: lightgrey; }
/* Style of selected tab label */
.tabs:has(#work:target) .tab-label[href="#work"],
.tabs:has(#links:target) .tab-label[href="#links"],
.tabs:has(#screenshots:target) .tab-label[href="#screenshots"],
.tabs:has(#extras:target) .tab-label[href="#extras"],
.tabs:not(:has(.tab-content:target)) .tab-label[href="#"] {
    border-style: double;
    border-width: 5px;
    border-bottom: none;
    font-weight: bold;
}
/* Style of hovered tab */
.tab-label:hover { background-color: rgba(255,255,255,0.1); }
/* Show selected tab, first tab by default */
.tab-content:target { display: block; }
.tab-content:first-of-type { display: block; }
/* Hide unselected tabs, including first one when another is selcted */
.tabs:has(.tab-content:target) 
.tab-content:first-of-type { display: none; }
.tab-content { display: none; scroll-margin-top: 100vh; }
/* Style of container for tabs contents */
.content {
    flex-grow: 1;
    overflow: auto;
    border-style: double;
    border-color: rgba(255,255,255,0.5);
    border-width: 5px;
    padding: 10px;
}

/* ===================================================== */

/* Tables with links in the about section */
.links-table { width: 100%; }
.links-cell-icon { padding: 5px; width: 20%; }
.links-cell-icon img { height: calc(24px * var(--scale)); object-fit: scale-down; text-align: right; }
.links-cell-text { padding: 10px; text-align: left; }
/* Tables with games capsules */
.games-table { width: 100%; }
.games-cell-icon { padding: 5px; width: 20%; }
.games-cell-icon img { height: calc(32px * var(--scale)); object-fit: scale-down; text-align: right; }
.games-cell-text { padding: 10px; text-align: left; }

/* ===================================================== */

/* Main page content inside the arcade cabinet */
.main-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 10px;
    overflow: auto;
    color: lightgrey;
    font-family: sans-serif;
    text-align: justify;
    word-break: normal;
    overflow-wrap: break-word;
    box-sizing: border-box;
    text-align: center;
}
.inline-image {
    max-width: 100%;
    height: auto;
    display: inline-block;
}
.main-content h1 {
    margin: 0 0 10px 0;
    flex-shrink: 0;
}
.inline-image-small {
    width: 480px;
    height: 270px;
}
.inline-logo-small {
    height: 48px;
    width: auto;
    display: inline-block;
}
.wishlist-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: link-pulse 20s infinite;
}
@keyframes link-pulse { 0% { opacity: 1; } 96% { opacity: 1; } 97% { opacity: 0.8; } 98% { opacity: 1; } 99% { opacity: 0.8; } 100% { opacity: 1; } }

