/* Modern gradient background */
body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Enhanced container styling */
.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Beautiful title with animation */
h1 {
  font-weight: bold;
  background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease-in-out infinite;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

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

/* Enhanced card styling */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.card-body {
  padding: 20px;
}

.card-title {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 15px;
}

/* Enhanced form controls */
.form-control, .form-select {
  border-radius: 10px;
  border: 2px solid #e1e8ed;
  transition: all 0.3s ease;
  padding: 12px 16px;
}

.form-control:focus, .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  transform: translateY(-2px);
}

/* Beautiful button styling */
.btn {
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::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;
}

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

.btn-success {
  background: linear-gradient(45deg, #56ab2f, #a8e6cf);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(45deg, #4a9c2a, #93d9b8);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
}

.btn-danger {
  background: linear-gradient(45deg, #ff6b6b, #ffa8a8);
  color: white;
}

.btn-danger:hover {
  background: linear-gradient(45deg, #ff5252, #ff8a80);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(45deg, #5a67d8, #6b46c1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Enhanced sidebar styling */
#recentSearches {
  max-height: 400px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  padding: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

#recentSearches .list-group-item {
  border: none;
  border-radius: 8px;
  margin-bottom: 5px;
  transition: all 0.3s ease;
  background: transparent;
}

#recentSearches .list-group-item:hover {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  transform: translateX(5px);
}

#recentSearches .list-group-item.active {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
}

/* Loading animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Results grid spacing */
#results {
  margin-top: 20px;
}

/* Responsive design improvements */
@media (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 10px;
  }
  
  h1 {
    font-size: 2rem;
  }
}

/* Clear history button styling */
#clearHistoryBtn {
  min-width: 160px;
  background: linear-gradient(45deg, #ff6b6b, #ffa8a8);
  color: white;
  border: none;
  transition: all 0.3s ease;
}

#clearHistoryBtn:hover {
  background: linear-gradient(45deg, #ff5252, #ff8a80);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Enhanced text styling */
.card-text {
  color: #666;
  line-height: 1.6;
}

.text-muted {
  color: #888 !important;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Hero Section Styling */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.08)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.06)"/><circle cx="90" cy="30" r="0.5" fill="rgba(255,255,255,0.07)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-image {
  animation: float 6s ease-in-out infinite;
}

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

.feature-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.25);
}

.feature-icon {
  font-size: 2rem;
}

/* Stats Section */
.stats-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-section h2 {
  font-weight: 700;
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced container spacing */
.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Responsive improvements for hero section */
@media (max-width: 768px) {
  .hero-section {
    min-height: 50vh;
    text-align: center;
  }
  
  .hero-section .display-3 {
    font-size: 2.5rem;
  }
  
  .stats-section {
    padding: 20px 0;
  }
}
