/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styles */
body {
  background: rgb(2, 6, 23);
  height: 100svh;
  display: grid;
  place-items: center;    
  place-content: center;
  
  color: white;
  font-family: 'Jost', sans-serif;
  
  grid-template-areas: "stack";
  overflow: hidden;
  
  > * {
    grid-area: stack;
  }
}

/* Static Background Container */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('../images/background/360-day.jpg');
  background-size: 130%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -1;
  transition: background-image 400ms cubic-bezier(1, 0.0, 0.4, 1);
}

/* Portrait orientation optimization */
@media (orientation: portrait) {
  body::before {
    background-size: cover;
    background-position: center center;
  }
}

/* Landscape orientation optimization */
@media (orientation: landscape) {
  body::before {
    background-size: cover;
    background-position: center center;
  }
}

/* Theme-specific backgrounds */
body:has(input[value="dark"]:checked)::before {
  background-image: url('../images/background/360-night.jpg');
}

body:has(input[value="dim"]:checked)::before {
  background-image: url('../images/background/360-dim.jpg');
}

/* Main Title */
.main-title-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.main-title {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: clamp(48px, 12vw, 120px);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-align: center;
  margin: 0;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  white-space: nowrap;
  
  /* Simple text color - no gradient or reflections */
  color: rgba(255, 255, 255, 0.85);
  
  /* Cloudy/soft text shadow effect for depth and readability */
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.6),
    0 0 20px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(255, 255, 255, 0.3),
    0 0 40px rgba(255, 255, 255, 0.2);
  
  position: relative;
}

/* Bounce animation for individual letters */
.main-title span {
  display: inline-block;
  animation: letterBounce 2s ease-in-out infinite;
  /* Start bounce after fadeIn completes (1.5s + 0.5s delay) */
  animation-delay: 2s;
}

/* Stagger animation delays for each letter */
.main-title span:nth-child(1) { animation-delay: 2s; }
.main-title span:nth-child(2) { animation-delay: 2.1s; }
.main-title span:nth-child(3) { animation-delay: 2.2s; }
.main-title span:nth-child(4) { animation-delay: 2.3s; }
.main-title span:nth-child(5) { animation-delay: 2.4s; }
.main-title span:nth-child(6) { animation-delay: 2.5s; }
.main-title span:nth-child(7) { animation-delay: 2.6s; }
.main-title span:nth-child(8) { animation-delay: 2.7s; }
.main-title span:nth-child(9) { animation-delay: 2.8s; }
.main-title span:nth-child(10) { animation-delay: 2.9s; }

/* Space between words */
.main-title span.space {
  width: 0.1em;
  animation: none;
}

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

.main-title:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* Pause bounce on hover for better readability */
.main-title:hover span {
  animation-play-state: paused;
}

/* Blur entire background on text hover */
.main-title:hover ~ * {
  filter: blur(3px);
  transition: filter 0.3s ease;
}

/* Alternative approach - blur body background on hover */
body:has(.main-title:hover)::before {
  filter: blur(3px);
  transition: filter 0.3s ease;
}


/* Airplane Animation */
.airplane-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2; /* Above the text */
}

.airplane {
  position: absolute;
  font-size: clamp(32px, 5vw, 64px);
  transition: transform 16ms ease-linear;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  filter: drop-shadow(0 0 25px rgba(0, 0, 0, 0.6));
}

/* Parachute Animation */
.parachute-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2; /* Above the text */
  display: none; /* Hidden by default */
}

.parachute {
  position: absolute;
  font-size: clamp(32px, 5vw, 64px);
  transition: transform 16ms ease-linear;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  filter: drop-shadow(0 0 25px rgba(0, 0, 0, 0.6));
}

/* Satellite Animation */
.satellite-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2; /* Above the text */
  display: none; /* Hidden by default */
}

.satellite {
  position: absolute;
  font-size: clamp(32px, 5vw, 64px);
  transition: transform 16ms ease-linear;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  filter: drop-shadow(0 0 25px rgba(0, 0, 0, 0.6));
}


/* Shooting Stars Canvas */
.shooting-stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  display: none; /* Hidden by default */
}

/* Show shooting stars only for dark theme */
body:has(input[value="dark"]:checked) .shooting-stars-canvas {
  display: block;
}

/* Floating Sand Particles Canvas */
.floating-sand-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  display: none; /* Hidden by default */
}

/* Show floating sand particles only for dim theme */
body:has(input[value="dim"]:checked) .floating-sand-canvas {
  display: block;
}

/* Hide airplane for dark and dim themes */
body:has(input[value="dark"]:checked) .airplane-container {
  display: none;
}

body:has(input[value="dim"]:checked) .airplane-container {
  display: none;
}

/* Show parachute only for dim theme */
body:has(input[value="dim"]:checked) .parachute-container {
  display: block;
}

/* Show satellite only for dark theme */
body:has(input[value="dark"]:checked) .satellite-container {
  display: block;
}

/* Theme-specific font colors */
/* Day theme (default) - black text */
body {
  color: black;
}

/* Dark theme - white text */
body:has(input[value="dark"]:checked) {
  color: white;
}

body:has(input[value="dark"]:checked) * {
  color: white;
}

/* Dim theme - white text */
body:has(input[value="dim"]:checked) {
  color: white;
}

body:has(input[value="dim"]:checked) * {
  color: white;
}


/* Liquid Glass Button - Independent from Switcher */
.liquid-glass-button {
  position: fixed;
  z-index: 1;
  bottom: 40px;
  left: 50%;
  transform: translate(-50%, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  isolation: isolate;
  background-color: rgb(255 255 255 / 25%);
  color: rgb(255 255 255 / 90%);
  text-shadow: 0 2px 4px rgb(0 0 0 / 10%);
  box-shadow: 0 6px 6px rgb(0 0 0 / 20%), 0 0 20px rgb(0 0 0 / 10%);
  user-select: none;
  cursor: pointer;
  transition: all 0.3s ease;
  
  &::before,
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
  }
  
  /* Glass distortion effect */
  &::before {
    backdrop-filter: blur(3px);
    filter: url(#glass-distortion);
    z-index: -1;
  }
  
  /* Outline shine */
  &::after {
    box-shadow: inset 2px 2px 1px 0 rgb(255 255 255 / 50%), inset -1px -1px 1px 1px rgb(255 255 255 / 50%);
  }
}

.liquid-glass-button:hover {
  transform: translate(-50%, -2px);
  background-color: rgb(255 255 255 / 35%);
  box-shadow: 0 8px 8px rgb(0 0 0 / 25%), 0 0 25px rgb(0 0 0 / 15%);
}

.liquid-glass-button:active {
  transform: translate(-50%, 0px);
  background-color: rgb(255 255 255 / 20%);
}

.liquid-glass-button__icon {
  width: 24px;
  height: 24px;
  /* Default (day theme) - black icon */
  filter: brightness(0) saturate(100%) invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0%) contrast(100%);
  transition: 
    filter 200ms cubic-bezier(0.5, 0, 0, 1),
    transform 200ms cubic-bezier(0.5, 0, 0, 1);
  z-index: 1;
}

.liquid-glass-button:hover .liquid-glass-button__icon {
  /* Day theme hover - slightly lighter black */
  filter: brightness(0) saturate(100%) invert(20%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
  transform: scale(1.1);
}

/* Dark mode icon color - white */
body:has(input[value="dark"]:checked) .liquid-glass-button__icon {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

body:has(input[value="dark"]:checked) .liquid-glass-button:hover .liquid-glass-button__icon {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(120%) contrast(120%);
  transform: scale(1.1);
}

/* Dim mode icon color - white */
body:has(input[value="dim"]:checked) .liquid-glass-button__icon {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

body:has(input[value="dim"]:checked) .liquid-glass-button:hover .liquid-glass-button__icon {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(120%) contrast(120%);
  transform: scale(1.1);
}

/* Liquid Glass Footer */
.liquid-glass-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  isolation: isolate;
  background-color: rgb(255 255 255 / 20%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgb(255 255 255 / 30%);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.liquid-glass-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  filter: url(#glass-distortion);
  z-index: -1;
}

.liquid-glass-footer.footer-open {
  max-height: 180px;
}

.footer-content {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

/* Brand Section */
.footer-brand {
  text-align: left;
}

.footer-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgb(0 0 0 / 95%);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.footer-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: rgb(0 0 0 / 80%);
  text-transform: uppercase;
}

/* Contact Section */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.footer-icon {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
}

.footer-link a {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgb(0 0 0 / 90%);
  text-decoration: none;
  transition: color 0.2s ease;
  text-transform: uppercase;
}

.footer-link a:hover {
  color: rgb(0 0 0 / 100%);
}

/* Legal Section */
.footer-legal {
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
}

.footer-legal a {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: rgb(0 0 0 / 80%);
  text-decoration: none;
  transition: color 0.2s ease;
  text-transform: uppercase;
}

.footer-legal a:hover {
  color: rgb(0 0 0 / 100%);
}

.footer-separator {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: rgb(0 0 0 / 60%);
}

/* Copyright Section */
.footer-copyright {
  padding: 0.5rem 1rem 1rem;
  text-align: center;
  border-top: 1px solid rgb(255 255 255 / 20%);
  margin-top: 0.5rem;
}

.footer-copyright-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: rgb(0 0 0 / 70%);
  margin: 0;
  text-transform: uppercase;
}

/* Cookies Popup Styles */
.cookies-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px 15px 0 0;
  padding: 20px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  color: #333;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  transform: translateY(100%);
  opacity: 0;
  transition: all 1.5s ease-in-out;
}

.cookies-popup.show {
  transform: translateY(0);
  opacity: 1;
}

.cookies-content p {
  margin-bottom: 15px;
}

.cookies-content a {
  color: #007bff;
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
}

.cookies-content a:hover {
  text-decoration: underline;
}

.accept-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-top: 10px;
  margin-left: auto;
  display: block;
}

.accept-btn:hover {
  background: #0056b3;
}

.accept-btn:active {
  transform: scale(0.98);
}

/* Question Popup Styles - Apple iOS Style */
.question-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.question-popup.show {
  opacity: 1;
  visibility: visible;
}

.question-popup.show .question-content {
  animation: dialogFadeIn 0.4s ease-out;
}

@keyframes dialogFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.question-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 14px;
  padding: 0;
  max-width: 320px;
  width: 90%;
  text-align: center;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.question-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  filter: url(#glass-distortion);
  z-index: -1;
  border-radius: 14px;
}

.question-content h2 {
  font-size: 17px;
  margin: 0;
  padding: 20px 20px 10px 20px;
  line-height: 1.3;
  font-weight: 400;
  color: #fff;
}

.question-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 20px 20px 20px;
}

.question-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.question-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  filter: url(#glass-distortion);
  z-index: -1;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.question-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.question-btn:hover::before {
  opacity: 1;
}

.question-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(0) scale(0.98);
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 30px;
  height: 30px;
  border-radius: 15px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.close-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  filter: url(#glass-distortion);
  z-index: -1;
  border-radius: 15px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.close-btn:hover::before {
  opacity: 1;
}

.close-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(0) scale(0.95);
}