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

body {
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(180deg, #FFF9F5 0%, #FFE8DE 100%);
  min-height: 100vh;
  overflow: hidden;
  touch-action: none;
}

.app-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 20px;
  position: relative;
  min-height: 100px;
}

.feedback-message {
  font-size: 20px;
  font-weight: 700;
  color: #F72585;
  opacity: 0;
  transform: translateY(-20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: absolute;
  top: 5px;
  text-align: center;
}

.feedback-message.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
  0% { transform: translateY(-20px) scale(0.5); opacity: 0; }
  50% { transform: translateY(5px) scale(1.1); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.power-swiper-badge {
  position: absolute;
  top: 35px;
  font-size: 14px;
  font-weight: 700;
  color: #FF6B6B;
  background: linear-gradient(135deg, #FFF 0%, #FFE8DE 100%);
  padding: 6px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  animation: pulse 1s ease-in-out infinite;
}

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

.header-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 55px;
}

.vibe-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 8px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.2);
}

.heart-icon {
  font-size: 20px;
}

.counter-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.streak-indicator {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #FF6B6B;
  background: rgba(255, 107, 107, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.card-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 420px;
  perspective: 1000px;
  margin: 20px 0;
}

.card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 25px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.card.dragging {
  cursor: grabbing;
}

.current-card {
  z-index: 3;
  transition: box-shadow 0.2s;
}

.current-card:not(.dragging) {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}

.stacked-card {
  pointer-events: none;
}

.stacked-card.second {
  z-index: 2;
  transition: transform 0.3s ease-out;
}

.stacked-card.third {
  z-index: 1;
  opacity: 0.7;
}

.card-heart {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 28px;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s;
}

.card-heart.pulsing {
  animation: heartPulse 0.3s ease-in-out infinite;
  color: #FF6B6B;
  text-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
}

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

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 24px;
  text-align: center;
}

.card-emoji {
  font-size: 80px;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

.card-title {
  font-size: 26px;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
  line-height: 1.2;
}

.card-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 280px;
}

.keyword {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.progress-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s;
}

.dot.active {
  background: white;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.dot.completed {
  background: rgba(255, 255, 255, 0.8);
}

.swipe-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) rotate(-15deg);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 10px;
  border: 4px solid;
  animation: indicatorPop 0.2s ease-out;
}

@keyframes indicatorPop {
  from { transform: translateY(-50%) rotate(-15deg) scale(0.5); opacity: 0; }
  to { transform: translateY(-50%) rotate(-15deg) scale(1); opacity: 1; }
}

.swipe-indicator.like {
  right: 20px;
  color: #4ECB71;
  border-color: #4ECB71;
  background: rgba(78, 203, 113, 0.25);
}

.swipe-indicator.nope {
  left: 20px;
  color: #FF6B6B;
  border-color: #FF6B6B;
  background: rgba(255, 107, 107, 0.25);
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-bottom: 20px;
}

.action-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  font-size: 26px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

.nope-btn {
  background: white;
  color: #FF6B6B;
}

.like-btn {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
  color: white;
}

.reveal-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #F72585 0%, #FF6B6B 100%);
  border: none;
  padding: 16px 28px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(247, 37, 133, 0.4);
  transition: all 0.3s;
}

.reveal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(247, 37, 133, 0.5);
}

.reveal-btn:active {
  transform: translateY(0);
}

.footer {
  padding: 16px;
  text-align: center;
}

.footer a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: #F72585;
}

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

.confetti-particle {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

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

/* Collection View */
.collection-view {
  min-height: 100vh;
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.collection-modal {
  background: white;
  border-radius: 30px;
  padding: 30px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex: 1;
}

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

.modal-header {
  text-align: center;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #F72585 0%, #FF6B6B 50%, #FFB685 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}

.match-percent {
  font-size: 16px;
  font-weight: 600;
  opacity: 0.9;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.collection-card {
  aspect-ratio: 1;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s;
  animation: cardPop 0.3s ease-out backwards;
}

.collection-card:nth-child(1) { animation-delay: 0.05s; }
.collection-card:nth-child(2) { animation-delay: 0.1s; }
.collection-card:nth-child(3) { animation-delay: 0.15s; }
.collection-card:nth-child(4) { animation-delay: 0.2s; }
.collection-card:nth-child(5) { animation-delay: 0.25s; }
.collection-card:nth-child(6) { animation-delay: 0.3s; }
.collection-card:nth-child(7) { animation-delay: 0.35s; }
.collection-card:nth-child(8) { animation-delay: 0.4s; }
.collection-card:nth-child(9) { animation-delay: 0.45s; }
.collection-card:nth-child(10) { animation-delay: 0.5s; }

@keyframes cardPop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.collection-card:hover {
  transform: scale(1.05);
}

.collection-emoji {
  font-size: 36px;
}

.collection-name {
  font-size: 12px;
  font-weight: 700;
  color: white;
  text-align: center;
  padding: 0 8px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.empty-state {
  grid-column: span 2;
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
  line-height: 1.6;
}

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

.share-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #F72585 0%, #7209B7 100%);
  border: none;
  padding: 16px 28px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(114, 9, 183, 0.3);
  transition: all 0.3s;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(114, 9, 183, 0.4);
}

.reset-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #666;
  background: #f5f5f5;
  border: none;
  padding: 14px 24px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}

.reset-btn:hover {
  background: #eee;
}

.back-btn-modal {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #F72585;
  background: transparent;
  border: 2px solid #F72585;
  padding: 12px 24px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}

.back-btn-modal:hover {
  background: rgba(247, 37, 133, 0.1);
}

@media (max-width: 360px) {
  .card-container {
    height: 380px;
    max-width: 280px;
  }
  
  .card-emoji {
    font-size: 60px;
  }
  
  .card-title {
    font-size: 22px;
  }
  
  .keyword {
    font-size: 11px;
    padding: 5px 10px;
  }
  
  .collection-grid {
    gap: 10px;
  }
  
  .collection-emoji {
    font-size: 28px;
  }
  
  .collection-name {
    font-size: 10px;
  }
}