/* ── Pagwa Competition — Festival of Colors Theme ──────────────── */

:root {
  --bg: #0d0d0d;
  --pink: #FF1493;
  --gold: #FFD700;
  --green: #00FF7F;
  --blue: #00BFFF;
  --purple: #9B59B6;
  --orange: #FF6B35;
  --red: #FF4757;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.08);
  --text: #f0f0f0;
  --text-muted: #888;
}

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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Animated Background Blobs ─────────────────────────────────── */

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: blobFloat 20s ease-in-out infinite;
}

.blob-1 {
  width: 600px; height: 600px;
  background: var(--pink);
  top: -10%; left: -5%;
  animation-delay: 0s;
}

.blob-2 {
  width: 500px; height: 500px;
  background: var(--gold);
  top: 30%; right: -10%;
  animation-delay: -5s;
  animation-duration: 25s;
}

.blob-3 {
  width: 450px; height: 450px;
  background: var(--green);
  bottom: -5%; left: 20%;
  animation-delay: -10s;
  animation-duration: 22s;
}

.blob-4 {
  width: 400px; height: 400px;
  background: var(--purple);
  top: 50%; left: 50%;
  animation-delay: -7s;
  animation-duration: 28s;
}

.blob-5 {
  width: 350px; height: 350px;
  background: var(--blue);
  top: 10%; right: 30%;
  animation-delay: -12s;
  animation-duration: 30s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -30px) scale(1.1); }
  50% { transform: translate(-20px, 50px) scale(0.95); }
  75% { transform: translate(30px, 20px) scale(1.05); }
}

/* ── Content Container ─────────────────────────────────────────── */

.content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* ── Glass Card ────────────────────────────────────────────────── */

.glass {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.glass-glow {
  box-shadow: 0 0 30px rgba(255, 20, 147, 0.1),
              0 0 60px rgba(255, 215, 0, 0.05);
}

/* ── Hero Section ──────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 40px 20px 30px;
  margin-bottom: 24px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: white;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--pink), var(--gold), var(--green), var(--blue));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}

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

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 20px;
}

.prize-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), #FFA500);
  color: #1a1a1a;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

/* ── Host Section ─────────────────────────────────────────────── */

.host-section {
  position: relative;
  text-align: center;
  padding: 28px 24px;
  margin-bottom: 24px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid transparent;
  border-radius: 16px;
  background-clip: padding-box;
  overflow: hidden;
}

.host-section::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--pink), var(--gold), var(--pink));
  background-size: 200% 200%;
  animation: hostBorderShift 4s ease-in-out infinite;
  z-index: -1;
}

.host-section::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: var(--bg);
  z-index: -1;
}

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

.host-section .host-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.host-section .host-handle {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.host-section .host-cta-text {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.host-section .host-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tiktok-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.tiktok-btn--follow {
  background: linear-gradient(135deg, var(--pink), #e91277);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 20, 147, 0.3);
}

.tiktok-btn--follow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 20, 147, 0.45);
}

.tiktok-btn--vote {
  background: linear-gradient(135deg, var(--gold), #FFA500);
  color: #1a1a1a;
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.tiktok-btn--vote:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 215, 0, 0.45);
}

.tiktok-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
}

.tiktok-icon svg {
  width: 100%;
  height: 100%;
}

/* ── Countdown ─────────────────────────────────────────────────── */

.countdown-wrap {
  padding: 24px;
  margin-bottom: 24px;
}

.countdown-label {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.countdown-num {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.countdown-txt {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.countdown-ended {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
  padding: 20px;
}

/* ── Stats Bar ─────────────────────────────────────────────────── */

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 16px;
  margin-bottom: 24px;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Section Headers ───────────────────────────────────────────── */

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0 4px;
}

.section-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.section-header .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--card-border), transparent);
}

/* ── Leaderboard ───────────────────────────────────────────────── */

.leaderboard {
  margin-bottom: 32px;
}

.leader-card {
  padding: 16px 20px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.leader-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.leader-card.rank-1 {
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent);
}

.leader-card.rank-2 {
  border-left: 3px solid #C0C0C0;
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.08), transparent);
}

.leader-card.rank-3 {
  border-left: 3px solid #CD7F32;
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.08), transparent);
}

.leader-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.leader-rank {
  font-size: 1.5rem;
  font-weight: 800;
  min-width: 36px;
  text-align: center;
}

.rank-1 .leader-rank { color: var(--gold); }
.rank-2 .leader-rank { color: #C0C0C0; }
.rank-3 .leader-rank { color: #CD7F32; }

.leader-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.leader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leader-info {
  flex: 1;
  min-width: 0;
}

.leader-name {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leader-handle {
  font-size: 13px;
  color: var(--text-muted);
}

.leader-score {
  text-align: right;
  flex-shrink: 0;
}

.leader-total {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green);
}

.leader-pts {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Score Breakdown (expanded) ────────────────────────────────── */

.leader-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.leader-detail.open {
  max-height: 600px;
  padding-top: 16px;
}

.score-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.score-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
  border-radius: 10px;
  text-align: center;
}

.score-item-val {
  font-size: 1.1rem;
  font-weight: 700;
}

.score-item-label {
  font-size: 11px;
  color: var(--text-muted);
}

.embed-wrap {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  min-height: 200px;
}

.embed-wrap iframe {
  max-width: 100%;
}

/* ── How to Enter ──────────────────────────────────────────────── */

.how-section {
  padding: 24px;
  margin-bottom: 32px;
}

.how-section h2 {
  margin-bottom: 20px;
  text-align: center;
}

.steps {
  display: grid;
  gap: 16px;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.step:nth-child(1) .step-num { background: var(--pink); color: white; }
.step:nth-child(2) .step-num { background: var(--gold); color: #1a1a1a; }
.step:nth-child(3) .step-num { background: var(--green); color: #1a1a1a; }
.step:nth-child(4) .step-num { background: var(--blue); color: #1a1a1a; }

.step-text h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-text p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Footer ────────────────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.footer a {
  color: var(--pink);
  text-decoration: none;
}

.footer-host-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(255, 20, 147, 0.12);
  border: 1px solid rgba(255, 20, 147, 0.25);
  color: var(--pink);
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.footer-host-link:hover {
  background: rgba(255, 20, 147, 0.2);
  border-color: rgba(255, 20, 147, 0.4);
  transform: translateY(-1px);
}

/* ── Scoring Rules ─────────────────────────────────────────────── */

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

.rule-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.rule-pts {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.rule-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Live Stream Banner (TikTok Live) ─────────────────────────── */

.live-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.live-banner.visible {
  transform: translateY(0);
}

.live-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(135deg, #FF1493, #FF4757, #FF1493);
  background-size: 200% 200%;
  animation: liveBannerGradient 3s ease-in-out infinite;
  box-shadow: 0 4px 24px rgba(255, 20, 147, 0.5),
              0 2px 8px rgba(255, 71, 87, 0.3);
}

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

.live-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.live-banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
  flex-shrink: 0;
  animation: liveBannerDotPulse 1s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

@keyframes liveBannerDotPulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 0 0 16px rgba(255, 255, 255, 0.3);
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.8), 0 0 32px rgba(255, 255, 255, 0.4);
    transform: scale(1.2);
  }
}

.live-banner-text {
  font-size: 16px;
  font-weight: 800;
  color: white;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: liveBannerTextGlow 2s ease-in-out infinite;
}

@keyframes liveBannerTextGlow {
  0%, 100% { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); }
  50% { text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.2); }
}

.live-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: #FF1493;
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.live-banner-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  background: #fff5f9;
}

.live-banner-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: 8px;
  line-height: 1;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.live-banner-close:hover {
  color: white;
}

/* ── Live Indicator ────────────────────────────────────────────── */

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 127, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(0, 255, 127, 0); }
}

/* ── Empty State ───────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* ── Confetti Canvas ───────────────────────────────────────────── */

#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

/* ── Responsive ────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .content { padding: 12px 10px 40px; }
  .hero { padding: 30px 12px 20px; }
  .leader-row { gap: 10px; }
  .leader-avatar { width: 40px; height: 40px; }
  .score-breakdown { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { gap: 16px; }
  .countdown { gap: 8px; }
  .countdown-unit { min-width: 60px; }
  .host-section { padding: 20px 16px; }
  .host-section .host-buttons { flex-direction: column; align-items: center; }
  .tiktok-btn { width: 100%; max-width: 280px; justify-content: center; }
}

/* ── Scrollbar ─────────────────────────────────────────────────── */

/* ── Live Ticker (sticky top bar) ─────────────────────────────── */

.live-ticker {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  overflow: hidden;
  min-height: 40px;
}

.ticker-viewers {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--text-muted);
}

.ticker-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF4757;
  display: inline-block;
  animation: tickerPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes tickerPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(255, 71, 87, 0); }
}

.ticker-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.ticker-messages {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 24px;
}

/* ── Vote Notifications (slide-in from right) ────────────────── */

.vote-notification {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.2), rgba(255, 215, 0, 0.2));
  border: 1px solid rgba(255, 215, 0, 0.15);
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  margin-right: 8px;
}

.vote-notification.visible {
  opacity: 1;
  transform: translateX(0);
}

.vote-notification.dismissing {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ── Color Toggle Button (floating action button) ────────────── */

.color-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  animation: colorBtnPulse 3s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  line-height: 1;
  padding: 0;
}

.color-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4);
}

.color-toggle-btn.active {
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.3), rgba(255, 215, 0, 0.3));
  border-color: var(--pink);
  box-shadow: 0 4px 24px rgba(255, 20, 147, 0.3),
              0 0 40px rgba(255, 215, 0, 0.15);
  animation: colorBtnActivePulse 1.5s ease-in-out infinite;
}

@keyframes colorBtnPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 12px rgba(255, 20, 147, 0.15); }
}

@keyframes colorBtnActivePulse {
  0%, 100% {
    box-shadow: 0 4px 24px rgba(255, 20, 147, 0.3), 0 0 40px rgba(255, 215, 0, 0.15);
  }
  50% {
    box-shadow: 0 4px 32px rgba(255, 20, 147, 0.5), 0 0 60px rgba(255, 215, 0, 0.25);
  }
}

/* ── Color Splatter Overlay ──────────────────────────────────── */

.color-splatter {
  position: absolute;
  z-index: 50;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  mix-blend-mode: screen;
}

.color-splatter.fading {
  opacity: 0 !important;
  transition: opacity 1s ease;
}

/* ── AI Competition Updates ────────────────────────────────────── */

.ai-updates {
  padding: 20px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.08), rgba(0, 191, 255, 0.06), rgba(255, 20, 147, 0.05));
  border: 1px solid rgba(155, 89, 182, 0.15);
}

.ai-updates::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--pink), var(--gold));
  background-size: 200% 100%;
  animation: aiUpdateGradient 4s linear infinite;
}

@keyframes aiUpdateGradient {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.ai-updates-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ai-updates-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.ai-updates-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text);
}

.ai-commentary {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
}

.ai-tip {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--gold);
}

.ai-tip::before {
  content: 'Tip: ';
  font-weight: 600;
  color: var(--gold);
}

.ai-updates.fade-in {
  animation: aiUpdateFadeIn 0.5s ease forwards;
}

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

/* ── Scrollbar ─────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ── Crowd Reactions ──────────────────────────────────────────── */
.reaction-bar {
  position: fixed;
  bottom: 24px;
  left: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.reaction-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.reaction-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.15);
}

.reaction-btn:active {
  transform: scale(1.35);
  background: rgba(255, 20, 147, 0.3);
}

.reaction-bubble {
  position: fixed;
  font-size: 36px;
  pointer-events: none;
  z-index: 9998;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  will-change: transform, opacity;
}

/* ── Battle Mode ──────────────────────────────────────────────── */
.battle-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: battleFadeIn 0.3s ease;
}

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

.battle-container {
  position: relative;
  width: 90%;
  max-width: 800px;
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  animation: battleSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes battleSlideUp {
  from { transform: translateY(60px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.battle-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.battle-cards {
  display: flex;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.battle-card {
  flex: 1;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.battle-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(255, 20, 147, 0.2);
}

.battle-card:active {
  transform: scale(0.97);
}

.battle-card .battle-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  overflow: hidden;
}

.battle-card .battle-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.battle-card .battle-handle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.battle-card .battle-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
}

.battle-card .battle-rank {
  font-size: 12px;
  color: var(--gold);
  margin-top: 4px;
}

.battle-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: var(--orange);
  text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
  flex-shrink: 0;
  animation: vsPulse 1.5s ease-in-out infinite;
}

@keyframes vsPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); text-shadow: 0 0 30px rgba(255, 107, 53, 0.8); }
}

.battle-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.battle-vote-btn {
  padding: 12px 32px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.battle-vote-btn--left {
  background: linear-gradient(135deg, var(--pink), #e91277);
  color: white;
}

.battle-vote-btn--right {
  background: linear-gradient(135deg, var(--blue), #0099dd);
  color: white;
}

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

.battle-close-btn {
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.battle-btn {
  padding: 6px 16px;
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.1);
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  white-space: nowrap;
}

.battle-btn:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: var(--orange);
}

/* ── Momentum Badges ──────────────────────────────────────────── */
.momentum-badge {
  position: absolute;
  top: 8px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 2;
  pointer-events: none;
}

.momentum-badge.fire {
  background: linear-gradient(135deg, #ff6b35, #ff1493);
  color: white;
  animation: firePulse 1s ease-in-out infinite;
  box-shadow: 0 2px 12px rgba(255, 107, 53, 0.4);
}

@keyframes firePulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.08); filter: brightness(1.2); }
}

.momentum-badge.trending {
  background: rgba(0, 255, 127, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 255, 127, 0.3);
}

/* ── Rank Transition Animation ────────────────────────────────── */
.leader-card {
  will-change: transform;
  position: relative;
}

.leader-card.rank-changed {
  animation: rankChangeGlow 0.8s ease-out;
}

@keyframes rankChangeGlow {
  0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
  30% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.1); }
  100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* ── Share Button ─────────────────────────────────────────────── */
.leader-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 8px;
}

.share-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.share-icon-btn:hover {
  background: rgba(255, 20, 147, 0.2);
  color: var(--pink);
  transform: scale(1.1);
}

/* ── TikTok Feed Section ──────────────────────────────────────── */
.feed-section {
  margin-bottom: 24px;
}

.feed-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 16px;
  scrollbar-width: none;
}

.feed-scroll::-webkit-scrollbar { display: none; }

.feed-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.feed-embed-container {
  width: 100%;
  min-height: 300px;
}

.feed-card iframe,
.feed-card blockquote {
  max-width: 100% !important;
  margin: 0 !important;
}

.feed-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--pink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.feed-link:hover {
  background: rgba(255, 20, 147, 0.1);
}

.feed-thumb-wrap {
  position: relative;
  width: 100%;
  cursor: pointer;
  overflow: hidden;
  border-radius: 16px;
}

.feed-thumb-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  overflow: hidden;
  text-decoration: none;
}

.feed-thumb {
  width: 100%;
  height: auto;
  min-height: 350px;
  object-fit: cover;
  display: block;
}

.feed-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease;
  padding-left: 4px;
}

.feed-thumb-link:hover .feed-play-icon {
  transform: translate(-50%, -50%) scale(1.15);
  background: rgba(255, 20, 147, 0.8);
}

.feed-video-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  font-size: 12px;
  line-height: 1.4;
}

/* ── Live Activity Feed ───────────────────────────────────────── */
.activity-feed {
  padding: 16px 20px;
  margin-bottom: 24px;
  max-height: 200px;
  overflow-y: auto;
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.activity-icon {
  font-size: 16px;
}

.activity-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.activity-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.activity-time {
  color: var(--text-muted);
  font-size: 11px;
  margin-right: 6px;
}

.activity-text {
  color: var(--text);
}

/* ── Sound Toggle ─────────────────────────────────────────────── */
.sound-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  color: var(--text-muted);
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.sound-toggle.enabled {
  color: var(--green);
  border-color: rgba(0, 255, 127, 0.3);
}

/* ── Scroll Animations ────────────────────────────────────────── */
/* Only animate elements explicitly tagged — don't hide glass cards by default */
.step,
.rule-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* All glass cards visible immediately — no hidden content on load */
.hero.glass,
.live-ticker,
.live-banner {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Share FAB ────────────────────────────────────────────────── */
.share-fab {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 1000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(0, 191, 255, 0.2);
  background: rgba(0, 191, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
}

.share-fab:hover {
  background: rgba(0, 191, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 191, 255, 0.25);
}

/* ── Responsive additions ──────────────────────────────────────── */

@media (max-width: 640px) {
  .live-banner-inner {
    padding: 10px 14px;
  }

  .live-banner-text {
    font-size: 13px;
    letter-spacing: 1px;
  }

  .live-banner-btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  .live-banner-dot {
    width: 10px;
    height: 10px;
  }

  .live-banner-close {
    font-size: 20px;
  }

  .live-ticker {
    gap: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .color-toggle-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
    bottom: 16px;
    right: 16px;
  }

  .vote-notification {
    font-size: 11px;
    padding: 3px 10px;
  }

  .reaction-bar {
    flex-direction: row;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 24px;
    padding: 6px 10px;
    gap: 4px;
  }

  .reaction-btn {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .battle-cards {
    flex-direction: column;
    gap: 16px;
  }

  .battle-vs {
    font-size: 1.5rem;
  }

  .battle-container {
    padding: 24px 16px;
    width: 95%;
  }

  .feed-card {
    flex: 0 0 260px;
  }

  .sound-toggle {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .share-fab {
    bottom: 76px;
    right: 16px;
    width: 42px;
    height: 42px;
  }

  .momentum-badge {
    font-size: 10px;
    padding: 3px 8px;
  }
}

/* ══════════════════════════════════════════════════════════════════ */
/* NEW COMPONENT STYLES: reactions, engage, sounds                  */
/* ══════════════════════════════════════════════════════════════════ */

/* ── Reaction Bar Enhancements ───────────────────────────────────── */

.reaction-btn {
  position: relative;
  flex-direction: column;
}

.reaction-emoji {
  display: block;
  line-height: 1;
}

.reaction-count {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 1px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.reaction-count--bump {
  transform: scale(1.4);
  color: var(--gold);
}

.reaction-btn--pressed {
  transform: scale(1.35) !important;
  background: rgba(255, 20, 147, 0.3) !important;
}

.reaction-bar--attention {
  animation: reactionBarAttention 0.6s ease-in-out 3;
}

@keyframes reactionBarAttention {
  0%, 100% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 20, 147, 0.3), 0 0 40px rgba(255, 215, 0, 0.15); }
}

/* ── Share Button (floating, left of reaction bar) ──────────────── */

.share-btn {
  position: fixed;
  bottom: 24px;
  left: 90px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 191, 255, 0.2);
  background: rgba(0, 191, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.share-btn:hover {
  background: rgba(0, 191, 255, 0.2);
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 191, 255, 0.25);
}

.share-icon {
  font-size: 16px;
  line-height: 1;
}

.share-label {
  line-height: 1;
}

/* ── Toast Notification ──────────────────────────────────────────── */

.pagwa-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 11000;
  padding: 10px 24px;
  border-radius: 999px;
  background: rgba(0, 255, 127, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 255, 127, 0.3);
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
}

.pagwa-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Battle Button (floating) ────────────────────────────────────── */

.battle-btn {
  position: fixed;
  bottom: 90px;
  left: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 53, 0.3);
  background: rgba(255, 107, 53, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--orange);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.battle-btn:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.25);
}

/* ── Battle Modal ────────────────────────────────────────────────── */

.battle-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.battle-modal--visible {
  opacity: 1;
}

.battle-modal--closing {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.battle-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.battle-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 90%;
  margin: 0 auto;
  padding: 32px 24px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  text-align: center;
}

.battle-modal--visible .battle-content {
  animation: battleSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.battle-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.battle-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.battle-header {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.battle-arena {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 20px;
}

.battle-card {
  flex: 1;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.battle-card--left:hover {
  border-color: rgba(255, 20, 147, 0.4);
  box-shadow: 0 0 24px rgba(255, 20, 147, 0.15);
}

.battle-card--right:hover {
  border-color: rgba(0, 191, 255, 0.4);
  box-shadow: 0 0 24px rgba(0, 191, 255, 0.15);
}

.battle-card--winner {
  border-color: var(--gold) !important;
  box-shadow: 0 0 32px rgba(255, 215, 0, 0.3) !important;
  background: rgba(255, 215, 0, 0.08) !important;
}

.battle-card--loser {
  opacity: 0.4;
  filter: grayscale(0.5);
}

.battle-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  overflow: hidden;
}

.battle-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.battle-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.battle-handle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.battle-stats {
  margin-bottom: 16px;
}

.battle-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
}

.battle-rank {
  font-size: 12px;
  color: var(--gold);
  margin-top: 4px;
}

.battle-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 60px;
}

.battle-vs-text {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--orange);
  text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
  animation: vsPulse 1.5s ease-in-out infinite;
}

.battle-vs-lightning {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, transparent, var(--orange), transparent);
  margin-top: 8px;
  opacity: 0.5;
}

.battle-vote-btn {
  display: block;
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.battle-vote-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.battle-vote-btn--pink {
  background: linear-gradient(135deg, var(--pink), #e91277);
  color: white;
}

.battle-vote-btn--pink:hover:not(:disabled) {
  box-shadow: 0 4px 20px rgba(255, 20, 147, 0.4);
  transform: translateY(-2px);
}

.battle-vote-btn--blue {
  background: linear-gradient(135deg, var(--blue), #0099dd);
  color: white;
}

.battle-vote-btn--blue:hover:not(:disabled) {
  box-shadow: 0 4px 20px rgba(0, 191, 255, 0.4);
  transform: translateY(-2px);
}

.battle-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.battle-counter {
  opacity: 0.7;
}

.battle-swipe-hint {
  display: none;
}

.battle-result {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 24px;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.battle-result--visible {
  opacity: 1;
  transform: scale(1);
}

.battle-result-winner {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.battle-result-score {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.battle-result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.battle-next-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
}

.battle-next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 20, 147, 0.3);
}

.battle-share-btn {
  padding: 12px 24px;
  border: 1px solid rgba(0, 191, 255, 0.3);
  border-radius: 999px;
  background: rgba(0, 191, 255, 0.1);
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
}

.battle-share-btn:hover {
  background: rgba(0, 191, 255, 0.2);
  border-color: var(--blue);
}

.battle-done-btn {
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
}

.battle-done-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
}

/* ── Sound Toggle Button (top-right) ─────────────────────────────── */

.sound-toggle-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  color: var(--text-muted);
  -webkit-tap-highlight-color: transparent;
}

.sound-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.sound-toggle-btn:not(.sound-toggle--muted) {
  color: var(--green);
  border-color: rgba(0, 255, 127, 0.3);
}

.sound-toggle--muted {
  opacity: 0.6;
}

/* ── Mobile responsive for new components ────────────────────────── */

@media (max-width: 640px) {
  .share-btn {
    left: auto;
    right: 70px;
    bottom: 16px;
    padding: 8px 14px;
    font-size: 12px;
  }

  .battle-btn {
    bottom: 70px;
    left: 16px;
    padding: 8px 14px;
    font-size: 12px;
  }

  .battle-content {
    width: 95%;
    padding: 24px 16px;
  }

  .battle-arena {
    flex-direction: column;
    gap: 12px;
  }

  .battle-vs {
    flex-direction: row;
    min-width: auto;
    gap: 12px;
  }

  .battle-vs-lightning {
    width: 40px;
    height: 2px;
    margin-top: 0;
    background: linear-gradient(90deg, transparent, var(--orange), transparent);
  }

  .battle-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .battle-header {
    font-size: 1.2rem;
  }

  .battle-result-winner {
    font-size: 1.4rem;
  }

  .battle-result-actions {
    flex-direction: column;
    width: 80%;
  }

  .battle-swipe-hint {
    display: block;
    font-style: italic;
    opacity: 0.6;
  }

  .sound-toggle-btn {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .pagwa-toast {
    bottom: 120px;
    font-size: 13px;
  }
}

/* Touch devices: show swipe hint */
@media (pointer: coarse) {
  .battle-swipe-hint {
    display: block;
    font-style: italic;
    opacity: 0.6;
  }
}

/* ── Caribbean Hashtag Feeds ──────────────────────────────────── */

.hashtag-feeds-section {
  margin-bottom: 32px;
}

.hashtag-feeds-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin: -8px 0 20px;
}

.hashtag-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
  justify-content: center;
  flex-wrap: wrap;
}

.hashtag-tabs::-webkit-scrollbar { display: none; }

.hashtag-tab {
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hashtag-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.hashtag-tab.active {
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.2), rgba(255, 215, 0, 0.15));
  border-color: rgba(255, 20, 147, 0.3);
  color: var(--text);
}

.hashtag-tab-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.hashtag-tab.active .hashtag-tab-count {
  background: rgba(255, 20, 147, 0.3);
  color: var(--pink);
}

.hashtag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.hashtag-video-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  min-height: 200px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hashtag-video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(255, 20, 147, 0.15);
}

.hashtag-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.7);
  color: var(--gold);
  backdrop-filter: blur(4px);
}

.hashtag-embed {
  width: 100%;
}

.hashtag-embed iframe,
.hashtag-embed blockquote {
  max-width: 100% !important;
  margin: 0 !important;
}

.hashtag-thumb-link {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
}

.hashtag-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hashtag-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease;
  padding-left: 4px;
}

.hashtag-thumb-link:hover .hashtag-play-icon {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(255, 20, 147, 0.8);
}

.hashtag-video-title {
  padding: 10px 12px 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
}

.hashtag-video-author {
  padding: 0 12px 10px;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .hashtag-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .hashtag-video-card {
    min-height: 150px;
  }

  .hashtag-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .hashtag-tab {
    font-size: 12px;
    padding: 6px 14px;
  }

  .hashtag-play-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}
