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

:root {
  --primary: #ff6b9d;
  --primary-dark: #e55a8a;
  --secondary: #6c5ce7;
  --success: #00b894;
  --danger: #ff7675;
  --bg: #fef9f9;
  --card-bg: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #ffeef8 0%, #fff5e6 100%);
  min-height: 100vh;
  color: var(--text);
  overflow-x: hidden;
}

.app {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 20px;
  background: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 40px;
}

/* Profile button & menu */
.profile-btn {
  position: relative;
  font-size: 1.2rem;
}

.profile-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  overflow: hidden;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  min-width: 200px;
  z-index: 1000;
}

.profile-email {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #666;
  border-bottom: 1px solid #f0f0f0;
  word-break: break-all;
}

.profile-menu-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}

.profile-menu-item:hover {
  background: #f8f0ff;
}

.profile-menu-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light, #888);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.btn-icon:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Custom CSS tooltips (replaces native title) */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease 0.4s;
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* Bottom control tooltips show above */
.controls [data-tooltip]::after {
  top: auto;
  bottom: calc(100% + 6px);
}

/* Exploration bar tooltip (wider, below) */
.exploration-bar[data-tooltip]::after {
  bottom: auto;
  top: calc(100% + 4px);
  max-width: 250px;
  white-space: normal;
  text-align: center;
}

/* Option 5: Slide-out preview */
.favorites-preview {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 12px 16px;
  min-width: 200px;
  max-width: 280px;
  z-index: 200;
  animation: slide-down 0.3s ease-out;
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.favorites-preview h4 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  color: var(--primary);
}

.favorites-preview ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.favorites-preview li {
  padding: 4px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid #eee;
}

.favorites-preview li:last-child {
  border-bottom: none;
}

.favorites-preview-fade {
  animation: fade-out 0.3s ease-in forwards;
}

@keyframes fade-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

#favorites-count, #rejects-count, #insights-count, #matches-count, #couples-count, #cultures-count {
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
  transition: transform 0.3s ease, background 0.3s ease;
}

#rejects-count {
  background: var(--danger);
}

#insights-count {
  background: var(--secondary);
}

#matches-count {
  background: #667eea;
}

#couples-count {
  background: #e91e8a;
}

#cultures-count {
  background: #43a047;
}

/* Glow pulse animation for emoji buttons */
@keyframes emojiGlowPulse {
  0% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
  25% {
    filter: brightness(1.3) drop-shadow(0 0 12px currentColor);
    transform: scale(1.15);
  }
  50% {
    filter: brightness(1.5) drop-shadow(0 0 20px currentColor);
    transform: scale(1.25);
  }
  75% {
    filter: brightness(1.3) drop-shadow(0 0 12px currentColor);
    transform: scale(1.15);
  }
  100% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
}

.btn-icon.glow-pulse {
  animation: emojiGlowPulse 0.6s ease-out;
  color: inherit;
}

/* Specific glow colors for each button */
#favorites-btn.glow-pulse {
  color: #ff6b9d;
  filter: drop-shadow(0 0 15px #ff6b9d);
}

#rejects-btn.glow-pulse {
  color: #ff7675;
  filter: drop-shadow(0 0 15px #ff7675);
}

#insights-btn.glow-pulse {
  color: #6c5ce7;
  filter: drop-shadow(0 0 15px #6c5ce7);
}

#matches-btn.glow-pulse {
  color: #667eea;
  filter: drop-shadow(0 0 15px #667eea);
}

/* Badge pop animation */
@keyframes badgePop {
  0% {
    transform: scale(1);
    background: inherit;
  }
  30% {
    transform: scale(1.5);
    background: #ff4444;
  }
  60% {
    transform: scale(1.3);
    background: #ff4444;
  }
  100% {
    transform: scale(1);
    background: inherit;
  }
}

.badge-pop {
  animation: badgePop 0.5s ease-out;
}

/* gender-select removed — gender chosen during onboarding */

/* Stats bar */
.stats-bar {
  text-align: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
}

.swipe-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fff0f5 0%, #f8f0ff 100%);
  border: 1.5px solid rgba(255, 107, 157, 0.25);
  border-radius: 20px;
  padding: 6px 16px 6px 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.12);
}

.swipe-counter:hover {
  transform: scale(1.03);
  box-shadow: 0 3px 12px rgba(255, 107, 157, 0.2);
}

.swipe-counter-icon {
  font-size: 1rem;
  line-height: 1;
  animation: counterPulse 3s ease-in-out infinite;
}

@keyframes counterPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.swipe-counter-num {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 1.4em;
  text-align: center;
}

.swipe-counter-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Pop animation on swipe count change */
.swipe-counter.pop {
  animation: counterPop 0.35s ease-out;
}

@keyframes counterPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  70% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* Sparkle burst on milestone swipes */
.swipe-counter-sparkle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sparkle-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  animation: sparkleBurst 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes sparkleBurst {
  0% { transform: translate(0, 0) scale(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; }
}

.top-prediction-stat {
  color: var(--secondary);
}

.top-prediction-stat strong {
  color: var(--primary);
}

.top-prediction-locked {
  color: var(--text-light);
  font-style: italic;
}

.top-prediction-locked strong {
  color: var(--secondary);
}

/* Reveal animation */
.top-prediction-stat.just-revealed {
  animation: revealPop 0.8s ease-out;
}

@keyframes revealPop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.reveal-celebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 32px 48px;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
  z-index: 2000;
  animation: celebrationIn 0.5s ease-out;
}

@keyframes celebrationIn {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.reveal-celebration h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--primary);
}

.reveal-celebration .revealed-name {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.reveal-celebration .revealed-percent {
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 20px;
}

.reveal-celebration .btn {
  margin-top: 12px;
}

.reveal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
}

/* Baby growth progress bar */
.baby-growth-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 20px 12px;
  background: linear-gradient(135deg, #fff5f8 0%, #fff9e6 100%);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.growth-container {
  position: relative;
  flex: 1;
  max-width: 220px;
}

.baby-stage {
  position: absolute;
  font-size: 1.8rem;
  transition: left 0.5s ease-out, transform 0.5s ease, filter 0.3s;
  animation: pulse 2s ease-in-out infinite;
  top: -28px;
  transform: translateX(-50%);
  left: 0%;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

@keyframes pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.1); }
}

.baby-stage.evolved {
  animation: evolve 0.6s ease-out;
}

@keyframes evolve {
  0% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.5); filter: brightness(1.3) drop-shadow(0 4px 8px rgba(255,105,180,0.5)); }
  100% { transform: translateX(-50%) scale(1); }
}

.growth-track {
  width: 100%;
  height: 14px;
  background: #eee;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  margin-top: 8px;
}

.growth-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffb6c1 0%, #ff69b4 50%, #ff1493 100%);
  border-radius: 7px;
  transition: width 0.5s ease-out;
  position: relative;
  min-width: 14px;
}

.growth-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.growth-label {
  font-size: 0.85rem;
  color: var(--text-light);
  min-width: 130px;
  text-align: left;
  font-weight: 500;
}

/* Exploration slider */
.exploration-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  color: var(--text-light);
}

.exploration-bar label {
  font-weight: 500;
}

.exploration-bar input[type="range"] {
  width: 120px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #ddd;
  border-radius: 3px;
  outline: none;
}

.exploration-bar input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--secondary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.exploration-bar input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--secondary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#exploration-value {
  min-width: 36px;
  font-weight: 600;
  color: var(--secondary);
}

/* Main */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 20px 20px;
  gap: 12px;
}

/* Main Logo */
.main-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-logo .logo-img {
  height: 5.5rem;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(255, 107, 157, 0.3));
}

/* Onboarding */
/* Conversational onboarding */
.onboarding {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  max-height: 60vh;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 85%;
  font-size: 0.95rem;
  line-height: 1.4;
  animation: bubbleIn 0.3s ease-out;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble.bot {
  background: var(--card-bg);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.chat-bubble.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 14px 20px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--text-light);
  border-radius: 50%;
  animation: typingDot 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chat-input-area {
  padding: 8px;
}

.chat-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-option-btn {
  padding: 12px 20px;
  border: 2px solid var(--primary);
  border-radius: 20px;
  background: white;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-option-btn:hover {
  background: var(--primary);
  color: white;
}

.chat-option-btn:active {
  transform: scale(0.97);
}

.chat-text-input-row {
  display: flex;
  gap: 8px;
}

.chat-text-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #eee;
  border-radius: 20px;
  font-size: 0.95rem;
  outline: none;
}

.chat-text-input:focus {
  border-color: var(--primary);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-send-btn:hover {
  background: var(--primary-dark);
}

.chat-name-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  min-height: 0;
}

.name-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #f0e6f6;
  color: var(--secondary);
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

.name-tag-x {
  cursor: pointer;
  font-weight: bold;
  opacity: 0.6;
}

.name-tag-x:hover {
  opacity: 1;
}

.chat-autocomplete {
  background: white;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 180px;
  overflow-y: auto;
  margin-top: 4px;
}

.autocomplete-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.autocomplete-item:hover {
  background: #fef0f5;
}

.autocomplete-origin {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Card container */
.card-container {
  width: 100%;
  max-width: 340px;
  height: 420px;
  position: relative;
  perspective: 1000px;
}

/* Name card */
.name-card {
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: absolute;
  touch-action: pan-y;
}

.name-card:active {
  cursor: grabbing;
}

.name-card.swiping {
  transition: none;
}

.name-card.swipe-left {
  animation: swipeLeft 0.4s ease-out forwards;
}

.name-card.swipe-right {
  animation: swipeRight 0.4s ease-out forwards;
}

.name-card.swipe-up {
  animation: swipeUp 0.4s ease-out forwards;
}

@keyframes swipeLeft {
  to {
    transform: translateX(-150%) rotate(-20deg);
    opacity: 0;
  }
}

@keyframes swipeRight {
  to {
    transform: translateX(150%) rotate(20deg);
    opacity: 0;
  }
}

@keyframes swipeUp {
  to {
    transform: translateY(-150%) scale(1.1);
    opacity: 0;
  }
}

/* Match badge */
.match-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transition: transform 0.3s, background 0.3s;
}

.match-badge.high {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.4);
}

.match-badge.medium {
  background: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%);
  box-shadow: 0 4px 12px rgba(253, 203, 110, 0.4);
}

.match-badge.low {
  background: linear-gradient(135deg, #b2bec3 0%, #636e72 100%);
  box-shadow: 0 4px 12px rgba(99, 110, 114, 0.3);
}

.match-percent {
  font-size: 1.1rem;
}

.match-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.card-content {
  text-align: center;
  padding: 32px;
}

.gender-icon {
  width: 7.5rem;
  height: 7.5rem;
  margin-bottom: 16px;
  display: block;
  object-fit: contain;
}

/* Mascot icons in lists/modals (inline with text) */
.mascot-icon {
  width: 3.5em;
  height: 3.5em;
  vertical-align: middle;
  object-fit: contain;
  display: inline-block;
}

.card-name {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.card-origin {
  font-size: 1rem;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Speech bubble row: emoji + bubble side by side */
.speech-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 8px;
  justify-content: center;
}

.speech-bubble-row .gender-icon {
  width: 6rem;
  height: 6rem;
  margin-bottom: 0;
  flex-shrink: 0;
  display: inline-block;
  object-fit: contain;
}

.speech-bubble {
  position: relative;
  background: #f3eef8;
  border-radius: 16px 16px 16px 4px;
  padding: 8px 14px;
  min-width: 120px;
  max-width: 200px;
  min-height: 1.4em;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.1);
}

/* Speech bubble tail pointing left toward the emoji */
.speech-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  bottom: 8px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 10px solid #f3eef8;
}

.mellamo-phrase {
  font-size: 0.85rem;
  color: var(--secondary);
  font-style: italic;
  white-space: nowrap;
  display: inline;
}

/* Blinking cursor for typewriter */
.mellamo-phrase.typing::after {
  content: '|';
  animation: blink-cursor 0.6s step-end infinite;
  color: var(--secondary);
  margin-left: 1px;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Fade-morph transition to "Me llamo..." */
.mellamo-phrase.morphing {
  animation: morphFade 0.5s ease-in-out;
}

@keyframes morphFade {
  0% { opacity: 0.85; }
  40% { opacity: 0; }
  60% { opacity: 0; }
  100% { opacity: 0.85; }
}

.card-meaning {
  font-size: 1rem;
  color: var(--text-light);
  font-style: italic;
  line-height: 1.5;
  padding: 0 16px;
}

/* Narration toast */
.narration-toast {
  background: rgba(45, 52, 54, 0.95);
  color: white;
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  animation: toastIn 0.4s ease-out;
  line-height: 1.4;
  margin-bottom: 16px;
}

.narration-toast.hidden {
  display: none;
}

.narration-toast.fade-out {
  animation: toastOut 0.4s ease-in forwards;
}

@keyframes toastIn {
  0% { 
    opacity: 0; 
    transform: translateY(10px) scale(0.9);
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  0% { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
  100% { 
    opacity: 0; 
    transform: translateY(-10px) scale(0.95);
  }
}

/* Controls */
.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 20px;
}

.controls-buttons {
  display: flex;
  gap: 20px;
  align-items: center;
}

.btn {
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: scale(1.05);
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 14px 32px;
}

.btn-secondary {
  background: #eee;
  color: var(--text);
  padding: 14px 32px;
}

.btn-nope, .btn-like, .btn-fav {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-nope {
  background: white;
  box-shadow: 0 4px 15px rgba(255, 118, 117, 0.3);
  border: 3px solid var(--danger);
}

.btn-like {
  background: white;
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
  border: 3px solid var(--success);
}

.btn-fav {
  background: white;
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
  border: 3px solid #ff69b4;
}

.btn-undo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 2px solid #ddd;
}

.btn-undo:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 20px;
  max-width: 500px;
  width: 100%;
}

.empty-state h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.empty-state p {
  color: var(--text-light);
  margin-bottom: 12px;
}

.empty-state .btn {
  margin-top: 24px;
}

/* Predictions section */
.predictions-section {
  margin-top: 24px;
  text-align: left;
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.predictions-section h3 {
  text-align: center;
  margin-bottom: 8px;
  color: var(--primary);
}

.predictions-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.predictions-list {
  max-height: 400px;
  overflow-y: auto;
}

.loading-predictions {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
}

.prediction-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  gap: 12px;
}

.prediction-item:last-child {
  border-bottom: none;
}

.prediction-rank {
  font-weight: 700;
  color: var(--text-light);
  font-size: 0.9rem;
  min-width: 28px;
}

.prediction-rank.top-3 {
  color: var(--primary);
}

.prediction-info {
  flex: 1;
}

.prediction-name {
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prediction-name .favorited {
  color: var(--danger);
  font-size: 0.9rem;
}

.prediction-meta {
  font-size: 0.85rem;
  color: var(--text-light);
}

.prediction-score {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 4px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.prediction-score.high {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-content.modal-tall {
  max-height: 90vh;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.modal-header h2 {
  font-size: 1.25rem;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

.add-favorite-form {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.add-favorite-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.add-favorite-input:focus {
  border-color: var(--primary);
}

.add-favorite-input::placeholder {
  color: var(--text-light);
}

.add-favorite-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, opacity 0.15s;
  flex-shrink: 0;
}

.add-favorite-btn:hover {
  transform: scale(1.1);
}

.add-favorite-btn:active {
  transform: scale(0.95);
}

.add-favorite-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.favorites-list {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.empty-favorites,
.loading-insights {
  text-align: center;
  color: var(--text-light);
  padding: 40px;
}

/* Insights modal */
.insights-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.insights-section {
  margin-bottom: 24px;
}

.insights-section h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.insights-section h3 .emoji {
  font-size: 1.2rem;
}

.insight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 8px;
}

.insight-bar {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.insight-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.insight-bar-fill.positive {
  background: linear-gradient(90deg, #00b894, #00cec9);
}

.insight-bar-fill.negative {
  background: linear-gradient(90deg, #ff7675, #d63031);
}

.insight-description {
  font-size: 0.9rem;
  color: var(--text);
  min-width: 200px;
}

.insights-not-ready {
  text-align: center;
  padding: 40px 20px;
}

.insights-not-ready .emoji {
  font-size: 3rem;
  margin-bottom: 16px;
}

.insights-not-ready p {
  color: var(--text-light);
  line-height: 1.6;
}

.model-stats {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.favorite-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f9f9f9;
  border-radius: 12px;
  margin-bottom: 12px;
}

.favorite-info h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.favorite-info p {
  font-size: 0.85rem;
  color: var(--text-light);
}

.btn-remove {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.btn-remove:hover {
  opacity: 1;
}

/* Multi-select tiles for cultural categories */
.chat-multi-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chat-multi-tile {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  position: relative;
  text-align: left;
  width: calc(50% - 4px);
  box-sizing: border-box;
}

.tile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tile-examples {
  font-size: 0.7rem;
  color: #999;
  font-style: italic;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-multi-tile:hover {
  border-color: var(--primary);
  background: #fef5f8;
}

.chat-multi-tile.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #ffeef5, #fff0f5);
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.2);
}

.chat-multi-tile.selected::after {
  content: '✓';
  position: absolute;
  top: -6px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.tile-emoji {
  font-size: 1.1rem;
}

.tile-label {
  font-weight: 500;
  color: var(--text);
}

.chat-done-btn {
  margin-top: 4px;
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
  font-weight: 600;
}

.chat-done-btn:hover {
  background: var(--primary-dark) !important;
  color: white !important;
}

/* Cultures modal */
.cultures-tiles-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 16px;
}

.cultures-modal-body {
  padding: 12px 0;
  overflow-y: auto;
  max-height: 70vh;
}

.culture-row {
  border-radius: 12px;
  overflow: hidden;
}

.culture-tile {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  position: relative;
}

.culture-tile:hover {
  border-color: var(--primary);
  background: #fef5f8;
}

.culture-tile.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #ffeef5, #fff0f5);
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.15);
}

.culture-tile .tile-chevron {
  margin-left: auto;
  font-size: 0.7rem;
  color: #999;
  padding: 4px;
  flex-shrink: 0;
  align-self: center;
}

/* Subcategory panel */
.sub-origins-panel {
  padding: 8px 12px 12px 36px;
  background: #f9f7fc;
  border-left: 2px solid #e0e0e0;
  border-right: 2px solid #e0e0e0;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 0 0 12px 12px;
  margin-top: -2px;
}

.origin-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.origin-chip {
  padding: 4px 10px;
  border: 1.5px solid #ddd;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-light);
  transition: all 0.15s;
}

.origin-chip:hover {
  border-color: var(--secondary);
}

.origin-chip.selected {
  border-color: var(--primary);
  background: #fff0f5;
  color: var(--text);
  font-weight: 500;
}

/* Swipe instruction overlay */
.swipe-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0 0 24px 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.swipe-overlay-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
}

.swipe-instruction {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.swipe-icon {
  font-size: 2.5em;
  line-height: 1;
}

.swipe-label {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
}

.swipe-direction {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 600;
  white-space: nowrap;
}

.swipe-divider {
  width: 0;
  align-self: stretch;
  border-left: 2px dotted #ddd;
  margin: 8px 0;
}

.swipe-overlay-dismiss {
  background: linear-gradient(135deg, var(--primary), #c44dff);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 48px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.swipe-overlay-dismiss:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
}

.swipe-overlay-dismiss:active {
  transform: scale(0.97);
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Swipe feedback overlay */
.swipe-feedback {
  position: absolute;
  top: 20px;
  font-size: 3rem;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.swipe-feedback.left {
  left: 20px;
  color: var(--danger);
}

.swipe-feedback.right {
  right: 20px;
  color: var(--success);
}

.swipe-feedback.visible {
  opacity: 1;
}

/* Auth modal */
.auth-modal-body {
  padding: 20px;
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.auth-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

.auth-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border: 2px solid #eee;
  border-radius: 14px;
  background: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.auth-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-btn:active {
  transform: scale(0.98);
}

.auth-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.auth-google {
  border-color: #4285f4;
  color: #4285f4;
}

.auth-google:hover {
  background: #4285f4;
  color: white;
}

/* Google's official rendered button wrapper */
.auth-google-official {
  width: 100%;
  height: 44px;
  overflow: hidden;
}
#auth-google-wrapper {
  width: 100%;
}

.auth-apple {
  border-color: #333;
  color: #333;
}

.auth-apple:hover {
  background: #333;
  color: white;
}

.auth-magic {
  border: 1px solid #dadce0;
  border-radius: 4px;
  color: #1f1f1f;
  background: white;
  font-size: 14px;
  font-weight: 500;
  padding: 0 12px;
  height: 40px;
  box-sizing: border-box;
}

.auth-magic:hover {
  background: #f6fafe;
  border-color: #d2e3fc;
  color: #1f1f1f;
}

.auth-email {
  border-color: var(--primary);
  color: var(--primary);
}

.auth-email:hover {
  background: var(--primary);
  color: white;
}

.auth-form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: authFormIn 0.3s ease-out;
}

@keyframes authFormIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-input {
  padding: 14px 16px;
  border: 2px solid #eee;
  border-radius: 14px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.auth-input:focus {
  border-color: var(--primary);
}

.auth-submit {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: white !important;
  border: none !important;
  font-weight: 700;
}

.auth-submit:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.auth-error {
  color: #d63031;
  font-size: 0.85rem;
  margin: 0;
}

.auth-success {
  color: var(--success);
  font-size: 0.85rem;
  margin: 0;
}

.auth-toggle {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

.auth-toggle a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 400px) {
  .header h1 {
    font-size: 1.25rem;
  }
  
  .main-logo .logo-img {
    height: 4rem;
  }
  
  .card-container {
    max-width: 300px;
    height: 380px;
  }
  
  .card-name {
    font-size: 2rem;
  }
  
  .btn-nope, .btn-like, .btn-fav {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

/* Confetti animation */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* Category suggestion chips */
.category-suggestions {
  margin-top: 24px;
  text-align: center;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 20px;
  border: 2px solid var(--primary, #e91e8a);
  background: white;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.suggestion-chip:hover {
  background: var(--primary, #e91e8a);
  color: white;
}

.suggestion-chip .chip-count {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* View matches CTA button */
.btn-matches-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin: 16px 0;
  transition: transform 0.2s;
}

.btn-matches-cta:hover {
  transform: scale(1.05);
}

.celebration-subtitle {
  color: var(--text-light, #666);
  font-size: 1rem;
  margin: 8px 0;
}

/* Couples matches section in matches modal */
.couples-matches-section {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff0f6 0%, #f8f0ff 100%);
  border: 1px solid #f0d0e8;
}

.couples-matches-section:empty {
  display: none;
}

.couples-matches-header {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text, #333);
}

.couples-teaser {
  text-align: center;
  padding: 20px;
  color: var(--text-light, #666);
}

.couples-teaser-btn {
  margin-top: 12px;
  padding: 10px 20px;
  border-radius: 20px;
  border: 2px solid var(--primary, #e91e8a);
  background: white;
  color: var(--primary, #e91e8a);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.couples-teaser-btn:hover {
  background: var(--primary, #e91e8a);
  color: white;
}

.couples-match-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0e0f0;
}

.couples-match-item:last-child {
  border-bottom: none;
}

.couples-match-item .mutual-badge {
  background: #e91e8a;
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

/* Mutual favorite heart animation overlay */
/* ============ COUPLES MATCH CELEBRATION ============ */

.couples-match-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;
  animation: couples-overlay-in 0.3s ease-out;
}

.couples-match-overlay.hidden {
  display: none;
}

.couples-match-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  opacity: 0;
  animation: confetti-fall 2.5s ease-in forwards;
  pointer-events: none;
}

.couples-match-content {
  text-align: center;
  z-index: 1;
  animation: couples-content-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.couples-match-emoji {
  font-size: 4rem;
  margin-bottom: 8px;
  animation: couples-emoji-bounce 0.6s ease-out 0.2s both;
}

.couples-match-title {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  margin-bottom: 8px;
  animation: couples-text-in 0.4s ease-out 0.3s both;
}

.couples-match-name {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ff6b9d, #f093fb, #667eea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  margin-bottom: 12px;
  animation: couples-name-in 0.5s ease-out 0.5s both;
}

.couples-match-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  animation: couples-text-in 0.4s ease-out 0.7s both;
}

@keyframes couples-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes couples-content-pop {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes couples-emoji-bounce {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes couples-text-in {
  0% { transform: translateY(15px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes couples-name-in {
  0% { transform: scale(0.5) translateY(10px); opacity: 0; }
  60% { transform: scale(1.1) translateY(-3px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(var(--drift)) rotate(var(--spin));
    opacity: 0;
  }
}

/* Couples header button */
#couples-header-btn {
  position: relative;
}

/* Removed: unpaired pulsing dot — looked like a bug rather than a feature */

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Favorites couples CTA */
.favorites-couples-cta {
  text-align: center;
  padding: 20px 16px;
  margin-top: 16px;
  border-top: 1px solid #eee;
  color: var(--text-light, #666);
}

/* Celebration couples CTA */
.celebration-couples-cta {
  margin-top: 24px;
  padding: 20px;
  text-align: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff0f6 0%, #f8f0ff 100%);
  border: 1px solid #f0d0e8;
}

.btn-couples-invite {
  margin-top: 12px;
  padding: 12px 24px;
  border-radius: 25px;
  border: none;
  background: linear-gradient(135deg, #e91e8a 0%, #c2185b 100%);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-couples-invite:hover {
  transform: scale(1.05);
}

/* Invite modal */
.invite-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 1rem;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.invite-input:focus {
  border-color: var(--primary, #e91e8a);
  outline: none;
}

.invite-form {
  margin-top: 16px;
}

.invite-status {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.invite-status.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.invite-status.error {
  background: #fce4ec;
  color: #c62828;
}

/* ====== Reset Confirmation Modal ====== */

.reset-modal-content {
  max-width: 340px;
  padding: 24px;
  text-align: center;
}

.reset-modal-message {
  margin: 12px 0 20px;
  font-size: 0.95rem;
  color: var(--text-light, #666);
  line-height: 1.4;
}

.reset-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reset-btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.reset-btn-keep {
  background: var(--primary, #e91e8a);
  color: white;
}

.reset-btn-keep:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.reset-btn-fresh {
  background: white;
  color: var(--text, #333);
  border: 2px solid #ddd;
}

.reset-btn-fresh:hover {
  border-color: var(--primary, #e91e8a);
  color: var(--primary, #e91e8a);
}

.reset-btn-cancel {
  background: none;
  color: var(--text-light, #999);
  font-weight: 400;
}

.reset-btn-cancel:hover {
  color: var(--text, #333);
}

/* ====== Predictions Overlay (first-time education) ====== */

.predictions-overlay {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  backdrop-filter: blur(4px);
  border-radius: 0 0 16px 16px;
  /* Constrain to modal-content, not viewport */
  max-width: 100%;
  box-sizing: border-box;
}

.predictions-overlay-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 16px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 16px;
}

.predictions-overlay-instruction {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.predictions-overlay-icon {
  font-size: 2.2em;
  line-height: 1;
}

.predictions-overlay-label {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.3;
}

.predictions-fav-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-left: auto;
  margin-right: 12px;
  white-space: nowrap;
}

/* ====== Predictions → Favorites (Heart Checkboxes) ====== */

.prediction-fav-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.prediction-fav-btn:hover {
  background: rgba(233, 30, 138, 0.1);
  transform: scale(1.15);
}

.prediction-fav-btn.is-favorited {
  animation: none;
}

.prediction-fav-btn.heart-pulse {
  animation: heartPulse 0.6s ease;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.4); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* NEW badge for predictions */
.new-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: newShimmer 2s ease-in-out infinite;
}

@keyframes newShimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.prediction-new {
  background: rgba(240, 147, 251, 0.05);
}

/* Predictions footer */
.predictions-footer {
  padding: 16px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  font-style: italic;
  border-top: 1px solid #f0f0f0;
}

/* ====== Sneak Peek Card ====== */

.sneak-peek-card {
  border: 2px solid transparent;
  background-image: linear-gradient(white, white), linear-gradient(135deg, #f5af19, #f12711, #f093fb, #667eea);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  position: relative;
}

.sneak-peek-card::before {
  content: '🔮 Sneak Peek';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 10px;
  z-index: 1;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
