/* Circuit Fortune Theme Custom Styles */

/* Glow Effects */
.glow-text {
  text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
}

.circuit-glow {
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.3), inset 0 0 20px rgba(0, 255, 204, 0.1);
}

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  from {
    box-shadow: 0 0 20px rgba(50, 255, 50, 0.5), 0 0 30px rgba(50, 255, 50, 0.3);
  }
  to {
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.7), 0 0 40px rgba(0, 255, 136, 0.5);
  }
}

/* Parallax Animation */
.parallax-bg {
  animation: parallaxFloat 20s ease-in-out infinite;
}

@keyframes parallaxFloat {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-10px) translateX(5px);
  }
  50% {
    transform: translateY(-5px) translateX(-5px);
  }
  75% {
    transform: translateY(-15px) translateX(3px);
  }
}

/* Marquee Animation */
.marquee {
  animation: marqueeScroll 30s linear infinite;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Circuit Board Pattern */
.circuit-pattern {
  background-image: linear-gradient(90deg, rgba(0, 255, 204, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(0, 255, 204, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Neon Border Animation */
.neon-border {
  position: relative;
  border: 2px solid transparent;
  background: linear-gradient(45deg, #0a0a0a, #1a1a1a) padding-box, linear-gradient(45deg, #32ff32, #00ff88, #00ffcc)
    border-box;
}

.neon-border::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #32ff32, #00ff88, #00ffcc, #32ff32);
  border-radius: inherit;
  z-index: -1;
  animation: neonRotate 4s linear infinite;
}

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

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

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 255, 204, 0.3);
}

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

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #32ff32, #00ff88);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #00ff88, #00ffcc);
}

/* Enhanced Prose Styling for Better Readability */
.prose {
  max-width: 100%;
  line-height: 1.7;
  font-size: 1rem;
  color: #e5e7eb;
}

.prose p {
  margin-bottom: 1.75em;
  color: #d1d5db;
  text-align: justify;
  hyphens: auto;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: #00ffcc;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 1.25em;
  line-height: 1.3;
  text-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.prose h1 {
  font-size: 2.5rem;
  margin-top: 0;
}

.prose h2 {
  font-size: 2rem;
  border-bottom: 2px solid rgba(0, 255, 204, 0.2);
  padding-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.625rem;
  color: #32ff32;
}

.prose h4 {
  font-size: 1.375rem;
  color: #00ff88;
}

.prose a {
  color: #00ffcc;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 204, 0.3);
  transition: all 0.3s ease;
  padding-bottom: 0.125rem;
}

.prose a:hover {
  color: #32ff32;
  border-bottom-color: #32ff32;
  text-shadow: 0 0 5px rgba(50, 255, 50, 0.5);
}

.prose ul,
.prose ol {
  margin-bottom: 2rem;
  padding-left: 2rem;
}

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

.prose ul li::before {
  content: "▶";
  color: #00ffcc;
  font-weight: bold;
  position: absolute;
  margin-left: -1.5rem;
}

.prose ol {
  counter-reset: list-counter;
}

.prose ol li {
  counter-increment: list-counter;
  position: relative;
}

.prose ol li::before {
  content: counter(list-counter);
  position: absolute;
  left: -2rem;
  top: 0;
  background: linear-gradient(45deg, #00ffcc, #32ff32);
  color: #000;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.prose li {
  margin-bottom: 0.75rem;
  color: #d1d5db;
  position: relative;
  padding-left: 0.5rem;
}

.prose blockquote {
  border-left: 4px solid #00ffcc;
  background: rgba(0, 255, 204, 0.05);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  font-style: italic;
  color: #9ca3af;
  border-radius: 0 8px 8px 0;
  position: relative;
}

.prose blockquote::before {
  content: "";
  font-size: 4rem;
  color: rgba(0, 255, 204, 0.3);
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  line-height: 1;
}

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
}

.prose table thead,
.prose table tbody,
.prose table tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.prose th,
.prose td {
  border: 1px solid rgba(0, 255, 204, 0.2);
  padding: 1rem 0.75rem;
  text-align: left;
  vertical-align: top;
  word-wrap: break-word;
  white-space: normal;
}

.prose th {
  background: linear-gradient(135deg, rgba(0, 255, 204, 0.15), rgba(50, 255, 50, 0.1));
  color: #00ffcc;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.prose td {
  color: #d1d5db;
  background: rgba(0, 0, 0, 0.2);
}

.prose tr:nth-child(even) td {
  background: rgba(0, 255, 204, 0.02);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem auto;
  display: block;
  box-shadow: 0 8px 32px rgba(0, 255, 204, 0.2);
  border: 1px solid rgba(0, 255, 204, 0.1);
}

.prose strong {
  color: #00ffcc;
  font-weight: 700;
}

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

.prose code {
  background: rgba(0, 255, 204, 0.1);
  color: #00ffcc;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.875em;
}

.prose pre {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 204, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: #e5e7eb;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .glow-text {
    text-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
  }

  .circuit-glow {
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
  }

  .prose {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .prose h1 {
    font-size: 2rem;
  }

  .prose h2 {
    font-size: 1.75rem;
  }

  .prose h3 {
    font-size: 1.5rem;
  }

  .prose h4 {
    font-size: 1.25rem;
  }

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

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

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

  .prose blockquote {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
  }
}

@media (max-width: 480px) {
  .prose {
    font-size: 0.875rem;
  }

  .prose h1 {
    font-size: 1.75rem;
  }

  .prose h2 {
    font-size: 1.5rem;
  }

  .prose h3 {
    font-size: 1.25rem;
  }

  .prose ul,
  .prose ol {
    padding-left: 1.25rem;
  }

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

/* Loading Animation */
.loading-pulse {
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Focus States for Accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #00ffcc;
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .text-gray-300 {
    color: #ffffff;
  }

  .text-gray-400 {
    color: #e5e5e5;
  }

  .border-neon-teal\/20 {
    border-color: #00ffcc;
  }

  .prose {
    color: #ffffff;
  }

  .prose p,
  .prose li,
  .prose td {
    color: #ffffff;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .pulse-glow,
  .parallax-bg,
  .marquee,
  .neon-border::before {
    animation: none;
  }

  .hover-lift {
    transition: none;
  }

  .prose h1,
  .prose h2,
  .prose h3,
  .prose h4,
  .prose h5,
  .prose h6 {
    text-shadow: none;
  }
}
