/* =============================================
   Binnary Bet Prime - Custom Styles
   Premium data-driven styling with bold numerics
   ============================================= */

/* =============================================
   Base & Reset
   ============================================= */
html {
  overflow-x: clip;
  overflow-y: auto;
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
}

/* =============================================
   Particle Animation
   ============================================= */
.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  border-radius: 50%;
  opacity: 0.6;
  animation: particleFloat 8s ease-in-out infinite;
}

.particle-1 {
  left: 10%;
  top: 20%;
  animation-delay: 0s;
  animation-duration: 10s;
}

.particle-2 {
  left: 25%;
  top: 60%;
  animation-delay: 1.5s;
  animation-duration: 12s;
}

.particle-3 {
  left: 50%;
  top: 30%;
  animation-delay: 3s;
  animation-duration: 9s;
}

.particle-4 {
  left: 70%;
  top: 70%;
  animation-delay: 4.5s;
  animation-duration: 11s;
}

.particle-5 {
  left: 85%;
  top: 25%;
  animation-delay: 2s;
  animation-duration: 13s;
}

.particle-6 {
  left: 40%;
  top: 80%;
  animation-delay: 5s;
  animation-duration: 8s;
}

@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-3rem) translateX(1rem) scale(1.2);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-1.5rem) translateX(-1.5rem) scale(0.8);
    opacity: 0.4;
  }
  75% {
    transform: translateY(-4rem) translateX(0.5rem) scale(1.1);
    opacity: 0.7;
  }
}

/* =============================================
   Tilt Animation
   ============================================= */
.tilt-element {
  transition: transform 0.3s ease-out;
}

.tilt-element:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) scale(1.02);
}

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

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

/* =============================================
   Prose Styling for Content Pages
   ============================================= */
.prose {
  color: #94a3b8;
  line-height: 1.75;
  max-width: 100%;
}

.prose h2 {
  color: #f8fafc;
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f59e0b;
  line-height: 1.3;
}

.prose h3 {
  color: #f8fafc;
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose h4 {
  color: #f8fafc;
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose p {
  margin-bottom: 1.25rem;
  color: #94a3b8;
}

.prose a {
  color: #f59e0b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

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

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

/* Prose Lists */
.prose ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.prose ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: #94a3b8;
}

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

.prose ol {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
  counter-reset: prose-counter;
}

.prose ol li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 0.75rem;
  color: #94a3b8;
  counter-increment: prose-counter;
}

.prose ol li::before {
  content: counter(prose-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Prose Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.prose thead {
  background: #1e3a5f;
}

.prose th {
  color: #f8fafc;
  font-weight: 600;
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 2px solid #f59e0b;
}

.prose td {
  color: #94a3b8;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #334155;
}

.prose tbody tr:hover {
  background: rgba(30, 58, 95, 0.3);
}

/* Prose Blockquotes */
.prose blockquote {
  border-left: 4px solid #f59e0b;
  background: rgba(30, 58, 95, 0.4);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
}

.prose blockquote p {
  margin-bottom: 0;
  color: #cbd5e1;
}

/* Prose Code */
.prose code {
  background: #1e3a5f;
  color: #fbbf24;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'JetBrains Mono', monospace;
}

.prose pre {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

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

/* Prose Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  border: 1px solid #334155;
}

/* Prose Horizontal Rule */
.prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f59e0b, transparent);
  margin: 2.5rem 0;
}

/* =============================================
   Table Wrapper for Prose
   ============================================= */
.prose .table-responsive,
.prose-content .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid #334155;
}

.prose .table-responsive table,
.prose-content .table-responsive table {
  margin-bottom: 0;
  border: none;
}

/* =============================================
   Details/Summary Styling
   ============================================= */
details summary {
  list-style: none;
}

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

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

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* =============================================
   Selection Styling
   ============================================= */
::selection {
  background: rgba(245, 158, 11, 0.3);
  color: #f8fafc;
}

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

/* =============================================
   Animation Utilities
   ============================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

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

/* =============================================
   Responsive Adjustments
   ============================================= */
@media (max-width: 768px) {
  .prose h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }

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

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

  .prose ol li::before {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
  }

  .particle {
    width: 0.375rem;
    height: 0.375rem;
  }
}

/* =============================================
   Print Styles
   ============================================= */
@media print {
  .particles-container,
  .tilt-element:hover {
    animation: none;
    transform: none;
  }

  body {
    background: white;
    color: black;
  }

  .prose {
    color: black;
  }

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