:root {
  --bg-primary: #0b0b1a;
  --bg-surface: #12122a;
  --bg-card: #1a1a3e;
  --accent-primary: #7c3aed;
  --accent-glow: #a855f7;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --text-primary: #f1f0ff;
  --text-secondary: #a89ec9;
  --border: #2e2b5a;
  --timer-calm: #c4b5fd;
  --timer-warning: #f59e0b;
  --timer-critical: #ef4444;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
}

#root {
  min-height: 100vh;
}

.timer-mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New",
    monospace;
}

@keyframes timer-shake {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-2px);
  }
  40% {
    transform: translateX(2px);
  }
  60% {
    transform: translateX(-1px);
  }
  80% {
    transform: translateX(1px);
  }
  100% {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes glitch {
  0% {
    filter: none;
  }
  20% {
    filter: hue-rotate(20deg) invert(0.2);
  }
  40% {
    filter: hue-rotate(-20deg) invert(0.4);
  }
  60% {
    filter: hue-rotate(10deg) invert(0.2);
  }
  100% {
    filter: none;
  }
}

/* Screen transitions */
.screen-enter {
  opacity: 0;
  transform: translateY(20px);
}
.screen-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 250ms ease-out, transform 250ms ease-out;
}
.screen-leave {
  opacity: 1;
  transform: translateY(0);
}
.screen-leave-active {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 200ms ease-in, transform 200ms ease-in;
}

/* Landing: timer glow pulse speeds */
.timer-glow-calm {
  animation: timer-glow-pulse 3s ease-in-out infinite;
}
.timer-glow-warning {
  animation: timer-glow-pulse 2s ease-in-out infinite;
  opacity: 0.85;
}
.timer-glow-critical {
  animation: timer-glow-pulse 1s ease-in-out infinite;
  opacity: 1;
}
@keyframes timer-glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

/* CTA flash on activation */
@keyframes cta-flash {
  0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.9); filter: brightness(1.4); }
  70% { box-shadow: 0 0 40px 12px rgba(124, 58, 237, 0.6); filter: brightness(1.1); }
  100% { box-shadow: 0 0 50px 16px rgba(124, 58, 237, 0.5); filter: brightness(1); }
}
.cta-flash-on {
  animation: cta-flash 0.6s ease-out forwards;
}
.cta-glow-pulse {
  animation: cta-glow-pulse 1.5s ease-in-out infinite;
}
@keyframes cta-glow-pulse {
  0%, 100% { box-shadow: 0 0 20px 4px rgba(124, 58, 237, 0.4); }
  50% { box-shadow: 0 0 32px 8px rgba(124, 58, 237, 0.6); }
}

/* Success: ticket spring-in */
@keyframes ticket-spring-in {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  60% { opacity: 1; transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.ticket-spring-in {
  animation: ticket-spring-in 500ms cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

/* Success: ticket shimmer */
@keyframes ticket-shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(-45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(-45deg); }
}
.ticket-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 60%,
    transparent 100%
  );
  animation: ticket-shimmer 3s linear infinite;
  pointer-events: none;
}

/* Success: letter stagger */
@keyframes letter-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tier selector: stepper fade-up */
.stepper-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}
.stepper-reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Success: ticket card shimmer 4s */
@keyframes ticket-shimmer-4s {
  0% { transform: translateX(-100%) translateY(-100%) rotate(-45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(-45deg); }
}
.ticket-shimmer-4s::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 60%,
    transparent 100%
  );
  animation: ticket-shimmer-4s 4s linear infinite;
  pointer-events: none;
}

/* Success: shareable card gradient border */
.shareable-card-gradient {
  border: 1px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, #7C3AED, #A855F7, #8B5CF6) border-box;
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.25);
}

/* Seat map: section picker layout and interactions */
.seat-map-section-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.6) transparent;
}
.seat-map-section-list::-webkit-scrollbar {
  width: 6px;
}
.seat-map-section-list::-webkit-scrollbar-track {
  background: transparent;
}
.seat-map-section-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.seat-map-section-card {
  position: relative;
}
.seat-map-section-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.seat-map-section-card--hovered::before {
  border-color: rgba(148, 163, 184, 0.6);
}
.seat-map-section-card--selected {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(17, 24, 39, 0.9));
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.8);
}
.seat-map-section-card--selected::before {
  border-color: rgba(124, 58, 237, 0.9);
}
.seat-map-section-card--selected::after {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(to bottom, #a855f7, #7c3aed);
}

.seat-map-section {
  transition: transform 200ms ease-out, filter 150ms ease-out;
}
.seat-map-section--hovered {
  filter: brightness(1.12);
}
.seat-map-section--selected {
  filter: brightness(1.18) saturate(1.05);
}

@keyframes seat-map-border-pulse {
  0% {
    stroke-width: 0;
    stroke-opacity: 0.8;
  }
  60% {
    stroke-width: 6;
    stroke-opacity: 1;
  }
  100% {
    stroke-width: 0;
    stroke-opacity: 0;
  }
}
.seat-map-section--pulse path {
  stroke: #ffffff;
  stroke-width: 0;
  stroke-opacity: 0;
  animation: seat-map-border-pulse 0.4s ease-out;
}

.seat-map-rows path {
  vector-effect: non-scaling-stroke;
}

@media (max-width: 767px) {
  .seat-map-wrap {
    margin-bottom: 0.25rem;
  }
  .seat-map-section-list {
    max-height: none;
  }
}

