#welcomeExperienceContainer {
      position: fixed;
      inset: 0;
      /* We no longer set a background color here */
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 5000;
      transition: opacity 0.6s ease-out;
      overflow: hidden; /* This is crucial */
    }

 /* We add a ::before pseudo-element to hold the blurred background */
    #welcomeExperienceContainer::before {
      content: '';
      position: absolute;
      inset: -10px; /* Slightly larger to hide blurred edges */
      z-index: -1; /* Sits BEHIND the modal content */
      
      /* This is a placeholder URL. For the best effect, you should
        host your own high-resolution image of a clean, warm desk.
      */
      background-image: url('/static/images/bg.png');
      background-size: cover;
      background-position: center;
      
      /* This is the magic: a deep blur to turn the photo into a texture */
      filter: blur(50px) brightness(0.9);
      
      /* This prevents the blur from "leaking" out of the edges */
      transform: scale(1.1);
    }

#welcomeWrapper {
      position: absolute;
      top: 45%;
      left: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      opacity: 0;
      pointer-events: none;
      animation: fadeInWrapper 1s ease forwards;
      margin-bottom: 5%;
      text-align: center;
      z-index: 2;
    }

#welcomeWrapper:hover #welcomeHeader {
      transform: translateY(-2px) scale(1.01);
      text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.25);
    }

#welcomeHeader {
      margin: 0 0 15px 0;
      font-family: 'Raleway', sans-serif;
      font-size: 32px;
      font-weight: 500;
      background: linear-gradient(140deg, #B1B8FF 0%, #938BFF 40%, #7F70FF 70%, #5E4BFF 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-fill-color: transparent;
      transition: transform 0.3s ease, text-shadow 0.3s ease;
      white-space: nowrap;
      text-align: center;
      letter-spacing: 0.5px;
      text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
    }

#welcomeUserPfp {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

#pfp-animation-container {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  position: relative;
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  /* A more subtle base shadow */
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* This pseudo-element creates the expanding ripple effect */
#pfp-animation-container::before {
    content: '';
    position: absolute;
    inset: -2px; /* Start tightly bound to the PFP */
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    opacity: 0;
}

/* This pseudo-element creates the orbiting satellite lights using box-shadow */
#pfp-animation-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    
    /* Three "satellites" created with blurred box-shadows for a soft, glowing effect */
    box-shadow: 
        65px 0px 10px -5px white,    /* Right satellite */
        -45px 50px 10px -5px white,  /* Bottom-left satellite */
        30px -60px 10px -5px white;  /* Top-right satellite */
        
    opacity: 0;
}

/* THE FIX: Add the animations to a new class that we will trigger with JS */
#pfp-animation-container.animate::before {
    animation: ripple 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}
#pfp-animation-container.animate::after {
    animation: orbit-lights 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

#step-generating-plan .interlude-text {
  font-size: 1.3rem;
}
#step-generating-plan .subtitle {
  margin-top: 10px;
  font-size: 1rem;
}

#step-personalized-welcome .step-content {
      gap: 20px;
    }

    #step-signin .step-content {
      gap: 25px;
    }

.welcome-step {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
  overflow-y: auto;
  overflow-x: hidden;
}

 .welcome-step.active-step {
      opacity: 1;
      visibility: visible;
      transition: opacity 0.5s ease-in-out, visibility 0s linear 0s;
    }


.welcome-modal {
      background: linear-gradient(135deg,
          rgba(220, 200, 255, 0.35),
          rgba(200, 180, 240, 0.3));
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 16px;
      padding: 20px;
      width: 90%;
      max-width: 450px;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
      text-align: center;
      transition: transform 0.3s ease;
    }

    .welcome-modal {
      pointer-events: auto;
      z-index: 1000;
    }


.welcome-modal .fun-message {
      font-style: italic;
      opacity: 0.8;
      font-size: 14px;
    }

.welcome-modal a {
      color: #fff;
      text-decoration: underline;
      transition: color 0.2s ease;
    }

    .welcome-modal a:hover {
      color: #f8bbd0;
    }

.welcome-modal h2 {
      font-size: 22px;
      font-weight: 700;
      margin-bottom: 12px;
      color: #fff;
    }


    .welcome-modal h2 span {
      background: linear-gradient(45deg, #ffffff, #d1c4e9);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }


    .welcome-modal p {
      font-size: 15px;
      margin-bottom: 10px;
      color: #fdfdfd;
      line-height: 1.4;
      opacity: 0.9;
    }

    .welcome-modal ul {
      list-style: none;
      padding: 0;
      margin-top: 10px;
      text-align: left;
    }

    .welcome-modal ul li {
      font-size: 14px;
      padding: 6px 0;
      display: flex;
      align-items: center;
      gap: 6px;
      color: #fefefe;
      transition: color 0.2s ease;
    }

    .welcome-modal ul li::before {
      content: "•";
      color: #f8bbd0;
    }

    .welcome-modal ul li:hover {
      color: #f8bbd0;
    }

    .welcome-modal:hover {
      background: rgba(220, 200, 255, 0.45);
    }

.onboarding-button-group {
  display: flex;
  gap: 25px; /* Increased from 20px for better visual separation */
  margin-top: 25px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Allows buttons to stack on smaller screens */
}


#googleSignInBtn {
      background-color: #d8b4fe;
      color: #333;
      border: none;
      padding: 12px 24px;
      font-size: 18px;
      border-radius: 12px;
      cursor: pointer;
      display: none;
      margin: 20px auto;
      display: block;
      width: fit-content;
      transition: background-color 0.3s ease, transform 0.2s ease;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

 #googleSignInBtn i.bx {
      font-size: 24px;
      vertical-align: middle;
      margin-right: 8px;
    }

   #googleSignInBtn:disabled {
      background-color: #e0e0e0;
      color: #9e9e9e;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }

     #googleSignInBtn:hover {
      background-color: #c084fc;
      transform: translateY(-3px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    /* Override the default dark .cta-button style for just this button */
#googleSignInBtnAgreement.cta-button {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px; /* Full pill shape */
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 1.05rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    
    transition: all 0.2s ease-out;
}

/* Style for the disabled/loading state */
#googleSignInBtnAgreement.cta-button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
    cursor: not-allowed;
    transform: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

/* A simple, clean hover state */
#googleSignInBtnAgreement.cta-button:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    /* transform: translateY(-2px) scale(1.01);  <-- REMOVED */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15),
                inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

#googleSignInBtnWelcome.google-button {
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
      color: #f0f0f0;
      border: 1px solid rgba(255, 255, 255, 0.2);
      padding: 14px 40px;
      font-size: 1.15rem;
      font-weight: 600;
      border-radius: 50px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
      position: relative;
      overflow: hidden;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
      margin-top: 15px;
    }

    #googleSignInBtnWelcome.google-button i.bxl-google {
      font-size: 1.6rem;
      color: #ffffff;
      transition: transform 0.3s ease;
    }

    #googleSignInBtnWelcome.google-button:not(:disabled):hover {
      transform: translateY(-3px) scale(1.03);
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.15),
        0 0 15px rgba(192, 162, 247, 0.3);
      border-color: rgba(255, 255, 255, 0.3);
    }

    #googleSignInBtnWelcome.google-button:not(:disabled):hover i.bxl-google {
      transform: rotate(-10deg) scale(1.1);
    }

    #googleSignInBtnWelcome.google-button:not(:disabled):active {
      transform: translateY(-1px) scale(1.01);
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    #googleSignInBtnWelcome.google-button:disabled {
      background: rgba(255, 255, 255, 0.05);
      color: rgba(255, 255, 255, 0.4);
      border-color: rgba(255, 255, 255, 0.1);
      cursor: not-allowed;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
      transform: none;
      text-shadow: none;
    }

    #googleSignInBtnWelcome.google-button:disabled i.bxl-google {
      color: rgba(255, 255, 255, 0.4);
      transform: none;
    }

    #googleSignInBtnWelcome.google-button::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 75%;
      height: 100%;
      background: linear-gradient(to right,
          rgba(255, 255, 255, 0) 0%,
          rgba(255, 255, 255, 0.15) 50%,
          rgba(255, 255, 255, 0) 100%);
      transform: skewX(-25deg);
      transition: left 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
      z-index: 1;
    }

     #googleSignInBtnWelcome.google-button:not(:disabled):hover::before {
      left: 120%;
    }

    #signInErrorMsg {
      color: #ff9b94;
      margin-top: 20px;
      font-size: 0.95rem;
      text-align: center;
      max-width: 90%;
      background-color: rgba(255, 138, 128, 0.1);
      border: 1px solid rgba(255, 138, 128, 0.3);
      padding: 8px 12px;
      border-radius: 8px;
    }

    #signOutBtn {
      display: block;
      width: 85%;
    }

    #agreeAndContinueBtn {
      margin-top: 0;
    }

    /* Style for the main "next step" buttons */
#start-onboarding-schedule-btn.cta-button,
#continueSetupBtn.cta-button,
#start-personalization-btn.cta-button,
#proceedToAppBtn.cta-button {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* We don't set border-radius, so it respects the 20px from .cta-button */
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 1.05rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    
    transition: all 0.2s ease-out;
}


/* Hover state for main "next step" buttons */
#start-onboarding-schedule-btn.cta-button:not(:disabled):hover,
#continueSetupBtn.cta-button:not(:disabled):hover,
#start-personalization-btn.cta-button:not(:disabled):hover,
#proceedToAppBtn.cta-button:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px); /* A subtle lift */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15),
                inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Disabled state for main "next step" buttons */
#start-onboarding-schedule-btn.cta-button:disabled,
#continueSetupBtn.cta-button:disabled,
#start-personalization-btn.cta-button:disabled,
#proceedToAppBtn.cta-button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
    cursor: not-allowed;
    transform: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

#proceedToAppBtn {
      margin-top: 5px;
    }


    .agreement-checkboxes {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 18px;
      margin-bottom: 35px;
      width: auto;
      max-width: 100%;
    }

     .agreement-text-small {
      font-size: 0.8rem;
      color: #909296; /* A deferential, low-contrast gray */
      max-width: 280px;
      text-align: center;
      line-height: 1.5;
      margin-top: 15px; /* Space it from the button */
    }
    .agreement-text-small a {
      color: #a0a2a6; /* Slightly brighter for the link */
      text-decoration: underline;
    }
    .agreement-text-small a:hover {
      color: #ffffff;
    }

    .checkbox-label-text {
      font-size: 1rem;
      line-height: 1.5;
    }

    .checkbox-label-text a {
      color: #fbc2eb;
      text-decoration: underline;
      transition: color 0.2s ease;
    }

    .checkbox-label-text a:hover {
      color: #ffdcf4;
    }

    .checkbox-visual {
      height: 26px;
      width: 26px;
      background-color: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 7px;
      margin-right: 15px;
      position: relative;
      transition: all 0.2s ease-out;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-shrink: 0;
    }

    .check-icon {
      font-size: 20px;
      color: #1d1832;
      opacity: 0;
      transform: scale(0.5);
      transition: opacity 0.2s ease-in-out, transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    }

    .fancy-checkbox {
      display: flex;
      align-items: center;
      cursor: pointer;
      color: #e0e0e0;
      position: relative;
    }

    .fancy-checkbox input {
      position: absolute;
      opacity: 0;
      height: 0;
      width: 0;
    }

    .fancy-checkbox:hover .checkbox-visual {
      transform: scale(1.08);
      border-color: rgba(255, 255, 255, 0.6);
    }

    .fancy-checkbox input:checked~.checkbox-visual {
      background-color: #a18cd1;
      border-color: #a18cd1;
      transform: scale(1.05);
    }

    .fancy-checkbox input:checked~.checkbox-visual .check-icon {
      opacity: 1;
      transform: scale(1);
    }

    .interlude-animation {
      margin-bottom: 25px;
    }

     .interlude-text {
      font-size: 1.5rem;
      color: #e0e0e0;
      font-weight: 500;
    }

    .personalized-greeting {
      font-size: clamp(2.2rem, 7vw, 3rem);
      font-weight: 700;
      line-height: 1.2;
      background: linear-gradient(90deg, #ffffff, #e0c3fc, #ffffff);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 5px;
    }

    .personalized-subtitle {
      font-size: clamp(1rem, 3vw, 1.1rem);
      color: #bdbdbd;
      margin-bottom: 0;
    }

     .pulse-icon {
  font-size: 5rem;
  color: #e0c3fc;
  /* --- THE FIX --- */
  display: inline-flex;  /* Use flexbox for centering the icon */
  align-items: center;
  justify-content: center;
  width: 90px;            /* Give it a consistent size */
  height: 90px;
  border-radius: 50%;   /* Make the element's box a circle */
  /* --- END FIX --- */
  animation: pulse 2s infinite ease-out;
}

.signin-action {
      margin-top: 20px;
    }

    .video-wrapper-onboarding {
      position: relative;
      height: 338px;
      width: 600px;
      margin-left: auto;
      margin-right: auto;
      margin-bottom: 20px;
      overflow: hidden;
      border-radius: 16px;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
      background: #111;
      flex-shrink: 0;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .video-wrapper-onboarding iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: none;
    }