/* TITLE SCREEN */
body.title-screen {
    margin: 0;
    background: #000;
}

#titleContainer {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* #titleCanvas {
    width: 100%;
    height: 100%;
} */

#titleContainer,
#characterSelectContainer,
#levelSelectContainer,
#highScoresContainer {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#titleCanvas,
#characterSelectCanvas,
#levelSelectCanvas,
#highScoresCanvas {
    width: min(100vw, 239vh);
    aspect-ratio: 2390 / 1000;
    max-height: 100vh;
}

#titleCanvas canvas,
#characterSelectCanvas canvas,
#levelSelectCanvas canvas,
#highScoresCanvas canvas,
#gameCanvas canvas {
    width: 100%;
    height: 100%;
    display: block;
}





/* ABOUT PAGE */
body.about-screen {
    margin: 0;
    background: #000;
    overflow: hidden;
    font-family: Arial, sans-serif;
    width: 100vw;
    height: 100vh;
}

#aboutScaleWrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#aboutContainer {
    width: 2390px;
    height: 1000px;
    background: #1a0702;
    color: #f0d0c7;
    box-sizing: border-box;
    padding: 70px 190px 50px;
    position: relative;
    transform-origin: center center;
}

/* HEADER */
.about-header {
    margin-bottom: 30px; /* tweak this */
}

.about-header h1 {
    margin: 0;
    color: #c28155;
    font-size: 72px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.about-header h1 {
    margin: 0;
    color: #c28155;
    font-size: 72px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.title-line,
.footer-line {
    flex: 1;
    height: 3px;
    background: rgba(194, 129, 85, 0.6);
}

.tm {
    font-size: 0.4em;
    vertical-align: super;
    margin-left: 2px;
    letter-spacing: 0;
}

/* SLIDER */
#aboutViewport {
    overflow: hidden;
    width: 100%;
    height: 760px;
}

#aboutTrack {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.45s ease;
}

.about-content {
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical centering */
    height: 100%; /* or a fixed height matching your layout */
}

.about-page {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 20px 100px 60px;
    font-size: 25px;
    line-height: 1.35;
    text-align: justify;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.about-page.is-active {
    opacity: 1;
}

.about-page h2 {
    color: #ff8f93;
    font-size: 38px;
    margin: 0 0 24px;
    text-align: center;
    letter-spacing: 1px;
    column-span: all;
}

.about-page p {
    margin: 0 0 18px;
}

.text-columns {
    column-gap: 80px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: none;
    /* column-fill: auto; */
    /* height: 525px; */
}

.text-columns p {
    margin: 0 0 14px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: none;
}

.text-columns.one-col {
    columns: 1;
    column-count: 1;
    max-width: 617px;      /* adjust to taste */
    margin-left: auto;
    margin-right: auto;
}

.text-columns.two-col {
    column-count: 2;
    column-gap: 80px;
    max-width: 1314px;
    margin: 0 auto; /* center it */
}

.text-columns.three-col {
    column-count: 3;
}

.text-columns p {
    margin: 0 0 14px;
}

/* ensure titles don't get split */
.about-page h2 {
    column-span: all;
}




/* CONTRIBUTOR CALLS */
.contributor-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1314px;
    margin: 0 auto;
    align-items: start;
}

.contributor-call p {
    margin: 0 0 14px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: none;
}




/* CREDITS */
.staff-list {
    margin-top: 0;
    text-align: center;
}

.staff-list dt {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0;
}

.staff-list dt:not(:first-of-type) {
    margin-top: 1.5rem;
}

.staff-list dd {
    margin-left: 0;
}

.staff-entry {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-top: 1.5rem;
}





/* STAT METERS */
.stat-meter {
    margin-top: 34px;
}

.split-meter-labels,
.split-meter-values {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #f0d0c7;
    font-size: 22px;
    font-weight: bold;
}


.split-meter-labels {
    margin-bottom: 10px;
}

.split-meter-values {
    margin-top: 8px;
}

.split-track {
    height: 10px;
    /* border: 2px solid #c28155; */
    background: #8febff; /* ChatGPT / AI portion */
    overflow: hidden;
}

.hand-code-fill {
    height: 100%;
    background: #ff8f93; /* hand-made / human portion */
}




/* SUPPORT */
.support-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.support-links a {
    text-decoration: none;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.support-links a:hover {
    opacity: 0.7;
}

/* FOOTER */
.about-footer {
    position: absolute;
    left: 190px;
    right: 190px;
    bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    color: #ffe9ab;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
}

.about-footer span {
    white-space: nowrap;
}

.about-footer::before {
    content: "";
    flex: 1;
    height: 3px;
    background: rgba(194, 129, 85, 0.6);
}

.about-footer .footer-line {
    flex: 1;
}





/* CHARACTER SELECT PAGE STYLES */
body.character-select-screen {
    margin: 0;
    background: #1a0702;
    overflow: hidden;
}

#characterSelectContainer {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}



/* LEVEL SELECT PAGE STYLES */
body.level-select-screen {
    margin: 0;
    background: #1a0702;
    overflow: hidden;
}

#levelSelectContainer {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}



/* SCENES */

body.game-screen {
    margin: 0;
    background: #000;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameContainer {
    width: min(100vw, 206.03vh);
    height: min(100vh, 48.54vw);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

#sceneContainer {
    width: 100%;
    height: calc(100% * 1000 / 1160);
    position: relative;
    overflow: hidden;
}

#hudPanel {
    width: 100%;
    height: calc(100% * 160 / 1160);
}



#hudCanvas {
    width: 100%;
    height: 100%;
}

#hudCanvas canvas {
    width: 100%;
    height: 100%;
    display: block;
}


#gameCanvas,
#interiorModal,
#restroomDoorModal,
#restroomInteriorModal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* border: solid 1px dodgerblue; */
    transition: opacity 0.5s ease;
    /* flex: 1;
    background-color: #1099bb; */
}


.scene-hidden {
    display: none;
    pointer-events: none;
}

.scene-visible {
    display: block;
    pointer-events: auto;
}



/* PASTED FROM CHAT */
/* LOADING SCREEN */
#loadingScreen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #1a0702;
    color: #f0d0c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    transition: opacity 300ms ease;
}

.loading-card {
    text-align: center;
    padding: 2rem;
}

.loading-card h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.loading-card p {
    opacity: 0.8;
}



/* LOCATION CSS */
.locations-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem;
}

.location-card {
    border: 2px solid black;
    padding: 1rem;
    width: 200px;
    box-sizing: border-box;
}

.location-card h2 {
    margin: 0 0 0.5rem;
}

.location-card p {
    margin: 0.3rem 0;
}

/* CONTAINER FOR ADD-CHARACTER BUTTONS */
#add-character-buttons {
    text-align: center;
    margin: 20px 0;
}




/* HIGH SCORE BITS */
body.high-scores-screen {
    margin: 0;
    background: #000;
    overflow: hidden;
}

#highScoresContainer {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* #highScoresCanvas {
    width: 100%;
    height: 100%;
} */


#interiorModal h2 {
    margin-top: 0;
}

#interiorModal button {
    margin-top: 20px;
    padding: 10px 16px;
    font-size: 16px;
}


.hint-message {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translate(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    opacity: 1;
    transition: opacity 1s ease;
    pointer-events: none;
}

.hint-message.fade-out {
    opacity: 0;
}

.restroom-door {
    width: 60px;
    height: 100px;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border-radius: 4px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.restroom-door:hover {
    background-color: #5dade2;
    cursor: pointer;
    box-shadow: 0 0 5px #3498db;
}

.restroom-door-visual {
    width: 80px;
    height: 120px;
    background-color: #3498db;
    color: white;
    font-weight: bold;
    font-size: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    margin: 10px auto;
    position: relative;
    transition: background-color 0.3s ease;
}

.npc-exit {
    width: 30px;
    height: 30px;
    background-color: #9b59b6;
    border-radius: 4px;
    position: absolute;
    left: 25px;
    top: -35px;
    z-index: 10;
    animation: npcExitAnimation 2s forwards;
}

@keyframes npcExitAnimation {
    0% { transform: translate(0); opacity: 1; }
    100% { transform: translate(-100px); opacity: 0; }
}





/* RESTROOM DOOR MODAL */
.go-to-restroom-button {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #6c5ce7;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.go-to-restroom-button:hover {
    background-color: #a29bfe;
}


/* NPCs */
.restroom-line {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.person-in-line {
    width: 20px;
    height: 20px;
    background-color: #9b59b6;
    border-radius: 4px;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

.employee-helper {
    width: 40px;
    height: 40px;
    background-color: #d7bde2;
    border: 2px solid #9b59b6;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    margin-top: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.employee-helper:hover {
    background-color: #bb8fce;
    box-shadow: 0 0 5px #9b59b6;
}

.employee-message {
    margin-top: 8px;
    font-style: italic;
    font-size: 14px;
}

.robber-placeholder {
    width: 40px;
    height: 40px;
    background-color: darkred;
    border: 2px solid black;
    margin-top: 10px;
    display: inline-block;
    text-align: center;
    font-size: 18px;
    color: white;
    font-weight: bold;
    border-radius: 4px;
}

.intercept-message {
    color: #5a5a5a;
}


#restroomLineVisuals {
    margin: 10px 0;
}

/* .out-of-order-sign {
    background-color: #e74c3c;
    color: white;
    font-weight: bold;
    padding: 10px 16px;
    margin-top: 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
} */


#restroomInteriorModal button {
    margin: 10px;
}

.platform-button {
    margin-top: 10px;
    padding: 8px 16px;
    font-size:  14px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.all-complete-banner {
    text-align: center;
    background-color: #fffae0;
    color: #333;
    border: 2px solid #f1c40f;
    padding: 20px;
    margin: 30px auto;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    max-width: 600px;
}

.friend-popup {
    width: 100px;
    height: 100px;
    background-color: rgba(225, 255, 255, 0.95);
    border: 3px solid #9b59b6;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #333;
    text-align: center;
    z-index: 10010;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    animation: fadeAndFloat 2.5s forwards;
}

@keyframes fadeAndFloat {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -60%) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -70%) scale(0.9);
    }
}


/* CONTROL PANEL WITH FLIPPABLE BUTTONS */
/* #controlPanel {
    width: 250px;
    background-color: #222;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
} */

#meters {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

#meters div {
    flex: 1;
    margin-bottom: 0;
}

.direction-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.keypad-row {
    display: flex;
    /* display: none; */
    /* flex-direction: row; */
    justify-content: center;
    /* align-items: center; */
    gap: 10px;
}

#codeInput,
#submitCodeButton {
    flex: 1;
    height: 25px;
}

.flip-button {
    perspective: 800px;
    border: none;
    background: none;
    padding: 0;
    width: 100%;
    height: 25px;
    margin: 5px 0;
    cursor: pointer;
}

.flip-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-button[data-active="false"] .flip-inner {
    transform: rotateX(180deg);
}

.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #444;
    color: #fff;
    font-weight: bold;
    border: 2px solid #333;
}

.flip-back {
    background: #222;
    transform: rotateX(180deg);
    color: transparent;
    pointer-events: none;
}

#keypadWrapper [data-active="false"] .keypad-front {
    visibility: hidden;
}

#keypadWrapper .flip-front {
    justify-content: space-between;
}

#keypadWrapper .flip-front > input,
#keypadWrapper .flip-front > .codeSubmitButton {
    flex: 1 1 0;
    min-width: 0;
}

#keypadWrapper .flip-front {
    gap: 10px;
}

.codeSubmitButton {
    color: #fff;
    font-weight: bold;
    background: transparent;
    border: none;
}