/* ═══════════════════════════════════════════
   PainkillerBD - Custom Styles & Animations
   ═══════════════════════════════════════════ */

/* ─── Hero Grid Background ─── */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(43, 138, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 138, 255, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 100%);
}

/* ─── Hero Glow Effects ─── */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.hero-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(43, 138, 255, 0.3), transparent 70%);
  top: 10%;
  left: 10%;
  animation: glowFloat 8s ease-in-out infinite;
}

.hero-glow-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(30, 201, 104, 0.25), transparent 70%);
  top: 40%;
  right: 5%;
  animation: glowFloat 10s ease-in-out infinite reverse;
}

.hero-glow-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 70%);
  bottom: 10%;
  left: 30%;
  animation: glowFloat 12s ease-in-out infinite 2s;
}

@keyframes glowFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.1); }
  50% { transform: translate(-20px, 30px) scale(0.95); }
  75% { transform: translate(15px, 15px) scale(1.05); }
}

/* ─── Hero Gradient Text Animation ─── */
.hero-gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 4s ease-in-out infinite;
}

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

/* ─── Hero Visual / AI Hub ─── */
.hero-visual {
  position: relative;
  width: 100%;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-main {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  width: 280px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  animation: mainCardPulse 4s ease-in-out infinite;
}

@keyframes mainCardPulse {
  0%, 100% { box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(43, 138, 255, 0); }
  50% { box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 40px 5px rgba(43, 138, 255, 0.15); }
}

.hero-floating-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.hero-floating-card-1 {
  top: 20px;
  right: 0;
  animation: floatCard1 6s ease-in-out infinite;
}

.hero-floating-card-2 {
  bottom: 60px;
  left: -20px;
  animation: floatCard2 7s ease-in-out infinite 1s;
}

.hero-floating-card-3 {
  top: 60%;
  right: -10px;
  animation: floatCard3 8s ease-in-out infinite 0.5s;
}

@keyframes floatCard1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
}

@keyframes floatCard2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes floatCard3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.5deg); }
}

/* ─── Particles ─── */
.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(43, 138, 255, 0.4);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ─── Navbar Styles ─── */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.nav-logo-text {
  color: white;
}

#navbar.scrolled .nav-link {
  color: #4b5563;
}

#navbar.scrolled .nav-link:hover {
  color: #1f2937;
  background: #f3f4f6;
}

#navbar.scrolled .nav-logo-text {
  color: #1f2937;
}

/* ─── Scroll Reveal Animations ─── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Form Focus Glow ─── */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(43, 138, 255, 0.1);
}

/* ─── Loading Spinner ─── */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Back to Top ─── */
#backToTop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Smooth Scroll ─── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

/* ─── Selection Color ─── */
::selection {
  background: rgba(43, 138, 255, 0.15);
  color: #112757;
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ─── Responsive Adjustments ─── */
@media (max-width: 640px) {
  .hero-visual {
    height: 300px;
  }

  .hero-card-main {
    width: 220px;
  }

  .hero-floating-card {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }
}

/* ─── Toast Notification ─── */
.toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 9999;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: linear-gradient(135deg, #12a452, #1ec968);
}

.toast.error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}
