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

/* Variables for Gaming Theme */
:root {
  --primary: #FFCC00; /* Gaming Yellow */
  --dark: #0f0f0f;
  --darker: #050505;
  --text-gray: #b3b3b3;
}

/* Hide Custom Scrollbar */
::-webkit-scrollbar {
  display: none;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(-45deg, #0a0514, #4a154b, #154a4a, #050505);
  background-size: 400% 400%;
  animation: gradientBG 8s ease infinite;
  color: white;
  height: 100vh;
  overflow: hidden; /* Disable body scroll, move to wrapper */
}

/* Loading Screen */
#loader {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--darker);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
  margin-bottom: 1rem;
}

.loading-text {
  font-family: 'Teko', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 4px;
  color: white;
  animation: pulse 1.5s infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

/* Parallax Wrapper */
.wrapper {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  perspective: 10px;
  scroll-behavior: smooth;
  scroll-padding-bottom: 100px; /* Prevents the bottom navbar from covering content when jumping to sections */
}

/* Parallax Background Layer */
.parallax-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  height: 120%; /* Extra height for parallax movement */
  transform: translateZ(-10px) scale(2);
  z-index: -1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Teko', sans-serif;
  font-size: 25vw;
  color: rgba(255, 255, 255, 0.05);
  letter-spacing: 20px;
  pointer-events: none;
  animation: rotateText 60s linear infinite;
}

@keyframes rotateText {
  from {
    transform: translateZ(-10px) scale(2) rotate(0deg);
  }
  to {
    transform: translateZ(-10px) scale(2) rotate(360deg);
  }
}

/* Floating Button Nav */
.button-nav {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(15px);
  padding: 0.5rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 204, 0, 0.2);
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease-in-out;
}

.button-nav.nav-hidden {
  transform: translate(-50%, 150%); /* Moves down while maintaining horizontal centering */
}

.button-nav a {
  color: white;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Springy pop effect */
}

.button-nav a i {
  font-size: 1.1rem;
}

.button-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
}

.button-nav a.active {
  background: var(--primary);
  color: black;
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
  transform: scale(1.1); /* Scales the active button up by 10% */
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 10% 4rem;
  min-height: 90vh;
  position: relative;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  z-index: 2;
}

.badge {
  background: var(--primary);
  color: black;
  display: inline-block;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  transform: skew(-10deg);
  margin-bottom: 1rem;
}

.hero-content .badge {
  /* Chains the fade-in and the continuous pulse (1s delay + 0.8s duration = 1.8s delay for the pulse) */
  animation: badgeFadeIn 0.8s ease 1s both, badgePulse 2s ease-in-out 1.8s infinite;
}

@keyframes badgeFadeIn {
  from { opacity: 0; transform: translateY(-50px) skew(-10deg); }
  to { opacity: 1; transform: translateY(0) skew(-10deg); }
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 204, 0, 0); }
  50% { box-shadow: 0 0 20px var(--primary); }
}

h1 {
  font-family: 'Teko', sans-serif;
  font-size: 5.5rem;
  line-height: 0.9;
  margin-bottom: 1rem;
  text-transform: uppercase;
  text-shadow: 4px 4px 0px rgba(0,0,0,0.5);
  animation: fadeInDown 1s cubic-bezier(0.2, 0.8, 0.2, 1) 1.2s both;
}

h1:hover .highlight::before {
  text-shadow: -2px 0 #ff00c1;
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

h1:hover .highlight::after {
  text-shadow: -2px 0 #00fff9;
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.highlight {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.highlight::before,
.highlight::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--darker);
  clip-path: inset(100% 0 0 0);
}

p {
  font-size: 1.1em;
  margin-bottom: 2.5em;
  color: var(--text-gray);
  max-width: 450px;
}

.hero-content p {
  animation: fadeInDown 1s cubic-bezier(0.2, 0.8, 0.2, 1) 1.4s both;
}

/* Skewed Gaming Button */
a.download-btn {
  display: inline-block;
  background: var(--primary);
  color: black;
  padding: 1.1em 2.5em;
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0% 100%, 0% 30%);
  transition: all 0.3s ease;
}

.hero-content .download-btn {
  animation: fadeInDown 1s cubic-bezier(0.2, 0.8, 0.2, 1) 1.6s both;
}

a.download-btn:hover {
  transform: scale(1.05) skew(-2deg);
  background: white;
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
}

/* Android phone mockup - Darker & Tilted */
.android-frame {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 9 / 19;
  border: 4px solid #333; /* Thinner modern bezel */
  border-radius: 20px;
  background: #000;
  margin: 0;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  /* 3D Tilt Effect */
  transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
  transition: transform 0.5s ease;
  animation: pulseGlow 3s infinite ease-in-out;
}

.android-frame:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* Side buttons removed visually or simplified */
.android-frame::before { display: none; }

/* Reflection Overlay */
.android-frame::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.05) 40%, transparent 50%);
  pointer-events: none;
  z-index: 10;
  border-radius: 20px;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8); }
  50% { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 60px rgba(255, 204, 0, 0.25); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  z-index: 9;
  animation: bounce 2s infinite;
}

.scroll-indicator span {
  font-family: 'Teko', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 3px;
  color: var(--text-gray);
}

.scroll-indicator .arrow {
  width: 15px;
  height: 15px;
  border-right: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* Camera */
.camera {
  position: absolute;
  top: 10px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 24px;
  background: black;
  border-radius: 50%;
  z-index: 5;
  display: flex; justify-content: center; align-items: center;
}
.camera-lens { width: 10px; height: 10px; background: #1a1a1a; border-radius: 50%; }
.camera-dot { display: none; }

/* Screen Wrapper ensures corners are clipped correctly during 3D transform */
.screen-wrapper {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 16px; /* 20px outer radius - 4px border */
  overflow: hidden;
  z-index: 1;
  -webkit-mask-image: -webkit-radial-gradient(white, black); /* WebKit bug fix */
}

/* Animation Logic */
.screen-scroll {
  display: flex;
  width: 100%; height: 100%;
  /* Disabled manual scroll for auto slideshow */
  animation: slideshow 16s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

.android-frame:hover .screen-scroll {
  animation-play-state: paused;
}

.screenshot {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  object-fit: cover;
}

@keyframes slideshow {
  0%, 15% { transform: translateX(0); }
  20%, 35% { transform: translateX(-100%); }
  40%, 55% { transform: translateX(-200%); }
  60%, 75% { transform: translateX(-300%); }
  80%, 95% { transform: translateX(-400%); }
  100% { transform: translateX(-500%); }
}

/* Features Showcase Section */
.showcase {
  padding: 4rem 10%;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(10px);
  clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%); /* Slanted top edge */
  margin-top: -60px;
  padding-top: 100px;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: 'Teko', sans-serif;
  font-size: 3.5rem;
  margin: 50px auto 1rem auto;
  color: white;
  text-transform: uppercase;
  position: relative;
  width: fit-content;
}

.section-title::before,
.section-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.section-title::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip-path: inset(0 0 0 0);
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.section-title::after {
  left: -2px;
  text-shadow: -2px 0 #00fff9;
  clip-path: inset(0 0 0 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(20% 0 80% 0); }
  20% { clip-path: inset(60% 0 10% 0); }
  40% { clip-path: inset(10% 0 50% 0); }
  60% { clip-path: inset(80% 0 5% 0); }
  80% { clip-path: inset(30% 0 40% 0); }
  100% { clip-path: inset(50% 0 30% 0); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(10% 0 60% 0); }
  20% { clip-path: inset(30% 0 20% 0); }
  40% { clip-path: inset(70% 0 10% 0); }
  60% { clip-path: inset(20% 0 50% 0); }
  80% { clip-path: inset(60% 0 20% 0); }
  100% { clip-path: inset(40% 0 30% 0); }
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 9/16;
  cursor: pointer;
  border: 1px solid #333;
  opacity: 0;
  transform: translateY(50px);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease-out, border-color 0.3s, box-shadow 0.3s;
}

.card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  animation: neonPulse 1.5s infinite alternate;
}

@keyframes neonPulse {
  from { box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary); }
  to { box-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary); }
}

.card img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.8);
  transition: filter 0.3s;
}

.card:hover img { filter: brightness(1); }

.card-info {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  padding: 1.5rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  color: white;
  text-align: center;
  transition: all 0.3s;
}

/* Hover Gradient intensification */
.card:hover .card-info {
  background: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0.4));
  padding-bottom: 2rem;
}

.card-info h3 {
  font-family: 'Teko', sans-serif;
  font-size: 1.8rem;
  margin: 0;
  letter-spacing: 1px;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.card-info p {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  color: var(--text-gray);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: all 0.4s ease;
}

.card:hover .card-info p {
  max-height: 60px; /* Reveal text */
  opacity: 1;
  margin-top: 0.5rem;
}

/* About Section */
.widget-content {
  padding: 4rem 10%;
  background: linear-gradient(to bottom, transparent, var(--darker));
  position: relative;
  z-index: 2;
}

.widget-content h2 {
  font-family: 'Teko', sans-serif;
  font-size: 3.5rem;
  color: white;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.widget-content p {
  max-width: 800px;
  margin-bottom: 3rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid #333;
  padding: 2rem;
  border-radius: 4px;
  text-align: center;
  position: relative;
  /* Tech-style corner cut */
  clip-path: polygon(0 0, 100% 0, 100% 85%, 90% 100%, 0 100%);
  opacity: 0;
  transform: translateY(50px);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease-out, border-color 0.3s, box-shadow 0.3s;
}

.feature-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.feature-card:hover .feature-icon {
  color: var(--primary);
  text-shadow: 0 0 15px var(--primary);
  transform: scale(1.1);
}

.feature-icon {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.feature-title {
  display: block;
  font-family: 'Teko', sans-serif;
  font-size: 1.8rem;
  color: white;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.feature-desc {
  display: block;
  color: var(--text-gray);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Contact Form Styles */
.contact-form-widget {
  max-width: 600px;
}

.contact-form-name,
.contact-form-email,
.contact-form-email-message {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid #333;
  color: white;
  font-family: 'Poppins', sans-serif;
  border-radius: 4px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form-name:focus,
.contact-form-email:focus,
.contact-form-email-message:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
}

.contact-form-button-submit {
  background: var(--primary);
  color: black;
  border: none;
  padding: 0.8rem 2rem;
  font-family: 'Teko', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0% 100%, 0% 30%);
  transition: all 0.3s ease;
}

.contact-form-button-submit:hover {
  transform: scale(1.05) skew(-2deg);
  background: white;
  box-shadow: 0 0 15px var(--primary);
}

footer {
  margin: 0;
  padding: 3rem 3rem 6rem; /* Extra padding to prevent footer getting hidden by floating nav */
  background: var(--darker);
  color: var(--text-gray);
  font-size: 0.9em;
  text-align: center;
}

.back-to-top-btn {
  position: fixed;
  bottom: 100px; /* Moved up to avoid overlap with new button nav */
  right: 30px;
  z-index: 999;
  background: var(--primary);
  color: black;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  transform: translateY(-5px);
  background: white;
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 2rem;
  }
  
  .button-nav {
    width: auto;
    max-width: 95%;
    overflow-x: auto;
    justify-content: center;
  }
  
  .button-nav a {
    padding: 0.8rem 1.2rem;
  }

  .button-nav a span {
    display: none; /* Creates a clean, app-like icon dock on mobile */
  }

  .button-nav a i {
    font-size: 1.3rem;
  }

  .hero-content { margin-bottom: 4rem; }
  h1 { font-size: 4rem; }
  .android-frame {
    transform: none; /* Disable 3D tilt on mobile */
    max-width: 250px; /* Scale down slightly on mobile */
    margin: 0 auto; /* Ensure it stays perfectly centered */
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--darker);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 0 30px rgba(255, 204, 0, 0.2);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  color: var(--text-gray);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-modal:hover {
  color: var(--primary);
}

#modalImage {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

#modalTitle {
  font-family: 'Teko', sans-serif;
  font-size: 2.5rem;
  color: white;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

#modalDesc {
  font-size: 1rem;
  color: var(--text-gray);
  line-height: 1.6;
  margin: 0;
}

/* Firecracker click effect */
.spark {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2000;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 600ms cubic-bezier(0.22,1,0.36,1), opacity 600ms ease-out;
  box-shadow: 0 0 8px rgba(255,200,80,0.9);
  mix-blend-mode: screen;
}
.fireflash {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1999;
  background: radial-gradient(circle at 30% 30%, #fff, #ffd27a 20%, #ff5500 60%, transparent 70%);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0.9;
  transition: transform 260ms ease-out, opacity 260ms ease-out;
  mix-blend-mode: screen;
}
