* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

body { 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #ff4444 100%);
  min-height: 100vh; 
  color: white;
  line-height: 1.6;
}

.container { 
  max-width: 1000px; 
  margin: 0 auto; 
  padding: 20px; 
  text-align: center; 
}

.error-hero { 
  padding: 80px 20px 60px; 
}

.ball-404 { 
  font-size: clamp(8rem, 20vw, 18rem); 
  margin-bottom: 2rem; 
  display: inline-block;
}

.ball {
  display: inline-block; 
  background: linear-gradient(45deg, #ff4444, #ffd700, #ff4444);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite, bounce 2s infinite;
  border-radius: 50%; 
  padding: 30px 60px 20px; 
  box-shadow: 
    0 30px 60px rgba(0,0,0,0.4), 
    inset 0 15px 30px rgba(255,255,255,0.3),
    inset 0 -10px 20px rgba(0,0,0,0.2);
  text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
  position: relative;
  font-weight: 900;
  font-size: 0.4em;
}

.ball span { 
  font-size: 1.2em; 
  display: inline-block;
  animation: spin 2s linear infinite; 
}

h1 { 
  font-size: clamp(2rem, 6vw, 4rem); 
  margin-bottom: 1.5rem; 
  color: #ffd700;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.error-message { 
  font-size: clamp(1.1rem, 3vw, 1.5rem); 
  margin-bottom: 3rem; 
  max-width: 700px; 
  margin-left: auto; 
  margin-right: auto;
  opacity: 0.95;
  font-weight: 300;
}

.quick-actions { 
  display: flex; 
  gap: 1.5rem; 
  justify-content: center; 
  flex-wrap: wrap; 
  margin-bottom: 4rem;
}

.cta-primary, .cta-secondary {
  padding: 18px 35px; 
  border-radius: 50px; 
  text-decoration: none;
  font-weight: 700; 
  font-size: 1.1rem; 
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.cta-primary { 
  background: linear-gradient(45deg, #ff4444, #ff6b6b); 
  color: white; 
  box-shadow: 0 12px 35px rgba(255,68,68,0.4);
}
.cta-primary:hover { 
  transform: translateY(-5px); 
  box-shadow: 0 20px 45px rgba(255,68,68,0.6);
}
.cta-primary:active { transform: translateY(-2px); }

.cta-secondary { 
  background: transparent; 
  color: white; 
  border: 3px solid rgba(255,255,255,0.9); 
}
.cta-secondary:hover { 
  background: rgba(255,255,255,0.15); 
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255,255,255,0.2);
}

.search-suggest {
  background: rgba(255,255,255,0.1); 
  backdrop-filter: blur(15px); 
  border-radius: 25px; 
  padding: 30px;
  border: 1px solid rgba(255,255,255,0.2);
  max-width: 500px;
  margin: 0 auto 60px;
}

.search-suggest p { 
  margin-bottom: 1.5rem; 
  font-size: 1.1rem;
}

.search-bar { 
  display: flex; 
  max-width: 100%; 
  background: rgba(255,255,255,0.95); 
  border-radius: 50px; 
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.search-bar input { 
  flex: 1; 
  border: none; 
  padding: 18px 25px; 
  font-size: 1rem; 
  background: transparent; 
  color: #333;
  outline: none;
  font-family: inherit;
}

.search-bar input::placeholder { 
  color: #666; 
  font-weight: 400;
}

.search-bar button { 
  background: linear-gradient(45deg, #ffd700, #ffed4a); 
  color: #2c3e50; 
  border: none; 
  padding: 18px 30px; 
  cursor: pointer; 
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s;
}

.search-bar button:hover { 
  transform: scale(1.05); 
  box-shadow: 0 8px 25px rgba(255,215,0,0.4);
}

.recent-trials { 
  background: rgba(255,255,255,0.12); 
  backdrop-filter: blur(20px); 
  border-radius: 25px; 
  padding: 50px 30px; 
  border: 1px solid rgba(255,255,255,0.15);
  margin-top: 40px;
}

.recent-trials h2 { 
  margin-bottom: 2.5rem; 
  font-size: 2rem;
  color: #ffd700;
}

.trials-preview { 
  display: flex; 
  gap: 25px; 
  flex-wrap: wrap; 
  justify-content: center; 
}

.trial-preview {
  background: rgba(255,255,255,0.15);
  padding: 25px 20px;
  border-radius: 15px;
  text-decoration: none;
  color: white;
  min-width: 220px;
  transition: all 0.3s;
  border: 2px solid transparent;
  animation: slideInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

.trial-preview:hover {
  transform: translateY(-8px);
  background: rgba(255,255,255,0.25);
  border-color: #ffd700;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.trial-preview h4 { 
  color: #ffd700; 
  margin-bottom: 0.5rem; 
  font-size: 1.1rem;
}

.trial-preview p { 
  color: rgba(255,255,255,0.9); 
  font-size: 0.95rem;
}

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

@keyframes bounce { 
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-30px); }
  60% { transform: translateY(-15px); }
}

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

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container { padding: 15px; }
  
  .quick-actions { 
    flex-direction: column; 
    align-items: center; 
    gap: 1rem;
  }
  
  .cta-primary, .cta-secondary { 
    width: 100%; 
    max-width: 280px; 
    text-align: center;
  }
  
  .search-bar { 
    flex-direction: column; 
    border-radius: 20px;
  }
  
  .search-bar input { 
    border-radius: 20px 20px 0 0; 
    padding: 20px;
  }
  
  .search-bar button { 
    border-radius: 0 0 20px 20px; 
    width: 100%;
  }
  
  .recent-trials { 
    padding: 30px 20px; 
    margin: 20px -15px;
    border-radius: 0;
  }
  
  .trials-preview { gap: 15px; }
  .trial-preview { min-width: 200px; }
}

@media (max-width: 480px) {
  .error-hero { padding: 50px 15px 40px; }
  .ball-404 { font-size: 12rem; }
  .recent-trials { padding: 25px 15px; margin: 15px -15px; }
  .search-suggest { padding: 25px 20px; margin-bottom: 30px; }
}
