/*

version: 18:48

*/

:root {
  /* Muted, sensual, non-influencer palette */
  --yes: #6b9080;      /* Muted sage green - softer, more intimate */
  --maybe: #d4a574;    /* Warm caramel - earthy, not loud */
  --no: #b85c5c;       /* Muted terracotta red - boundary without aggression */
  
  /* Backgrounds - deep charcoal/soft black */
  --bg: #1c1c1e;       /* Deep charcoal (closer to #1C1C1E) */
  --card: #2c2c2e;     /* Soft black for cards */
  
  /* Text - soft ivory/warm off-white */
  --text: #f4f1ec;     /* Soft ivory (closer to #F4F1EC) */
  --muted: #a8a8a8;    /* Warm gray - easier on eyes than pure gray */

  /* Radii and transitions */
  --radius-full: 999px;
  --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: radial-gradient(circle at top, #111827, #020617);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.app {
  width: 100%;
  max-width: 480px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 20px 20px 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.75);
  border: none;
}

h1, h2 {
  margin-bottom: 0.25rem;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

p, .pill, .small, .question-text, .list {
  color: var(--muted);
}

p {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.85);
  margin-bottom: 0.75rem;
}

.small {
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.question-text {
  font-size: 1.5rem; 
  margin: 0 0 20px 0;
  text-align: center;
  line-height: 1.3;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 600px) {
  .question-text {
    font-size: 1.5rem;
  }
}

.buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

button {
  flex: 1;
  border-radius: var(--radius-full);
  border: none;
  padding: 10px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #0b1120;
  font-weight: 600;
  transition: transform 0.08s ease, background 0.1s ease, box-shadow 0.1s ease;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width var(--transition), height var(--transition);
}

button:active::before {
  width: 300px;
  height: 300px;
}

button:active {
  transform: scale(0.96);
  box-shadow: none;
}

button:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.btn-yes {
  background: var(--yes);
  box-shadow: 0 0 0 1px rgba(16,185,129,0.2);
}

.btn-maybe {
  background: var(--maybe);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.25);
}

.btn-no {
  background: var(--no);
  box-shadow: 0 0 0 1px rgba(239,68,68,0.25);
}

.center {
  text-align: center;
}

.progress {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.step-label {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.list {
  margin-top: 10px;
  padding-left: 16px;
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-yes { background: rgba(16,185,129,0.1); color: #6ee7b7; }
.badge-soft { background: rgba(245,158,11,0.1); color: #fed7aa; }
.badge-none { background: rgba(148,163,184,0.15); color: #cbd5f5; }

.section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 8px;
  margin-bottom: 4px;
}

.divider {
  margin: 10px 0;
  border-top: 1px solid rgba(148,163,184,0.25);
}

.tagline {
  font-size: 0.8rem;
  text-align: center;
  margin-top: 8px;
}

.app-header {
  width: 100%;
  background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,41,59,0.95));
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  text-align: center;
  padding: 18px 0 10px 0;
  position: relative;
  top: 0;
  z-index: 10;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.app-title-link {
  text-decoration: none !important;
  color: #fff !important;
  display: inline-block;
  transition: opacity 0.2s ease;
}

.app-title-link:hover {
  opacity: 0.8;
  text-decoration: none !important;
  color: var(--text) !important;
}

.app-title-link:active {
  opacity: 0.6;
  text-decoration: none !important;
  color: var(--text) !important;
}

.app-title-link:visited {
  text-decoration: none !important;
  color: var(--text) !important;
}

.app-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff !important;
  margin: 0;
  line-height: 1.2;
  cursor: pointer;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
}

@media (max-width: 600px) {
  .header-row {
    gap: 8px;
  }
  
  .undo-btn {
    padding: 5px 10px;
    gap: 4px;
    margin-top: 6px;
  }
  
  
  .undo-icon {
    font-size: 1.3rem;
  }
}

/* Swipe/transition styles for question card */
.question-main {
  position: relative;
  overflow-x: visible;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  z-index: 20; /* Higher than header (z-index: 10) so swipe card appears on top */
}

.swipe-card {
  transition: transform 0.35s cubic-bezier(.4,1.4,.6,1), opacity 0.25s, box-shadow 0.15s ease;
  will-change: transform, opacity, box-shadow;
  touch-action: pan-x pan-y;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 20; /* Ensure swipe card is above header */
}

/* Swipe area takes up most of the space for easy swiping */
.swipe-area {
  flex: 1;
  min-height: 200px;
  position: relative;
}

/* Question content anchored at bottom for thumb reach */
.question-content {
  flex: 0 0 auto;
  padding: 0 0 16px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.swipe-card.swiping {
  transition: box-shadow 0.1s ease, background-color 0.1s ease; /* Smooth transitions */
  box-shadow: 0 0 0 3px rgba(148,163,184,0.2); /* Default neutral glow */
}

/* Dynamic colored glow based on swipe direction */
.swipe-card.swipe-direction-yes {
  box-shadow: 0 0 0 6px var(--yes) !important; /* Green glow for YES */
  background-color: rgba(107, 144, 128, 0.3) !important; /* 30% green overlay */
}

.swipe-card.swipe-direction-maybe {
  box-shadow: 0 0 0 6px var(--maybe) !important; /* Amber glow for MAYBE */
  background-color: rgba(212, 165, 116, 0.3) !important; /* 30% amber overlay */
}

.swipe-card.swipe-direction-no {
  box-shadow: 0 0 0 6px var(--no) !important; /* Red glow for NO */
  background-color: rgba(184, 92, 92, 0.3) !important; /* 30% red overlay */
}

.swipe-card.swipe-right {
  transform: translateX(100vw) rotate(8deg) scale(0.95);
  opacity: 0.2;
  box-shadow: 0 0 0 8px var(--no); /* Right = No (red) */
}

.swipe-card.swipe-left {
  transform: translateX(-100vw) rotate(-8deg) scale(0.95);
  opacity: 0.2;
  box-shadow: 0 0 0 8px var(--yes); /* Left = Yes (green) */
}

.swipe-card.swipe-maybe {
  animation: swipeMaybeUp 0.4s cubic-bezier(.4,1.4,.6,1);
}

@keyframes swipeMaybeUp {
  0% { 
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 var(--maybe);
    opacity: 1;
  }
  50% { 
    transform: translateY(-150px) scale(0.95);
    box-shadow: 0 0 0 16px var(--maybe);
    opacity: 0.7;
  }
  100% { 
    transform: translateY(-300px) scale(0.9);
    box-shadow: 0 0 0 0 var(--maybe);
    opacity: 0;
  }
}

/* Handoff pulse animation */
@keyframes handoffPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
  }
}

/* Visual cue overlays - Positioned at top of question card */
.swipe-cue {
  position: absolute;
  top: 40px;
  z-index: 2;
  font-size: 4.5rem;
  font-weight: 900;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.05em;
}

.swipe-cue.no {
  color: var(--no);
  left: 40px;
  transform: scale(0.9);
}

.swipe-cue.maybe {
  color: var(--maybe);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
}

.swipe-cue.yes {
  color: var(--yes);
  right: 40px;
  transform: scale(0.9);
}

.swipe-card.swiping .swipe-cue.active {
  opacity: 0.95;
}

.swipe-card.swiping .swipe-cue.no.active {
  transform: scale(1.2);
}

.swipe-card.swiping .swipe-cue.maybe.active {
  transform: translateX(-50%) scale(1.2);
}

.swipe-card.swiping .swipe-cue.yes.active {
  transform: scale(1.2);
}

/* Swipe indicator glyphs - Show available gestures */
.swipe-indicators {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.swipe-card:hover .swipe-indicators {
  opacity: 0.6;
}

.swipe-card.swiping .swipe-indicators {
  opacity: 0;
}

.swipe-indicator {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.swipe-indicator.left {
  left: 20px;
  top: 40px;
  color: var(--no);
  animation: pulseIndicator 2s ease-in-out infinite;
}

.swipe-indicator.up {
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--maybe);
  animation: pulseIndicatorCentered 2s ease-in-out infinite;
}

.swipe-indicator.right {
  right: 20px;
  top: 40px;
  color: var(--yes);
  animation: pulseIndicator 2s ease-in-out infinite;
}

@keyframes pulseLeft {
  0%, 100% {
    opacity: 0.4;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-50%) scale(1.1);
  }
}

@keyframes pulseRight {
  0%, 100% {
    opacity: 0.4;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-50%) scale(1.1);
  }
}

@keyframes pulseUp {
  0%, 100% {
    opacity: 0.4;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1.1);
  }
}

/* Single synchronized pulse animation for all indicators */
@keyframes pulseIndicator {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Special handling for centered up indicator */
.swipe-indicator.up {
  animation-name: pulseIndicatorCentered;
}

@keyframes pulseIndicatorCentered {
  0%, 100% {
    opacity: 0.4;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1.1);
  }
}

/* Swipe indicators now visible on all devices */

.btn-arrow {
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.8;
  display: inline-block;
  transition: transform 0.2s ease;
}

button:hover .btn-arrow {
  transform: scale(1.15);
  opacity: 1;
}

@media (max-width: 600px) {
  .btn-arrow {
    display: none;
  }
}

/* Pack Overlay - Full screen menu */
.pack-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.97);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pack-overlay.active {
  display: flex;
  opacity: 1;
}

.pack-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.8);
}

.pack-overlay-header h2 {
  color: var(--yes);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

.pack-overlay-close {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--no);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex: 0 0 auto;
}

.pack-overlay-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

.pack-overlay-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.pack-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.pack-grid li {
  margin: 0;
}

.pack-grid button {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.pack-grid button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(245, 158, 11, 0.1));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pack-grid button:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.pack-grid button:hover::before {
  opacity: 1;
}

.pack-grid button:active {
  transform: translateY(0);
}

.pack-grid button.current-pack {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
  color: var(--yes);
}

.pack-grid button.current-pack::after {
  content: '?';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--yes);
}

@media (min-width: 601px) {
  .pack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.question-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.undo-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(107, 144, 128, 0.2);
  border: 1px solid rgba(107, 144, 128, 0.4);
  color: var(--yes);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  width: auto;
  min-width: 0;
}

.undo-btn:hover {
  background: rgba(107, 144, 128, 0.35);
  border-color: rgba(107, 144, 128, 0.6);
  transform: scale(1.05);
}

.undo-btn:active {
  transform: scale(0.95);
}

.undo-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.undo-text {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 600px) {
  .undo-btn {
    padding: 1px 6px;
    gap: 3px;
    font-size: 0.75rem;
  }
  .undo-icon {
    font-size: 1.1rem;
  }
}

.header-top-row .step-label {
  margin-bottom: 0;
}

.header-top-row .undo-btn {
  margin-top: 0;
}


