/* ============================================
   Binnary Pulse Lite - Custom CSS
   Minimalist interface, softer contrasts
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;
  --color-secondary: #10b981;
  --color-secondary-light: #34d399;
  --color-accent: #f59e0b;
  --color-dark: #1e1b4b;
  --color-dark-soft: #312e81;
  --color-light: #f8fafc;
  --color-light-soft: #e2e8f0;
  --color-muted: #94a3b8;
  --color-surface: #ffffff;
  --color-surface-dark: #0f172a;
  --transition-base: 0.3s ease;
  --shadow-soft: 0 4px 20px rgba(99, 102, 241, 0.15);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
}

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

body {
  overflow-x: clip;
}

/* ---------- Keyframe Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 1.25rem rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 2.5rem rgba(99, 102, 241, 0.7);
  }
}

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

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

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

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

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

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

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-2rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(2rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ---------- Animation Utility Classes ---------- */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

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

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

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

.animate-scale-pulse {
  animation: scale-pulse 2s ease-in-out infinite;
}

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

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

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

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

/* ---------- Parallax ---------- */
.parallax-wrapper {
  perspective: 1000px;
  overflow: hidden;
}

.parallax-layer {
  transform-style: preserve-3d;
  will-change: transform;
}

.parallax-bg {
  transform: translateZ(-1px) scale(1.5);
}

.parallax-mid {
  transform: translateZ(-0.5px) scale(1.25);
}

.parallax-front {
  transform: translateZ(0);
}

/* ---------- Navigation ---------- */
.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);
}

.nav-link {
  position: relative;
  transition: color var(--transition-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 0;
  height: 0.125rem;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.nav-link:hover::after {
  width: 100%;
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
  background: var(--color-surface-dark);
  opacity: 0.98;
}

.burger-line {
  transition: all var(--transition-base);
}

.burger-active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(0.3125rem, 0.3125rem);
}

.burger-active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(0.3125rem, -0.3125rem);
}

/* ---------- Button Styles ---------- */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-surface);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  border: 0.125rem solid var(--color-primary-light);
  color: var(--color-primary-light);
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  color: var(--color-dark);
}

/* ---------- Card Styles ---------- */
.card-hover {
  transition: all var(--transition-base);
}

.card-hover:hover {
  transform: translateY(-0.5rem);
  box-shadow: var(--shadow-soft);
}

/* ---------- Hero Section ---------- */
.hero-gradient {
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-soft) 50%, var(--color-primary-dark) 100%);
}

.hero-pattern {
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
}

/* ---------- Bonus Badge ---------- */
.bonus-badge {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(79, 70, 229, 0.95));
  backdrop-filter: blur(0.625rem);
  border: 0.0625rem solid rgba(255, 255, 255, 0.2);
}

/* ---------- Game Cards ---------- */
.game-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  transition: all var(--transition-base);
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 60%);
  z-index: 1;
}

.game-card:hover {
  transform: scale(1.03);
}

.game-card-content {
  position: relative;
  z-index: 2;
}

/* ---------- Step Cards ---------- */
.step-badge {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-surface);
  font-size: 1.25rem;
}

.step-connector {
  position: absolute;
  top: 1.5rem;
  left: calc(50% + 1.5rem);
  width: calc(100% - 3rem);
  height: 0.125rem;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  opacity: 0.3;
}

/* ---------- Table Styles ---------- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

.payment-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 37.5rem;
}

.payment-table th,
.payment-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 0.0625rem solid rgba(148, 163, 184, 0.2);
}

.payment-table th {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-light);
  font-weight: 600;
}

.payment-table td {
  color: var(--color-light-soft);
}

.payment-table tr:hover td {
  background: rgba(99, 102, 241, 0.05);
}

/* ---------- Provider Cloud ---------- */
.provider-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 0.0625rem solid rgba(99, 102, 241, 0.2);
  border-radius: 2rem;
  color: var(--color-light-soft);
  font-size: 0.875rem;
  transition: all var(--transition-base);
}

.provider-tag:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--color-primary);
}

/* ---------- Promo Cards ---------- */
.promo-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.8), rgba(49, 46, 129, 0.6));
  border: 0.0625rem solid rgba(99, 102, 241, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all var(--transition-base);
}

.promo-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-soft);
}

/* ---------- FAQ Section ---------- */
.faq-item {
  border: 0.0625rem solid rgba(148, 163, 184, 0.2);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: var(--color-primary);
}

.faq-question {
  padding: 1.25rem;
  background: rgba(99, 102, 241, 0.05);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-light);
  font-weight: 500;
}

.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  color: var(--color-light-soft);
}

.faq-item.active .faq-answer {
  padding: 1.25rem;
  max-height: 31.25rem;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform var(--transition-base);
}

/* ---------- Footer ---------- */
.footer-gradient {
  background: linear-gradient(180deg, var(--color-dark-soft) 0%, var(--color-dark) 100%);
}

.age-badge {
  width: 2.5rem;
  height: 2.5rem;
  border: 0.125rem solid var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.875rem;
}

/* ---------- SVG Decorative Patterns ---------- */
.pattern-dots {
  background-image: radial-gradient(rgba(99, 102, 241, 0.3) 0.0625rem, transparent 0.0625rem);
  background-size: 1.25rem 1.25rem;
}

.pattern-grid {
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.1) 0.0625rem, transparent 0.0625rem),
    linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0.0625rem, transparent 0.0625rem);
  background-size: 3.125rem 3.125rem;
}

/* ============================================
   PROSE STYLING FOR MARKDOWN CONTENT
   ============================================ */

.prose {
  color: var(--color-light-soft);
  line-height: 1.75;
  max-width: 100%;
}

.prose > * + * {
  margin-top: 1.5em;
}

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

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

.prose h4 {
  color: var(--color-primary-light);
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* Paragraphs */
.prose p {
  margin-bottom: 1.25em;
  color: var(--color-light-soft);
}

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

.prose em {
  color: var(--color-primary-light);
  font-style: italic;
}

/* Links */
.prose a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 0.1875rem;
  transition: color var(--transition-base);
}

.prose a:hover {
  color: var(--color-secondary-light);
}

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

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

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

.prose li {
  margin-bottom: 0.5em;
  color: var(--color-light-soft);
  padding-left: 0.5em;
}

.prose li::marker {
  color: var(--color-primary);
}

.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 var(--color-primary);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--color-light);
}

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

/* Tables */
.prose .table-responsive {
  overflow-x: auto;
  margin: 1.5em 0;
  border-radius: 0.5rem;
  border: 0.0625rem solid rgba(148, 163, 184, 0.2);
}

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

.prose thead {
  background: rgba(99, 102, 241, 0.15);
}

.prose th {
  padding: 1em;
  text-align: left;
  font-weight: 600;
  color: var(--color-light);
  white-space: nowrap;
}

.prose td {
  padding: 1em;
  border-top: 0.0625rem solid rgba(148, 163, 184, 0.15);
  color: var(--color-light-soft);
}

.prose tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* Code */
.prose code {
  background: rgba(99, 102, 241, 0.15);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: var(--color-primary-light);
  font-family: ui-monospace, monospace;
}

.prose pre {
  background: rgba(15, 23, 42, 0.8);
  padding: 1.25em;
  border-radius: 0.5rem;
  overflow-x: auto;
  border: 0.0625rem solid rgba(148, 163, 184, 0.2);
}

.prose pre code {
  background: transparent;
  padding: 0;
  color: var(--color-light-soft);
}

/* Horizontal Rule */
.prose hr {
  border: none;
  height: 0.0625rem;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin: 2.5em 0;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5em 0;
  box-shadow: var(--shadow-soft);
}

/* Definition Lists */
.prose dl {
  margin: 1.5em 0;
}

.prose dt {
  font-weight: 600;
  color: var(--color-light);
  margin-top: 1em;
}

.prose dd {
  margin-left: 1.5em;
  color: var(--color-light-soft);
}

/* ---------- Utility Classes ---------- */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(30, 27, 75, 0.7);
  backdrop-filter: blur(0.625rem);
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 64rem) {
  .prose h2 {
    margin-top: 2em;
  }
  
  .prose h3 {
    margin-top: 1.5em;
  }
}

@media (max-width: 48rem) {
  .prose {
    font-size: 0.9375rem;
  }
  
  .prose blockquote {
    padding: 0.75em 1em;
  }
  
  .prose th,
  .prose td {
    padding: 0.75em;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--color-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-dark);
  border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ---------- Selection ---------- */
::selection {
  background: var(--color-primary);
  color: var(--color-surface);
}
