/* Base styles */
html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    overflow-x: hidden;
    background-color: #000;
  }

  body {
    <!-- background-image: url('https://gamifeye.com/assets/images/bg-clothes-apparel.jpg'); -->
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }

  section {
    min-height: 100vh;
    width: 100vw;
    position: relative;
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    z-index: 1;
    padding: 20px;
  }

  /* Add a black background during the fade */
  section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 2;
    opacity: 1;
    transition: opacity 1s ease-in-out;
  }

  section.visible {
    opacity: 1;
  }

  section.visible::before {
    opacity: 0;
  }

  /* Ensure content stays above the black fade layer */
  .content {
    position: relative;
    z-index: 3;
  }

  /* Typography */
  h1, h2, h3, h5, h6 {
    font-family: 'Luckiest Guy', cursive;
    color: #d4ff35;
    line-height: 0.8em;
    margin-bottom: 30px;
    text-shadow: 0 -3px 0 #212121, 0 3px 0 #212121, -3px 0 0 #212121, 3px 0 0 #212121, 
                 -3px -3px 0 #212121, 3px -3px 0 #212121, -3px 3px 0 #212121, 3px 3px 0 #212121, 
                 -3px 6px 0 #212121, 0 6px 0 #212121, 3px 6px 0 #212121;
  }

  h1 { font-size: calc(2.75rem + 3vw); }
  h2 { font-size: calc(2.65rem + 1.8vw); }
  h3 { font-size: calc(2.6rem + 1.2vw); }
  h5 { font-size: 3rem; }
  h6 { font-size: 2rem; }

  /* Separate h4 styling to change color */
  h4 {
    font-family: 'Luckiest Guy', cursive;
    color: #d4ff35;
    line-height: 0.8em;
    margin-bottom: 30px;
    text-shadow: 0 -3px 0 #212121, 0 3px 0 #212121, -3px 0 0 #212121, 3px 0 0 #212121, 
                 -3px -3px 0 #212121, 3px -3px 0 #212121, -3px 3px 0 #212121, 3px 3px 0 #212121, 
                 -3px 6px 0 #212121, 0 6px 0 #212121, 3px 6px 0 #212121;
    font-size: calc(1.6rem + 0.6vw);
  }

  p, li {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 -2px 0 #212121, 0 2px 0 #212121, -2px 0 0 #212121, 2px 0 0 #212121,
                 -2px -2px 0 #212121, 2px -2px 0 #212121, -2px 2px 0 #212121, 2px 2px 0 #212121,
                 -2px 4px 0 #212121, 0 4px 0 #212121, 2px 4px 0 #212121;
  }

  li {
    margin-bottom:1px;
  }

  /* Larger margin for last paragraph in a section */
  section p:last-of-type {
    margin-bottom: 40px;
  }

  /* Center paragraph text on mobile devices */
  @media (max-width: 767.98px) {
    p, li {
      text-align: left;
      font-size:14px;
    }
  }

  /* Center text on mobile */
  @media (max-width: 767.98px) {
    section {
      min-height: 100vh;
      height: auto;
      padding: 40px 20px;
    }
    
    .overlay {
      position: absolute;
      height: 100%;
      width: 100%;
    }
  }

  /* Animations */
  .content {
    opacity: 0;
    position: relative;
    z-index: 3;
    transition: all 1s ease-in-out 0.3s;
  }

  section:nth-child(odd) .content { transform: translateX(-100px); }
  section:nth-child(even) .content { transform: translateX(100px); }
  section.visible .content {
    opacity: 1;
    transform: translateX(0);
  }

  /* Rotating images */
  .rotate-in-left, .rotate-in-right {
    opacity: 0;
    visibility: hidden;
    transition: all 1.2s ease-out;
  }

  .rotate-in-left { transform: rotate(-30deg) translateX(-100%); }
  .rotate-in-right {
    transform: rotate(30deg) translateX(100%);
    transition-delay: 0.6s;
  }

  .rotate-in-left.is-visible,
  .rotate-in-right.is-visible {
    opacity: 1;
    visibility: visible;
    transform: rotate(0) translateX(0);
  }

  /* Intro animations */
  @keyframes animations {
    from {
      opacity: 0;
      transform: scale(0.5) translateY(-100px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  .zoom-in {
    animation: animations 1s ease-out forwards;
  }



  .slide-from-top {
    animation: animations 1s ease-out forwards;
  }

  /* Mobile optimization */
  @media (max-width: 576px) {
    h1 { font-size: calc(2.2rem + 1.8vw); }
    h2 { font-size: calc(2.6rem + 1.2vw); }
    h3 { font-size: calc(2.55rem + 0.6vw); }
    h4 { font-size: calc(1.8rem + 1.2vw); }
    h5 { font-size: 2.3rem; }
    h6 { font-size: 2rem; }
  }

  .fade-on-scroll {
    opacity: 1;
    transition: opacity 0.5s ease-out;
  }

  .fade-out {
    opacity: 0;
  }

  .sequence-1, .sequence-2, .sequence-3 {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
  }

  .sequence-1.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .sequence-2.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
  }

  .sequence-3.visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.8s;
  }

  .section-image {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .section-image.visible {
    opacity: 1;
    transform: scale(1);
    animation: pulsate 2s ease-in-out infinite;
  }

  @keyframes pulsate {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.05);
    }
    100% {
      transform: scale(1);
    }
  }

  /* Mobile styles */
  @media (max-width: 767.98px) {
    .section-image {

    }
  }

  /* Existing sequence-1 animation will be applied since we added the class */
  .sequence-1.visible {
    opacity: 1;
    transform: scale(1);
  }

  .custom-navbar {
    background-color: #000000;
    border-bottom: 2px solid #d4ff35;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3), 0 3px 6px rgba(0, 0, 0, 0.2);
  }

  /* Add padding to body to prevent content from hiding under navbar */
  body {
    padding-top: 58px; /* Increased by 2px to account for border */
  }

  .navbar-nav .nav-link {
    color: #ff00ff !important; /* Default state */
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
  }

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link:focus,
  .navbar-nav .nav-link.active {
    color: #d4ff35 !important; /* Hover, focus, and active state */
  }

  /* Mobile menu styling */
  @media (max-width: 991.98px) {
    .navbar-collapse {
      background-color: #000000;
      padding: 1rem;
      border-radius: 0 0 8px 8px;
      margin-top: 0.5rem;
    }
    
    .navbar-collapse.show {
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav {
      padding-bottom: 0.5rem;
    }
  }

  /* Hamburger menu icon color when not expanded */
  .navbar-toggler {
    border-color: #ff00ff;
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ff00ff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  }

  /* Hamburger menu icon color when expanded (selected) */
  .navbar-toggler[aria-expanded="true"] {
    border-color: #d4ff35;
  }

  .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23d4ff35' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  }

  /* Shared border and shadow styles for navbar and sections */
  .custom-navbar {
    border-bottom: 2px solid #d4ff35;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3), 0 3px 6px rgba(0, 0, 0, 0.2);
  }

  /* Download button styles */
  .download-btn {
    background-color: #d4ff35;
    font-family: 'Roboto Mono', monospace;
    color: black;
    border: none;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
    text-transform: uppercase;
  }

  .download-btn:hover,
  .download-btn:focus {
    background-color: #ff00ff;
    color: white;
  }

  .pink-text {
  color: #ff00ff;
  }

  .green-text {
  color: #00ff00;
  }

  .download-icon {
    font-size: 1.1em; /* Slightly larger than text */
  }

  /* Adjust container spacing for mobile */
  @media (max-width: 991.98px) {
    .navbar-brand {
      flex: 0 0 auto;
    }
    
    .download-btn {
      flex: 0 1 auto;
      margin: 0 1rem;
    }
    
    .navbar-toggler {
      flex: 0 0 auto;
    }
    
    .container {
      justify-content: space-between;
      align-items: center;
    }
  }

  /* Base styles for elements before animation */
  .fade-in-element {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.8s ease-out;
  }

  /* Styles when element becomes visible */
  .fade-in-element.visible {
    opacity: 1;
    transform: scale(1);
  }

  /* Sequence timing classes */
  .sequence-2 {
    transition-delay: 0.2s;
  }

  .sequence-3 {
    transition-delay: 0.4s;
  }

  /* Pulsating animation for images */
  .section-image.visible {
    animation: pulsate 2s ease-in-out infinite;
  }

  @keyframes pulsate {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.05);
    }
    100% {
      transform: scale(1);
    }
  }

  .custom-model-viewer {
    width: 100%;
    height: 400px;
    margin: 0 auto; /* Centers horizontally */
    display: block; /* Ensures proper margin behavior */
    background-color: transparent; /* Optional: ensures no background color */
  }

  /* Mobile styles */
  @media (max-width: 767.98px) {
    .custom-model-viewer {
      height: 200px;
    }
  }

  /* Ensure model-viewer has proper loading behavior */
  model-viewer::part(default-progress-bar) {
    background-color: #ff00ff; /* Matches your theme */
  }

  /* Optional: Style the AR button if needed */
  model-viewer::part(ar-button) {
    background-color: #ff00ff;
    color: white;
  }

  

  /* Ensure content remains visible above the aurora */
  .content {
    position: relative;
    z-index: 1;
  }

  .intro-section {
    position: relative;
  }

  .planet-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    width: 100%;
    max-width: 800px;
    height: auto;
  }

  .rotating-planet {
    width: 100%;
    height: auto;
    animation: rotate 60s linear infinite;
    opacity: 0.8; /* Adjust as needed */
  }

  .klout-explosion {
    width: 500px;
    height: auto;
    animation: rotate 30s linear infinite;
    opacity: 0.8; /* Adjust as needed */
  }

  .treasure-map {
    width: 500px;
    height: auto;
    animation: sway 3s ease-in-out infinite;
    opacity: 0.8; /* Adjust as needed */
  }

  .klout-antirotate {
    width: 500px;
    height: auto;
    animation: antirotate 10s linear infinite;
    opacity: 0.8; /* Adjust as needed */

  }

  @keyframes antirotate {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(-360deg);
    }
  }

  @media screen and (max-width: 768px) {
    .klout-explosion {
      width: 100%;
    }
    .treasure-map {
      width: 100%;
    }
    .klout-antirotate {
      width: 100%;
    }
  }

  @keyframes rotate {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

  /* Ensure model-viewer stays above the planet */
  .custom-model-viewer {
    position: relative;
    z-index: 1;
  }

  .section-border {
    position: relative;
    overflow: hidden;
    border-bottom: 1px dashed #d4ff35;
  }

  .space-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
  }

  /* Stars Layers */
  .stars-layers {
    position: absolute;
    width: 100%;
    height: 100%;
    perspective: 300px;
  }

  .stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
  }

  .stars.small {
    background-image: radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 50px 90px, #fff, rgba(0,0,0,0));
    background-size: 200px 200px;
    animation: twinkle-small 4s infinite alternate;
  }

  .stars.medium {
    background-image: radial-gradient(2px 2px at 100px 150px, #fff, rgba(0,0,0,0)),
                      radial-gradient(2px 2px at 200px 250px, #fff, rgba(0,0,0,0));
    background-size: 300px 300px;
    animation: twinkle-medium 5s infinite alternate;
  }

  .stars.large {
    background-image: radial-gradient(3px 3px at 150px 200px, #fff, rgba(0,0,0,0)),
                      radial-gradient(3px 3px at 250px 300px, #fff, rgba(0,0,0,0));
    background-size: 400px 400px;
    animation: twinkle-large 6s infinite alternate;
  }

  /* Nebulae */
  .nebulae {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .nebula {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    border-radius: 40%;
    filter: blur(60px);
  }

  .nebula-blue {
    background: radial-gradient(circle at center,
        rgba(63, 94, 251, 0.1) 0%,
        rgba(63, 94, 251, 0) 70%);
    animation: nebula-drift 30s infinite linear;
  }

  .nebula-purple {
    background: radial-gradient(circle at center,
        rgba(252, 70, 107, 0.1) 0%,
        rgba(252, 70, 107, 0) 70%);
    animation: nebula-drift 40s infinite linear reverse;
    animation-delay: -10s;
  }

  .nebula-teal {
    background: radial-gradient(circle at center,
        rgba(70, 252, 167, 0.1) 0%,
        rgba(70, 252, 167, 0) 70%);
    animation: nebula-drift 35s infinite linear;
    animation-delay: -20s;
  }

  /* Animations */
  @keyframes twinkle-small {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
  }

  @keyframes twinkle-medium {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
  }

  @keyframes twinkle-large {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
  }

  @keyframes nebula-drift {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 0.2;
    }
    50% {
        transform: rotate(180deg) scale(1.5);
        opacity: 0.4;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 0.2;
    }
  }

  /* Add glow to large stars */
  .stars.large::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    filter: blur(4px);
    animation: star-glow 3s infinite alternate;
  }

  @keyframes star-glow {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
  }

  .animated-bg {
    position: relative;
    background: linear-gradient(
        45deg,
        #000510,
        #010b1c,
        #050a15,
        #0a0b1f,
        #0d0a1e,
        #0a0f1c,
        #071016,
        #0a1515,
        #0d1a1a
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
  }

  .animated-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(16, 0, 43, 0.8),
        rgba(0, 21, 36, 0.8),
        rgba(0, 26, 26, 0.8)
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    animation-delay: -5s;
    mix-blend-mode: soft-light;
  }

  @keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
  }

  /* Adjust overlay opacity to allow background to show through */
  .overlay {
    background: rgba(0, 0, 0, 0.2);
    mix-blend-mode: multiply;
  }

  /* Add subtle pulsing glow */
  .animated-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(43, 0, 61, 0.2),
        rgba(0, 38, 38, 0.2),
        rgba(0, 20, 51, 0.2)
    );
    animation: pulseGlow 10s ease-in-out infinite;
    mix-blend-mode: soft-light;
  }

  @keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
  }

  @keyframes sway {
    0%, 100% {
      transform: rotate(-5deg);
    }
    50% {
      transform: rotate(5deg);
    }
  }

  .findable-cards {
    animation: zoom 1s ease-in-out infinite;
  }

  @keyframes zoom {
    0%, 100% {
      width: 20%;
    }
    50% {
      width: 100%;
    }
  }

  @media screen and (max-width: 768px) {
    .klout-explosion {
      width: 100%;
    }
    .treasure-map {
      width: 100%;
    }
    .klout-antirotate {
      width: 100%;
    }
    .findable-cards {
      width: 40px !important;
    }
  }

  .pulse {
    animation: pulse 5s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% {
      transform: scale(0.25);
    }
    50% {
      transform: scale(1);
    }
  }

  .footer {
    background-color: #1a1a1a;
    color: #ffffff;
  }

  .footer h5 {
    color: #ff00ff;
    margin-bottom: 1rem;
  }

  .footer a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .footer a:hover {
    color: #ff00ff;
  }

  .social-links a {
    font-size: 1.5rem;
    color: #ffffff;
    transition: color 0.3s ease;
  }

  .social-links a:hover {
    color: #ff00ff;
  }

  .footer hr {
    border-color: #333333;
    margin: 2rem 0;
  }

  .section-image[src*="gamifeye-king.png"] {
    animation: float 3s ease-in-out infinite;
  }

  @keyframes float {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
  }

  .slideshow {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 20px 0;
  }

  .slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out;
  }

  .slideshow img.active {
    opacity: 1;
  }

  .cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border-top: 2px solid #d4ff35;
    color: white;
    padding: 1rem;
    display: none;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.3;
  }

  .cookie-consent.active {
    display: block;
  }

  .cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }

  .cookie-text {
    flex: 1;
  }

  .cookie-buttons {
    display: flex;
    gap: 1rem;
  }

  .cookie-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
  }

  .cookie-btn.accept {
    background: #ff00ff;
    color: white;
  }

  .cookie-btn.accept:hover {
    background: #cc00cc;
  }

  .cookie-btn.decline {
    background: transparent;
    color: white;
    border: 1px solid white;
  }

  .cookie-btn.decline:hover {
    background: rgba(255, 255, 255, 0.1);
  }

   /* 3D Flip animation for planets image */
   @keyframes flip3D {
    0% { transform: perspective(1000px) rotateY(0deg); }
    100% { transform: perspective(1000px) rotateY(360deg); }
}

img[src*="planets-blank.png"] {
    animation: flip3D var(--flip-duration) ease-in-out infinite;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}