/* ========================================
   Rewards page styles
   ======================================== */

.rewards-main {
  max-width: 1000px;
}

/* Hero */
.rewards-hero {
  text-align: center;
  margin-bottom: 48px;
  padding: 40px 20px;
  background: linear-gradient(135deg,
    rgba(184, 164, 216, 0.08),
    rgba(94, 234, 212, 0.08));
  border: 1px solid rgba(184, 164, 216, 0.15);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.rewards-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(94, 234, 212, 0.12), transparent 60%);
  pointer-events: none;
}

.rewards-hero-icon {
  font-size: 56px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px rgba(94, 234, 212, 0.5));
  animation: rewardsHeroFloat 4s ease-in-out infinite;
}

@keyframes rewardsHeroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.rewards-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 300;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--soft-white) 0%, var(--soft-purple) 50%, var(--teal-glow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}

.rewards-subtitle {
  font-size: 15px;
  color: var(--subtle-gray);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.6;
  font-weight: 300;
}

.rewards-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 500px;
  margin: 0 auto;
}

.rewards-stat-card {
  text-align: center;
  padding: 16px 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.rewards-stat-num {
  font-size: 28px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--soft-purple), var(--teal-glow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.rewards-stat-label {
  font-size: 10px;
  color: var(--subtle-gray);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Milestone progress */
.milestone-section {
  border-color: rgba(94, 234, 212, 0.2);
}

.milestone-progress {
  padding: 8px 0;
}

.milestone-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.milestone-current {
  font-size: 24px;
  font-weight: 600;
  color: var(--soft-white);
}

.milestone-current span {
  font-size: 14px;
  color: var(--subtle-gray);
  font-weight: 400;
  margin-left: 4px;
}

.milestone-next {
  font-size: 13px;
  color: var(--subtle-gray);
}

.milestone-bar {
  height: 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(94, 234, 212, 0.15);
  margin-bottom: 16px;
}

.milestone-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--soft-purple), var(--teal-glow));
  border-radius: 100px;
  box-shadow: 0 0 16px rgba(94, 234, 212, 0.5);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.milestone-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent);
  animation: barShine 2.5s ease-in-out infinite;
}

@keyframes barShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.milestone-reward {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(94, 234, 212, 0.08);
  border-radius: 12px;
}

.milestone-reward-emoji {
  font-size: 22px;
  filter: drop-shadow(0 0 8px rgba(94, 234, 212, 0.4));
}

.milestone-reward-text {
  font-size: 14px;
  color: var(--soft-white);
  line-height: 1.5;
  font-weight: 500;
}

.all-milestones {
  text-align: center;
  font-size: 16px;
  color: var(--teal-glow);
  font-weight: 500;
  padding: 16px;
}

/* Badges */
.badges-count {
  font-size: 12px;
  color: var(--teal-glow);
  font-weight: 500;
  margin-left: 10px;
  padding: 3px 10px;
  background: rgba(94, 234, 212, 0.1);
  border-radius: 100px;
  letter-spacing: 0.5px;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.badge-card {
  text-align: center;
  padding: 20px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  position: relative;
  opacity: 0.45;
  filter: grayscale(80%);
  transition: var(--transition-base);
}

.badge-card.badge-earned {
  opacity: 1;
  filter: none;
  background: linear-gradient(135deg, rgba(184, 164, 216, 0.1), rgba(94, 234, 212, 0.1));
  border-color: rgba(94, 234, 212, 0.3);
  box-shadow: 0 4px 20px rgba(94, 234, 212, 0.12);
}

.badge-card.badge-earned:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(94, 234, 212, 0.2);
}

.badge-emoji {
  font-size: 36px;
  margin-bottom: 8px;
  display: inline-block;
}

.badge-card.badge-earned .badge-emoji {
  filter: drop-shadow(0 0 12px rgba(94, 234, 212, 0.5));
  animation: badgePulse 4s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.badge-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--soft-white);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.badge-desc {
  font-size: 11px;
  color: var(--subtle-gray);
  line-height: 1.5;
}

.badge-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal-glow);
  color: var(--deep-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* Prizes */
.prizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}

.prize-card {
  text-align: center;
  padding: 24px 18px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.prize-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 215, 0, 0.05), transparent 60%);
  pointer-events: none;
}

.prize-gold {
  border-color: rgba(255, 215, 0, 0.4);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.06), rgba(255, 165, 0, 0.04));
  box-shadow: 0 4px 24px rgba(255, 200, 100, 0.1);
}

.prize-silver {
  border-color: rgba(180, 180, 200, 0.3);
  background: linear-gradient(135deg, rgba(220, 220, 240, 0.06), rgba(180, 180, 200, 0.04));
}

.prize-bronze {
  border-color: rgba(205, 127, 50, 0.3);
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.06), rgba(184, 115, 51, 0.04));
}

.prize-medal {
  font-size: 38px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 16px rgba(255, 215, 100, 0.4));
}

.prize-place {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--soft-white);
  margin-bottom: 12px;
}

.prize-text {
  font-size: 12px;
  color: var(--subtle-gray);
  line-height: 1.5;
}

.prizes-info {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.prizes-info strong {
  display: block;
  font-size: 13px;
  color: var(--soft-white);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.prizes-info ul {
  list-style: none;
  padding: 0;
}

.prizes-info li {
  font-size: 13px;
  color: var(--subtle-gray);
  line-height: 1.6;
  padding: 4px 0 4px 20px;
  position: relative;
}

.prizes-info li::before {
  content: '🪷';
  position: absolute;
  left: 0;
  font-size: 11px;
}

/* Earn more */
.earn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.earn-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  text-decoration: none;
  color: var(--soft-white);
  transition: var(--transition-base);
}

.earn-card:hover:not(.earn-card-passive) {
  transform: translateY(-2px);
  border-color: rgba(94, 234, 212, 0.3);
  background: rgba(94, 234, 212, 0.05);
}

.earn-card-passive {
  cursor: default;
  opacity: 0.85;
}

.earn-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.earn-card strong {
  font-size: 13px;
  font-weight: 500;
}

.earn-card span {
  font-size: 12px;
  color: var(--teal-glow);
  font-weight: 500;
}

.earn-card span span {
  color: var(--subtle-gray);
  font-weight: 400;
}

/* Become Tester CTA */
.tester-cta-section {
  background: linear-gradient(135deg,
    rgba(184, 164, 216, 0.12),
    rgba(94, 234, 212, 0.12));
  border-color: rgba(184, 164, 216, 0.3);
  text-align: center;
}

.tester-cta-inner {
  padding: 16px;
}

.tester-cta-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.tester-cta-section h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--soft-white);
  margin-bottom: 12px;
}

.tester-cta-section p {
  font-size: 14px;
  color: var(--subtle-gray);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto 20px;
}

/* ─── Social share buttons ─── */
.share-section {
  background: linear-gradient(135deg,
    rgba(184, 164, 216, 0.06),
    rgba(94, 234, 212, 0.06));
  border-color: rgba(184, 164, 216, 0.2);
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--soft-white);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.share-btn.share-done {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}

.share-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  color: white;
}

.share-twitter .share-icon {
  background: linear-gradient(135deg, #000000, #1a1a1a);
  font-family: 'Inter', sans-serif;
}

.share-facebook .share-icon {
  background: linear-gradient(135deg, #1877F2, #0D5DBF);
  font-family: 'Georgia', serif;
}

.share-instagram .share-icon {
  background: linear-gradient(135deg, #F58529, #DD2A7B 30%, #8134AF 60%, #515BD4);
}

.share-tiktok .share-icon {
  background: linear-gradient(135deg, #000000, #FF0050 50%, #00F2EA);
}

.share-twitter:hover { border-color: #ffffff40; }
.share-facebook:hover { border-color: #1877F2; box-shadow: 0 8px 24px rgba(24, 119, 242, 0.3); }
.share-instagram:hover { border-color: #DD2A7B; box-shadow: 0 8px 24px rgba(221, 42, 123, 0.3); }
.share-tiktok:hover { border-color: #FF0050; box-shadow: 0 8px 24px rgba(255, 0, 80, 0.3); }

.share-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.share-info strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--soft-white);
  letter-spacing: 0.2px;
}

.share-pts {
  font-size: 11px;
  color: var(--teal-glow);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.share-pts-big {
  color: #FFD700;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.share-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal-glow);
  color: var(--deep-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Modals */
.share-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: modalFadeIn 0.2s ease;
}

.share-modal[style*="display:none"], .share-modal[style*="display: none"] {
  display: none !important;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.share-modal-card {
  max-width: 480px;
  width: 100%;
  padding: 32px 28px;
  background: linear-gradient(180deg,
    rgba(19, 27, 38, 0.98),
    rgba(11, 17, 24, 0.98));
  border: 1px solid rgba(94, 234, 212, 0.3);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5),
              0 0 60px rgba(94, 234, 212, 0.15);
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.share-modal-card h3 {
  font-size: 22px;
  font-weight: 500;
  color: var(--soft-white);
  margin-bottom: 12px;
}

.share-modal-card > p {
  font-size: 14px;
  color: var(--subtle-gray);
  margin-bottom: 16px;
  line-height: 1.6;
}

.share-modal-card ol {
  padding-left: 20px;
  margin-bottom: 24px;
}

.share-modal-card li {
  font-size: 13px;
  color: var(--soft-white);
  padding: 4px 0;
  line-height: 1.6;
}

.share-modal-card strong {
  color: var(--teal-glow);
  font-weight: 600;
}

.tiktok-url-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--soft-white);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
  transition: var(--transition-base);
}

.tiktok-url-input:focus {
  outline: none;
  border-color: rgba(255, 0, 80, 0.5);
  box-shadow: 0 0 24px rgba(255, 0, 80, 0.2);
}

.tiktok-error {
  font-size: 12px;
  color: #F87171;
  padding: 8px 12px;
  background: rgba(248, 113, 113, 0.08);
  border-radius: 8px;
  margin-bottom: 12px;
}

.share-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.share-modal-actions .btn {
  padding: 12px 20px;
  font-size: 13px;
}

@media (max-width: 540px) {
  .rewards-stats { grid-template-columns: 1fr; max-width: 280px; }
  .badges-grid { grid-template-columns: repeat(2, 1fr); }
  .prizes-grid { grid-template-columns: 1fr; }
  .share-grid { grid-template-columns: 1fr; }
  .share-modal-card { padding: 24px 20px; }
  .share-modal-actions { flex-direction: column-reverse; }
  .share-modal-actions .btn { width: 100%; justify-content: center; }
}
