/* ========================================
   🎬 INTERACTIVE COMPONENTS
   Animations, Transitions & Effects
   ======================================== */

/* ========================================
   🎪 HERO SECTION
   ======================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="mesh" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="rgba(255,255,255,0.1)"/><path d="M0 25 Q12.5 12.5 25 25 T50 25" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23mesh)"/></svg>');
  opacity: 0.4;
  animation: drift 20s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  animation: slideUp 0.8s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideUp 0.8s ease-out 0.1s both;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  animation: slideUp 0.8s ease-out 0.2s both;
  font-weight: 500;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: slideUp 0.8s ease-out 0.3s both;
}

/* ========================================
   🎴 ANIMATED CARDS
   ======================================== */

.card-animated {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-animated::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.card-animated:hover::before {
  left: 100%;
}

.card-animated:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.card-image-container {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.card-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-animated:hover .card-image-container img {
  transform: scale(1.1);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-animated:hover .card-overlay {
  opacity: 1;
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  animation: slideRight 0.6s ease-out;
}

/* ========================================
   🔌 SEARCH BAR ENHANCED
   ======================================== */

.search-hero {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  animation: slideUp 0.8s ease-out 0.4s both;
}

.search-bar {
  display: flex;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 50px;
  padding: 0.5rem 0.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  gap: 0.5rem;
  align-items: center;
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.search-bar:hover,
.search-bar:focus-within {
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 0 25px 60px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
}

.search-input-field {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  padding: 0 1rem;
  color: #333;
  font-weight: 500;
}

.search-input-field::placeholder {
  color: #999;
  font-weight: 400;
}

.search-select-field {
  border: none;
  outline: none;
  background: transparent;
  color: #333;
  font-weight: 500;
  padding: 0 1rem;
  border-left: 2px solid #eee;
  cursor: pointer;
  min-width: 120px;
}

.search-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.search-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* ========================================
   📊 BUSINESS GRID
   ======================================== */

.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  animation: fadeIn 0.6s ease-out;
}

.business-card {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.business-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.business-card-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.business-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.business-card:hover .business-card-image img {
  transform: scale(1.1) rotate(2deg);
}

.business-card-status {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--success);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: slideRight 0.6s ease-out;
}

.business-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.business-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.business-card-category {
  display: inline-block;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.business-card-description {
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.business-card-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--lighter-gray);
  margin-bottom: 1rem;
}

.business-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.business-stat-value {
  font-weight: 700;
  color: var(--dark);
}

.star-rating {
  color: var(--warning);
  font-size: 0.9rem;
}

.business-card-actions {
  display: flex;
  gap: 0.5rem;
}

.business-card-actions .btn {
  flex: 1;
  padding: 0.6rem 0.5rem;
  font-size: 0.85rem;
}

/* ========================================
   💬 MESSAGING INTERFACE
   ======================================== */

.message-bubble {
  padding: 1rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  max-width: 80%;
  animation: slideUp 0.3s ease-out;
  word-wrap: break-word;
  position: relative;
}

.message-bubble.sent {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.message-bubble.received {
  background: var(--lighter-gray);
  color: var(--dark);
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

.message-input-container {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 12px;
  margin-top: 1rem;
}

.message-input {
  flex: 1;
  border: 2px solid var(--lighter-gray);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.message-input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ========================================
   ⭐ REVIEWS & RATINGS
   ======================================== */

.review-item {
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--bg-light);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  animation: slideUp 0.4s ease-out;
}

.review-item:hover {
  background: var(--lighter-gray);
  transform: translateX(4px);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.review-author {
  font-weight: 700;
  color: var(--dark);
}

.review-date {
  font-size: 0.85rem;
  color: var(--gray);
}

.review-rating {
  display: flex;
  gap: 0.25rem;
  color: var(--warning);
  font-size: 1rem;
}

.review-text {
  color: var(--dark);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.review-actions {
  display: flex;
  gap: 1rem;
}

.review-action-btn {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
}

.review-action-btn:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* ========================================
   🎛️ RATING INPUT
   ======================================== */

.rating-selector {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.rating-star-input {
  font-size: 2.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.4;
}

.rating-star-input:hover,
.rating-star-input.selected {
  opacity: 1;
  transform: scale(1.2);
}

/* ========================================
   📍 LOCATION & MAP
   ======================================== */

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
}

.map-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 1.5rem 0;
  height: 400px;
}

/* ========================================
   📱 MOBILE NAVIGATION
   ======================================== */

.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--lighter-gray);
  display: none;
  z-index: 999;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-nav-items {
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--gray);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.5rem;
}

.mobile-nav-item.active {
  color: var(--primary);
}

.mobile-nav-item:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
  }

  body {
    padding-bottom: 70px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .business-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }

  .message-bubble {
    max-width: 90%;
  }
}

/* ========================================
   🎨 FILTERS & SIDEBAR
   ======================================== */

.filter-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.filter-title {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-item:hover {
  background: var(--bg-light);
}

.filter-item input {
  cursor: pointer;
  accent-color: var(--primary);
}

.filter-item label {
  cursor: pointer;
  flex: 1;
  margin: 0;
  font-weight: 500;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.25rem;
}

.filter-tag-close {
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.filter-tag-close:hover {
  transform: scale(1.2);
}

/* ========================================
   🏆 LEADERBOARD & STATS
   ======================================== */

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--gray);
  font-weight: 600;
  font-size: 0.9rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  background: var(--bg-light);
  transition: all 0.3s ease;
}

.leaderboard-item:hover {
  background: var(--lighter-gray);
  transform: translateX(4px);
}

.leaderboard-rank {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-right: 1rem;
  flex-shrink: 0;
}

.leaderboard-info {
  flex: 1;
}

.leaderboard-name {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.leaderboard-subtitle {
  font-size: 0.85rem;
  color: var(--gray);
}

.leaderboard-score {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

/* ========================================
   🎁 PREMIUM FEATURES
   ======================================== */

.premium-banner {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
  animation: slideUp 0.6s ease-out;
}

.premium-banner-title {
  color: #333;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.premium-banner-text {
  color: #555;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.premium-features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.premium-feature {
  background: rgba(255, 255, 255, 0.7);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: #333;
}

/* ========================================
   ⏱️ LOADING ANIMATIONS
   ======================================== */

.loading-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.loading-skeleton {
  background: linear-gradient(
    90deg,
    var(--lighter-gray) 0%,
    var(--white) 50%,
    var(--lighter-gray) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-image {
  width: 100%;
  height: 200px;
  margin-bottom: 1rem;
}

/* ========================================
   ✨ SPARKLE & MAGIC EFFECTS
   ======================================== */

.sparkle {
  position: relative;
  display: inline-block;
}

.sparkle::after {
  content: '✨';
  position: absolute;
  right: -1.5rem;
  animation: bounce 2s ease-in-out infinite;
}

.magic-text {
  background: linear-gradient(45deg, var(--primary), var(--secondary), var(--primary));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  font-weight: 700;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
