/* ========================================
   Sweet Spark Studio - Custom Styles
   Sweetsino Casino Theme
   ======================================== */

/* ----------------------------------------
   Animation Keyframes
   ---------------------------------------- */

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

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

@keyframes pulse-slow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

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

@keyframes bounce-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ----------------------------------------
   Animation Utilities
   ---------------------------------------- */

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 8s ease-in-out infinite;
  animation-delay: 1s;
}

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

.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

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

.animate-spin-slow {
  animation: spin-slow 20s linear infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

/* ----------------------------------------
   Global Overrides
   ---------------------------------------- */

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

body {
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----------------------------------------
   Table Responsive Wrapper
   ---------------------------------------- */

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

/* ----------------------------------------
   Prose Styling for Markdown Content
   ---------------------------------------- */

.prose {
  --prose-body: #1e1b2e;
  --prose-headings: #1e1b2e;
  --prose-lead: rgba(30, 27, 46, 0.8);
  --prose-links: #e11d48;
  --prose-bold: #1e1b2e;
  --prose-counters: #f43f5e;
  --prose-bullets: #f43f5e;
  --prose-hr: rgba(30, 27, 46, 0.1);
  --prose-quotes: #1e1b2e;
  --prose-quote-borders: #f43f5e;
  --prose-captions: rgba(30, 27, 46, 0.6);
  --prose-code: #e11d48;
  --prose-pre-code: #fff8f0;
  --prose-pre-bg: #1e1b2e;
  --prose-th-borders: rgba(30, 27, 46, 0.2);
  --prose-td-borders: rgba(30, 27, 46, 0.1);

  color: var(--prose-body);
  max-width: 100%;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose h2 {
  color: var(--prose-headings);
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.75em;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
  padding-bottom: 0.5em;
  border-bottom: 2px solid rgba(244, 63, 94, 0.2);
}

.prose h3 {
  color: var(--prose-headings);
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.375em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.4;
}

.prose h4 {
  color: var(--prose-headings);
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.125em;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  color: rgba(30, 27, 46, 0.85);
}

.prose a {
  color: var(--prose-links);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.prose a:hover {
  border-bottom-color: var(--prose-links);
  color: #be123c;
}

.prose strong {
  color: var(--prose-bold);
  font-weight: 600;
}

.prose ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose ul li {
  position: relative;
  padding-left: 1.75em;
  margin-bottom: 0.625em;
  color: rgba(30, 27, 46, 0.85);
}

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

.prose ol {
  list-style-type: none;
  padding-left: 0;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  counter-reset: item;
}

.prose ol li {
  position: relative;
  padding-left: 2.5em;
  margin-bottom: 0.75em;
  counter-increment: item;
  color: rgba(30, 27, 46, 0.85);
}

.prose ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75em;
  height: 1.75em;
  background: linear-gradient(135deg, #f43f5e, #a855f7);
  color: white;
  font-weight: 600;
  font-size: 0.875em;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prose blockquote {
  font-style: italic;
  color: var(--prose-quotes);
  border-left: 4px solid var(--prose-quote-borders);
  padding-left: 1.5em;
  margin: 1.5em 0;
  background: linear-gradient(to right, rgba(244, 63, 94, 0.05), transparent);
  padding: 1em 1.5em;
  border-radius: 0 0.75em 0.75em 0;
}

.prose blockquote p {
  margin: 0;
}

.prose hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(244, 63, 94, 0.3), transparent);
  margin: 3em 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(30, 27, 46, 0.1);
  margin: 2em auto;
  display: block;
}

/* ----------------------------------------
   Prose Tables
   ---------------------------------------- */

.prose .table-responsive,
.prose > div[style*="overflow"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2em 0;
  border-radius: 1rem;
  border: 1px solid rgba(30, 27, 46, 0.1);
  box-shadow: 0 4px 20px rgba(30, 27, 46, 0.05);
}

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

.prose thead {
  background: linear-gradient(135deg, #f43f5e, #a855f7);
}

.prose thead th {
  color: white;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  padding: 1em 1.25em;
  text-align: left;
  border: none;
}

.prose thead th:first-child {
  border-top-left-radius: 0.75rem;
}

.prose thead th:last-child {
  border-top-right-radius: 0.75rem;
}

.prose tbody tr {
  border-bottom: 1px solid rgba(30, 27, 46, 0.08);
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background-color: rgba(244, 63, 94, 0.03);
}

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

.prose tbody td {
  padding: 1em 1.25em;
  color: rgba(30, 27, 46, 0.8);
  border: none;
}

.prose tbody tr:nth-child(even) {
  background-color: rgba(30, 27, 46, 0.02);
}

/* ----------------------------------------
   Code Blocks
   ---------------------------------------- */

.prose code {
  color: var(--prose-code);
  background: rgba(244, 63, 94, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 0.375em;
  font-size: 0.875em;
  font-weight: 500;
}

.prose pre {
  background: var(--prose-pre-bg);
  color: var(--prose-pre-code);
  border-radius: 1rem;
  padding: 1.5em;
  overflow-x: auto;
  margin: 2em 0;
}

.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.875em;
}

/* ----------------------------------------
   Component Overrides
   ---------------------------------------- */

details summary {
  outline: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Smooth transitions for tilt effect */
[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

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

::-webkit-scrollbar-track {
  background: #fff8f0;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #fda4af, #a855f7);
  border-radius: 0.3125rem;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #f43f5e, #7c3aed);
}

/* ----------------------------------------
   Responsive Typography
   ---------------------------------------- */

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

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

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

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

  .prose thead th,
  .prose tbody td {
    padding: 0.75em 1em;
  }
}

/* ----------------------------------------
   Focus States for Accessibility
   ---------------------------------------- */

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #f43f5e;
  outline-offset: 2px;
}

/* ----------------------------------------
   Selection Colors
   ---------------------------------------- */

::selection {
  background: rgba(244, 63, 94, 0.2);
  color: #1e1b2e;
}

::-moz-selection {
  background: rgba(244, 63, 94, 0.2);
  color: #1e1b2e;
}
