/* Mobile-First CSS for Project Mjolnir */

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

body {
  font-family: ubuntu, sans-serif;
  color: #333;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body::-webkit-scrollbar {
  display: none;
}

/* Mobile Page Structure */
.mobile-page {
  width: 100vw;
  min-height: 100vh; /* Minimum full screen, can grow */
  display: flex;
  flex-direction: column;
  position: relative;
  scroll-snap-align: start;
}

/* Video page stays fixed height */
#videoPage {
  height: 100vh; /* Fixed height for video */
}

/* Landing Video Page */
#videoPage {
  background: #000;
  justify-content: center;
  align-items: center;
}

.mobile-header {
  position: absolute;
  top: 5%;
  left: 5%;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.mobile-logo {
  width: 80px;
  height: auto;
  margin-bottom: 10px;
}

.mobile-header h1 {
  font-size: 14pt;
  color: #333;
  text-align: center;
  margin: 0;
}

.mobile-video-container {
  width: 100%;
  height: 100%;
  position: relative;
}

#mobileBackgroundVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile Resources Overlay - Scroll Up Triggered */
.mobile-resources-overlay {
  position: fixed;
  top: -70vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 70vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  z-index: 100;
  transition: top 0.4s ease;
  overflow-y: auto;
  border-radius: 15px 15px 0 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: none;
}

.mobile-resources-overlay.active {
  top: 15vh;
}

.mobile-resources-overlay::before {
  content: "Swipe down to close";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 69, 0, 0.9);
  color: white;
  padding: 6px 15px;
  font-size: 10pt;
  border-radius: 15px;
  z-index: 101;
}

.mobile-resources-content {
  width: 100%;
  text-align: center;
  padding: 40px 20px 20px 20px;
}

.mobile-resources-content h1 {
  font-size: 20pt;
  margin-bottom: 10px;
  color: #333;
}

.mobile-resources-content h2 {
  font-size: 16pt;
  margin: 15px 0 8px 0;
  color: #444;
}

.mobile-resources-content p {
  font-size: 10pt;
  line-height: 1.4;
  margin-bottom: 15px;
  color: #666;
}

.mobile-downloads {
  margin: 15px 0;
}

.mobile-download-btn {
  display: block;
  width: 90%;
  max-width: 280px;
  margin: 8px auto;
  padding: 12px;
  background-color: #ff4500;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12pt;
  font-family: ubuntu;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-download-btn:hover {
  background-color: #e03e00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-video {
  margin: 15px 0;
}

.mobile-video iframe {
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Gallery Page - No gaps, content-fitted height */
#galleryPage {
  background: #f8f9fa;
  padding: 0;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  height: auto; /* Let content determine height */
  min-height: 100vh; /* Minimum full screen */
}

.mobile-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0; /* No gaps between images */
  width: 100vw;
  height: auto; /* Height determined by content */
}

.mobile-gallery-grid img {
  width: 100%;
  height: 50vw; /* Square images - half viewport width for 2 columns */
  object-fit: cover;
  border-radius: 0; /* No rounded corners for seamless grid */
  cursor: zoom-in;
  transition: transform 0.2s ease;
  display: block;
}

.mobile-gallery-grid img:hover {
  transform: scale(1.02); /* Subtle hover effect */
  z-index: 10;
  position: relative;
}

/* About Page - Let it spread out naturally */
#aboutPage {
  background: #fff;
  padding: 20px;
  justify-content: flex-start;
  align-items: center;
  overflow-y: auto;
  height: auto; /* Let content determine height */
  min-height: 100vh; /* At least full screen */
}

.mobile-about-content {
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.mobile-about-content h1 {
  font-size: 24pt;
  margin-bottom: 10px;
  color: #333;
}

.mobile-about-content h2 {
  font-size: 16pt;
  margin-bottom: 15px;
  color: #666;
  font-style: italic;
}

.mobile-about-content p {
  font-size: 12pt;
  line-height: 1.8;
  margin-bottom: 25px;
  color: #555;
  text-align: left;
  padding: 0 10px;
}

.mobile-3d-container {
  width: 100%;
  height: 350px; /* Larger 3D model area */
  margin: 30px 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-sketchfab {
  width: 100%;
  height: 100%;
  border: 0;
  background-color: rgba(200, 200, 200, 0.1);
}

.mobile-donate-link {
  text-decoration: none;
  margin-top: 20px;
  display: block;
}

.mobile-donate-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 14pt;
  font-family: ubuntu;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-donate-btn:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Image Overlay */
#mobile-overlay-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9998;
  display: none;
}

#mobile-image-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: none;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
  .mobile-header {
    top: 3%;
    left: 3%;
    padding: 10px;
  }

  .mobile-logo {
    width: 60px;
  }

  .mobile-header h1 {
    font-size: 12pt;
  }

  .mobile-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .mobile-gallery-grid img {
    height: 120px;
  }
}
