@keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  .abs {
    position: absolute;
  }
  
  a {
    color: white;
    text-decoration: none;
  }
  a:hover {
    color: lightblue;
  }

  @font-face {
  font-family: 'Google Sans';
  src: url('../fonts/GoogleSans-Regular.ttf') format('truetype'),
       url('../fonts/GoogleSans-Medium.ttf') format('truetype'),
       url('../fonts/GoogleSans-Bold.ttf') format('truetype');
  /* font-weight: normal; */
  /* font-style: normal; */
  }

  body {
    bottom: 0;
    /*font-family: "Titillium Web", sans-serif;*/
    font-family: "Google Sans", sans-serif;
    color: white;
    left: 0;
    margin: 0;
    position: absolute; 
    right: 0;
    top: 0;
    transform-origin: 0px 0px;
    overflow: hidden;
    border: 0 white;
  }
  
  .selfie {
    transform: scale(-1, 1);
  }
  
  .container {
    position: absolute; 
    top: 0;
    right: 0;
    bottom: 0;
    left: 0; 
    background-color: #FFFFFF;
    border: 0 white;

    /* background-color: #596e73;
    width: 100%;
    max-height: 100%;
    height: 100%;   */
  }
  
  #mainCanvas {
    /* width: 100%; */
    height: 100%;
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;    /* use top instead, if top/centre aligning  */
    border: 0 white;
  }
  #debugCanvas {
    /* width: 100%; 
    height: 100%; */
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;    /* use top instead, if top/centre aligning  */
  }
  
  .loading {
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    align-items: center;
    backface-visibility: hidden;
    justify-content: center;
    opacity: 1;
    transition: opacity 1s;
  }
  .loading .message {
    font-size: x-large;
  }
  .loading .spinner {
    position: absolute;
    width: 120px;
    height: 120px;
    animation: spin 1s linear infinite;
    border: 32px solid #bebebe;
    border-top: 32px solid #3498db;
    border-radius: 50%;
  }
  
  .loaded .loading {
    opacity: 0;
  }

  /*----------------------------------------------------------- */

  .hidden {
    /* display: none;   */
    margin-left: -9999;
  }
  .hidden2 {
    display: none;  
  }
  .transparent {
    opacity:0.3;
  }

  #instructions {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #cccccc;
  }
  #feedbackDiv {
    position: absolute;
    top: 130px;
    right: 20px;
    color: #cccccc;
    font-size: 24px;
    opacity: 0;
  }

  .videoSource {
    position: absolute;
    top: 30px;
    right: 10px;
    width: 160px; 
    height: 90px; 
    background-color: #000000;
  }

  #PresetControls {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 100px;
    color: #333333;
    opacity: 0;
  }
  #CP1 {
    position: absolute;
    left: 120px;
    top: 0px;
    opacity: 0;
  }
  #CP2 {
    position: absolute;
    left: 500px;
    top: 0px;
    opacity: 0;
  }

  .control-panel-expander {
    display: none;
  }

  #preset-title {  /* The preset title shown in the top left of each experience */
    position: fixed; 
    top: 10;          /* Aligns the element to the top of the screen */
    left: 10;         /* Aligns the element to the left of the screen */
    z-index: 9998;   /* Ensures it appears on top of other elements */
    /* background-color: white; /* Optional: Add background for visibility */ */
    padding: 10px;   /* Optional: Add some padding */
    font-size: 16px; /* Optional: Customize font size */
    color: #5F6368;    /* Optional: Text color */
  }

  /* Overlay styling */
  #intro-screen {  /* The white introduction screen backdrop ahead of each preset */
    position: fixed; /* Stays in the same position relative to the viewport */
    top: 0;
    left: 0;
    width: 100vw; /* Full width of the viewport */
    height: 100vh; /* Full height of the viewport */
    background-color: rgba(255, 255, 255, 0.9); /* White with slight transparency */
    /* display: none; Hidden by default none or block*/
    z-index: 9999; /* Ensure it layers on top of all other elements */

    display: block;
    opacity: 0; /* Fully transparent by default */
    visibility: hidden; /* Hidden, but takes up space */
    transition: opacity 1s ease, visibility 1s ease; /* Smooth fade transition */
  }

  #intro-screen.active {
    opacity: 1; /* Fully visible */
    visibility: visible; /* Make it visible */
  }

  #intro-screen-title {
    position: absolute;
    font-weight: bold;
    top: 40%;
    left: 0%;
    transform: translate(0%, -50%); /* Center content both vertically and horizontally */
    font-size: 64px;
    width: 100%; /* Full width of its container */
    color: #CC8811; /* Text color */
    text-align: center;

    display: block;
    opacity: 0; /* Fully transparent by default */
    visibility: hidden; /* Hidden, but takes up space */
    transition: opacity 1s ease, visibility 1s ease; /* Smooth fade transition */
  }

  #intro-screen-title.active {
    opacity: 1; /* Fully visible */
    visibility: visible; /* Make it visible */
  }


  /* Centered content - the description of the preset*/
  #intro-screen-content {
    position: absolute;
    font-weight: regular;
    top: 58%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center content both vertically and horizontally */
    font-size: 42px;
    line-height: 1.5;
    width: 80%; 
    color: #5F6368; /* Text color */
    text-align: center;

    display: block;
    opacity: 0; /* Fully transparent by default */
    visibility: hidden; /* Hidden, but takes up space */
    transition: opacity 1s ease, visibility 1s ease; /* Smooth fade transition */    
  }

   #intro-screen-content.active {
    opacity: 1; /* Fully visible */
    visibility: visible; /* Make it visible */
  }
  
  /*----------------------------------------------------------- */

#white-background {
    position: absolute; /* Sticks the background to the viewport */
    top: 0;
    left: 0;
    width: 100vw; /* Full width of the viewport */
    height: 100vh; /* Full height of the viewport */
    background-color: white; /* White background */
    z-index: 1; /* Sits behind logo and text */ 
    display: block;
}


/* Initially set the logo to be invisible */
#logo {
  position: absolute;
  width: 15vw; /* Logo width is 15% of screen width */
  height: auto; /* Maintain aspect ratio */
  opacity: 0;
  /*transition: all 1s ease;
  transition-duration: 1s; */
  bottom: 0%;
  right: 0%;
  /* transform: translate(-50%, -50%); */
  scale: 1;
  z-index: 9999; 
}

#logo-colour {
  position: absolute;
  width: 30vw; /* Logo width is 1/5 of screen width */
  height: auto; /* Maintain aspect ratio */
  opacity: 1;
  transition: all 1s ease;
  transition-duration: 1s;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  scale: 1;
  z-index: 9999; 

  display: block;
  opacity: 0; /* Fully transparent by default */
  visibility: hidden; /* Hidden, but takes up space */
  transition: opacity 1s ease, visibility 1s ease; /* Smooth fade transition */   
}

#logo-colour.active {
  opacity: 1; /* Fully visible */
  visibility: visible; /* Make it visible */
}

/* Animation for logo fading in */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#logo.fade-in {
  animation: fadeIn 1s ease forwards;
}

#chromefetti-text.fade-in {
  animation: fadeIn 1s ease forwards;
}

#multiline-text.fade-in {
  animation: fadeUpMulti 1s ease forwards;
}

#multiline-text {
  position: absolute;
  font-size: 48px;
  font-weight: normal;
  color: #5F6368;
  opacity: 0;
  top: 50%;
  left: 0%;
  border: 10px black;
  width: 100%; /* Full width of its container */
  text-align: center; /* Aligns the text in the center */
  transform: translateY(-50%); /* Vertically centers it */
  z-index: 9999; 
  /*border: 1px solid blue;  Temporary for debugging */
}

@keyframes fadeUpMulti {
    0% {
        opacity: 0;
        transform: translateY(1em);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


