/* ===== TREASURE HUNT THEME — giveaways.php ===== */
/* Page-specific visual theme. Extracted from inline <style> (v5.10.0) */

/* Shimmer overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Hero section treasure glow */
.giveaways-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.05), rgba(139, 92, 246, 0.08));
}

.giveaways-hero::before {
  background: linear-gradient(90deg, transparent, #fbbf24, #f59e0b, #fbbf24, transparent);
  background-size: 200% 100%;
  animation: gold-shimmer 3s linear infinite;
}

.giveaways-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 50%);
  animation: treasure-glow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gold-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes treasure-glow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(10%, 10%) scale(1.1); opacity: 0.8; }
}

/* Metric cards with gold accents */
.metric-card {
  border: 1px solid rgba(251, 191, 36, 0.2);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(139, 92, 246, 0.05));
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.2), transparent);
  animation: card-shine 3s ease-in-out infinite;
}

.metric-card:nth-child(1)::before { animation-delay: 0s; }
.metric-card:nth-child(2)::before { animation-delay: 0.5s; }
.metric-card:nth-child(3)::before { animation-delay: 1s; }

@keyframes card-shine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.metric-value {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

/* Loading shimmer skeleton */
.metric-value.is-loading {
  color: transparent !important;
  text-shadow: none !important;
  min-width: 3.5rem;
  min-height: 1.2em;
  display: block;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  background: rgba(251, 191, 36, 0.08);
}
.metric-value.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(251, 191, 36, 0.22) 40%,
    rgba(251, 191, 36, 0.38) 50%,
    rgba(251, 191, 36, 0.22) 60%,
    transparent 100%);
  background-size: 250% 100%;
  animation: metric-shimmer 1.6s ease-in-out infinite;
}
@keyframes metric-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Giveaway cards treasure effect */
.giveaway-card {
  transition: all 0.3s ease;
}

.giveaway-card:hover {
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.2), 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Touch devices: eliminate 300ms tap delay and prevent iOS hover drift.
   Uses (hover: none) to target all touch devices regardless of screen width
   (covers landscape mode on phones/tablets too). */
@media (hover: none), (pointer: coarse) {
  .giveaway-card,
  .giveaway-actions button,
  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .btn-task-action,
  .btn-task-verify,
  .btn-complete-task,
  .gdm-join-btn {
    touch-action: manipulation;
  }
  /* Belt-and-suspenders: block any transform that might still fire via :hover */
  .giveaway-card:hover,
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-outline:hover,
  .task-item:hover {
    transform: none !important;
  }
  /* Hide card action buttons — card is now fully tappable to open the modal */
  .giveaway-actions {
    display: none;
  }
  /* Subtle tap affordance: chevron in bottom-right corner of card */
  .giveaway-card {
    cursor: pointer;
  }
  /* iOS Safari fix: click events only propagate from child elements to parent
     handlers when cursor:pointer is set EXPLICITLY (not via CSS inheritance).
     Without this, tapping on h3/p/span/div inside the card does nothing on iOS. */
  .giveaway-card * {
    cursor: pointer;
  }
  .giveaway-card::before {
    content: '›';
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 1.4rem;
    color: rgba(251,191,36,0.55);
    line-height: 1;
    pointer-events: none;
    z-index: 2;
  }
}
/* Keep cursor:pointer hint for iOS tap recognition on the card wrapper */
@media (max-width: 1024px) {
  .giveaway-card {
    cursor: pointer;
  }
}

.giveaway-card::after {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

/* Filter buttons gold style */
.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

/* Sparkle decorations */
.sparkle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: #fbbf24;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  animation: sparkle-twinkle 2s ease-in-out infinite;
}

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}

/* Navbar gold accent */
.navbar {
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.nav-link.active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

/* CTA buttons */
.giveaway-actions .btn-primary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0d0f18;
  font-weight: 700;
}

.giveaway-actions .btn-primary:hover {
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.5);
}

/* Coin float animation */
.floating-coin {
  position: fixed;
  font-size: 1.5rem;
  color: #fbbf24;
  pointer-events: none;
  z-index: 3;
  animation: coin-float 6s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

@keyframes coin-float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  25% { transform: translateY(-20px) rotate(90deg); opacity: 0.6; }
  50% { transform: translateY(-10px) rotate(180deg); opacity: 0.4; }
  75% { transform: translateY(-30px) rotate(270deg); opacity: 0.7; }
}

/* Footer gold accent */
.footer {
  border-top: 1px solid rgba(251, 191, 36, 0.2);
}
