/* Clean, modern styling with better contrast */
:root {
  --dark-bg: #111111;
  --text-color: #f8f8f8;
  --accent-gold: #e6b800;
  --subtle-accent: #1a1a1a;
  --footer-bg: rgba(0, 0, 0, 0.9);
}

/* Base styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--dark-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

body.loaded {
  opacity: 1;
}

/* Page loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--dark-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition:
    opacity 0.8s ease-out,
    visibility 0.8s ease-out;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-icon {
  width: 100px;
  height: 100px;
  position: relative;
}

.loader-icon img {
  width: 100%;
  height: auto;
  animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* Video section */
.video-container {
  width: 100%;
  height: 70vh;
  overflow: hidden;
  position: relative;
  background-color: var(--dark-bg);
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: linear-gradient(to top, var(--dark-bg), transparent);
  z-index: 2;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Prevent stretching on mobile */
  object-position: center;
  /* Ensure proper aspect ratio */
  aspect-ratio: 16/9;
}

/* Video loading indicator */
.video-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: white;
  z-index: 2;
  background: rgba(0, 0, 0, 0.7);
  padding: 2rem;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Logo overlay on video */
.video-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 14%; /* Reduced by 1/3 from 16.5% */
  max-width: 80px; /* Reduced by 1/3 from 100px */
  z-index: 3;
}

.video-logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.7));
}

/* Main content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Tagline with animation */
.tagline {
  font-size: 2.5rem;
  text-align: center;
  margin-top: 0rem;
  margin-bottom: 2rem;
  color: var(--accent-gold);
  font-weight: 600;
  line-height: 1.3;
  max-width: 1200px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.tagline .separator {
  display: inline-block;
  width: 2rem;
  position: relative;
}

.tagline .separator.medium-screen {
  width: 0.75rem;
}

.tagline .separator.small-screen {
  width: 0.4rem;
}

.tagline .word {
  display: inline-block;
  opacity: 1;
  transition:
    text-shadow 0.5s ease,
    color 0.5s ease;
  margin: 0 0.15em;
}

.tagline .word.accent {
  color: #ffffff;
  animation: glow-pulse 3s infinite alternate;
}

.tagline .word.regular {
  animation: subtle-pulse 4s infinite alternate;
}

/* Subtle glow effect that fades in and out */
.tagline::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(230, 184, 0, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  z-index: -1;
  animation: subtle-glow 4s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
  0% {
    text-shadow:
      0 0 5px var(--accent-gold),
      0 0 10px rgba(230, 184, 0, 0.3);
  }
  50% {
    text-shadow:
      0 0 10px var(--accent-gold),
      0 0 20px rgba(230, 184, 0, 0.5),
      0 0 30px rgba(230, 184, 0, 0.2);
  }
  100% {
    text-shadow:
      0 0 5px var(--accent-gold),
      0 0 10px rgba(230, 184, 0, 0.3);
  }
}

@keyframes subtle-pulse {
  0% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
}

@keyframes subtle-glow {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.logo-container {
  width: 100%;
  max-width: 500px;
  margin: 2rem auto 3rem;
  text-align: center;
}

.logo-container img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

/* Features section */
.features {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
  gap: 2rem;
  width: 100%;
}

.feature-card {
  background-color: var(--subtle-accent);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  width: 320px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.feature-icon {
  font-size: 2.8rem;
  margin-bottom: 1.2rem;
  color: var(--accent-gold);
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent-gold);
}

.feature-desc {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.6;
}

/* Store buttons */
.store-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  margin: 0.25rem auto;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.store-button {
  display: inline-block;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  opacity: 0.9;
}

.store-button:hover {
  transform: scale(1.05);
  opacity: 1;
}

.store-button img {
  height: auto;
  width: auto;
}

/* Set specific sizes for each store button */
.store-button img[alt='Get it on Google Play'] {
  width: 170px;
  max-height: 50px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.store-button img[alt='Download on the App Store'] {
  max-height: 50px;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* Store buttons container */
.store-buttons-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
}

/* Navigation buttons */
.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem auto 2rem;
  flex-wrap: wrap;
}

.nav-button {
  background: linear-gradient(135deg, var(--accent-gold), #d4a500);
  color: var(--dark-bg);
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(230, 184, 0, 0.2);
  min-width: 160px;
  text-align: center;
}

.nav-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(230, 184, 0, 0.3);
  background: linear-gradient(135deg, #f0c300, var(--accent-gold));
}

/* Paragraph spacing for better readability */
.section-content p {
  margin-bottom: 1.5rem;
}

.section-content p:last-child {
  margin-bottom: 0;
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  padding: 0.5rem;
  text-align: center;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.footer-copyright {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: #ffffff;
  font-size: 0.9rem;
}

.footer-logo {
  height: 20px;
  width: auto;
  vertical-align: middle;
}

footer a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  .video-container {
    height: 50vh;
    /* Better mobile video handling */
    min-height: 300px;
  }

  .video-logo {
    max-width: 150px;
  }

  /* Mobile video optimizations */
  .video-container video {
    /* Better mobile performance */
    will-change: transform;
    /* Prevent iOS Safari issues */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  .tagline {
    font-size: 1.8rem;
  }

  /* Reduce separator width for medium screens */
  .tagline .separator {
    width: 0.75rem;
  }

  /* Reduce word margins for medium screens */
  .tagline .word {
    margin: 0 0.1em;
  }

  .features {
    flex-direction: column;
    align-items: center;
  }

  .feature-card {
    width: 100%;
    max-width: 360px;
  }

  .store-buttons {
    flex-direction: column;
    align-items: center;
  }

  .nav-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .nav-button {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .video-container {
    height: 40vh;
    /* Ensure minimum height for small screens */
    min-height: 250px;
  }

  .video-logo {
    max-width: 100px;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .tagline {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  /* Minimal separator for small screens */
  .tagline .separator {
    width: 0.4rem;
  }

  /* Reduce word margins for small screens */
  .tagline .word {
    margin: 0 0.05em;
  }

  .feature-card {
    padding: 1.8rem 1.5rem;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  .video-container video {
    object-fit: contain !important;
    background: #111;
  }
}

.unmute-button {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.unmute-button:hover {
  background-color: rgba(0, 0, 0, 0.7);
}
