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

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(220, 38, 38, 0.5); }
  50% { box-shadow: 0 0 40px rgba(220, 38, 38, 0.8), 0 0 60px rgba(220, 38, 38, 0.4); }
}

@keyframes particle-float {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) rotate(360deg); opacity: 0; }
}

@keyframes tilt {
  0%, 100% { transform: perspective(1000px) rotateX(0deg) rotateY(0deg); }
  50% { transform: perspective(1000px) rotateX(2deg) rotateY(2deg); }
}

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

.particles-container::before,
.particles-container::after {
  content: '';
  position: absolute;
  width: 0.25rem;
  height: 0.25rem;
  background: radial-gradient(circle, rgba(220, 38, 38, 1), transparent);
  border-radius: 50%;
  animation: particle-float 8s infinite;
  --tx: calc(100vw * var(--random-x, 0.5));
  --ty: calc(-100vh * var(--random-y, 1.2));
}

.particles-container::before {
  left: 10%;
  top: 20%;
  animation-delay: 0s;
  --random-x: 0.8;
  --random-y: 1.5;
}

.particles-container::after {
  left: 70%;
  top: 40%;
  animation-delay: 3s;
  --random-x: 0.3;
  --random-y: 1.3;
}

/* Tilt Card Effect */
.tilt-card {
  animation: tilt 6s ease-in-out infinite;
}

.tilt-card:hover {
  animation: glow 2s ease-in-out infinite;
}

/* Prose Styling */
.prose-custom {
  max-width: 100%;
  color: #d1d5db;
  line-height: 1.7;
}

.prose-custom h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #f87171;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
  background: linear-gradient(to right, #ef4444, #dc2626);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prose-custom h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fca5a5;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.prose-custom h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fecaca;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose-custom p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #d1d5db;
}

.prose-custom strong {
  color: #f9fafb;
  font-weight: 600;
}

.prose-custom em {
  color: #fca5a5;
  font-style: italic;
}

.prose-custom a {
  color: #ef4444;
  text-decoration: underline;
  transition: color 0.2s;
}

.prose-custom a:hover {
  color: #dc2626;
}

.prose-custom ul {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: #d1d5db;
}

.prose-custom ul li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
  line-height: 1.7;
}

.prose-custom ol {
  list-style-type: decimal;
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: #d1d5db;
}

.prose-custom ol li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
  line-height: 1.7;
}

.prose-custom blockquote {
  border-left: 0.25rem solid #dc2626;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #fca5a5;
  background: rgba(220, 38, 38, 0.05);
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
}

.prose-custom table {
  width: 100%;
  max-width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  background: #1f2937;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.prose-custom thead {
  background: linear-gradient(to right, #b91c1c, #991b1b);
}

.prose-custom thead th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: #ffffff;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose-custom tbody tr {
  border-bottom: 0.0625rem solid #374151;
  transition: background-color 0.2s;
}

.prose-custom tbody tr:hover {
  background-color: #374151;
}

.prose-custom tbody td {
  padding: 1rem;
  color: #d1d5db;
  font-size: 0.875rem;
}

.prose-custom img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2rem 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  border: 0.125rem solid #991b1b;
}

.prose-custom code {
  background: #1f2937;
  color: #fca5a5;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose-custom pre {
  background: #111827;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 0.0625rem solid #374151;
}

.prose-custom pre code {
  background: none;
  padding: 0;
  color: #fca5a5;
}

.prose-custom hr {
  border: none;
  border-top: 0.125rem solid #991b1b;
  margin: 2.5rem 0;
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

/* Mobile Menu Background */
#mobile-menu {
  background-color: #111827;
}

/* Smooth Transitions */
* {
  transition-property: color, background-color, border-color, transform, opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}
