/* Universal Button Styles */
.explore-btn {
  transition: all 0.3s ease;
  border-width: 2px;
}

.explore-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.25);
  border-color: #0d6efd;
  background-color: #0d6efd;
  color: white;
}

.add-definition-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.add-definition-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.add-definition-btn:hover::before {
  left: 100%;
}

.add-definition-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
  background-color: #0f5132;
  border-color: #0f5132;
}

/* Enhanced Alert Styles */
.alert.alert-info {
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
  border-left: 4px solid #2196f3;
}

/* General Enhanced Button Styles */
.btn-enhanced {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-enhanced:hover {
  transform: translateY(-2px);
}

.btn-enhanced.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-enhanced.btn-success:hover {
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.btn-enhanced.btn-warning:hover {
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-enhanced.btn-danger:hover {
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-enhanced.btn-info:hover {
  box-shadow: 0 4px 12px rgba(13, 202, 240, 0.3);
}

.btn-enhanced.btn-secondary:hover {
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Shimmer effect for special buttons */
.btn-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.btn-shimmer:hover::before {
  left: 100%;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .d-flex.gap-2 {
    flex-direction: column;
  }
  
  .btn-sm {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
  
  .btn-enhanced:hover {
    transform: none; /* Disable lift effect on mobile */
  }
}

/* Card hover effects */
.card-enhanced {
  transition: all 0.3s ease;
  min-height: 280px; /* Ensures consistent card height */
}

.card-enhanced:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-enhanced .card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-enhanced .card-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-enhanced .card-text {
  font-size: 0.9rem;
  line-height: 1.4;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* Limits to 4 lines */
  line-clamp: 4; /* Standard property for compatibility */
  -webkit-box-orient: vertical;
  margin-bottom: 1rem;
}

.card-enhanced .btn {
  margin-top: auto; /* Pushes button to bottom */
}

/* Link animations */
.link-animated {
  position: relative;
  text-decoration: none;
  transition: color 0.3s ease;
}

.link-animated::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.link-animated:hover::after {
  width: 100%;
}

.link-animated:hover {
  text-decoration: none;
}

/* HTMX Loading and Pagination Styles */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-request.htmx-indicator {
  opacity: 1;
}

.pagination .page-link {
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#definitions-container {
  transition: opacity 0.2s ease;
}

.htmx-request #definitions-container {
  opacity: 0.7;
}
