/* Crimson Surge Theme - Custom Animations & Overrides */

/* Keyframe Animations */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(220, 20, 60, 0.8), 0 0 60px rgba(255, 215, 0, 0.5);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Marquee Animation */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.marquee-content {
  display: flex;
  animation: marquee 30s linear infinite;
  will-change: transform;
}

.marquee-content:hover {
  animation-play-state: paused;
}

/* Parallax Layers */
.parallax-layer {
  transition: transform 0.3s ease-out;
  will-change: transform;
}

/* Glow Effects */
.glow-crimson {
  animation: glow-pulse 3s ease-in-out infinite;
}

.glow-gold {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

/* Button Shimmer Effect */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.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);
  animation: shimmer 3s infinite;
}

/* Floating Animation */
.float-animation {
  animation: float 6s ease-in-out infinite;
}

/* Obsidian Pattern Background */
.obsidian-pattern {
  background-image: radial-gradient(circle at 20% 50%, rgba(220, 20, 60, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.08) 0%, transparent 50%);
  background-size: 100% 100%;
}

/* Metallic Gradient */
.metallic-gold {
  background: linear-gradient(135deg, #ffd700 0%, #ffa500 50%, #ffd700 100%);
  background-size: 200% 200%;
  animation: shimmer 4s ease infinite;
}

/* Card Hover Effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(220, 20, 60, 0.4);
}

/* Prose Styling for Readability */
.prose {
  color: #e5e5e5;
  line-height: 1.75;
  max-width: 100%;
}

/* Enhanced heading styles with better spacing and contrast */
.prose h2 {
  color: #ffd700;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.prose h3 {
  color: #ffa500;
  font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin-top: 1.8em;
  margin-bottom: 0.9em;
  line-height: 1.4;
}

.prose h4 {
  color: #ffb84d;
  font-weight: 600;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

/* Improved paragraph and text styling */
.prose p {
  margin-bottom: 1.5em;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: #d4d4d4;
}

.prose p:first-of-type {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: #e5e5e5;
}

/* Enhanced list styling with better spacing */
.prose ul,
.prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.5em;
  padding-left: 1.75em;
  color: #d4d4d4;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

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

.prose li::marker {
  color: #ffd700;
  font-weight: 600;
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

/* Strong and emphasis styling */
.prose strong {
  color: #ffd700;
  font-weight: 700;
}

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

/* Link styling with better contrast */
.prose a {
  color: #ff6b6b;
  text-decoration: underline;
  text-decoration-color: rgba(255, 107, 107, 0.4);
  text-underline-offset: 0.2em;
  transition: all 0.2s ease;
  font-weight: 500;
}

.prose a:hover {
  color: #ffd700;
  text-decoration-color: #ffd700;
}

/* Enhanced table styling with responsive design */
.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  background: rgba(26, 26, 26, 0.6);
  border-radius: 0.5rem;
  overflow: hidden;
}

.prose thead {
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.3), rgba(178, 34, 34, 0.3));
}

.prose th {
  background: transparent;
  color: #ffd700;
  padding: 1em 0.75em;
  text-align: left;
  font-weight: 700;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose td {
  padding: 1em 0.75em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #d4d4d4;
}

.prose tbody tr {
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background: rgba(220, 20, 60, 0.1);
}

.prose tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.prose tbody tr:nth-child(even):hover {
  background: rgba(220, 20, 60, 0.12);
}

/* Blockquote styling */
.prose blockquote {
  border-left: 0.25rem solid #ffd700;
  padding-left: 1.5em;
  margin: 2em 0;
  font-style: italic;
  color: #b8b8b8;
  background: rgba(255, 215, 0, 0.05);
  padding: 1.5em;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
  margin-bottom: 0.75em;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Image styling with responsive behavior */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2em 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(220, 20, 60, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prose img:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3);
}

/* Code and pre styling */
.prose code {
  background: rgba(220, 20, 60, 0.15);
  color: #ffa500;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: "Courier New", monospace;
}

.prose pre {
  background: rgba(10, 10, 10, 0.8);
  color: #e5e5e5;
  padding: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2em 0;
  border: 1px solid rgba(220, 20, 60, 0.2);
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Horizontal rule styling */
.prose hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
  margin: 3em 0;
}

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
  border-radius: 0.5rem;
  max-width: 100%;
}

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

/* Mobile Menu Transitions */
.mobile-menu {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.mobile-menu.hidden {
  transform: translateX(-100%);
  opacity: 0;
}

/* Badge Styles */
.badge-glow {
  position: relative;
}

.badge-glow::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg, #dc143c, #ffd700, #dc143c);
  z-index: -1;
  opacity: 0.7;
  filter: blur(10px);
}

/* Fade In Animation */
.fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #dc143c, #ffd700);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffd700, #dc143c);
}

/* Responsive Typography */
@media (max-width: 768px) {
  .prose {
    font-size: 1rem;
  }

  .prose table {
    font-size: 0.875rem;
  }

  .prose th,
  .prose td {
    padding: 0.75em 0.5em;
  }

  .prose ul,
  .prose ol {
    padding-left: 1.5em;
  }

  .prose blockquote {
    padding: 1em;
    padding-left: 1.25em;
  }
}

@media (max-width: 480px) {
  .prose h2 {
    margin-top: 1.5em;
  }

  .prose h3 {
    margin-top: 1.3em;
  }

  .prose table {
    font-size: 0.8rem;
  }
}
