@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
  .btn-primary {
    display: inline-block;
    background: linear-gradient(to right, rgb(236, 72, 153), rgb(168, 85, 247), rgb(147, 51, 234));
    color: white;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: all 0.3s cubic-bezier(0, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
  }
  
  .btn-primary:hover {
    background: linear-gradient(to right, rgb(219, 39, 119), rgb(147, 51, 234), rgb(126, 34, 206));
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    transform: translateY(-2px);
  }
  
  .btn-primary:active {
    transform: translateY(0);
  }
  
  .btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgb(216 180 254 / 0.5);
  }
  
  .btn-secondary {
    display: inline-block;
    background: white;
    border: 2px solid rgb(168, 85, 247);
    color: rgb(147, 51, 234);
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: all 0.3s cubic-bezier(0, 0, 0.2, 1);
    text-decoration: none;
  }
  
  .btn-secondary:hover {
    background: linear-gradient(to right, rgb(236, 72, 153), rgb(168, 85, 247), rgb(147, 51, 234));
    color: white;
    border-color: transparent;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    transform: translateY(-2px);
  }
  
  .btn-secondary:active {
    transform: translateY(0);
  }
  
  .btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgb(216 180 254 / 0.5);
  }
  
  .btn-outline {
    border: 2px solid #FF6B6B;
    color: #FF6B6B;
    font-weight: bold;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    transition: all 0.3s;
    background: transparent;
  }
  
  .btn-outline:hover {
    background: #FF6B6B;
    color: white;
  }
  
  .card {
    @apply bg-white rounded-2xl shadow-xl overflow-hidden;
  }
  
  .input-field {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent;
  }
}

body {
  @apply bg-gradient-to-br from-pink-50 to-purple-50 min-h-screen;
}

.profile-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 600px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  cursor: grab;
  transition: transform 0.3s ease;
}

.profile-card:active {
  cursor: grabbing;
}

.profile-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 2rem;
}

.swipe-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.swipe-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.swipe-btn:hover {
  transform: scale(1.1);
}

.swipe-btn.not {
  background: #FF6B6B;
  color: white;
}

.swipe-btn.hot {
  background: #4ECDC4;
  color: white;
}

.match-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.message {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  word-wrap: break-word;
}

.message.sent {
  align-self: flex-end;
  background: #4ECDC4;
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.message.received {
  align-self: flex-start;
  background: #f3f4f6;
  color: #1f2937;
  border-bottom-left-radius: 0.25rem;
}

.message-input-container {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  background: white;
}

/* Notification Toast */
.notification-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  max-width: 400px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  padding: 1rem;
  z-index: 9999;
  animation: slideInRight 0.3s ease-out;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.notification-toast:hover {
  transform: translateX(-5px);
}

.notification-toast.slide-out {
  animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #FF6B6B;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}
