/* ------------------ RESET ------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Poppins', sans-serif;
  background: #0a0a0a;
  color: #fff;
  overflow-x: hidden;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}
html {
  scroll-behavior: smooth;
}

/* ------------------ NAVBAR ------------------ */
.navbar {
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 1000;
}
.menu-toggle {
  width: 30px;
  height: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.menu-toggle div {
  width: 100%;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
}
.menu-toggle.active div:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.menu-toggle.active div:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active div:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ------------------ SIDE MENU ------------------ */
.side-menu {
  position: fixed;
  top: 0;
  right: -260px;
  width: 250px;
  height: 100%;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(15px);
  transition: right 0.4s ease;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.side-menu.active {
  right: 0;
}
.menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-top: 40px;
}
.menu-links li {
  list-style: none;
}
.menu-links li a {
  text-decoration: none;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding-bottom: 4px;
}
.menu-links li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease;
}
.menu-links li a:hover::after,
.menu-links li a.active::after {
  width: 100%;
}

/* ------------------ CONNECT SECTION ------------------ */
.connect-section {
  text-align: center;
  margin-bottom: 30px;
}
.connect-section h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #fff;
}
.social-links {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
}
.social-links a {
  text-decoration: none;
  color: #fff;
  border: 1px solid #fff;
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.social-links a:hover {
  background: #fff;
  color: #000;
}

/* ------------------ BACKGROUND ------------------ */
.space-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  overflow: hidden;
  z-index: -1;
}
.stars {
  width: 200%;
  height: 200%;
  background: url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
  opacity: 0.2;
  animation: moveStars 60s linear infinite;
}
@keyframes moveStars {
  from { transform: translate(0, 0); }
  to { transform: translate(-500px, -500px); }
}
.meteorite {
  position: absolute;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0));
  opacity: 0;
  transform: rotate(-45deg);
  animation: meteor 8s linear infinite;
}
.meteorite:nth-child(2) { top: 10%; left: 78%; animation-delay: 0s; }
.meteorite:nth-child(3) { top: 20%; left: 80%; animation-delay: 3s; }
.meteorite:nth-child(4) { top: 65%; left: 75%; animation-delay: 5s; }
.meteorite:nth-child(5) { top: -10%; left: 68%; animation-delay: 6s; }
.meteorite:nth-child(6) { top: -10%; left: 38%; animation-delay: 7s; }
@keyframes meteor {
  0% { opacity: 0; transform: translate(0, 0) rotate(-45deg); }
  10% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-800px, 800px) rotate(-45deg); }
}

/* ------------------ HERO ------------------ */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.typing-text {
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.5px;
}
.sub-heading {
  font-size: 1.4rem;
  color: #ccc;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 1.5s ease forwards 2s;
}
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.cursor {
  display: inline-block;
  width: 9px;
  height: 0.7em;
  background-color: #fff;
  margin-left: 4px;
  animation: blink 0.8s infinite;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ------------------ ABOUT ------------------ */
.about {
  padding: 100px 20px;
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-container {
  max-width: 1100px;
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  padding: 60px 50px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
}

.about-container.in-view {
  opacity: 1;
  transform: translateY(0);
}

.about-title {
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  text-align: left;
  margin-bottom: 15px;
}

.about-divider {
  width: 60px;
  height: 3px;
  background: #fff;
  margin-bottom: 30px;
}

.about-text {
  font-size: 1.08rem;
  color: #ccc;
  line-height: 1.9;
  text-align: left;
  max-width: 950px;
  padding: 0 10px;
}

/* ------------------ PAYMENTS ------------------ */
.payments {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(145deg, #0f0f0f, #0a0a0a);
  min-height: 100vh;
}
.section-title {
  font-size: 2.8rem;
  color: #fff;
  margin-bottom: 20px;
}
.payment-divider {
  width: 60px;
  height: 3px;
  background: #fff;
  margin: 10px auto 20px;
}
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 40px auto;
}
.crypto-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  transition: all 0.4s ease;
  text-decoration: none;
  perspective: 1000px;
}
.crypto-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-8px) scale(1.05);
}
.crypto-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
.crypto-item span {
  font-size: 0.95rem;
  text-align: center;
  opacity: 0.9;
}

/* ------------------ FOOTER ------------------ */
.footer {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 -2px 10px rgba(255, 255, 255, 0.15);
}

/* ------------------ SCROLL ANIMATION ------------------ */
.scroll-animate {
  opacity: 0;
  transform: translateY(80px) scale(0.9) rotateX(10deg);
  transition: all 1s ease;
}
.scroll-animate.in-view {
  opacity: 1;
  transform: translateY(0) scale(1) rotateX(0deg);
}

/* ✅ Transition Overlay for Redirect */
#transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.6s ease-in-out;
  color: #fff;
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 1px;
}

#transition-overlay.active {
  transform: scaleY(1);
}

.transition-text {
  opacity: 0;
  animation: fadeIn 0.4s ease forwards 0.3s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ================== UNIVERSAL MOBILE OPTIMIZATION ================== */
@media only screen and (max-width: 767px) {
  /* Fluid typography and spacing */
  :root {
    font-size: calc(14px + 0.3vw);
  }
  
  /* Hero section */
  .hero {
    height: 100dvh;
    height: -webkit-fill-available;
    padding: 0 5vw;
  }
  
  .typing-text {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.2;
  }
  
  .sub-heading {
    font-size: clamp(0.9rem, 4vw, 1.2rem);
    margin-top: 1.5vh;
  }

  /* Side menu */
  .side-menu {
    width: min(250px, 85vw);
    padding: 15vh 5vw;
  }
  
  .menu-links li a {
    font-size: clamp(1rem, 4.5vw, 1.3rem);
  }

  /* About section */
  .about {
    padding: 8vh 5vw;
  }
  
  .about-container {
    padding: 5vh 5vw;
  }
  
  .about-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  
  .about-text {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
  }

  /* Payments section */
  .payments {
    padding: 8vh 5vw;
    min-height: 90vh;
  }
  
  .section-title {
    font-size: clamp(1.6rem, 6.5vw, 2.1rem);
  }
  
  .crypto-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2.5vh;
    margin: 3vh auto;
  }
  
  .crypto-icon {
    width: clamp(45px, 12vw, 60px);
    height: clamp(45px, 12vw, 60px);
    font-size: clamp(1rem, 4vw, 1.4rem);
  }

  /* Connect section */
  .connect-section {
    margin-bottom: 3vh;
  }
  
  .social-links a {
    padding: 1.5vh 4vw;
    font-size: clamp(0.8rem, 3.5vw, 0.9rem);
  }

  /* Touch targets */
  a, button, .crypto-item {
    min-height: 44px;
  }
}

/* ================== iPad Air OPTIMIZATION ================== */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 820px) 
  and (-webkit-min-device-pixel-ratio: 2) {

  /* Typography adjustments */
  body {
    font-size: 16px;
  }

  /* Hero Section */
  .hero {
    padding: 0 8vw;
  }
  
  .typing-text {
    font-size: 3.4rem;
    line-height: 1.25;
  }
  
  .sub-heading {
    font-size: 1.3rem;
    margin-top: 2vh;
  }

  /* Side Menu */
  .side-menu {
    width: 240px;
    padding: 100px 25px;
  }
  
  .menu-links {
    gap: 25px;
  }
  
  .menu-links li a {
    font-size: 1.2rem;
  }

  /* About Section */
  .about-container {
    padding: 50px 35px;
  }
  
  .about-title {
    font-size: 2.3rem;
  }
  
  .about-text {
    font-size: 1.05rem;
    line-height: 1.85;
  }

  /* Payments Section */
  .section-title {
    font-size: 2.5rem;
  }
  
  .crypto-grid {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 25px;
    max-width: 800px;
  }
  
  .crypto-icon {
    width: 58px;
    height: 58px;
    font-size: 1.3rem;
  }

  /* Connect Section */
  .connect-section h4 {
    font-size: 1.25rem;
  }
  
  .social-links a {
    padding: 9px 16px;
    font-size: 0.95rem;
  }

  /* Landscape Orientation */
  @media (orientation: landscape) {
    .hero {
      padding-top: 40px;
    }
    
    .typing-text {
      font-size: 3rem;
    }
    
    .about, .payments {
      padding-top: 70px;
      padding-bottom: 70px;
    }
    
    .crypto-grid {
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
  }
}

/* ================== iPad Mini OPTIMIZATION ================== */
@media only screen 
  and (width: 768px) 
  and (height: 1024px) {
  
  /* Connect Section Adjustment */
  .connect-section {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 10px;
    transform: translateY(-10px);
  }
  
  .social-links {
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    padding: 0 10px;
  }
  
  .social-links a {
    text-align: center;
    width: 100%;
    max-width: 180px;
  }
  
  .typing-text {
    font-size: 2.8rem;
  }
  
  .about-title {
    font-size: 2rem;
  }
  
  .side-menu {
    padding: 80px 20px 40px;
  }
}

/* ================== SAFARI/iOS FIXES ================== */
@supports (-webkit-touch-callout: none) {
  /* Viewport height fixes */
  .hero, .about, .payments {
    min-height: -webkit-fill-available;
  }
  
  /* Smooth scrolling */
  html {
    -webkit-overflow-scrolling: touch;
  }
}

/* ================== ANDROID CONSISTENCY ================== */
@supports not (-webkit-touch-callout: none) {
  /* Prevent font boosting */
  * {
    max-height: 1000000px;
  }
  
  /* Viewport units fix */
  .hero {
    height: 100dvh;
  }
}

/* ================== PIXEL 7 REFERENCE STYLES ================== */
@media only screen 
  and (min-device-width: 412px) 
  and (max-device-width: 412px) 
  and (-webkit-device-pixel-ratio: 2.75) {
  /* Your existing Pixel 7 mobile styles */
  @media only screen and (max-width: 768px) {
    /* Keep all your existing Pixel 7 specific styles here */
    /* They will serve as reference for other devices */
  }
}

/* ================== TABLET OPTIMIZATIONS ================== */
@media only screen and (min-width: 768px) and (max-width: 1366px) {
  /* Base adjustments */
  body {
    font-size: 15px;
  }

  /* Hero Section */
  .typing-text {
    font-size: 3.2rem;
    letter-spacing: 1.2px;
  }
  
  .sub-heading {
    font-size: 1.2rem;
  }

  /* Side Menu */
  .side-menu {
    width: 240px;
    padding: 90px 25px;
  }
  
  .menu-links li a {
    font-size: 1.15rem;
  }

  /* About Section */
  .about-container {
    padding: 50px 40px;
  }
  
  .about-title {
    font-size: 2.2rem;
  }
  
  .about-text {
    font-size: 1rem;
    line-height: 1.8;
  }

  /* Payments Section */
  .section-title {
    font-size: 2.4rem;
  }
  
  .crypto-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 25px;
    max-width: 850px;
  }
  
  .crypto-icon {
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }

  /* Connect Section Fix */
  .connect-section {
    margin-bottom: 30px;
    position: relative;
    bottom: 0;
  }
  
  .social-links {
    gap: 15px;
  }
  
  .social-links a {
    padding: 8px 14px;
    font-size: 0.9rem;
  }
  
  .connect-section h4 {
    font-size: 1.2rem;
  }

  /* Surface Pro 7 Aspect Ratio Adjustment */
  @media (min-aspect-ratio: 3/2) {
    .hero {
      padding-top: 40px;
    }
    
    .about, .payments {
      padding-top: 80px;
      padding-bottom: 80px;
    }
  }

  /* iPad Pro 12.9" Specific */
  @media (width: 1024px) and (height: 1366px) {
    .typing-text {
      font-size: 3.5rem;
    }
    
    .side-menu {
      width: 260px;
    }
  }
}