html {
    scroll-behavior: smooth;
}

.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main scroll area */
.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}




/* ---------- LANDING PAGE AREA ---------- */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Container */
.landing-container {
    position: fixed;
    flex-direction: column;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/landing/landing-bg.png') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Stays on top of everything */
    transition: opacity 0.8s ease, visibility 0.8s;
}

.landing-content {
    text-align: center;
}

/* Title Styling */
.landing-title {
    font-family: 'Caveat Brush', cursive;
    color: #FDF3CF;
    font-weight: normal;
    font-size: 4rem; 
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    margin-top: 10px;
    margin-bottom: 30px;
}

/* Pizza Image & Float Animation */
.floating-pizza {
    width: 200px; 
    animation: floatAnim 2.5s ease-in-out infinite;
}

@keyframes floatAnim {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Press to Start */
.press-to-start {
    background: #FDF3CF;
    margin: 15px auto 0 auto; /* Centers horizontally with auto margins */
    color: #9E4F19;
    font-family: "Caveat Brush", cursive;
    font-size: 24px;
    padding: 14px 50px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
    transition: transform 0.25s ease, background 0.25s ease;
}

.press-to-start:hover {
    transform: scale(1.08);
    background: #FFE9B5;
}

/* Class to hide the landing page */
.fade-out {
    opacity: 0;
    visibility: hidden;
}




/* MENU BUTTON */
.menu-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s ease-out;
}

.menu-btn:hover {
    transform: scale(1.2);
}

.menu-btn img {
    width: 100%;
}

/* MENU PANEL */
.menu-panel {
    position: fixed;
    top: 20px;
    right: 80px;
    width: 225px;
    padding: 65px 30px 30px 30px;
    background-image: url("assets/scene1/menu-canvas.png");
    background-size: cover;
    background-repeat: no-repeat;

    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) rotate(5deg);
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out, transform 0.3s ease-out;
    
    z-index: 999;

    font-family: "Caveat Brush", sans-serif;
}

.menu-panel.open {
    opacity: 1;
    visibility: visible;
    /* Final state: full size and straight */
    transform: scale(1) rotate(0deg); 
}

/* MENU TEXT ITEMS */
.menu-item {
    padding: 1px 0;
    padding-left: 3px;
    font-size: 15px;
    cursor: pointer;
    color: #9E4F19;
}

.menu-item:hover {
    color: #E4281D; /* red hover */
}


/* ---------- SOUND BUTTON ---------- */
.sound-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 999;
    cursor: pointer;
}

.sound-btn img {
    width: 48px;
    transition: transform 0.25s ease;
}

.sound-btn:hover img {
    transform: scale(1.1);
}




/* ---------- SCENE 1 AREA ---------- */
#scene1 {
    position: relative;
    height: 100%;
    width: 100%;
    padding-top: 1px;
    background-color: #9AD3D1;
    scroll-snap-align: start;
}

/* TEXT */
.sub-title {
    font-family: 'Caveat Brush', sans-serif;
    text-align: center;
    margin-top: 50px;
    font-size: 30px;
    color: #E2271B;
    letter-spacing: 1px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
    font-weight: normal;
}

.main-title {
    font-family: 'Caveat Brush', sans-serif;
    text-align: center;
    margin-top: 5px;
    font-size: 60px;
    color: #FDF3CF;
    letter-spacing: 6px;
    text-shadow: 6px 6px 8px rgba(0, 0, 0, 25%);
    font-weight: normal;
    position: relative;
    z-index: 5;
}

/* CLOUDS */
.cloud {
    position: absolute;
    width: 230px;
    animation: float 2s ease-in-out infinite;
    z-index: 1; 
}

.cloud-left2 {
    top: 100px;
    left: 0px;
}

.cloud-right2 {
    top: 40px;
    right: 0px;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
    100% { transform: translateY(0px); }
}

/* HOUSE */
.house-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0px;
}

#house3-img {
    width: auto;
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    cursor: url("assets/scene1/brown-cursor.png"), auto; /* custom cursor for house only */
}


/* CONNECTOR */
.newconnector {
    position: relative; 
    bottom: 0;
    width: 100%;
    z-index: 10;
    margin-top: 0;
    margin-bottom: 0;
}




/* ---------- SCENE 2 AREA ---------- */
#scene2 {
    background-color: #FDF3CF; 
    width: 100%;
    min-height: 120vh; 
    padding: 50px 20px; /* Add some padding so text isn't right on the edge */
    position: relative; 
    margin-top: -120px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.scene2-text-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
}

.scene2-text {
    margin-top: 200px; /* adjust higher/lower as you like */
}

.scene2-text h1,
.scene2-text h2,
.scene2-text p {
    font-family: "Caveat Brush", cursive;
    margin: 10px 0;
}

/* dot size */
.dots {
    font-size: 50px;
}

#scene2 h1 {
    font-size: 80px;
    font-weight: normal;
}

#scene2 h2 {
    font-size: 50px;
    font-weight: normal;
}

.scroll-float {
  overflow: hidden;
  scroll-snap-align: start;
}

.scroll-float-text {
  display: inline-block;
  font-size: clamp(1.6rem, 8vw, 10rem);
  font-weight: 900;
  text-align: center;
  line-height: 1.5;
  transform: translateY(30px); /* more drift */
  animation: float 4s ease-in-out infinite alternate;

}

.char {
    display: inline-block;
    will-change: transform, opacity;
}


/* Scene 2 Full GIF */
.scene2-gif-wrapper {
    margin-top: 50vh;
    width: 100%;
    height: 100vh;               
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    scroll-snap-align: start;
}

#scene2Gif {
    width: 750px;
    height: auto;
    object-fit: cover;
}



/* ---------- SCENE 3 AREA ---------- */
#scene3 {
  height: 230vh;
  width: 100%;
  background: #FDF3CF;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 90px;
  position: relative;
}

.scene3-text {
    text-align: center;
    margin-top: 200px;
}

.scene3-text h1,
.scene3-text h2,
.scene3-text p {
    font-family: "Caveat Brush", cursive;
    margin: 10px 0;
}

/* dot size */
.dots {
    font-size: 50px;
}

#scene3 h1 {
    font-size: 80px;
    font-weight: normal;
}

#scene3 h2 {
    font-size: 50px;
    font-weight: normal;
}


/* Dough board area */
.dough-area {
    position: relative;
    margin-top: 40vh;
    margin-bottom: 10vh;
    width: 750px;
    height: 750px;
    justify-content: center;
    align-items: center;
}

#doughBoard {
    width: 100%;
    pointer-events: auto;
    cursor: none; /* Hide default cursor ONLY inside this box */
}

#doughBoard.shake {
  animation: shake 0.30s ease;
}

@keyframes shake {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-4px); }
  50%  { transform: translateX(4px); }
  75%  { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

#rollerCursor {
    width: 300px;
    position: absolute;
    pointer-events: none; /* cursor follow only */
    display: none;
    transform: translate(-50%, -50%);
}

#oopsImg {
  position: absolute;
  width: 150px;            /* adjust size */
  opacity: 0;             /* hidden by default */
  pointer-events: none;
  transition: opacity 0.25s ease;

  /* Default position (adjust later if needed) */
  top: 65%;               
  left: 65%;              
  transform: translateX(-50%);
}

/* Connector */
.connector-scene3 {
    width: 100%;
    margin-top: 40px;
    z-index: 10;
}



/* ---------- SCENE 4 AREA ---------- */
/* ---------- PART 1 ---------- */
#scene4 {
    background: #FFBC51;
    width: 100%;
    height: 250vh;
    position: relative;
    justify-content: center;
    align-items: center;
    padding-top: 90px;
}

/* Text wrapper */
.scene4-text {
    text-align: center;
    margin-top: 250px;
}

.scene4-text h1,
.scene4-text h2,
.scene4-text p {
    font-family: "Caveat Brush", cursive;
    font-weight: normal;
    margin: 20px 0;
}

#scene4 h1 {
    font-size: 90px;
    font-weight: normal;
    line-height: 0.9;

}

#scene4 h2 {
    font-size: 50px;
    font-weight: normal;
}


/* Pick your sauce text */
.pick-sauce {
    text-align: center;
    font-family: "Caveat Brush", cursive;
    font-weight: normal;
    font-size: 30px;
    margin-top: 60vh;
}

/* Sauce wrapper */
.sauce-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    margin-top: 30px;
    margin-bottom: 10vh;
}

/* Sauce images */
.sauce-img {
    width: 220px;
    cursor: pointer;
    transition: transform 0.25s ease;
}

/* Hover scale */
.sauce-img:hover {
    transform: scale(1.08);
}

/* Connector image */
.connector-scene4 {
    width: 100%;
    position: relative;
    display: block;
    margin-top: 80px;
    z-index: 20;
}

/* ---------- PART 2 ---------- */
.scene4-result {
    width: 100%;
    min-height: 100vh;
    background: #FDF3CF;
    display: flex;
    align-items: flex-start; /* top alignment */
    justify-content: center; /* left alignment */
    padding: 35vh 50px 50px 50px; /* push down and add left spacing */
}

.result-container {
    display: flex;
    align-items: center;
    gap: 60px;
    opacity: 1;
    transition: opacity 0.8s ease, transform 0.8s ease;
    margin-top: 40px;
}

.result-image {
    width: 460px;
}


/* Title + subtitle on right */
.result-text h1 {
    font-family: "Caveat Brush";
    font-weight: normal;
    color: #9E4F19;
    font-size: 70px;
    text-align: center;
    margin: 0;
    transform: translateY(-30px); /* move text upward */
}

.result-text p {
    font-family: "Caveat Brush";
    font-weight: normal;
    color: #9E4F19;
    font-size: 32px;
    line-height: 1.3;
}

/* When activated */
.show-result {
    opacity: 1;
    transform: translateX(0px);
}



/* ---------- SCENE 5 AREA ---------- */
/* ---------- PART 1 ---------- */
.scene5 {
    width: 100%;
    min-height: 100vh;
    background: #FDF3CF;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Content wrapper */
.scene5-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-left: 50px;
}

/* Image */
.scene5-image {
    width: 320px; /* medium size, adjust if needed */
    height: auto;
}

/* Text */
.scene5-title {
    font-size: 70px;
    font-family: "Caveat Brush";
    color: #9E4F19;
    font-weight: normal;
    margin: 0;
}

.scene5-subtitle {
    font-family: "Caveat Brush";
    font-size: 28px;
    color: #9E4F19;
    margin: 0;
}

/* Fade animation */
/* Default: visible */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Only fade when browser supports scroll animation */
@supports (animation-timeline: view()) {
    .fade-in {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeUp linear forwards;
        animation-timeline: view();
        animation-range: entry 20% cover 40%;
    }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ---------- PART 2 ---------- */
.scene5-part2 {
    background: #FDF3CF;
    padding: 120px 0;
    text-align: center;
    overflow: visible;
}

.topping-instruction {
    font-family: "Caveat Brush", cursive;
    font-size: 35px;
    color: #9E4F19;
    margin-bottom: 60px;
}

/* Pizza area */
.pizza-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 120px;
}

.pizza-area {
    position: relative;
}

.pizza {
    width: 480px;
    position: relative;
    z-index: 2;
}

/* Arrows */
.arrow {
    width: 70px;
    position: absolute;
    z-index: 3;
}

.arrow-left {
    left: -90px;
    top: 50px;
    transform: translateY(-50%);
}

.arrow-right {
    right: -90px;
    top: 50px;
    transform: translateY(-50%);
}

/* Toppings */
.toppings-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 600px; /* control spread */
    margin: 0 auto;
}

.topping {
    width: 155px;
    cursor: grab;
}


/* Float animation */
.float {
    animation: floatUpDown 3.5s ease-in-out infinite;
}

@keyframes floatUpDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}



/* ---------- SCENE 6 AREA ---------- */
/* ---------- PART 1 ---------- */
#scene6-part1 {
    background: #FDF3CF;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scene6-text {
    text-align: center;
}

.scene6-text h1,
.scene6-text h2 {
    font-family: "Caveat Brush", cursive;
    font-weight: normal;
    margin: 20px 0;
}

/* Text Size */
.scene6-text h1 {
    font-size: 90px;
}

.scene6-text h2 {
    font-size: 50px;
}


/* ---------- PART 2 ---------- */
.scene6-part2 {
    background: #FDF3CF;
    padding: 30px 0;
    position: relative;
}

/* Layout */
.scene6-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
}

/* Oven */
.scene6-oven {
    width: 480px;
}

/* Text image */
.scene6-text-img {
    width: 280px;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 1s ease, transform 1s ease;
}

.scene6-text-img.show {
    opacity: 1;
    transform: translateX(0);
}

/* Connector */
.connector-scene6 {
    width: 100%;
    display: block;
    position: absolute;
    padding-bottom: 120px;
    left: 0;
    z-index: 10;
    pointer-events: none; /* avoid blocking clicks */
}




/* ---------- SCENE 7 AREA ---------- */
.scene7 {
    background: #FFBC51;
    padding: 240px 40px 120px; /* top | left-right | bottom */
    text-align: center;
    position: relative;
    overflow: visible;
}

/* Text */
.scene7-text h1 {
    font-family: "Caveat Brush", cursive;
    font-weight: normal;
    color: #9E4F19;
    font-size: 40px;
    line-height: 1.1;
    margin: 10px 0;
}

/* Sauce layout */
.final-sauce-wrapper {
    margin-top: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 120px;
}

/* Sauce images */
.final-sauce {
    width: 220px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.final-sauce:hover {
    transform: scale(1.08);
}

.connector-scene7 {
    position: absolute;
    padding-top: 120px;
    left: 0;
    width: 100%;
    z-index: 10;
    pointer-events: none;
}


/* ---------- SCENE 8 AREA ---------- */
#scene8 {
    scroll-margin-top: -120px;
}

.scene8 {
    background: #8AC6C4;
    position: relative; /* REQUIRED for absolute overlay */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Result image */
#finalResultImage {
    width: 100%;
    display: block;
    z-index: 1;
}

/* Overlay container */
.scene8-overlay {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5; /* ABOVE image */
    pointer-events: auto;
}

/* Text styles */
.scene8-small {
    font-family: "Caveat Brush", cursive;
    color: #FDF3CF;
    font-size: 35px;
    margin-bottom: 10px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.scene8-big {
    letter-spacing: 2px;
    font-family: "Caveat Brush", cursive;
    color: #FDF3CF;
    font-size: 70px;
    font-weight: normal;
    margin-bottom: 30px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.back-to-top {
    background: #FDF3CF;
    color: #9E4F19;
    font-family: "Caveat Brush", cursive;
    font-size: 20px;
    padding: 14px 40px; /* controls size */
    border: none;
    border-radius: 16px;
    cursor: pointer;

    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
    transition: transform 0.25s ease, background 0.25s ease;
}

.back-to-top:hover {
    transform: scale(1.08);
    background: #FFE9B5;
}


/* ---------- COPYRIGHT AREA ---------- */
.copyright-scene {
    background: #733E3A;
    padding: 15px;   /* space top & bottom */
    text-align: center;
}

.copyright-text {
    font-family: "Caveat Brush", cursive;
    font-weight: normal;
    font-size: 18px;
    color: #FDF3CF;
    opacity: 0.8;
}



/* ---------- SCROLLBAR ---------- */
/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 8px; 
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(158, 79, 25, 0.55);
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background 0.25s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(115, 62, 58, 0.85);
    border: 2px solid transparent;
    background-clip: content-box;
}




/* POPUP OVERLAY */
/* The Dark Background Overlay */
#mobile-block-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Darker background */
    z-index: 999999; /* Higher than landing page */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px); /* Optional: blurs the background slightly */
}

/* The Popup Card */
#mobile-block-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Change 0.7 to 0.4 for a lighter shadow */
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 999999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px); /* Lowering blur also helps it look lighter */
}

.desktop-popup {
    background-color: #FDF3CF; /* Your Cream */
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); /* Strong drop shadow */
    font-family: 'Caveat Brush', cursive;
}

.popup-title {
    color: #E2271B; /* Your Red */
    font-size: 42px;
    font-weight: normal;
    margin-bottom: 20px;
}

.popup-text {
    color: #9E4F19; /* Your Brown */
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 30px;
}

/* The Button */
.got-it-btn {
    background-color: #E2271B; /* Your Red */
    color: #FDF3CF; /* Your Cream */
    border: none;
    padding: 15px 60px;
    font-family: 'Caveat Brush', cursive;
    font-size: 24px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 8px 15px rgba(226, 39, 27, 0.3);
    transition: transform 0.2s ease;
}

.got-it-btn:hover {
    transform: scale(1.05);
}

/* ACTIVATION: Show only on small screens */
@media screen and (max-width: 1100px) {
    #mobile-block-overlay {
        display: flex;
    }
    
    /* Completely hide the Start button in the background for extra safety */
    .press-to-start {
        display: none !important;
    }
}





/* ---------- RESPONSIVE DESIGN LANDING PAGE ---------- */
/* TABLET SIZE */
@media screen and (max-width: 1024px) {
    .landing-title {
        font-size: 3.5rem; /* Slightly smaller text */
        margin-bottom: 25px;
    }

    .floating-pizza {
        width: 180px; /* Scale down the pizza slightly */
    }
}

/* PHONE SIZE */
@media screen and (max-width: 600px) {
    .landing-container {
        /* Optional: adjust background position if the pizza cut-off looks weird */
        background-position: center; 
    }

    .landing-title {
        font-size: 2.5rem; /* Much smaller for narrow screens */
        margin-bottom: 20px;
        padding: 0 20px; /* Prevents text from hitting screen edges */
        line-height: 1.2;
    }

    .floating-pizza {
        width: 150px; /* Compact size for mobile */
    }

    .press-to-start {
        font-size: 20px; /* Easier to fit on one line */
        padding: 12px 40px;
        width: 80%; /* Makes the button a nice big touch target */
        max-width: 300px;
    }
}



/* ---------- RESPONSIVE DESIGN SCENE 1 ---------- */
/* TABLET SIZE */
@media (max-width: 1024px) {
    .main-title {
        font-size: 48px;
        letter-spacing: 4px;
    }

    .sub-title {
        font-size: 26px;
    }

    .cloud {
        width: 140px;
    }

    .cloud-left2 {
        top: 80px;
    }

    .cloud-right2 {
        top: 60px;
    }


    #house3-img {
        width: 100%;       /* Force it to span the full width */
        max-height: none;  /* Remove the 72vh limit causing the gap */
        display: block;    /* Removes the tiny bottom whitespace gap */
    }

    .newconnector {
        margin-top: -50px; /* Adjust this value until the brown parts align */
        position: relative;
        z-index: 11;       /* Ensure it stays on top of the house */
    }
}

