/* ==========================================================================
   POP4YOU ARCADE & RETAIL APP - DESIGN SYSTEM & STYLES
   ========================================================================== */

:root {
  --font-heading: 'Fredoka', cursive, sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Color Palette */
  --bg-gradient: linear-gradient(135deg, #130924 0%, #2a0845 50%, #17072b 100%);
  --card-bg: rgba(255, 255, 255, 0.07);
  --card-border: rgba(255, 255, 255, 0.15);
  
  --pop-pink: #ff3385;
  --pop-pink-glow: rgba(255, 51, 133, 0.4);
  --pop-yellow: #ffb703;
  --pop-yellow-glow: rgba(255, 183, 3, 0.4);
  --pop-purple: #9d4edd;
  --pop-blue: #00b4d8;
  --pop-gold: #ffb703;

  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Animated Bubbles */
.bg-bubbles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.02) 70%);
  animation: floatUp 12s infinite linear;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(1) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-110vh) scale(1.3) rotate(360deg); opacity: 0; }
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(19, 9, 36, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-official-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(255, 51, 133, 0.4));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-official-logo:hover {
  transform: scale(1.1) rotate(-5deg);
}

.hero-brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.hero-brand-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(255, 51, 133, 0.6));
  animation: float 3s ease-in-out infinite alternate;
}

.modal-header-logo {
  height: 50px;
  margin-bottom: 10px;
  object-fit: contain;
}

.logo-badge {
  font-size: 28px;
  background: linear-gradient(135deg, var(--pop-yellow), #ff8800);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 0 20px var(--pop-yellow-glow);
  animation: pulseLogo 3s infinite alternate;
}

@keyframes pulseLogo {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-pop {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--pop-yellow);
  text-shadow: 0 0 10px var(--pop-yellow-glow);
}

.brand-4you {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--pop-pink);
  text-shadow: 0 0 10px var(--pop-pink-glow);
}

.brand-tag {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  border-radius: 40px;
  border: 1px solid var(--card-border);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--pop-pink), var(--pop-purple));
  box-shadow: 0 4px 15px var(--pop-pink-glow);
}

.btn-retail-highlight {
  background: linear-gradient(135deg, var(--pop-yellow), #ff7b00) !important;
  color: #130924 !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 15px var(--pop-yellow-glow);
  animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 0 10px var(--pop-yellow-glow); }
  100% { transform: scale(1.04); box-shadow: 0 0 22px var(--pop-yellow-glow); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.score-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--pop-yellow);
  padding: 8px 16px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--pop-yellow);
}

.star-icon {
  color: var(--pop-yellow);
  animation: spinStar 6s infinite linear;
}

@keyframes spinStar {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

/* MAIN CONTENT */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
  position: relative;
  z-index: 10;
}

.app-section {
  display: none;
  opacity: 0;
  transform: translateY(20deg);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.app-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* HERO SECTION */
.hero-banner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--pop-pink-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 51, 133, 0.2);
  border: 1px solid var(--pop-pink);
  color: var(--pop-pink);
  padding: 6px 16px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 44px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.highlight-text {
  background: linear-gradient(135deg, var(--pop-yellow), var(--pop-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.cta-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-bounce);
}

.cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.cta-btn.primary {
  background: linear-gradient(135deg, var(--pop-pink), var(--pop-purple));
  color: #fff;
  box-shadow: 0 8px 25px var(--pop-pink-glow);
}

.cta-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
  color: #fff;
}

.cta-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cta-btn.gold {
  background: linear-gradient(135deg, #ffb703, #ff8800);
  color: #130924;
  box-shadow: 0 8px 25px var(--pop-yellow-glow);
}

.cta-btn.lg {
  font-size: 18px;
  padding: 18px 36px;
}

/* HERO SHOWCASE CARD STACK */
.hero-showcase {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 300px;
}

.hero-card-stack {
  position: relative;
  width: 220px;
  height: 220px;
}

.hero-img {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 24px;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.2);
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
  transition: var(--transition-bounce);
}

.hero-img.img-1 {
  top: 0;
  left: 0;
  transform: rotate(-10deg);
  z-index: 3;
}

.hero-img.img-2 {
  top: 20px;
  left: 40px;
  transform: rotate(5deg);
  z-index: 2;
}

.hero-img.img-3 {
  top: 40px;
  left: 80px;
  transform: rotate(18deg);
  z-index: 1;
}

.hero-showcase:hover .img-1 { transform: rotate(-15deg) translate(-20px, -10px) scale(1.05); }
.hero-showcase:hover .img-2 { transform: rotate(0deg) translate(0, -15px) scale(1.05); }
.hero-showcase:hover .img-3 { transform: rotate(25deg) translate(20px, -10px) scale(1.05); }

/* FEATURE CARDS GRID */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  margin-bottom: 20px;
}

.bg-pink { background: linear-gradient(135deg, var(--pop-pink), #ff0055); box-shadow: 0 8px 20px var(--pop-pink-glow); }
.bg-yellow { background: linear-gradient(135deg, var(--pop-yellow), #ff8800); box-shadow: 0 8px 20px var(--pop-yellow-glow); }
.bg-purple { background: linear-gradient(135deg, var(--pop-purple), #7b2cbf); box-shadow: 0 8px 20px rgba(157, 78, 221, 0.4); }
.bg-amber { background: linear-gradient(135deg, #f77f00, #d62828); }
.bg-blue { background: linear-gradient(135deg, var(--pop-blue), #0077b6); }

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-link {
  font-weight: 700;
  color: var(--pop-yellow);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

/* SECTION MASCOTS */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 38px;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 18px;
}

.mascot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

/* HEADER ALBUM BADGE PILL */
.album-badge-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 51, 133, 0.15);
  border: 1px solid var(--pop-pink);
  padding: 8px 16px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--pop-pink);
}

.album-icon {
  color: var(--pop-pink);
  animation: pulse 2s infinite alternate;
}

/* COLLECTION PROGRESS BANNER */
.collection-progress-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

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

.progress-info h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--pop-yellow);
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-text {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.progress-bar-track {
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pop-yellow), var(--pop-pink), var(--pop-purple));
  border-radius: 20px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 15px var(--pop-pink-glow);
}

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

/* LOCKED vs UNLOCKED MASCOT CARDS */
.mascot-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: var(--transition-bounce);
  position: relative;
}

.mascot-card.locked .mascot-avatar {
  filter: grayscale(1) opacity(0.3) blur(2px);
}

.mascot-card.locked .mascot-badge {
  background: #555 !important;
  color: #aaa;
}

.mascot-card.locked .mascot-name {
  color: var(--text-muted);
}

.mascot-lock-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(19, 9, 36, 0.85);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-md);
  z-index: 10;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  color: #fff;
}

.mascot-card.locked .mascot-lock-overlay {
  display: flex;
}

.mascot-lock-overlay i {
  font-size: 36px;
  color: var(--pop-yellow);
}

.mascot-lock-overlay span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.mascot-card.unlocked {
  border-color: var(--pop-yellow);
  box-shadow: 0 0 20px rgba(255, 183, 3, 0.2);
}

.mascot-card.just-unlocked {
  animation: unlockFlash 1.2s ease;
}

@keyframes unlockFlash {
  0% { transform: scale(1); border-color: var(--pop-yellow); }
  50% { transform: scale(1.1) rotate(4deg); border-color: #fff; box-shadow: 0 0 40px var(--pop-pink); }
  100% { transform: scale(1); border-color: var(--pop-yellow); }
}

.mascot-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.mascot-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  color: #fff;
}

.mascot-img-wrapper {
  width: 170px;
  height: 170px;
  margin: 20px auto;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.2);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mascot-avatar {
  width: 90%;
  height: 90%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.mascot-card:hover .mascot-avatar {
  transform: scale(1.1) rotate(3deg);
}

.mascot-name {
  font-family: var(--font-heading);
  font-size: 24px;
  margin-bottom: 4px;
}

.mascot-role {
  color: var(--pop-yellow);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}

.mascot-stats {
  margin-bottom: 20px;
  text-align: left;
}

.stat-bar {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.stat-bar span {
  display: block;
  margin-bottom: 3px;
}

.bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pop-yellow), var(--pop-pink));
  border-radius: 4px;
}

.mascot-action-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mascot-action-btn:hover {
  background: var(--pop-pink);
  border-color: var(--pop-pink);
}

/* SECTION GAMES HUB */
.game-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.game-tab-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 18px;
  padding: 14px 28px;
  border-radius: 40px;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.game-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.game-tab-btn.active {
  color: #130924;
  background: var(--pop-yellow);
  border-color: var(--pop-yellow);
  box-shadow: 0 8px 25px var(--pop-yellow-glow);
}

.game-viewport {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  position: relative;
}

.game-viewport.active {
  display: block;
}

/* GAME HUD */
.game-hud {
  display: flex;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  padding: 12px 24px;
  border-radius: 30px;
  margin-bottom: 24px;
}

.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.hud-val {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--pop-yellow);
}

/* CANVAS WRAPPER & OVERLAYS */
.canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  border: 2px solid var(--card-border);
}

#catchCanvas {
  display: block;
  width: 100%;
  height: auto;
  background: #0f071d;
}

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(19, 9, 36, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  z-index: 20;
}

.game-overlay.hidden {
  display: none;
}

.overlay-title {
  font-family: var(--font-heading);
  font-size: 38px;
  margin-bottom: 14px;
  color: var(--pop-yellow);
}

.overlay-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 450px;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* MEMORY GAME GRID */
.memory-grid-container {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  min-height: 440px;
}

/* SEARCH BAR CONTAINER & FILTERS */
.search-bar-container {
  max-width: 600px;
  margin: 20px auto 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 20px;
  color: var(--pop-yellow);
  font-size: 18px;
  pointer-events: none;
}

#mascotSearchInput {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--card-border);
  padding: 14px 48px 14px 50px;
  border-radius: 40px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  backdrop-filter: blur(10px);
  transition: var(--transition-fast);
}

#mascotSearchInput:focus {
  border-color: var(--pop-yellow);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 20px var(--pop-yellow-glow);
}

.clear-search-btn {
  position: absolute;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  display: none;
}

.clear-search-btn:hover {
  color: #fff;
}

.search-counter {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* REVEAL MODAL & SURPRISE PACK STYLES */
.modal-card-reveal {
  max-width: 580px;
  padding: 32px;
  overflow: hidden;
  position: relative;
}

.reveal-step {
  display: none;
}

.reveal-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* LIVE CAMERA SCANNER VIEWPORT STYLES */
.camera-scanner-viewport {
  position: relative;
  width: 100%;
  height: 260px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--pop-yellow);
  box-shadow: 0 0 25px rgba(255, 183, 3, 0.3);
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SCANNER RETICLE & TARGET CORNERS */
.scanner-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 140px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.target-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--pop-yellow);
  border-style: solid;
}

.target-corner.top-left {
  top: -2px;
  left: -2px;
  border-width: 4px 0 0 4px;
}

.target-corner.top-right {
  top: -2px;
  right: -2px;
  border-width: 4px 4px 0 0;
}

.target-corner.bottom-left {
  bottom: -2px;
  left: -2px;
  border-width: 0 0 4px 4px;
}

.target-corner.bottom-right {
  bottom: -2px;
  right: -2px;
  border-width: 0 4px 4px 0;
}

/* GLOWING RED LASER SCANLINE */
.laser-scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #ff0055;
  box-shadow: 0 0 15px #ff0055, 0 0 25px #ff0055;
  animation: laserScan 2s infinite ease-in-out alternate;
}

@keyframes laserScan {
  0% { top: 5%; }
  100% { top: 92%; }
}

.camera-status-pill {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(19, 9, 36, 0.85);
  border: 1px solid var(--card-border);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-red {
  color: #ff0055;
  animation: pulse 1s infinite alternate;
}

.camera-actions-bar {
  margin: 16px 0;
  text-align: center;
}

.manual-scan-toggle {
  margin-top: 10px;
  text-align: center;
}

.text-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.text-link-btn:hover {
  color: #fff;
}

.manual-input-box {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.quick-pack-selector label {
  font-size: 14px;
  font-weight: 700;
  color: var(--pop-yellow);
  display: block;
  margin-bottom: 10px;
}

.pack-btns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pack-select-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-bounce);
  text-align: center;
}

.pack-select-btn:hover {
  background: var(--pop-pink);
  border-color: var(--pop-pink);
  transform: translateY(-2px);
}

/* SUSPENSE SHAKING PACK ANIMATION */
.suspense-box {
  padding: 40px 20px;
  text-align: center;
}

.shaking-pack {
  font-size: 80px;
  margin: 0 auto 20px;
  display: inline-block;
  animation: shakePack 0.4s infinite ease-in-out;
  position: relative;
}

@keyframes shakePack {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.1); }
  50% { transform: rotate(8deg) scale(1.15); }
  75% { transform: rotate(-6deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

.pack-sparkles {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
}

.suspense-title {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--pop-yellow);
  margin-bottom: 8px;
}

.suspense-sub {
  color: var(--text-muted);
  font-size: 15px;
}

/* REVEALED MASCOT SHOWCASE */
.reveal-badge-header {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--pop-yellow);
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-shadow: 0 0 15px var(--pop-yellow-glow);
}

.revealed-mascot-card {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--pop-yellow);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  0% { transform: scale(0.4) rotate(-10deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.revealed-img-frame {
  width: 140px;
  height: 140px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff;
  padding: 10px;
  box-shadow: 0 0 25px var(--pop-yellow-glow);
}

.revealed-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.revealed-mascot-name {
  font-family: var(--font-heading);
  font-size: 26px;
  margin-bottom: 4px;
}

.revealed-mascot-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* INSTANT IN-STORE RETAIL COUPON BOX */
.instant-coupon-box {
  background: linear-gradient(135deg, #1f0b38, #350b55);
  border: 2px dashed var(--pop-yellow);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 0 25px var(--pop-yellow-glow);
  position: relative;
}

.coupon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.coupon-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #4cc9f0;
  letter-spacing: 0.5px;
}

.coupon-discount {
  background: linear-gradient(135deg, var(--pop-yellow), #ff8800);
  color: #130924;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 0 10px var(--pop-yellow-glow);
}

.coupon-instruction {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.barcode-display-wrapper {
  background: #ffffff;
  color: #000;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.barcode-font {
  font-family: 'Libre Barcode 128', cursive, monospace;
  font-size: 42px;
  letter-spacing: 2px;
  line-height: 1;
}

.barcode-code-text {
  font-size: 14px;
  font-family: monospace;
  letter-spacing: 1px;
  margin-top: 4px;
}

.coupon-timer {
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--pop-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* CONFETTI ANIMATION */
.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 14px;
  top: -20px;
  animation: confettiFall 2.5s infinite linear;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(600px) rotate(720deg); opacity: 0; }
}

/* CINEMA THEATER & VIDEO ANIMATION STYLES */
.btn-cinema-highlight {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.3), rgba(255, 51, 133, 0.3)) !important;
  border-color: var(--pop-purple) !important;
  color: #fff !important;
}

.cinema-theater-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-top: 20px;
}

@media (max-width: 1024px) {
  .cinema-theater-container {
    grid-template-columns: 1fr;
  }
}

.theater-screen-wrapper {
  background: #0d041a;
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.screen-frame {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

#cinemaCanvas {
  width: 100%;
  height: 480px;
  display: block;
  object-fit: contain;
}

.cinema-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 4, 26, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 30px;
  color: #fff;
  transition: opacity 0.4s ease;
}

.cinema-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-pulse-btn {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--pop-pink), var(--pop-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 0 30px var(--pop-pink-glow);
  animation: pulse 1.8s infinite alternate;
  transition: transform 0.2s ease;
}

.play-pulse-btn:hover {
  transform: scale(1.15);
}

.cinema-controls-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 30px;
}

.cinema-ctrl-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.cinema-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--pop-yellow);
}

.video-timeline-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.video-timeline-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pop-yellow), var(--pop-pink));
  border-radius: 10px;
  transition: width 0.1s linear;
}

.video-time-code {
  font-family: monospace;
  font-size: 13px;
  color: var(--text-muted);
}

/* PLAYLIST SELECTOR */
.cinema-playlist-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.cinema-playlist-wrapper h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--pop-yellow);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.playlist-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.video-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.video-card:hover, .video-card.active {
  background: rgba(255, 51, 133, 0.15);
  border-color: var(--pop-pink);
  transform: translateX(4px);
}

.video-thumb-wrapper {
  position: relative;
  width: 70px;
  height: 60px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb-wrapper img {
  width: 85%;
  height: 85%;
  object-fit: contain;
}

.video-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 10px;
  font-family: monospace;
  padding: 2px 4px;
  border-radius: 4px;
}

.video-info h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  color: #fff;
  margin-bottom: 2px;
}

.video-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.mascot-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.mascot-card-actions .mascot-action-btn {
  flex: 1;
  font-size: 12px;
  padding: 8px 10px;
}

.mascot-card-actions .btn-vid {
  background: rgba(157, 78, 221, 0.2);
  border-color: var(--pop-purple);
  color: #fff;
}

.mascot-card-actions .btn-vid:hover {
  background: var(--pop-purple);
}

.filter-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 20px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
  color: #130924;
  background: var(--pop-yellow);
  border-color: var(--pop-yellow);
  font-weight: 700;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.memory-grid.memory-grid-20 {
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.memory-grid.memory-grid-24 {
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.memory-card {
  aspect-ratio: 1;
  perspective: 1000px;
  cursor: pointer;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card-border);
}

.card-front {
  background: linear-gradient(135deg, #2a0845, #130924);
  font-size: 36px;
}

.card-back {
  background: #fff;
  transform: rotateY(180deg);
  overflow: hidden;
}

.card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* WHEEL GAME */
.wheel-flex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.wheel-box {
  position: relative;
  display: flex;
  justify-content: center;
}

.wheel-pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 32px;
  color: var(--pop-yellow);
  z-index: 10;
  text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

#wheelCanvas {
  max-width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.wheel-controls {
  text-align: left;
}

.wheel-controls h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  margin-bottom: 14px;
}

.wheel-controls p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 28px;
}

.wheel-result-msg {
  margin-top: 20px;
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--pop-yellow);
  min-height: 60px;
}

/* MODAL RETAIL SCANNER */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #190a30;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: var(--pop-yellow);
  color: #130924;
  font-size: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 20px var(--pop-yellow-glow);
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  margin-bottom: 8px;
}

.modal-header p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 24px;
}

.scanner-preview {
  position: relative;
  width: 240px;
  height: 180px;
  margin: 0 auto 24px;
  border: 2px dashed var(--pop-pink);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
}

.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--pop-pink);
  box-shadow: 0 0 15px var(--pop-pink);
  animation: scanMove 2s infinite ease-in-out alternate;
}

@keyframes scanMove {
  0% { top: 10%; }
  100% { top: 90%; }
}

.scanner-dummy-pack {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  opacity: 0.8;
}

.scanner-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

.scan-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.scan-input-group input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  padding: 12px 16px;
  border-radius: 30px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}

.scan-feedback {
  font-family: var(--font-heading);
  font-size: 16px;
  min-height: 30px;
}

.scan-feedback.success { color: #4cc9f0; }
.scan-feedback.error { color: #ff0055; }

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  .hero-banner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 24px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-showcase {
    display: none;
  }

  .navbar {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
  }

  .wheel-flex {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .wheel-controls {
    text-align: center;
  }
}
