/* GLOBAL RESET FOR ONBOARDING OVERLAY ONLY */
#onboarding-overlay {
  position: fixed;
  top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Default Dark Mode Background */
    background-color: #131313;
    z-index: 9999;
    
    font-family: 'Exo', sans-serif;
    color: white;
    
    display: flex; /* Centering Container */
    justify-content: center;
    align-items: center;
}

#onboarding-overlay .ob-pagination {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 1.5rem;
    font-family: 'Exo', sans-serif;
    color: rgba(255, 255, 255, 0.5);
    z-index: 200;
}

/* Light Mode Override - Higher Specificity (1-1-0) wins over (1-0-0) */
@media (prefers-color-scheme: light) {
    #onboarding-overlay.ob-overlay {
        background-color: #016293;
    }
}

/* Mobile / Responsive Styles */
@media (max-width: 768px) {
    #onboarding-overlay h1 {
        font-size: 3rem !important; /* Scale down from 5rem */
    }
    
    #onboarding-overlay .ob-input, 
    #onboarding-overlay .ob-split-input {
        font-size: 4rem !important; /* Scale down from 8rem */
        width: 90% !important;
    }
    
    #onboarding-overlay .ob-hint {
        font-size: 1rem !important;
        padding: 0 20px;
    }
    
    #onboarding-overlay .apps-carousel-wrapper {
        min-height: 150px !important;
    }
    
    .ob-overlay .ob-app-item,
    .ob-overlay .ob-app-item:hover {
        width: 80px !important;
        height: 80px !important;
        border-radius: 16px !important;
        margin: 0 !important;
    }
    
    #onboarding-overlay .lead-text {
        font-size: 1.5rem !important;
    }
    
    #onboarding-overlay .blink-videogame {
        font-size: 1.5rem !important;
    }
    
    #onboarding-overlay .split-input-container {
        gap: 5px !important;
    }
    
    #onboarding-overlay .split-separator {
        font-size: 3rem !important;
    }

    #onboarding-overlay .bottom-action {
        width: 100%;
        left: 0;
        justify-content: center;
        bottom: 20px;
        font-size: 1rem;
    }
}

#onboarding-overlay.d-none {
  display: none !important;
}

#onboarding-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Steps - Scoped */
#onboarding-overlay .ob-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;
  transform: translateX(50px);
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}



#onboarding-overlay .ob-step.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 100;
}

/* Typography - Scoped */
#onboarding-overlay h1 {
  font-size: 5rem;
  font-weight: 200;
  margin-bottom: 2rem;
  line-height: 1.2;
  border-bottom: none !important; /* Override style.css */
  font-family: "Exo", sans-serif !important;
}

#onboarding-overlay .font-exo {
  font-family: "Exo", sans-serif !important;
}

#onboarding-overlay .font-nunito {
  font-family: "Nunito", sans-serif !important;
}

/* Inputs - Scoped */
#onboarding-overlay .ob-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid #555;
  color: white;
  font-size: 8rem;
  font-family: "Exo", sans-serif;
  font-weight: 200;
  text-align: center;
  width: 80%;
  max-width: 710px;
  outline: none;
  padding-bottom: 10px;
}

#onboarding-overlay .ob-input:focus {
  border-bottom: 2px solid white;
}

#onboarding-overlay input::selection {
  background: rgba(255, 255, 255, 0.3);
}

#onboarding-overlay .input-line-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Screen 2: Split Inputs - Scoped */
#onboarding-overlay .split-input-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

#onboarding-overlay .ob-split-input {
  background: transparent;
  border: none !important;
  border-bottom: 2px solid #555 !important;
  color: white;
  font-size: 8rem;
  font-family: "Exo", sans-serif;
  font-weight: 200;
  text-align: center;
  outline: none;
  padding: 0;
  line-height: 1;
  min-width: 205px;
}

#onboarding-overlay .ob-split-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

#onboarding-overlay .ob-split-input:focus {
  border-bottom: 2px solid white !important;
}

/* Specific tight widths using ch relative to huge font */
#onboarding-overlay #dob-1 {
  width: 2ch;
}
#onboarding-overlay #dob-2 {
  width: 2ch;
}
#onboarding-overlay #dob-3 {
  width: 4ch;
}

#onboarding-overlay .split-separator {
  font-size: 6rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 5px;
  font-weight: 100;
}

/* Remove default blue outline/underline overrides ONLY inside overlay */
#onboarding-overlay input:focus,
#onboarding-overlay select:focus,
#onboarding-overlay textarea:focus,
#onboarding-overlay button:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* Hints - Scoped */
#onboarding-overlay .ob-hint {
  font-size: 1.2rem;
  color: #fff;
  margin-top: 2rem;
  font-family: "Nunito", sans-serif;
  padding-top: 1rem;
  display: inline-block;
  max-width: 600px;
}

#onboarding-overlay .fade-in {
  /* Slower fade in as requested (2s) */
  animation: fadeIn 2s ease-in forwards;
}

#onboarding-overlay .hidden {
  opacity: 0;
  visibility: hidden;
}

#onboarding-overlay .visible {
  visibility: visible;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Bottom Actions - Scoped */
#onboarding-overlay .bottom-action {
  position: absolute;
  bottom: 5vh;
  left: 0; 
  width: 100%;
  justify-content: center;
  font-family: "Nunito", sans-serif;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}

#onboarding-overlay .bottom-action a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s;
  border-bottom: none !important;
}

#onboarding-overlay .bottom-action a:hover {
  color: white;
  text-decoration: none;
}

/* Apps Carousel - Scoped */
#onboarding-overlay .apps-carousel-wrapper {
  width: 100%;
  max-width: 100vw;
  overflow-x: auto;
  padding: 40px 0;
  /* Hide scrollbar for ticker look */
  scrollbar-width: none;

  min-height: 200px;
  white-space: nowrap;
  display: block;
  overflow-y: hidden;

  /* Mask to fade edges */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

/* Hide webkit scrollbar */
#onboarding-overlay .apps-carousel-wrapper::-webkit-scrollbar {
  display: none;
}

#onboarding-overlay .apps-carousel {
  display: inline-flex;
  flex-direction: row;
  gap: 40px;
  /* Push start to 1/2 of the screen (50vw) */
  padding-left: 50vw;
  /* Add buffer at end for loop smoothness if needed, or 0 */
  padding-right: 0; 
  min-width: 100%;
  align-items: center;
}

/* App Items - Scoped 
   Using class .ob-overlay instead of #onboarding-overlay to lower specificity 
   so that .item a.classname from app-icons.css (0-2-1) can override (0-2-0) */
.ob-item-wrapper {
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0;
  float: none;
}

.ob-overlay .ob-app-item {
  display: inline-block;
  width: 120px;
  height: 120px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
  border-radius: 24px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.ob-overlay .ob-app-item:hover {
  /* Enforce dimensions to override style.css .item a:hover */
  width: 120px !important;
  height: 120px !important;
  margin: 0 !important;

  transform: none;
  z-index: 10;

  filter: brightness(1.2);
  /* Ensure no border radius change if style.css does that */
  border-radius: 24px;
}

.ob-overlay .ob-app-item.selected {
  box-shadow: 0 0 0 5px #198754, 0 15px 30px rgba(0, 0, 0, 0.5);
  transform: scale(1.1);
}

.ob-overlay .ob-app-item.selected::after {
  content: "\F26A";
  font-family: "bootstrap-icons";
  position: absolute;
  top: -10px;
  right: -10px;
  color: #198754;
  font-size: 2rem;
  background: white;
  border-radius: 50%;
  line-height: 1;
  border: 2px solid white;
}

/* Ready Step - Scoped */
#onboarding-overlay .ready-content {
  max-width: 1200px;
  margin-bottom: 4rem;
}

#onboarding-overlay .lead-text {
  font-size: 3rem;
  margin-bottom: 2rem;
  color: #ccc;
  font-weight: 200;
  line-height: 1.2;
}

#onboarding-overlay .lead-text strong {
  font-weight: 800;
}

/* Animations */
.blink-videogame {
  /* Smooth fade in/out as requested */
  animation: blink-smooth 2s infinite ease-in-out;
  font-size: 2rem;
  color: white;
}

@keyframes blink-smooth {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.happy-days-msg {
  display: block;
  font-size: 2rem;
  color: #83d3fa;
  margin-bottom: 0.5rem;
  font-family: 'Exo', sans-serif;
}
