/* ---------- Layout ---------- */
.store-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap; /* Prevent wrapping by default, especially for high-res mobile */
  padding: 20px 0;
}

/* Optimization for high-res mobile & tablets (e.g. iPhone emulators/iPad landscape) */
@media only screen and (min-width: 901px) and (max-width: 1300px) {
  .store-buttons {
    gap: 12px;
    padding: 16px 0;
  }
  
  .store-btn {
    padding: 12px 20px;
  }

  .store-btn:first-child {
    margin-left: 24px;
  }

  .store-btn:last-child {
    margin-right: 24px;
  }
}

/* ---------- Base Button ---------- */
.store-btn {
  /* PREMIUM BLUE-GREEN PALETTE: 
     Deep Indigo (#4f46e5) -> Electric Blue (#3b82f6) -> Seafoam (#10b981) -> Emerald (#34d399) 
  */
  --brand-gradient: linear-gradient(
    135deg, 
    #6366f1, 
    #007aff, 
    #3b82f6, 
    #10b981, 
    #34d399,
    #6366f1
  );
  
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-radius: 18px;
  text-decoration: none;
  font-family: system-ui, -apple-system, sans-serif;
  
  /* Increased glass opacity for cleaner contrast on white */
  background: rgba(255, 255, 255, 0.75); 
  color: #121212; 
  
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  
  /* Initial subtle teal glow */
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
  
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  overflow: hidden;
}

/* ---------- Unsync Logic ---------- */

.store-btn:first-child {
  animation: pulseGlow 8s ease-in-out infinite;
}
.store-btn:first-child::after,
.store-btn:first-child::before {
  animation-duration: 10s;
}

.store-btn:last-child {
  animation: pulseGlow 7s ease-in-out infinite -3.5s;
}
.store-btn:last-child::after,
.store-btn:last-child::before {
  animation-duration: 8s;
  animation-delay: -2.5s;
}

/* ---------- Background Layers ---------- */

.store-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-gradient);
  background-size: 400% 400%;
  animation-name: gradientMove;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  opacity: 0.2; /* Visible but sophisticated */
  z-index: 1;
}

.store-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-gradient);
  background-size: 400% 400%;
  animation-name: gradientMove;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  opacity: 0; 
  transition: opacity 0.5s ease;
  z-index: 2;
}

.store-btn:hover::before {
  opacity: 0.4; 
  animation-duration: 4.5s !important; 
}

/* ---------- Content ---------- */
.store-btn .text,
.store-btn .logo {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
}

.store-btn .logo img {
  width: 28px;
  height: 28px;
  filter: brightness(0);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Interactions ---------- */
.store-btn:hover {
  transform: translateY(-5px) scale(1.02);
  background: rgba(255, 255, 255, 0.9);
  /* Cool Blue/Green glow on hover */
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2), 0 5px 15px rgba(16, 185, 129, 0.15);
}

.store-btn:hover .logo img {
  transform: rotate(-8deg) scale(1.1);
}

/* ---------- Text Styles ---------- */
.store-btn small { font-size: 11px; font-weight: 500; opacity: 0.7; line-height: 1.1; }
.store-btn strong { font-size: 16px; font-weight: 700; line-height: 1.1; letter-spacing: -0.2px; }

/* ---------- Keyframes ---------- */

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 25px rgba(59, 130, 246, 0.12); }
  50% { box-shadow: 0 12px 35px rgba(16, 185, 129, 0.2); }
}

/* ---------- Coming Soon State ---------- */

.store-btn.coming-soon {
  opacity: 1; /* Main button stays opaque for the badge to be visible */
  pointer-events: none;
  cursor: default;
  filter: grayscale(0.2);
  overflow: visible !important; /* Allow the badge to float outside the border */
}

.store-btn.coming-soon .logo,
.store-btn.coming-soon .text {
  opacity: 0.5; /* Dim only the internal content */
}

.store-btn.coming-soon::before {
  display: none; /* Disable hover animation layer */
}

/* Maintain background layer without pulse animation */
.store-btn.coming-soon:first-child {
  animation: none !important;
}

.store-btn.coming-soon::after {
  animation: none !important;
  opacity: 0.15;
  border-radius: inherit; /* Fix: ensures the background respects the parent's rounded corners */
}

.store-btn.coming-soon .badge {
  position: absolute;
  top: -10px;
  right: -5px;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--brand-gradient);
  background-size: 200% 200%;
  color: #fff;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1;
}