/***
 * This sheet determines the styling of Cheryl's World.
 */

 html {
    cursor: var(--regular-cursor);
 }

body {
    background: black;
    font-family: "Source Sans 3", sans-serif;
    cursor: var(--regular-cursor);
    -webkit-font-smoothing: antialiased;
}

/* Remove pointer events when object interactions are not enabled */
body:not(.interactions-enabled) .object,
body:not(.interactions-enabled) .hidden-object {
    pointer-events: none;
}

/* Remove object transform on hover when object interactions are not enabled */
body.interactions-enabled .object:hover {
    transform: scale(1.05);   /* your current hover transform */
    cursor: var(--pointer-cursor);
}


:root {
    --pointer-cursor: url('media/icons/pointer.png'), auto;
    --regular-cursor: url('media/icons/cursor.png'), auto;
    --link-color: #0000ff; /* default light blue */
    --link-visited-color: #800080; /* default light blue */
  }

  a:link {
    color: var(--link-color);
  }

  a:visited {
    color: var(--link-visited-color);
  }


  
  
  a, button, [role="button"], .clickable, .btn {
    cursor: var(--pointer-cursor) !important;
  }
  
  
  
/***
 * Background, room, and objects
 */

.background {
    background: white;
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transition: opacity 6s ease;
}

.room {
    max-height: 100%;
    position: relative;
    top: 50%;
    left: 50%;
    background-size: contain;
    transform: translate(-50%, -50%);
    aspect-ratio: 2410 / 1662;
}

.room-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.object {
    position: absolute;
    cursor: var(--pointer-cursor);
    max-width: 100%;
    height: auto;
    width: auto;
}

@keyframes jingle {
    0% {
        transform: scale(1.05) translateY(0.5px) translateX(0.5px) rotate(1deg);
    }
    50% {
        transform: scale(1.05) translateY(-0.5px) translateX(-0.5px) rotate(-1deg);
    }
    100% {
        transform: scale(1.05) translateY(0.5px) translateX(0.5px) rotate(1deg);
    }
}

.object:hover {
    animation: jingle 0.5s ease-in-out;
    cursor: var(--pointer-cursor);
}

#welcome-mat {
    width: 23%;
    left: 37.5%;
    bottom: 0%;
}

#gumball-machine {
    width: 10.5%;
    left: 82.7%;
    bottom: 5%;
}

#record-player {
    width: 14.5%;
    left: 63.6%;
    bottom: 32.7%;
}

#drawing {
    width: 12%;
    left: 85.2%;
    bottom: 38.5%;
}

#puzzle {
    width: 6.6%;
    left: 14.8%;
    bottom: 11.3%;
}

#notebook {
    width: 6%;
    left: 19.2%;
    bottom: 27%;
}

#tv {
    width: 12%;
    left: 12%;
    bottom: 32%;
}

#books {
    width: 5.3%;
    left: 7.8%;
    bottom: 17.5%;
}

#easter-eggs {
    display: none;
    width: 8%;
    left: 29.2%;
    bottom: 2%;
}

#credits-poster {
    width: 10.8%;
    left: 88.2%;
    bottom: 53%;
}

#figurine {
    width: 3%;
    left: 25.2%;
    bottom: 42%;
}

#eight-ball {
    width: 4.5%;
    left: 19.2%;
    bottom: 26%;
}

.hidden-object {
    position: absolute;
    max-width: 100%;
    height: auto;
    width: auto;
}

.speech-bubble {
    position: absolute;
    max-width: 15%;
    height: auto;
    width: auto;
    visibility: hidden;
    animation: jingle 0.5s ease-in-out;
}

#clock {
    width: 7%;
    left: 5%;
    bottom: 66.6%;
}

#light {
    width: 9.5%;
    left: 45.2%;
    bottom: 79.5%;
}

#light:hover {
    cursor: var(--pointer-cursor);
}

#couch {
    width: 26.3%;
    left: 32.65%;
    bottom: 27%;
}

#berkeley-flag {
    width: 11.4%;
    left: 17.2%;
    bottom: 61.5%;
}

#map {
    width: 11%;
    left: 71.7%;
    bottom: 52.5%;
}

#trainers {
    width: 12%;
    left: 60.2%;
    bottom: 0%;
}

/***
 * Pop-up Content
 */

.info-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.99);
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    width: 80%;
    height: 80%;
    /* overflow: hidden; */
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-slide {
    display: none;
}

.popup-slide.active {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80%;
    height: 100%;
    left: 50%;
    transform: translate(-50%, 0%);
    object-fit: contain;
}

.popup-title {
    font-family: "Gloria Hallelujah", sans-serif;
    font-size: clamp(1rem, 2.5vw, 2rem); /* min(3vw, 3vh) */
    color: black;
    text-align: center;
    width: 100%;
    line-height: 1.5;
    max-height: 15%;
    text-overflow: ellipsis;
    object-fit: contain;
    margin: 1.25rem;
}

.popup-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.popup-linked-image {
    transition: transform 0.3s ease;
    object-fit: contain;
    border-radius: 0.5vw;
}

.popup-linked-image:hover {
    transform: scale(1.02);
}

.popup-image {
    object-fit: contain;
    border-radius: 0.5vw;
}

.popup-video {
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.5vw;
    width: 300px;
    height: 20vw;
}

.popup-text {
    font-family: "Source Sans 3", sans-serif;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem); /* min(2vw, 2vh) */
    line-height: 1.4;
    color: black;
    text-align: center;
    max-width: 90%;
    overflow:hidden;
}

.popup-link#portrait{
    width: auto;
    height: 50%;
}

.popup-link#landscape{
    width: 100%;
    height: auto;
}

.popup-linked-image#portrait{
    width: auto;
    height: 100%;
}

.popup-linked-image#landscape{
    width: 60%;
    height: auto;
}

.popup-image-exception {
    max-height: 60%;
    width: auto;
  }
  
.popup-image#portrait {
    width: auto;
    max-height: 70%;
}

.popup-image#landscape {
    max-width: 70%;
    height: auto;
}

.popup-youtube-div {
    left: 0;
    width: 85%;
    height: 20%;
    position: relative;
    padding-bottom: 42.1875%;
}

.popup-youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

.popup-spotify-div {
    position: relative;
    width: 75%;
    padding-bottom: 32%; /* 4:3 aspect ratio */
    height: 0;
}

.popup-spotify-div iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/***
 * Pop-up Navigation
 */

.popup-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0 10px;
    box-sizing: border-box;
    pointer-events: none; /* Disable pointer events for container */
}

.nav-btn {
    pointer-events: auto;  /* Re-enable for buttons */
    background: none;
    border: none;
    width: 4vw;
    height: 4vw;
    cursor: var(--pointer-cursor);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, filter 0.3s;
}

.nav-btn:hover {
    filter: brightness(0.8);
    transform: scale(1.25);
}

.nav-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.prev-btn {
    margin-left: 1vw;
}

.next-btn {
    margin-right: 1vw;
    animation: bounce 1.5s infinite ease-in-out;
}

/* Define the bouncing animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px); /* bounce up 10px */
  }
}

.btn-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: var(--pointer-cursor);
    width: max(2vw, 2vh);
    color: #666;
    background: none;
    border: none;
    padding: 5px;
    z-index: 9999;
}

.close-btn:hover {
    filter: brightness(0.8);
    transform: scale(1.25);
}

.slide-dots {
    display: flex;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    gap: 2px;
}

.slide-dots .dot {
    width: 1.2vw;
    height: 1.2vw;
    border-radius: 50%;
    background-color: white;
    border: 1.5px solid #333;
    transition: opacity 1s, background-color 0.3s;
}

.slide-dots .dot.active {
    opacity: 1;
    background-color: #333;
}

    
/***
 * Splash Page
 */
.splash-container {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    text-align: center;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: black;
    opacity: 1;
    transition: opacity 1s ease;
    z-index: 9999;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(1);
    }
    60% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

#splash-enter-btn {
    cursor: var(--pointer-cursor);
    opacity: 0;
    animation: none;
    transition: filter 0.3s ease;
    height: 10%;
    width: auto;
}

#splash-prof-image {
    max-height: 40vh;
    width: auto;
}

#splash-enter-btn:hover {
    filter: brightness(0.7);
    transform: scale(1.1)
}

#splash-enter-btn.bounce-in {
    opacity: 1;
    animation: bounceIn 0.5s ease forwards;
}

.splash-title {
    font-size: clamp(2.5rem, 3vw, 5rem); /* min(3.5vw, 5vh) */
    max-width: 50%;
    height: auto;
    font-family: "Gloria Hallelujah", sans-serif;
    font-style: normal;
    font-weight: bold;
    line-height: 1.5;
    color: white;
    margin-bottom: 17.5px;
}

.splash-text {
    font-size: clamp(1.25rem, 1.6vw, 2rem); /* min(1.6vw, 2vh) */
    max-width: 50%;
    height: auto;
    padding-left: 10%;
    padding-right: 10%;
    font-family: "Source Sans 3", sans-serif;
    font-style: normal;
    line-height: 1.5;
    color: white;
}

/***
 * Tutorial Page
 */
.tutorial-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    padding-bottom: 60px;
    transition: opacity 1s ease;
}

.tutorial-content {
    background: white;
    padding: 2%;
    border-radius: 10px;
    text-align: center;
    max-width: 70%;
    max-height: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tutorial-title {
    font-size: clamp(2rem, 4vw, 2.5rem); /* min(4vw, 4vh) */
    font-family: "Gloria Hallelujah", sans-serif;
    color: black;
    margin: 0;
    line-height: 1.5;
}

.tutorial-text {
    font-size: clamp(1.25rem, 1.6vw, 1.75rem); /* min(2.4vw, 2.4vh) */
    font-family: "Source Sans 3", sans-serif;
    line-height: 1.6;
    color: black;
}

.tutorial-got-it-btn {
    position: relative;
    bottom: 0;
    cursor: var(--pointer-cursor);
    background: none;
    width: 20%;
    border: none;
}

.tutorial-got-it-btn:hover {
    filter: brightness(0.8);
    transform: scale(1.1);
}

/***
 * Rotate Device Message
 */
#rotate-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    color: white;
    display: none;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 9999;
    flex-direction: column;
    padding: 2rem; /* Add space inside the container */
    box-sizing: border-box; /* Makes padding not affect width/height */
    font-family: "Gloria Hallelujah", sans-serif;
}

.rotate-text {
    font-family: "Gloria Hallelujah", sans-serif;
    font-size: clamp(1rem, 7vw, 1.5rem); /* min(8vw, 8vh) */
    line-height: 1.5;
}

@media (max-width: 768px) and (orientation: portrait) {
    #rotate-message {
        display: flex;
    }
}

.message {
    opacity: 0;
    transition: opacity 3s ease;
    margin-top: 5px;
  }
  .message.visible {
    opacity: 1;
  }