/* ============================================================
   EXPO SHOWCASE BOOTH THEME — Pick One for Free
   Bright, high-energy, vibrant corporate exhibition theme
   Light sunburst background, electric royal blue, festive red & sunshine gold
   ============================================================ */

:root {
  --bg-main:         #f4f8fc;
  --bg-card:         rgba(255, 255, 255, 0.96);
  --blue-primary:    #0066ff;
  --blue-vivid:      #0052cc;
  --blue-deep:       #0038b8;
  --blue-light:      #e8f2ff;
  --blue-glow:       rgba(0, 102, 255, 0.35);
  --red-festive:     #ff2a44;
  --red-deep:        #d90024;
  --red-glow:        rgba(255, 42, 68, 0.35);
  --gold-sunshine:   #ffb700;
  --gold-bright:     #ffd000;
  --gold-deep:       #d97706;
  --ink-primary:     #0c1e3d;
  --ink-secondary:   #4b5e80;
  --ink-muted:       #7d8fa9;
  --border-card:     rgba(0, 102, 255, 0.16);
  --border-light:    rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: var(--bg-main);
  color: var(--ink-primary);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Expo Background: Sunburst Rays & Ambient Glows ── */
.stage-bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.9) 0%, rgba(235, 245, 255, 0.8) 60%, #e2efff 100%);
}

/* Conic Sunburst Ray effect */
.stage-bg-effects::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(0, 102, 255, 0.03) 0deg 12deg,
    transparent 12deg 24deg
  );
  animation: rotateSunburst 120s linear infinite;
  transform-origin: center center;
}

@keyframes rotateSunburst {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Dynamic Bottom Stage Color Ribbons (Red, Blue, Yellow) */
.stage-bg-effects::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -10%;
  right: -10%;
  height: 160px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 42, 68, 0.14) 0%, transparent 65%),
    linear-gradient(135deg, rgba(0, 102, 255, 0.08) 0%, rgba(255, 183, 0, 0.08) 50%, rgba(255, 42, 68, 0.1) 100%);
  filter: blur(20px);
}

.spotlight {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.spotlight-magenta {
  width: 60vw;
  height: 60vw;
  max-width: 600px;
  max-height: 600px;
  top: -10vw;
  left: -10vw;
  background: radial-gradient(circle, rgba(255, 42, 68, 0.18) 0%, transparent 70%);
}

.spotlight-cyan {
  width: 65vw;
  height: 65vw;
  max-width: 650px;
  max-height: 650px;
  top: -5vw;
  right: -10vw;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.18) 0%, transparent 70%);
}

.spotlight-gold {
  width: 70vw;
  height: 70vw;
  max-width: 700px;
  max-height: 700px;
  bottom: -20vw;
  left: 20vw;
  background: radial-gradient(circle, rgba(255, 183, 0, 0.2) 0%, transparent 70%);
}

/* ── App Full-Viewport Container ── */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.5vh, 28px) 16px;
}

/* ── Main Stage (Containerless floating on Sunburst background) ── */
.royal-stage {
  width: min(650px, 98vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: clamp(10px, 2vh, 20px) 16px;
  position: relative;
  overflow: visible;
  animation: stageEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen {
  display: none;
  width: 100%;
  text-align: center;
  margin: auto;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  animation: stageEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes stageEnter {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Brand Header & Logo ── */
.brand-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.brand-logo {
  height: clamp(34px, 5vh, 48px);
  width: auto;
  max-width: 80vw;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 102, 255, 0.15));
  transition: transform 0.25s ease;
}

.brand-logo:hover {
  transform: scale(1.02);
}

/* ── Expo Header Badge & Title ── */
.expo-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, rgba(255, 42, 68, 0.1), rgba(0, 102, 255, 0.1));
  border: 1px solid rgba(0, 102, 255, 0.22);
  color: var(--blue-vivid);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: clamp(10px, 1.3vh, 11.5px);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.expo-event-pill .pill-dot {
  width: 6px;
  height: 6px;
  background: var(--red-festive);
  border-radius: 50%;
  animation: pulseDot 1.6s ease-in-out infinite;
}

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

.screen h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(26px, 4.4vh, 36px);
  line-height: 1.15;
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0c1e3d;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 50, 120, 0.08);
}

.screen h1 span {
  background: linear-gradient(135deg, #0052cc 0%, #ff2a44 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sub {
  max-width: 440px;
  margin: 0 auto 16px;
  color: #475569;
  font-size: clamp(13px, 1.65vh, 14.5px);
  line-height: 1.45;
  font-weight: 600;
}

/* ── Wheel Stage ── */
.wheel-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 16px;
}

.wheel-halo {
  position: absolute;
  width: 112%;
  height: 112%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(0, 102, 255, 0.12) 0%,
    rgba(255, 183, 0, 0.14) 40%,
    rgba(255, 42, 68, 0.08) 65%,
    transparent 75%);
  filter: blur(24px);
  pointer-events: none;
}

.wheel-wrap {
  position: relative;
  width: min(390px, 48vh, 84vw);
  aspect-ratio: 1;
}

.wheel-wrap canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter:
    drop-shadow(0 16px 36px rgba(0, 70, 180, 0.22))
    drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
  display: block;
}

/* ── Yellow Pointer / Stopper Arrow ── */
.pointer-wrap {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  pointer-events: none;
  transition: transform 0.09s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pointer-wrap.tick {
  transform: translateX(-50%) rotate(-15deg);
}

.royal-pointer {
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}

/* ── Golden Pedestal Stand ── */
.wheel-pedestal {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 52vw);
  height: clamp(22px, 3.4vh, 30px);
  background: linear-gradient(180deg, #fff7c2 0%, #ffd000 30%, #ffb700 70%, #d97706 100%);
  clip-path: polygon(16% 0%, 84% 0%, 100% 100%, 0% 100%);
  border-radius: 0 0 12px 12px;
  box-shadow:
    0 10px 24px rgba(0, 50, 150, 0.18),
    inset 0 2px 2px rgba(255, 255, 255, 0.9);
  z-index: 0;
  pointer-events: none;
}

.wheel-pedestal::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -6%;
  right: -6%;
  height: 5px;
  background: linear-gradient(90deg, #d97706, #ffd000, #ffffff, #ffd000, #d97706);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ── Action Buttons ── */
.action-wrap {
  margin-bottom: 12px;
}

.primary, .secondary {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* High-Impact Expo Spin Button */
.primary {
  position: relative;
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 50%, #0038b8 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: clamp(13px, 1.8vh, 16px) clamp(42px, 6.5vw, 64px);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(13.5px, 1.8vh, 15.5px);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow:
    0 8px 24px rgba(0, 102, 255, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: all 0.2s ease;
  overflow: hidden;
  gap: 8px;
}

.btn-sparkle {
  color: #ffd000;
  font-size: 14px;
  text-shadow: 0 0 6px rgba(255, 208, 0, 0.8);
}

.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-25deg);
  transition: left 0.75s ease;
}

.primary:hover:not(:disabled)::before {
  left: 150%;
}

.primary:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 12px 30px rgba(0, 102, 255, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.primary:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

/* Secondary Button */
.secondary {
  background: rgba(0, 102, 255, 0.08);
  color: var(--blue-vivid);
  border: 1.5px solid rgba(0, 102, 255, 0.25);
  border-radius: 999px;
  padding: clamp(9px, 1.4vh, 12px) 28px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(12px, 1.5vh, 13px);
  font-weight: 800;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.secondary:hover {
  background: rgba(0, 102, 255, 0.16);
  border-color: var(--blue-primary);
  transform: translateY(-1px);
}

/* ── Trust Bar ── */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: clamp(11.5px, 1.5vh, 13px);
  color: var(--ink-secondary);
  margin-top: 8px;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.trust-bar span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trust-icon {
  color: var(--gold-deep);
  font-size: 11px;
}

.trust-dot {
  color: rgba(0, 102, 255, 0.3);
  font-size: 16px;
  line-height: 1;
}

/* ── Winner Celebration Screen ── */
.winner-screen {
  gap: 0;
}

.winner-screen.active {
  animation: popupBurst 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popupBurst {
  0%   { transform: scale(0.4) translateY(30px); opacity: 0; }
  50%  { transform: scale(1.06) translateY(-6px); opacity: 1; }
  70%  { transform: scale(0.97) translateY(2px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.blasters-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.blaster {
  font-size: clamp(34px, 4.8vh, 46px);
  animation: blasterPop 1.8s ease-in-out infinite alternate;
  display: inline-block;
  line-height: 1;
}

.blaster-left  { animation-delay: 0s;   transform-origin: right center; }
.blaster-right { animation-delay: 0.3s; transform-origin: left center; }

@keyframes blasterPop {
  0%   { transform: scale(1)    rotate(-8deg); }
  50%  { transform: scale(1.18) rotate(6deg);  }
  100% { transform: scale(1)    rotate(-4deg); }
}

.winner-screen h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(28px, 5vh, 40px);
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #0066ff 0%, #ff2a44 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(0, 102, 255, 0.2));
}

.winner-card {
  background: #ffffff;
  border: 2px solid var(--border-card);
  border-radius: clamp(18px, 2.5vh, 26px);
  padding: clamp(22px, 3vh, 30px) clamp(20px, 4vw, 36px);
  box-shadow:
    0 20px 50px rgba(0, 50, 150, 0.16),
    0 4px 14px rgba(0, 0, 0, 0.06);
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: box-shadow 0.3s ease;
}

.winner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(9px, 1.2vh, 10.5px);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--blue-vivid);
  background: var(--blue-light);
  border: 1px solid rgba(0, 102, 255, 0.25);
  padding: 4px 14px;
  border-radius: 999px;
  text-transform: uppercase;
}

.winner-badge-icon {
  color: var(--gold-deep);
  font-size: 11px;
}

.winner-label {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  font-weight: 800;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.winner-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(26px, 4.2vh, 34px);
  font-weight: 900;
  margin: 0;
  color: var(--ink-primary);
  line-height: 1.2;
}

.claim {
  min-width: 220px;
  margin-top: 6px;
  background: linear-gradient(135deg, #ff2a44 0%, #d90024 100%);
  box-shadow:
    0 8px 24px rgba(255, 42, 68, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.claim:hover:not(:disabled) {
  box-shadow:
    0 12px 30px rgba(255, 42, 68, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* ── Particle & Confetti Stage ── */
.particle-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.glitter-particle {
  position: fixed;
  width: 6px;
  height: 6px;
  pointer-events: none;
  z-index: 9998;
  border-radius: 50%;
}

.glitter-particle.star {
  width: 0;
  height: 0;
  border-radius: 0;
  background: none !important;
}

.confetti-particle {
  pointer-events: none;
  z-index: 9999;
}

@keyframes flashFade {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* ── Admin Portal Styles (Clean SaaS Expo Edition) ── */
.admin-body {
  padding: 24px 16px;
  min-height: 100vh;
  background-color: var(--bg-main);
}

.admin-shell {
  max-width: 820px;
  margin: auto;
  position: relative;
  z-index: 1;
}

.admin-brand {
  margin-bottom: 20px;
}

.admin-card {
  background: #ffffff;
  border: 1.5px solid var(--border-card);
  border-radius: 24px;
  padding: 30px;
  box-shadow:
    0 16px 48px rgba(0, 50, 150, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04);
}

.admin-card h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 26px;
  font-weight: 900;
  margin: 4px 0 8px;
  color: var(--ink-primary);
}

.admin-card h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  margin-top: 24px;
  font-size: 20px;
  font-weight: 800;
  color: var(--blue-vivid);
}

.admin-card p {
  color: var(--ink-secondary);
  line-height: 1.5;
  font-size: 14px;
}

.admin-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.hidden {
  display: none !important;
}

.admin-card form {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.admin-card input {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: var(--ink-primary);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  transition: all 0.2s ease;
}

.admin-card input:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
  background: #ffffff;
}

.product-edit {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
}

.product-num {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--blue-primary);
  padding-top: 6px;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
  flex: 1;
}

.fields label {
  font-size: 11.5px;
  font-weight: 800;
  display: grid;
  gap: 6px;
  color: var(--ink-secondary);
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.msg {
  min-height: 22px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
}

.msg.ok    { color: #16a34a; }
.msg.error { color: #dc2626; }

.muted, .small {
  color: var(--ink-muted);
}

hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 24px 0;
}

.qr-preview-box {
  display: inline-block;
  padding: 14px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  margin: 14px 0;
}

.qr {
  width: min(240px, 100%);
  display: block;
}

.link-btn {
  margin-top: 4px;
}

.small {
  font-size: 12px;
  margin-top: 22px !important;
}

code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--blue-vivid);
}

.royal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(9.5px, 1.3vh, 11px);
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--blue-vivid);
  background: var(--blue-light);
  border: 1px solid rgba(0, 102, 255, 0.2);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.royal-badge .gem {
  color: var(--gold-deep);
  font-size: 11px;
}

@media (max-width: 650px) {
  .fields { grid-template-columns: 1fr; }
  .admin-card form { flex-direction: column; }
  .admin-top { flex-direction: column; }
  .admin-top .secondary { align-self: flex-start; }
  .product-edit { gap: 10px; }
  .trust-bar { font-size: 11px; gap: 6px; }
}
