/* === CANONICAL MODAL GEOMETRY === */
:root {
    --modal-top: calc(15% - 4.1rem);
    --modal-width: calc(100vw - 3rem);
    --modal-max-width: 60rem;
    --modal-height: 40rem;
    --modal-max-height: calc(100dvh - 6rem);
    --modal-border: 7px solid black;
    --modal-radius: 1.25rem;
}

body {
    margin: 0;
    font-family: "nexa-text", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 0.95rem;
}

.target {
    cursor: pointer;
}

h5 {

    font-variation-settings: "opsz" 8, "wght" 800;
    font-size: 1.1rem;
}

header {
    /* border: 2px solid green;
    height: 5rem; */

    position: fixed;
    top: 0;
    z-index: 2;
    width: 100vw;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: normal;
    align-items: normal;
    align-content: normal;
}

header img {
    scale: 0.95;
}

header .icon {
    cursor: pointer;
}

#floor-container {
    position: relative;
    z-index: -1;
    width: 100vw;
    height: 100dvh;
    overflow: hidden !important;
    text-align: center;
}
/* STUDIO HEADER LOGO */
.studio-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 3rem;
    margin-bottom: 0.5rem;
    transition: transform 0.25s ease;
}

.studio-header a {
    transition: transform 0.25s ease, background 0.2s ease;
}

.studio-header img {
    height: 24px;
    object-fit: contain;
}
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    column-gap: 2rem;
    row-gap: 1.5rem;
    align-items: center;
}

.logo-grid a:hover img, .studio-header a:hover  {
  transform: scale(1.05);
}
.logo-grid img {
    max-width: 120px;
}
/* logo cell */
.logo-grid a {
    transition: transform 0.25s ease, background 0.2s ease;
    display: flex;
    flex-direction: column;     /* ← stack vertically */
    align-items: flex-start;    /* ← left aligned */
    justify-content: flex-start;
    gap: 0.4rem;                /* space between logo and text */
    height: auto;               /* allow text to define height */
    text-decoration: none;
    margin-bottom: 1rem;
    color: black;
}
/* actual logo */
.logo-grid img {
    height: 60px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.25s ease-out;
    object-fit: contain;
}
.logo-grid a p {
    padding-top: 0.5rem;
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.2;
    font-style: italic;
}
.logo-grid a p::before {
    content: "";
}
#game-star {
  position: relative;
  margin: 0 auto;
    top: 5rem;
    pointer-events: all;
}

.star-bg {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.game-detail-content {
    display: none;
    margin: 3rem 1rem 3rem 2.3rem;
}
/* GAME DETAIL CONTENT = ALBUM TEXT */
#game-detail .game-detail-content {
    margin: 3rem 1rem 3rem 2.3rem !important;
}
#game-detail #close-game-detail,
#sites-modal #close-sites,
.album-sub > div[id^="close"],
.other-sub > div[id^="close"] {
    position: sticky !important;
    top: 3rem !important;
    margin-left: auto !important;

    width: 3.5rem;
    height: 3.5rem;
    z-index: 20;
}
/* UNIFIED MODAL SCROLLBAR */
#game-detail,
#sites-modal .popup-inner,
.album-sub,
.other-sub {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.35) transparent;
}

#games-star-wrap {
    position: fixed !important;
    background: transparent !important;
    border: none !important;
}

#games-modal.detail-open #games-star-wrap {
    display: none !important;
}
.album-text {
    margin: 3rem 1rem 3rem 2.3rem !important;
}
.game-detail-content .web-desc,
.game-detail-content .web-vids {
    max-width: 720px;
    margin: 0 0;
}

.game-detail-content img {
  width: 100%;
  border-radius: 12px;
  margin-top: 16px;
}
.window {
    position: absolute;
    top: 10.5rem;
    height: 8.5rem;
}

#w0 {
    left: 25vw;
}

#w1 {
    right: 25vw;
}

#floor {
    width: 2560px;
    position: absolute;
    z-index: -1;
    top: 13rem;
    transform: translateX(-50%);
}

.flex-items {
    height: 8.75rem;
    text-align: center;
}

.flex-items img {
    transform: translateX(-50%);
    margin-top: 2.75rem;
    height: 2rem;
    position: absolute;
}

.flex-items:nth-child(1), .flex-items:nth-child(3) {
    width: calc((100% - 7.75rem) / 2);
    display: block;
    flex-grow: 0;
    flex-shrink: 1;
    flex-basis: auto;
    align-self: auto;
    order: 0;
}
  
.flex-items:nth-child(2) {
    min-width: 5rem;
    width: 7.75rem;
    display: block;
    flex-grow: 0;
    flex-shrink: 1;
    flex-basis: auto;
    align-self: auto;
    order: 0;
}

.icon {
    margin-top: 1rem !important;
    height: 6rem !important;
}

.portfolio {
    scale: 0.95;
}

#illustrations {
    position: relative;
    display: block;
    height: 40rem;
    width: 100vw;
    overflow: hidden !important;
}


#games {
    position: absolute;
    top: 13rem;
    right: calc(41vw - 17.5rem);
    width: 11.75rem;
    height: 12rem;
    padding: 1.5rem;
    cursor: pointer;
}


#games img {
    position: absolute;
    height: 12rem;
}
#games-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
}





/* example positions — tweak freely */
.star-item[data-game="timmy"] {
  top: 46%;
  left: 50%;
    transform: translate(-50%, -50%);
    width: 57px;
    height: 60px;
}

.star-item[data-game="vinyl"] {
  top: 46%;
  left: 28%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
}

.star-item[data-game="knifehall"] {
  top: 46%;
  right: 28%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
}




/* GAME STAR ICONS – OG / HOVER SWAP */
.star-item {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
}

.star-item img {
    position: absolute;
    width: 64px;
    height: auto;
    top: 0;
    left: 0;
    transition: opacity 0s ease, transform 0.25s ease;
}
.star-item[data-game="timmy"] img {
    width: 57px;
    margin-left: 0.3rem;
    height: 60px;
}

/* default visible */
.star-item .star-og {
    opacity: 1;
}

/* hover hidden by default */
.star-item .star-hover {
    opacity: 0;
    transform: scale(1);
    transition: opacity 0s ease, transform 0.25s ease;
}

/* on hover → swap */
.star-item:hover .star-og {
    opacity: 0;
}

.star-item:hover .star-hover {
    opacity: 1;
    transform: scale(1.1);
}



/* blur like Ostatní */
#games-modal .blur-bg {
    z-index: 95;
}
/* hide star when detail is open */
#games-modal.detail-open #games-star-wrap {
    display: none;
}

/* STAR CONTAINER */
#games-star-wrap {
    position: fixed;
    pointer-events: none;
    z-index: 99;

    top: 15%;
    left: 50%;
    transform: translateX(-50%) translateY(-15%);

    width: calc(100vw - 4rem);
    max-width: 760px;

    background: transparent; /* important */
    border: none;
    border-radius: 0;
}
#hry {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s;
}

#hry img {
    background: radial-gradient(#ffffff 35%, #ffffff00 90%);
    border-radius: 2rem;
    padding: 0.5rem;

    height: 3.5rem;
    margin-top: 0.5rem;
    margin-left: -7.25rem;
}

#games:hover #hry {
    opacity: 1;
    pointer-events: initial;
}


#content {
    margin-top: 6rem;
    overflow: hidden;
}



#sites {
    position: absolute;
    top: 20rem;
    left: 50%;
    cursor: pointer;
}

#sites img {
    height: 10.5rem;
    margin-left: -8.25rem;
    top: 0;
    position: absolute;
}

#devtext {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s;
}

#sites:hover #devtext {
    opacity: 1;
    pointer-events: initial;
}

#devtext img {
    margin-top: -5.25rem;
    margin-left: -4.75rem;
    height: 4.5rem;
    background: radial-gradient(#ffffff 35%, #ffffff00 90%);
    border-radius: 3rem;
    padding: 0.5rem;
} 

footer {
    text-align: center;
    height: 5rem;
    bottom: 0;
    width: 15rem;
    transform: translateX(-50%);
    margin-left: 50%;
    margin-bottom: 4rem;
    z-index: 100;
}

/* STAR BACKGROUND IMAGE */
.star-bg {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}
#games-pop, #other-pop, #sites-pop {
    position: fixed;
    z-index: 99;
    top: 2rem;
    width: calc(100vw - 4rem);
    min-height: 80dvh;
    height: 30.25rem;
    max-width: 60rem;
    margin-left: 50%;
    transform: translateX(-50%);
    max-height: calc(100dvh - 6rem);
    background-color: white;
    border-radius: 0.75rem;
    border: 5px solid black;
}
#close-game-detail {
    height: 3.5rem;
    width: 3.5rem;
    position: absolute;
    top: 3rem;
    right: 1rem;
    background-image: url(./img/close.png);
    background-size: 3.35rem;
    background-repeat: no-repeat;
    cursor: pointer;
}
.popup {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
}
.popup .close-btn {
    position: absolute;
    top: 3rem;
    right: 1rem;
    z-index: 5;
}
.popup-inner {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);

    background-color: white;
    border: 7px solid black;
    border-radius: 1.25rem;

    padding: 2.5rem 2rem 3rem;
    overflow-y: auto;
    z-index: 99;
}
.blur-bg {
    width: 200vw;
    height: 200dvh;
    position: fixed;
    z-index: 2;
    top: 0;
    left: 0;
    backdrop-filter: blur(2.5px);
    cursor: pointer;
}
#games-modal, #other-modal, #game-detail {
    display: none;
}
#copy p{
    font-size: 12px;
    cursor: default;
}
.blur-bg {
    cursor: pointer;
}
/* === CANONICAL MODAL GEOMETRY (SOURCE OF TRUTH) === */
.modal-shell {
    position: fixed;
    z-index: 99;

    top: 15%;
    left: 50%;
    transform: translateX(-50%);

    width: calc(100vw - 3rem);
    max-width: 60rem;
    height: 40rem;
    max-height: calc(100dvh - 6rem);

    background: white;
    border: 7px solid black;
    border-radius: 1.25rem;

    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
}
#close-game, #close-crown ,#close-other, #close-sites, #close-flash, #close-swtab, #close-utbm, #close-plei {
    height: 3.5rem;
    position: absolute;
    right: 1rem;
    top: 3rem;
    border-radius: 0.37rem;
    width: 3.5rem;
    background-image: url(./img/close.png);
    background-size: 3.35rem;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: scale 0.25s ease-in-out;
}
#sites-splash, #flash-splash {
    margin: 0rem 3rem;
}
#sites-style {
    height: 2.5rem;
    width: calc(100%);
    margin-left: -5px;
    border-radius: 0;
    border: 5px solid black;
    position: relative;
    bottom: 0;
    border-bottom: 0px solid black;
}
.sites-project {
    cursor: pointer;
    text-align: center;
    display: inline-block;
    width: 4rem;
    padding: 1.5rem;

    font-family: "nexa-text", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 0.95rem;
}

.sites-project>div {
    text-align: center;
    width: 5.2rem;
    left: -0.6rem;
    position: relative;
}

.sites-project img {
    height: 4rem;
    width: 4rem;
    margin-bottom: -0.5rem;
}
.flash-project {
    display: inline-block;
}
.flash-project img {
    width: 3.75rem;
    height: auto;
    margin-left: -0.8rem;
    margin-right: 2.5rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
}
.flash-desc {
    margin-left: 2.3rem;
}

#games-pop img {
    width: 4.5rem;
}

#games-container>div {
    display: inline-block;
    padding: 2rem;
    cursor: pointer;
}

#games-container {
    width: 100%;
    text-align: center;
    margin: 0;
    position: absolute;
    top: 25%;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

.web-project {
    margin: 0 4.7rem;
    position: relative;
}
#web-cont {
    min-height: calc(100% - 16.5rem);
}

#games-cont {
    min-height: calc(100% - 34.5rem);
}
#games-cont {
    position: relative;
    top: calc(50% - 1.5rem);
    padding-bottom: 2.75rem;
}

#games-cont .desktop {
    min-width: 27.2rem;
}

.web-vids .desktop {
    width: 90%;
    min-width: 12rem;
    top: 5rem;
    vertical-align: top;
    max-width: calc(100vw - 6rem - 14px);
}
.web-vids .mobil {
    vertical-align: top;
    width: 12%;
    height: auto;
    min-width: 85px;
    top: 5rem;
    left: calc(50% + 2rem);
}

#nahoru-web .mobil {
    min-width: 96.5px;
}
#nahoru-web .desktop {
    min-width: 21.5rem;
}
#trans-web .mobil {
    width: 15.76%;
    min-width: 111px;
}
#nahoru-web .mobil {
    width: 14.02%;
}

#meze23-web .mobil {
    width: 12.06%;
}

.na-web {
    width: 9rem;
    text-align: center;
    height: 3rem;
    border-radius: 2rem;
    border: 5px solid black;
    margin: 1.5rem 0 3rem 0;
    transition: scale 0.25s ease-in-out;
}

.na-web:hover {
    scale: 1.035;
}
.sites-project:hover #project5-img {
    scale: 1.02;
}
a {
    text-decoration: none !important;
    
}
#kalle-web, #nahoru-web, #meze24-web, #meze23-web, #trans-web, #timmy, #vinyl, #knifehall {
    display: none;
}

#kalle-web .desktop {
    min-width: 22.1rem;
}
#kalle-web .mobil {
    min-width: 85.7px;
    width: 12.13%;
}

#meze24-web .mobil {
    min-width: 85.5px;
    width: 12.13%;
}

#meze24-web .desktop {
    min-width: 22.1rem;
}

.na-web p {
    padding-top: 0.125rem;
    font-weight: 700;
    bottom: 0.15rem;
    position: relative;
    color: black;
    font-variation-settings: "opsz" 8, "wght" 800;
}

#games-pop:hover {
}

.close-pop {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    /* Add additional styling as needed */
}

#vinyl-dwnld {
    display: block;
}

#vinyl-dwnld a {
    display: inline-block;
    margin: 1rem 1rem 1rem 0;
}

#vinyl-dwnld .na-web {
    width: 12rem;
}
footer p {
    transition: scale 0.25s ease-in-out;
}
footer p:hover:not(#copy p) {
    scale: 1.15;
}


#other {
    position: absolute;
    top: 14rem;
    left: calc(37vw - 17rem);
    width: 11.75rem;
    height: 12rem;
    padding: 1.5rem;
    cursor: pointer;
}
#other, #sites, #games {
    transition: scale 0.25s ease-out;
}

#other:hover, #sites:hover, #games:hover {
    scale: 1.015;
}
#crown:hover {
    scale: 0.96;
}

#other img {
    position: absolute;
    height: 12rem;
}

#other-words {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s;
}

#other-words img {
    background: radial-gradient(#ffffff 45%, #ffffff00 95%);
    border-radius: 2rem;
    padding: 0.5rem;

    height: 6rem;
    margin-top: -3rem;
    margin-left: 7.25rem;
}

#other:hover #other-words {
    opacity: 1;
    pointer-events: initial;
}
#other-modal {
    width: 100vw;
    height: 50rem;
    position: absolute;
}
#plei-pop embed {
    width: 100%;
    margin-top: 1rem;
    height: 450px;
}
#guide {
    z-index: 9999999;
    position: absolute;
    margin-left: 50%;
    top: 0;
    pointer-events: none;
}
#guide img {
    background: radial-gradient(#fffffff4 45%, #ffffff00 95%);
    position: absolute;
    top: 20rem;
    width: 10rem;
    transform: translateX(-50%);
    pointer-events: none;
}
#other-pop {
    background-image: url(./img/table_empty.png);
    background-size: 100%;
    background-repeat: no-repeat;
    max-width: 700px;
    margin-left: 50%;
    background-color: transparent;
    left: 0;
    border: none;

    position: fixed;
    border-radius: 0.75rem;
    z-index: 99;
    top: 15%;
    transform:translateX(-50%) translateY(-15%);
    width: calc(100vw - 4rem);
    min-height: unset;
    max-height: calc(100dvh - 0rem);
    margin-top: 5rem;
}
#table-cloth {
    transform: translateX(-50%);
    margin-left: 50%;
    width: 100%;
    position: relative;
    max-width: 689px;
    max-height: 470px;
    top: 1px;
    border-radius: 50%;
    height: calc((100vw - 10.8rem - 5px));
    width: min(140vw, 689px, calc(100vw - 4.65rem));
}






.enlargable {
    cursor: pointer;
}

.blur-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2.5px);
    z-index: 999;
    cursor: pointer;
}

/* Fullscreen container */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
}

/* Enlarged image */
.image-overlay img {
    max-width: 90%;
    max-height: 90%;
}

/* Close button */
.image-overlay button {
    position: absolute;
    top: 3rem;
    right: 1rem;

    width: 3.5rem;
    height: 3.5rem;

    background-image: url(./img/close.png);
    background-size: 3.25rem;
    background-repeat: no-repeat;
    background-position: center;

    border: none;
    background-color: transparent;

    cursor: pointer;
    pointer-events: auto;

    transform-origin: center center;
    transition: transform 0.25s ease-in-out;
}

.image-overlay button:hover {
    transform: scale(1.07);
}
.image-overlay .nav-arrow {
    position: absolute;
    top: 50%;
    width: 3.5rem;
    height: 3.5rem;

    background-image: url(./img/arrow.png);
    background-size: 3.25rem;
    background-repeat: no-repeat;
    background-position: center;

    cursor: pointer;
    pointer-events: auto;

    transform-origin: center center;
    transition: transform 0.25s ease-in-out;
}

/* vertical centering ONLY */
.image-overlay .nav-prev,
.image-overlay .nav-next {
    transform: translateY(-50%);
}

.image-overlay .nav-prev {
    left: 1.5rem;
    transform: translateY(-50%) rotate(180deg);
}

.image-overlay .nav-next {
    right: 1.5rem;
}

.image-overlay .nav-arrow:hover {
    transform: translateY(-50%) scale(1.07);
}

.image-overlay .nav-prev:hover {
    transform: translateY(-50%) rotate(180deg) scale(1.07);
}




#swtab {    
    position: absolute;
    margin-top: 5.3%;
    margin-left: 35%;
    width: 25% !important;
    min-width: 94px !important;
    max-width: 175px !important;
}
#utbm {
    position: absolute;
    margin-top: 13.2%;
    width: 30.75% !important;
    margin-left: 9.8%;
}

#crown {
    position: absolute;
    rotate: 5deg;
    margin-top: 16%;
    margin-left: 65.5%;
    width: 23% !important;
    scale: 0.92;
    min-width: 88px !important;
}
#flash {
    position: absolute;
    margin-top: 40%;
    margin-left: 57%;
    width: 17.5% !important;
    min-width: 64px !important;
    max-width: 186px !important;
}
#plei {
    position: absolute;
    margin-top: 40%;
    margin-left: 26%;
    width: 23% !important;
    min-width: 88px !important;
}
.hover-div {
    cursor: pointer;
}
#sites-pop {
    overflow-y: scroll;
}
#games-pop {
    overflow-x: hidden;
    overflow-y: scroll;
}
#sites-modal .popup-inner.wide {
    padding: 0rem 1rem 5rem 2.3rem;
}

#swtab-modal, #crown-modal, #utbm-modal, #plei-modal, #flash-modal, #sites-modal {
    display: none;
}
#swtab {
    position: absolute;   /* ← CRITICAL */
    width: 25%;
    margin-left: 35%;
    margin-top: 5.3%;
}

.hover-swap img {
    position: absolute;
    inset: 0;
}
.album-sub img {
    width: 100%;
    transition:transform 0.25s ease;
}
.album-sub .two-row img, .other-sub .two-row img {
    display: inline-block;
    width: 49.27%;
    height: auto;
    margin: 0;
}
.album-sub .row {
    width: 100%;
}
.other-project .row img{
    width: 100%;
}
#large-render {
    width: 50%;
    margin-left: 25%;
}
.album-text {
    margin: 3rem 1rem 3rem 2.3rem;
}
#d-flash, #foto-flash {
    display: none;
}
#close-game,
#close-game-detail,
#close-sites,
#close-other,
#close-swtab,
#close-utbm,
#close-flash,
#close-plei,
#close-crown {
    transition: scale 0.25s ease-in-out;
}

#close-game:hover,
#close-game-detail:hover,
#close-sites:hover,
#close-other:hover,
#close-swtab:hover,
#close-utbm:hover,
#close-flash:hover,
#close-plei:hover,
#close-crown:hover {
    scale: 1.07;
}
.menu {
    width: 240px;
    text-align: center;
}

.album-sub #close-swtab,
.album-sub #close-utbm,
.album-sub #close-crown,
.other-sub #close-plei,
.other-sub #close-flash,
#sites-modal #close-sites,
#game-detail #close-game-detail {
    position: sticky;
    top: 3rem;
    margin-left: auto;
    z-index: 20;
    margin-bottom: -3.5rem;

    height: 3.5rem;
    width: 3.5rem;
}
#close-game {
    right: 0rem;
    top: 5rem;
    z-index: 1000;
    pointer-events: initial;
}
/* STAR ICON + LABEL */
.star-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* icon wrapper keeps hover swap intact */
.star-icon {
    position: relative;
    width: 64px;
    height: 64px;
}

/* label */
.star-label {
    font-size: 0.85rem;
    color: black;
    padding-top: 4.25rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}
.album-sub,
.other-sub {
    top: 0 !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.35) transparent;
}
.image-overlay .dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    pointer-events: none;
}

.image-overlay .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.25);
}
.hover-swap {
    position: absolute;
    display: inline-block;
    cursor: pointer;
}

.hover-swap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;
    transition:
        opacity 0s linear,
        transform 0.25s ease;
    transform-origin: center center;
}

/* default */
.hover-swap .hover-og {
    opacity: 1;
}

/* hover image hidden initially */
.hover-swap .hover-hover {
    opacity: 0;
}

/* hover behaviour */
.hover-swap:hover .hover-og {
    opacity: 0;
}

.hover-swap:hover .hover-hover {
    opacity: 1;
    transform: scale(1.08);
}

/* OPTIONAL — micro polish */
.hover-swap:hover {
    z-index: 2;
}
.image-overlay .dot.active {
    background-color: rgba(0, 0, 0, 0.75);
}
/* Styling for each <p> element as headings */
.menu p {
    padding: 4px;
    margin: 0;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
}

/* Hide the subheadings by default */
.subheadings {
    max-height: 0;
    overflow: hidden;
    margin: 0.5rem 0 0.5rem 0;
    padding: 0;
    list-style: none;
    transition: max-height 0.25s ease-out;
}

.subheadings li {
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: scale 0.25s ease-in-out;
}

.subheadings li:hover {
    scale: 1.1;
}

/* Active class to expand subheadings */
.menu-heading.active + .subheadings {
    max-height: 180px; /* Set a height large enough to fit all items */
}

.bang img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-55%) translateY(-53%);
    max-width: 40rem;
    width: 80vw !important;
    pointer-events: none;
}
/* =========================================================
   FINAL CANONICAL MODAL GEOMETRY — ALL MODALS
   (games, webdev, albums, flash, plei)
   ========================================================= */

#game-detail,
#sites-modal .popup-inner.wide,
.album-sub,
.other-sub,
#flash-pop,
#plei-pop {
    position: fixed !important;
    top: 15% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;

    width: calc(100vw - 3rem) !important;
    max-width: 60rem !important;

    height: 40rem !important;
    max-height: calc(100dvh - 6rem) !important;

    background: white !important;
    border: 7px solid black !important;
    border-radius: 1.25rem !important;

    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;

    z-index: 99 !important;
}

/* =========================================================
   CONTENT MARGINS — MATCH ALBUM STYLE EXACTLY
   ========================================================= */

#game-detail .game-detail-content,
.album-text,
.flash-desc {
    margin: 3rem 1rem 3rem 2.3rem !important;
}

/* =========================================================
   CLOSE BUTTON — IDENTICAL POSITION EVERYWHERE
   ========================================================= */

#game-detail #close-game-detail,
#sites-modal #close-sites,
#flash-pop #close-flash,
#plei-pop #close-plei,
.album-sub > div[id^="close"],
.other-sub > div[id^="close"] {
    position: sticky !important;
    top: 3rem !important;
    margin-left: auto !important;

    width: 3.5rem;
    height: 3.5rem;

    z-index: 20 !important;
}

/* =========================================================
   STAR MENU — NEVER AFFECT DETAIL LAYOUT
   ========================================================= */

#games-star-wrap {
    position: fixed !important;
    background: transparent !important;
    border: none !important;
}

#games-modal.detail-open #games-star-wrap {
    display: none !important;
}

/* =========================================================
   UNIFIED SCROLLBAR — ALL MODALS
   ========================================================= */

#game-detail,
#sites-modal .popup-inner,
.album-sub,
.other-sub,
#flash-pop,
#plei-pop {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.35) transparent;
}

#game-detail::-webkit-scrollbar,
#sites-modal .popup-inner::-webkit-scrollbar,
.album-sub::-webkit-scrollbar,
.other-sub::-webkit-scrollbar,
#flash-pop::-webkit-scrollbar,
#plei-pop::-webkit-scrollbar {
    width: 8px;
}

#game-detail::-webkit-scrollbar-track,
#sites-modal .popup-inner::-webkit-scrollbar-track,
.album-sub::-webkit-scrollbar-track,
.other-sub::-webkit-scrollbar-track,
#flash-pop::-webkit-scrollbar-track,
#plei-pop::-webkit-scrollbar-track {
    background: transparent;
}

#game-detail::-webkit-scrollbar-thumb,
#sites-modal .popup-inner::-webkit-scrollbar-thumb,
.album-sub::-webkit-scrollbar-thumb,
.other-sub::-webkit-scrollbar-thumb,
#flash-pop::-webkit-scrollbar-thumb,
#plei-pop::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.35);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
}

#game-detail::-webkit-scrollbar-thumb:hover,
#sites-modal .popup-inner::-webkit-scrollbar-thumb:hover,
.album-sub::-webkit-scrollbar-thumb:hover,
.other-sub::-webkit-scrollbar-thumb:hover,
#flash-pop::-webkit-scrollbar-thumb:hover,
#plei-pop::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0,0,0,0.5);
}
    .album-sub.modal-shell, #plei-pop, #flash-pop {
        top: 0vh !important;
    }
@media only screen and (max-width: 42em) {
    #games-star-wrap {
        left: unset;
        transform: unset;
        width: 100%;
    }
    .album-text h2, .web-desc h2 {
        margin-right: 5.5rem;
    }
    .logo-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        column-gap: 2rem;
        row-gap: 1.5rem;
        align-items: center;
        margin-right: 2rem;
    }

    /* actual logo */
    .logo-grid img {
        height: 26px;
        max-width: 100px;
        object-fit: contain;
    }
    #close-sites {
        right: -1rem;
    }
    .star-bg {
        width: 140vw;
        max-width: 609px;
        min-width: 37.35rem;
        margin-left: 50%;
        transform: translateX(-50%);
    }

    #table-cloth, #game-star {
        min-width: 37.35rem;
        min-height: 31.1rem;
        left: 50%;
        transform: translateX(-50%);
        width: fit-content;
    }
    #utbm {
        margin-top: 13%;
        margin-left: 10.5%;
    }

    #other-pop:not(.album-sub, .other-sub) {
        width: 140vw;
        max-width: 609px;
    }
    #bang-container {
        width: 100%;
    }

    .bang img {
        position: absolute;
        top: 50%;
        left: calc((100vw - 4rem) / 2);
        transform: translateX(-50%) translateY(-50%);
        max-width: 40rem;
        width: 80vw !important;
        margin-top: -6.25rem;
        min-width: 35rem !important;
        pointer-events: none;
    }
    #games-container > div {
        margin: -0.30rem;
    }

    #close-sites:hover {
        scale: 1.08;
    }

    header {
        width: unset;
    }

    .sites-project {
        margin-top: 0.25rem;
        padding: 0.5rem 0.5rem 0.5rem 0.5rem;
        scale: 0.85;
    }
    #game-star {
        width: 100vw;
        height: 20.1rem;
        min-height: unset;
    }
    #games-container>div {
        padding: 0.25rem;
        scale: 0.8;
    }

    #games-cont .desktop {
        min-width: unset;
    }
    
    #vinyl-dwnld a {
        margin: -1rem 0rem -5.5rem 0rem;
    }
    .web-vids {
        text-align: left;
        margin-left: -2.33rem;
        width: unset;
    }
    #close-game {
        right: 1rem;
    }
    .album-text, .game-detail-content {
        margin: 3rem 1rem 3rem 1.5rem;
    }
    .flash-desc{
        margin-left: 1.5rem;
    }
    #sites-modal .popup-inner.wide {
        padding: 0rem 1rem 5rem 1.5rem;
    }
    .instrukce {
        text-align: left;
        margin-left: 0;
        margin-top: 2.3rem;
    }

    .na-web {
        width: 9rem;
        text-align: center;
        height: 3rem;
        border-radius: 2rem;
        border: 5px solid black;
        margin: 3rem 0;
    }
    .web-project {
        margin-left: 2.3rem;
    }

    .web-project .desktop, .web-vids .mobil {
        width: calc(100vw - 4rem);
        min-width: unset;
    }

    .web-vids .mobil {
        margin-left: auto;
        margin-top: 2.3rem;
        max-width: 18rem;
        width: calc(100%) !important;

    }

    #sites-splash, #flash-splash {
        margin: 0.5rem 1rem;
    }

    #flash1-img, #flash2-img {
        margin-left: 1rem;
        margin-right: -0.00rem;
    }

    #other {
        top: 17.4rem;
        left: calc(22vw - 8.25rem);
    }

    #content {
        margin-top: 0rem;
    }

    #other-pop {
        height: calc(140vw / 1.1933333333);
        max-height: 546px;
        top: 22%;
        overflow: unset;
    }

    #games-star-wrap {
        top: 17%;
    }
    .star-item[data-game="timmy"] {
    top: 45%;
    }

    .star-item[data-game="vinyl"] {
    top: 45%;
    }

    .star-item[data-game="knifehall"] {
    top: 45%;
    }

    header {
        position: relative;
        display: block;
        margin-top: 2rem;
    }

    .flex-items {
        scale: 1.1;
        height: 4.5rem;
        margin-left: 50%;
        transform: translateX(-50%);
    }
      
    .flex-items:nth-child(2) {
        min-width: 7.5rem;
        width: 7.5rem;
    }
      
    .flex-items:nth-child(3) {
        margin-top: 4rem;
        pointer-events: none;
    }

    .icon {
        height: 9rem !important;
        width: auto;
    }

    #illustrations {
        margin-top: -5rem;
        height: 46rem;
    }

    #floor {
        width: 3960px;
        top: 12.75rem;
    }
    #games {
        margin-top: 3rem;
        margin-right: 4rem;
    }
    
    .window {
        top: 12rem;
    }
    #sites {
        scale: 1;
        top: 29.25rem;
    }
    #w0 {
        left: calc(35vw - 5.5rem);
    }
    
    #w1 {
        right: calc(35vw - 5.5rem);
    }
    #devtext {
        pointer-events: none;
    }
    #kalle-web .desktop, #meze24-web .desktop, #nahoru-web .desktop, #meze23-web .desktop{
        width: 101%;
        margin-left: -0.5%;
        min-width: unset;
    }

    #crown {
        margin-top: 18%;
        margin-left: 61.5%;
    }

    #close-other{
        position: fixed;
        top: 0rem;
        left: calc(50% + 50vw - 5.15rem);
        overflow-x: visible !important;
    }

    #guide img {
        top: 29.5rem;
    }

}