﻿/* =========================================
   DOLLAR STORE POS & SARDAR SAAB PRANK
   ========================================= */

:root {
  /* POS Corporate Theme */
  --pos-bg: #0b1329;
  --pos-card: #131d38;
  --pos-card-border: #1e2d54;
  --pos-primary: #0284c7;
  --pos-primary-hover: #0369a1;
  --pos-green: #10b981;
  --pos-text: #f8fafc;
  --pos-text-muted: #94a3b8;
  
  /* Meme & Bomb Theme */
  --font-heading: 'Bungee', cursive, sans-serif;
  --font-pos: 'Inter', system-ui, -apple-system, sans-serif;
  --font-quote: 'Outfit', sans-serif;
  --font-urdu: 'Noto Nastaliq Urdu', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  background: var(--pos-bg);
  color: var(--pos-text);
  font-family: var(--font-pos);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  transition: background 0.5s ease;
}

body.blast-mode {
  background: radial-gradient(circle at 50% 20%, #1e1b4b 0%, #0f172a 40%, #050711 100%);
}

/* Background particle canvas */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 90;
}

/* Screen Flash Overlay */
.flash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle, #fffbeb 10%, #ea580c 60%, #7c2d12 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

.flash-overlay.active {
  animation: flashBurst 0.9s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes flashBurst {
  0% { opacity: 1; transform: scale(1); filter: brightness(2.5); }
  25% { opacity: 0.85; filter: hue-rotate(20deg); }
  50% { opacity: 0.4; }
  100% { opacity: 0; transform: scale(1.05); }
}

/* Screen Shake */
body.screen-shake {
  animation: megaShake 0.75s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes megaShake {
  10%, 90% { transform: translate3d(-4px, 0, 0) rotate(-0.5deg); }
  20%, 80% { transform: translate3d(6px, -4px, 0) rotate(1deg); }
  30%, 50%, 70% { transform: translate3d(-8px, 6px, 0) rotate(-1.5deg) scale(1.03); }
  40%, 60% { transform: translate3d(8px, -6px, 0) rotate(1.5deg) scale(1.03); }
}

/* Sound Button */
.sound-btn {
  position: fixed;
  top: 1rem;
  right: 1.2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: var(--font-pos);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sound-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

/* =========================================
   1. PROFESSIONAL DOLLAR STORE POS STYLES
   ========================================= */
.pos-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  z-index: 10;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pos-wrapper.hidden {
  display: none;
}

/* Top POS Bar */
.pos-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--pos-card);
  border: 1px solid var(--pos-card-border);
  border-radius: 16px;
  padding: 0.9rem 1.4rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.pos-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo {
  font-size: 1.8rem;
  background: rgba(2, 132, 199, 0.15);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

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

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--pos-text-muted);
}

.pos-status-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pos-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pos-green);
  box-shadow: 0 0 8px var(--pos-green);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.pos-terminal-pill {
  font-size: 0.8rem;
  color: var(--pos-text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
}

.pos-terminal-pill strong {
  color: #e2e8f0;
}

/* Center Card Container */
.pos-card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1rem;
  margin: auto 0;
}

.pos-main-card {
  background: var(--pos-card);
  border: 1px solid var(--pos-card-border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  max-width: 620px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.pos-badge {
  display: inline-block;
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}

.pos-heading {
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 0.8rem;
}

.pos-subtext {
  font-size: 0.95rem;
  color: var(--pos-text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Metric Items */
.pos-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-bottom: 2.2rem;
}

.metric-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.metric-label {
  font-size: 0.72rem;
  color: var(--pos-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 0.85rem;
  font-weight: 600;
}

.status-good {
  color: #34d399;
}

/* POS Launch Button */
.pos-action-box {
  margin-bottom: 1.5rem;
}

.pos-launch-btn {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: var(--font-pos);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 1.15rem 2rem;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pos-launch-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.5);
}

.pos-launch-btn:active {
  transform: translateY(1px) scale(0.99);
}

.pos-security-note {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

.pos-footer {
  text-align: center;
  font-size: 0.8rem;
  color: #475569;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.footer-divider {
  opacity: 0.5;
}

/* =========================================
   2. REVEAL SECTION (THE MEME BOMB)
   ========================================= */
.reveal-card {
  background: rgba(22, 27, 46, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px);
  border-radius: 30px;
  padding: 2.5rem 1.8rem;
  text-align: center;
  max-width: 680px;
  width: 92%;
  margin: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 50;
}

.reveal-card.hidden {
  display: none;
}

/* Comic Boom Badge */
.boom-badge {
  font-family: var(--font-heading);
  background: #ff0055;
  color: #fff;
  padding: 0.6rem 1.8rem;
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  border-radius: 12px;
  transform: rotate(-3deg);
  box-shadow: 0 8px 25px rgba(255, 0, 85, 0.7);
  animation: boomPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.4) forwards;
  margin-bottom: 1.5rem;
  border: 3px solid #ffdd00;
}

@keyframes boomPop {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.25) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(-3deg); opacity: 1; }
}

/* Dramatic Photo Container */
.photo-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 1.8rem;
  border-radius: 24px;
}

.photo-container.bomb-enter {
  animation: bombDropIn 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bombDropIn {
  0% {
    transform: scale(0.05) translateY(-500px) rotate(-30deg);
    opacity: 0;
    filter: brightness(5) blur(10px);
  }
  60% {
    transform: scale(1.15) translateY(20px) rotate(5deg);
    opacity: 1;
    filter: brightness(1.6) blur(0);
  }
  80% {
    transform: scale(0.95) translateY(-10px) rotate(-2deg);
  }
  100% {
    transform: scale(1) translateY(0) rotate(0);
    filter: brightness(1);
  }
}

/* Flame Aura around photo */
.flame-aura {
  position: absolute;
  inset: -12px;
  background: radial-gradient(circle, #ff0055 0%, #ff9900 60%, transparent 80%);
  border-radius: 30px;
  filter: blur(15px);
  opacity: 0.75;
  z-index: 1;
  animation: flamePulse 2s infinite ease-in-out;
}

@keyframes flamePulse {
  0%, 100% { transform: scale(1); opacity: 0.65; }
  50% { transform: scale(1.05); opacity: 0.95; }
}

.frame-border {
  position: relative;
  z-index: 2;
  border-radius: 20px;
  overflow: hidden;
  border: 4px solid #f59e0b;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  background: #000;
  max-height: 480px;
}

.sardar-img {
  width: 100%;
  height: 100%;
  max-height: 460px;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}

.sardar-img:hover {
  transform: scale(1.04);
}

.vip-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 1px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

/* Caption and Dialogue Box */
.caption-container {
  width: 100%;
  max-width: 520px;
  z-index: 5;
}

.funny-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 4.2vw, 2.1rem);
  line-height: 1.35;
  color: #fef08a;
  text-shadow: 0 3px 0 #b45309, 0 8px 20px rgba(245, 158, 11, 0.5);
  margin-bottom: 0.6rem;
  animation: quoteZoom 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes quoteZoom {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.urdu-subtext {
  font-family: var(--font-urdu), serif;
  font-size: clamp(1.4rem, 3.8vw, 1.9rem);
  color: #fed7aa;
  margin-bottom: 1.8rem;
  direction: rtl;
  line-height: 1.8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Fake Infinite Loading Progress Bar */
.loading-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1.8rem;
}

.loading-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.6rem;
}

#progressPercent {
  color: #fbbf24;
  font-weight: 800;
  font-family: monospace;
  font-size: 1.1rem;
}

.progress-bar-bg {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  width: 99%;
  height: 100%;
  background: linear-gradient(90deg, #ff0055, #f59e0b, #10b981, #3b82f6);
  background-size: 300% 100%;
  border-radius: 999px;
  animation: progressStrobe 2s infinite linear;
  transition: width 0.3s ease;
}

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

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  padding: 0.85rem 1.6rem;
  border-radius: 14px;
  font-family: var(--font-pos);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.replay-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.replay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.6);
}

.cheer-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.cheer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(59, 130, 246, 0.6);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .pos-wrapper {
    padding: 1rem;
  }
  .pos-main-card {
    padding: 2.2rem 1.2rem;
  }
  .pos-metrics-grid {
    grid-template-columns: 1fr;
  }
  .pos-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .pos-status-bar {
    width: 100%;
    justify-content: space-between;
  }
  .action-buttons {
    flex-direction: column;
    width: 100%;
  }
  .action-btn {
    width: 100%;
  }
}
