/* ============================================
   GoldenClover Custom Styles
   Jackpot Gleam Theme - Golden & Green Radiance
   ============================================ */

/* === Keyframe Animations === */

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

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4), 0 0 40px rgba(212, 175, 55, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6), 0 0 60px rgba(212, 175, 55, 0.3);
  }
}

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

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

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

@keyframes sparkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes clover-spin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* === Parallax Layers === */

.parallax-layer {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === Marquee Container === */

.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;
}

/* === Clover Decorations === */

.clover-decoration {
  position: absolute;
  opacity: 0.15;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

.clover-decoration.spin {
  animation: clover-spin 8s ease-in-out infinite;
}

/* === Golden Glow Effects === */

.golden-glow {
  position: relative;
  overflow: hidden;
}

.golden-glow::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  animation: rotate-slow 20s linear infinite;
  pointer-events: none;
}

/* === Shimmer Effect === */

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
  pointer-events: none;
}

/* === Scatter Burst === */

.scatter-burst {
  position: relative;
}

.scatter-burst::before,
.scatter-burst::after {
  content: "✦";
  position: absolute;
  color: #d4af37;
  font-size: 1.5rem;
  animation: sparkle 2s ease-in-out infinite;
  pointer-events: none;
}

.scatter-burst::before {
  top: -10px;
  right: -10px;
  animation-delay: 0s;
}

.scatter-burst::after {
  bottom: -10px;
  left: -10px;
  animation-delay: 1s;
}

/* === Prose Styling for Readability === */

.prose {
  color: #1a1a1a;
  line-height: 1.75;
  max-width: 100%;
}

/* Enhanced heading styles with golden accents */
.prose h2 {
  color: #0f1419;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.3;
  position: relative;
  padding-bottom: 0.5em;
  border-bottom: 2px solid #d4af37;
}

.prose h2::before {
  content: "♣";
  color: #22c55e;
  margin-right: 0.5em;
  font-size: 0.9em;
}

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

/* Improved paragraph spacing and readability */
.prose p {
  margin-bottom: 1.5em;
  font-size: clamp(1rem, 2vw, 1.0625rem);
  max-width: 100%;
}

.prose p:first-of-type {
  font-size: clamp(1.0625rem, 2.2vw, 1.125rem);
  line-height: 1.8;
}

/* Enhanced list styling */
.prose ul,
.prose ol {
  margin-bottom: 1.5em;
  padding-left: 1.75em;
  max-width: 100%;
}

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

.prose ul li {
  position: relative;
  margin-bottom: 0.75em;
  padding-left: 0.5em;
}

.prose ul li::before {
  content: "▸";
  position: absolute;
  left: -1.25em;
  color: #d4af37;
  font-weight: bold;
}

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

.prose ol li {
  margin-bottom: 0.75em;
  padding-left: 0.5em;
}

.prose li {
  line-height: 1.7;
}

/* Strong emphasis with golden color */
.prose strong {
  color: #0a0a0a;
  font-weight: 600;
}

/* Link styling with hover effects */
.prose a {
  color: #b8941f;
  text-decoration: underline;
  text-decoration-color: rgba(212, 175, 55, 0.4);
  text-underline-offset: 0.2em;
  transition: all 0.2s ease;
  font-weight: 500;
}

.prose a:hover {
  color: #d4af37;
  text-decoration-color: #d4af37;
  text-underline-offset: 0.3em;
}

/* Responsive table styling with proper overflow */
.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-bottom: 2em;
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  background: #ffffff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.prose thead {
  background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
}

.prose th {
  padding: 1em 0.75em;
  text-align: left;
  font-weight: 600;
  color: #1a1a1a;
  border-bottom: 2px solid #b8941f;
  white-space: nowrap;
}

.prose td {
  padding: 0.875em 0.75em;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
}

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

.prose tbody tr:last-child td {
  border-bottom: none;
}

/* Blockquote styling with clover accent */
.prose blockquote {
  border-left: 4px solid #22c55e;
  padding-left: 1.5em;
  margin: 2em 0;
  font-style: italic;
  color: #374151;
  background: #f0fdf4;
  padding: 1.5em;
  border-radius: 0.5rem;
  position: relative;
}

.prose blockquote::before {
  content: "♣";
  position: absolute;
  top: 0.5em;
  left: 0.5em;
  font-size: 2em;
  color: #22c55e;
  opacity: 0.3;
  font-style: normal;
}

.prose blockquote p {
  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 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: block;
}

/* Code styling */
.prose code {
  background: #f3f4f6;
  color: #1f2937;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: ui-monospace, monospace;
}

.prose pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2em 0;
}

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

/* === Table Responsive Wrapper === */

/* Enhanced table wrapper with smooth scrolling */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 2em;
  border-radius: 0.5rem;
  max-width: 100%;
}

.table-responsive::-webkit-scrollbar {
  height: 0.5rem;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #b8941f;
}

/* === Button Enhancements === */

.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  animation: pulse-glow 2s ease-in-out infinite;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before {
  width: 300px;
  height: 300px;
}

/* === Bonus Badge === */

.bonus-badge {
  position: relative;
  background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 50%, #d4af37 100%);
  animation: pulse-glow 3s ease-in-out infinite;
}

/* === Game Card Hover === */

.game-card {
  transition: all 0.3s ease;
  position: relative;
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(34, 197, 94, 0.2));
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.game-card:hover::after {
  opacity: 1;
}

/* === Smooth Scroll === */

html {
  scroll-behavior: smooth;
}

/* === Mobile Menu === */

.mobile-menu {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

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

/* === Sticky Header Shadow === */

.header-shadow {
  transition: box-shadow 0.3s ease;
}

.header-shadow.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* === Clover SVG Filter === */

.clover-glow {
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6)) drop-shadow(0 0 16px rgba(34, 197, 94, 0.4));
}

/* === Responsive Utilities === */

@media (max-width: 768px) {
  .prose h2 {
    margin-top: 2em;
    padding-bottom: 0.4em;
  }

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

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

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

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

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

@media (max-width: 480px) {
  .prose th,
  .prose td {
    padding: 0.625em 0.4em;
  }
}

/* === Focus Styles for Accessibility === */

*:focus-visible {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

/* === Print Styles === */

@media print {
  .no-print {
    display: none !important;
  }
}
