/* =============================================
   Mafiareview Casino - Custom Styles
   Midnight Review Studio Plus Theme
   ============================================= */

/* === Base Reset & Globals === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  overflow-y: auto;
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Animations === */

/* Pulse Slow */
@keyframes pulse-slow {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.animate-pulse-slow {
  animation: pulse-slow 4s ease-in-out infinite;
}

/* Animation Delay */
.animation-delay-2000 {
  animation-delay: 2s;
}

/* Bounce Slow */
@keyframes bounce-slow {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.5rem);
  }
}

.animate-bounce-slow {
  animation: bounce-slow 2s ease-in-out infinite;
}

/* Glow Animation */
@keyframes glow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

.animate-glow {
  animation: glow 3s ease-in-out infinite;
}

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

.marquee-track {
  display: flex;
  gap: 1.5rem;
  animation: marquee 40s linear infinite;
  width: max-content;
}

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

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

/* === Scrollbar Styling === */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}

::-webkit-scrollbar-track {
  background: rgba(15, 22, 47, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

/* === Table Responsive === */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  min-width: 100%;
}

/* === Details/Summary Styling === */
details summary::-webkit-details-marker {
  display: none;
}

details summary {
  list-style: none;
}

/* === Prose Styling for Markdown Content === */
.prose {
  color: #d4d7e5;
  line-height: 1.7;
  max-width: 100%;
}

/* Headings */
.prose h2 {
  color: #f0f1f5;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  line-height: 1.3;
}

.prose h3 {
  color: #f0f1f5;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.4;
}

.prose h4 {
  color: #d4d7e5;
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin-top: 1.75em;
  margin-bottom: 0.5em;
}

/* First heading shouldn't have top margin */
.prose > h2:first-child,
.prose > h3:first-child {
  margin-top: 0;
}

/* Paragraphs */
.prose p {
  margin-bottom: 1.25em;
  color: #a9afc9;
}

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

.prose em {
  color: #d4d7e5;
}

/* Links */
.prose a {
  color: #d4af37;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.prose a:hover {
  color: #f0c14b;
  border-bottom-color: #d4af37;
}

/* Lists */
.prose ul,
.prose ol {
  margin-top: 1em;
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

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

.prose ul li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.625em;
  color: #a9afc9;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.625em;
  width: 0.375em;
  height: 0.375em;
  background: linear-gradient(135deg, #d4af37, #22d3ee);
  border-radius: 50%;
}

.prose ol {
  list-style-type: none;
  counter-reset: ol-counter;
}

.prose ol li {
  position: relative;
  padding-left: 2em;
  margin-bottom: 0.625em;
  color: #a9afc9;
  counter-increment: ol-counter;
}

.prose ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5em;
  height: 1.5em;
  background: rgba(99, 102, 241, 0.2);
  color: #22d3ee;
  font-size: 0.75em;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
}

/* Nested Lists */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* Blockquotes */
.prose blockquote {
  border-left: 0.25rem solid #d4af37;
  background: linear-gradient(135deg, rgba(40, 55, 119, 0.3), rgba(15, 22, 47, 0.5));
  padding: 1.25em 1.5em;
  margin: 1.5em 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
  color: #d4d7e5;
  font-style: italic;
  margin-bottom: 0;
}

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

/* Tables */
.prose .table-responsive {
  overflow-x: auto;
  margin: 1.5em 0;
  border-radius: 0.75rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.prose table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
  font-size: 0.9375em;
}

.prose thead {
  background: rgba(40, 55, 119, 0.5);
}

.prose th {
  color: #f0f1f5;
  font-weight: 600;
  text-align: left;
  padding: 0.875em 1em;
  white-space: nowrap;
}

.prose td {
  padding: 0.875em 1em;
  border-top: 1px solid rgba(99, 102, 241, 0.15);
  color: #a9afc9;
}

.prose tbody tr:hover {
  background: rgba(40, 55, 119, 0.2);
}

/* Standalone table wrapper */
.prose > table {
  display: block;
  overflow-x: auto;
  margin: 1.5em 0;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5em 0;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Code */
.prose code {
  background: rgba(40, 55, 119, 0.5);
  color: #22d3ee;
  padding: 0.125em 0.375em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "Fira Code", monospace;
}

.prose pre {
  background: rgba(15, 22, 47, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0.5rem;
  padding: 1em 1.25em;
  overflow-x: auto;
  margin: 1.5em 0;
}

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

/* Horizontal Rule */
.prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
  margin: 2.5em 0;
}

/* === Responsive Breakpoints === */
@media (max-width: 640px) {
  .prose {
    font-size: 0.9375rem;
  }

  .prose h2 {
    margin-top: 2em;
  }

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

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

  .prose blockquote {
    padding: 1em;
    margin: 1em 0;
  }
}

/* === Focus States for Accessibility === */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

/* === Selection Styling === */
::selection {
  background: rgba(212, 175, 55, 0.3);
  color: #f0f1f5;
}

/* === Print Styles === */
@media print {
  .prose {
    color: #000;
  }

  .prose h2,
  .prose h3,
  .prose h4 {
    color: #000;
  }

  .prose a {
    color: #000;
    text-decoration: underline;
  }
}
