/* ========================================
   GAMBANA PULSE SPHERE THEME
   Custom CSS - Animations, Overrides & Prose
   ======================================== */

/* ----------------------------------------
   KEYFRAME ANIMATIONS
   ---------------------------------------- */

@keyframes pulse-sphere {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes pulse-sphere-delayed {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1) translateY(0);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.08) translateY(-10px);
  }
}

@keyframes tilt {
  0%,
  100% {
    transform: rotate(-1deg);
  }
  50% {
    transform: rotate(1deg);
  }
}

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

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.6);
  }
}

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

/* Animation Classes */
.animate-pulse-sphere {
  animation: pulse-sphere 4s ease-in-out infinite;
}

.animate-pulse-sphere-delayed {
  animation: pulse-sphere-delayed 5s ease-in-out infinite;
  animation-delay: 1s;
}

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

.animate-marquee {
  animation: marquee 30s linear infinite;
}

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

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

/* ----------------------------------------
   SCROLLBAR STYLING
   ---------------------------------------- */

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

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

::-webkit-scrollbar-track {
  background: rgba(26, 26, 46, 0.5);
  border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.6);
}

/* ----------------------------------------
   TABLE RESPONSIVE WRAPPER
   ---------------------------------------- */

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

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

/* ----------------------------------------
   PROSE STYLING FOR MARKDOWN CONTENT
   ---------------------------------------- */

.prose {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.75;
  max-width: 100%;
}

/* Headings */
.prose h2 {
  color: #e2e8f0;
  font-size: 1.75em;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.3;
  padding-bottom: 0.5em;
  border-bottom: 2px solid rgba(124, 58, 237, 0.3);
}

.prose h3 {
  color: #e2e8f0;
  font-size: 1.375em;
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.4;
}

.prose h4 {
  color: #a78bfa;
  font-size: 1.125em;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.5;
}

/* Paragraphs */
.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose p:first-child {
  margin-top: 0;
}

/* Links */
.prose a {
  color: #a78bfa;
  text-decoration: underline;
  text-decoration-color: rgba(167, 139, 250, 0.4);
  text-underline-offset: 0.2em;
  transition: all 0.2s ease;
}

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

/* Strong & Emphasis */
.prose strong {
  color: #e2e8f0;
  font-weight: 600;
}

.prose em {
  font-style: italic;
}

/* Lists */
.prose ul {
  list-style-type: disc;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

.prose ol {
  list-style-type: decimal;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

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

.prose li::marker {
  color: #a78bfa;
}

.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: 4px solid #7c3aed;
  padding-left: 1.25em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  font-style: italic;
  color: #94a3b8;
  background: rgba(124, 58, 237, 0.05);
  padding: 1em 1.25em;
  border-radius: 0 0.5em 0.5em 0;
}

.prose blockquote p {
  margin: 0;
}

/* Tables */
.prose table {
  width: 100%;
  table-layout: auto;
  text-align: left;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.875em;
  border-collapse: collapse;
}

.prose thead {
  background: rgba(26, 26, 46, 0.8);
  border-bottom: 2px solid rgba(124, 58, 237, 0.3);
}

.prose thead th {
  color: #e2e8f0;
  font-weight: 600;
  padding: 0.875em 1em;
  vertical-align: bottom;
}

.prose tbody tr {
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
  transition: background-color 0.2s ease;
}

.prose tbody tr:hover {
  background: rgba(124, 58, 237, 0.08);
}

.prose tbody td {
  padding: 0.875em 1em;
  vertical-align: top;
}

/* Table Responsive Wrapper */
.prose .table-responsive {
  overflow-x: auto;
  margin-top: 2em;
  margin-bottom: 2em;
  border-radius: 0.75em;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.prose .table-responsive table {
  margin: 0;
}

/* Code */
.prose code {
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.15);
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
  font-size: 0.875em;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

.prose pre {
  background: rgba(10, 10, 18, 0.8);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 0.75em;
  padding: 1.25em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  overflow-x: auto;
}

.prose pre code {
  background: transparent;
  padding: 0;
  font-size: 0.875em;
  line-height: 1.7;
}

/* Horizontal Rule */
.prose hr {
  border: none;
  border-top: 1px solid rgba(124, 58, 237, 0.3);
  margin-top: 3em;
  margin-bottom: 3em;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75em;
  margin-top: 2em;
  margin-bottom: 2em;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

/* Figure */
.prose figure {
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose figcaption {
  color: #94a3b8;
  font-size: 0.875em;
  margin-top: 0.75em;
  text-align: center;
}

/* Definition Lists */
.prose dl {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose dt {
  color: #e2e8f0;
  font-weight: 600;
  margin-top: 1em;
}

.prose dd {
  margin-left: 1.5em;
  margin-top: 0.25em;
}

/* ----------------------------------------
   COMPONENT OVERRIDES
   ---------------------------------------- */

/* Details/Summary (FAQ) styling */
details summary::-webkit-details-marker {
  display: none;
}

details summary {
  list-style: none;
}

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

/* Selection */
::selection {
  background: rgba(124, 58, 237, 0.4);
  color: #fff;
}

/* ----------------------------------------
   UTILITY CLASSES
   ---------------------------------------- */

.bg-gradient-sphere {
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
}

.text-gradient {
  background: linear-gradient(135deg, #a78bfa 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Ensure body doesn't allow horizontal scroll */
html,
body {
  overflow-x: clip;
  overflow-y: auto;
}

/* ----------------------------------------
   RESPONSIVE ADJUSTMENTS
   ---------------------------------------- */

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

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

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

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

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

/* ----------------------------------------
   PRINT STYLES
   ---------------------------------------- */

@media print {
  .prose {
    color: #000;
  }

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

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