
/* -------------------------------------------------------- */
/* FONTS                                                    */
/* -------------------------------------------------------- */
@font-face {
    font-family: "Jacquard24";
    src: url("/fonts/Jacquard24.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "IMFell";
    src: url("/fonts/IMFellEnglishSC.ttf") format("truetype");
    font-display: swap;
}

/* =========================================
   1. MAIN LAYOUT & BODY
   ========================================= */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    /* Black background from new style */
    color: #fff;
    font-family: sans-serif;
    overflow: hidden;
    /* Prevents scrolling behind the flipbook */
}

/* =========================================
   2. SCREEN SPLIT (Fixed Positioning)
   ========================================= */
.left-half {
    position: fixed;
    left: 0;
    top: 0;
    width: 50%;
    height: 100vh;
}

.right-half {
    /* Center the flipbook in the viewport so it's always accessible */
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 4vh 4vw;
    pointer-events: auto;
}

/* =========================================
   3. TURN.JS CORE BOOK SETUP 
   ========================================= */
#flipbook {
    /* JS sets exact width/height; prevent CSS from scaling it down */
    max-width: none;
    max-height: none;
    box-sizing: content-box;
    --flip-scale: 0.95;
    transform-origin: center center;
    transform: scale(var(--flip-scale));
}

/* turn.js wrappers — make transforms originate from page spine (center vertical) */
.turn-page-wrapper {
    transform-origin: center center;
}

.turn-page-wrapper.left {
    transform-origin: left center;
}

.turn-page-wrapper.right {
    transform-origin: right center;
}

/* =========================================
   4. PAGE STRUCTURE (Merged)
   ========================================= */
.page-container {
    /* Layout rules from your new CSS */
    display: block;
    overflow: hidden;
    box-sizing: border-box;
    background-color: white;
    /* Still required for hard page shadows */

    /* The "Invisible Cage" (CRUCIAL FOR THE GIF BUTTONS!) */
    position: relative;
    width: 100%;
    height: 100%;
}

.page-background {
    width: 100%;
    height: 100%;
    display: block;

    /* From your new CSS: Keeps images whole without cropping */
    object-fit: contain;
    object-position: center center;
}

.hard .page-background {
    object-fit: contain;
}

/* =========================================
   5. NEOCITIES GIF BUTTONS (The 10 Buttons)
   ========================================= */

/* The Base Class (Shared by all GIFs) */
.clique-link {
    position: absolute !important;
    z-index: 9999 !important;
    /* Forces the GIF over the Turn.js 3D layers */
    display: block !important;

    /* Pushes the GIF 1 pixel forward so it doesn't get hidden! */
    transform: translateZ(1px) !important;
    -webkit-transform: translateZ(1px) !important;

    transition: transform 0.2s ease-in-out;
}

.clique-link:hover {
    transform: scale(1.1) translateZ(1px) !important;
    -webkit-transform: scale(1.1) translateZ(1px) !important;
}

.clique-link img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    border: none;
}

/* --- The 10 Unique Positions --- */

/* Left side group */
.pos-1 {
    left: 18.38% !important;
    top: 55.68% !important;
    width: 27.62% !important;
    height: 6.25% !important;
}

/* 1. AfraidOfEncounters */
.pos-2 {
    left: 56.9% !important;
    top: 45% !important;
    width: 27.62% !important;
    height: 6.25% !important;
}

/* 2. PrismaticWasteland */
.pos-3 {
    left: 19.35% !important;
    top: 45% !important;
    width: 27.62% !important;
    height: 6.25% !important;
}

/* Base 88x31 Button Sizes (17.1% width, 3.87% height) */
.pos-4 {
    top: 35% !important;
    left: 5% !important;
    width: 17.1% !important;
    height: 3.87% !important;
}

.pos-5 {
    top: 45% !important;
    left: 5% !important;
    width: 17.1% !important;
    height: 3.87% !important;
}

/* Right side group */
.pos-6 {
    top: 5% !important;
    right: 5% !important;
    width: 17.1% !important;
    height: 3.87% !important;
}

.pos-7 {
    top: 15% !important;
    right: 5% !important;
    width: 17.1% !important;
    height: 3.87% !important;
}

.pos-8 {
    top: 25% !important;
    right: 5% !important;
    width: 17.1% !important;
    height: 3.87% !important;
}

.pos-9 {
    top: 35% !important;
    right: 5% !important;
    width: 17.1% !important;
    height: 3.87% !important;
}

.pos-10 {
    bottom: 5% !important;
    right: 5% !important;
    width: 17.1% !important;
    height: 3.87% !important;
}

/* =========================================
   MOBILE RESPONSIVENESS & ROTATION LOCK
   ========================================= */

/* By default, hide the rotation overlay on desktop/landscape */
#rotate-device-overlay {
    display: none;
}

/* If the screen is a phone AND held vertically... */
@media screen and (max-width: 800px) and (orientation: portrait) {

    /* 1. Show the warning screen */
    #rotate-device-overlay {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #101010;
        /* Match your dark background */
        color: #b21c0e;
        /* Match your crimson accent */
        font-family: "IMFell", serif;
        /* Or Jacquard24 */
        font-size: 1.5rem;
        text-align: center;
        z-index: 99999;
        /* Forces it above everything else */
    }

    /* 2. Completely hide the book so Turn.js doesn't try to calculate weird math */
    .right-half {
        display: none !important;
    }
}