/* ========================================
   Binnary Pulse North Theme - Custom CSS
   ======================================== */

/* CSS Variables */
:root {
  --pulse-primary: #00d4ff;
  --pulse-secondary: #7c3aed;
  --pulse-accent: #f59e0b;
  --pulse-dark: #0a0e1a;
  --pulse-darker: #050810;
  --pulse-surface: #111827;
  --pulse-surface-light: #1f2937;
  --pulse-text: #f1f5f9;
  --pulse-text-muted: #94a3b8;
  --pulse-success: #10b981;
  --pulse-border: #374151;
}

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

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 1.25rem rgba(0, 212, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 2.5rem rgba(0, 212, 255, 0.6);
  }
}

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

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(1.875rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes tiltIn {
  from {
    opacity: 0;
    transform: perspective(62.5rem) rotateX(10deg);
  }
  to {
    opacity: 1;
    transform: perspective(62.5rem) rotateX(0);
  }
}

@keyframes borderPulse {
  0%, 100% {
    border-color: var(--pulse-primary);
  }
  50% {
    border-color: var(--pulse-secondary);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================================
   Animation Utility Classes
   ======================================== */

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

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

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

.animate-slide-up {
  animation: slideInUp 0.6s ease-out forwards;
}

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

.animate-tilt-in {
  animation: tiltIn 0.7s ease-out forwards;
}

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

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

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ========================================
   Parallax & Tilt Effects
   ======================================== */

.parallax-container {
  perspective: 62.5rem;
  transform-style: preserve-3d;
}

.parallax-layer {
  transition: transform 0.3s ease-out;
}

.tilt-card {
  transition: transform 0.3s ease-out;
  transform-style: preserve-3d;
}

.tilt-card:hover {
  transform: perspective(62.5rem) rotateX(5deg) rotateY(-5deg) scale(1.02);
}

/* ========================================
   Component Overrides
   ======================================== */

.btn-primary {
  background: linear-gradient(135deg, var(--pulse-primary), var(--pulse-secondary));
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--pulse-secondary), var(--pulse-primary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.625rem 1.875rem rgba(0, 212, 255, 0.3);
}

.btn-secondary {
  border: 0.125rem solid var(--pulse-primary);
  background: transparent;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--pulse-primary);
  color: var(--pulse-dark);
  box-shadow: 0 0 1.25rem rgba(0, 212, 255, 0.4);
}

/* Card styles */
.game-card {
  background: var(--pulse-surface);
  border: 0.0625rem solid var(--pulse-border);
  transition: all 0.3s ease;
  overflow: hidden;
}

.game-card:hover {
  border-color: var(--pulse-primary);
  transform: translateY(-0.3125rem);
  box-shadow: 0 0.9375rem 2.5rem rgba(0, 212, 255, 0.15);
}

.promo-card {
  background: linear-gradient(145deg, var(--pulse-surface), var(--pulse-surface-light));
  border: 0.0625rem solid var(--pulse-border);
  transition: all 0.3s ease;
}

.promo-card:hover {
  border-color: var(--pulse-accent);
  box-shadow: 0 0.625rem 1.875rem rgba(245, 158, 11, 0.15);
}

/* Badge styles */
.bonus-badge {
  background: linear-gradient(135deg, var(--pulse-accent), #f97316);
  animation: pulseGlow 2s ease-in-out infinite;
}

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

/* Hero section */
.hero-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 26, 0.7) 0%,
    rgba(10, 14, 26, 0.85) 50%,
    rgba(10, 14, 26, 0.95) 100%
  );
}

/* Navigation */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

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

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

/* Mobile menu */
.mobile-menu {
  background: var(--pulse-surface);
  backdrop-filter: blur(0.625rem);
}

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

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  margin-bottom: 1.5rem;
}

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

.table-responsive::-webkit-scrollbar-track {
  background: var(--pulse-surface);
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--pulse-border);
  border-radius: 0.25rem;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--pulse-primary);
}

/* ========================================
   Prose Styling for Markdown Content
   ======================================== */

.prose {
  color: var(--pulse-text);
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.75;
}

.prose h2 {
  color: var(--pulse-text);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 0.125rem solid var(--pulse-primary);
  position: relative;
}

.prose h2::before {
  content: '';
  position: absolute;
  bottom: -0.125rem;
  left: 0;
  width: 3.75rem;
  height: 0.125rem;
  background: var(--pulse-accent);
}

.prose h3 {
  color: var(--pulse-text);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 0.25rem solid var(--pulse-secondary);
}

.prose h4 {
  color: var(--pulse-text);
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  color: var(--pulse-text-muted);
  margin-bottom: 1.25rem;
  text-align: left;
}

.prose a {
  color: var(--pulse-primary);
  text-decoration: none;
  border-bottom: 0.0625rem solid transparent;
  transition: all 0.3s ease;
}

.prose a:hover {
  color: var(--pulse-accent);
  border-bottom-color: var(--pulse-accent);
}

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

.prose em {
  color: var(--pulse-text);
  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: var(--pulse-text-muted);
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.625rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--pulse-primary);
  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: var(--pulse-text-muted);
  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, var(--pulse-primary), var(--pulse-secondary));
  color: var(--pulse-dark);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.prose thead {
  background: linear-gradient(135deg, var(--pulse-surface-light), var(--pulse-surface));
}

.prose th {
  color: var(--pulse-text);
  font-weight: 600;
  text-align: left;
  padding: 1rem;
  border-bottom: 0.125rem solid var(--pulse-primary);
  white-space: nowrap;
}

.prose td {
  color: var(--pulse-text-muted);
  padding: 1rem;
  border-bottom: 0.0625rem solid var(--pulse-border);
  vertical-align: top;
}

.prose tbody tr {
  transition: background 0.3s ease;
}

.prose tbody tr:hover {
  background: rgba(0, 212, 255, 0.05);
}

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

/* Prose Blockquotes */
.prose blockquote {
  background: linear-gradient(135deg, var(--pulse-surface), var(--pulse-surface-light));
  border-left: 0.25rem solid var(--pulse-accent);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
  color: var(--pulse-text);
  font-style: italic;
  margin-bottom: 0;
}

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

/* Prose Code */
.prose code {
  background: var(--pulse-surface-light);
  color: var(--pulse-primary);
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.prose pre {
  background: var(--pulse-surface);
  border: 0.0625rem solid var(--pulse-border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

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

/* Prose Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  border: 0.0625rem solid var(--pulse-border);
}

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

/* ========================================
   FAQ Section
   ======================================== */

.faq-item {
  border: 0.0625rem solid var(--pulse-border);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.faq-question {
  background: var(--pulse-surface);
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: var(--pulse-surface-light);
}

.faq-answer {
  background: var(--pulse-surface-light);
  padding: 1.25rem;
  border-top: 0.0625rem solid var(--pulse-border);
}

/* ========================================
   Provider Cloud
   ======================================== */

.provider-tag {
  background: var(--pulse-surface);
  border: 0.0625rem solid var(--pulse-border);
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  font-size: 0.875rem;
  color: var(--pulse-text-muted);
  transition: all 0.3s ease;
}

.provider-tag:hover {
  border-color: var(--pulse-primary);
  color: var(--pulse-primary);
  transform: translateY(-0.125rem);
}

/* ========================================
   Scrollbar Styling
   ======================================== */

::-webkit-scrollbar {
  width: 0.625rem;
}

::-webkit-scrollbar-track {
  background: var(--pulse-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--pulse-surface-light);
  border-radius: 0.3125rem;
}

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

/* ========================================
   Utility Overrides
   ======================================== */

.text-gradient {
  background: linear-gradient(135deg, var(--pulse-primary), var(--pulse-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-gradient {
  border: 0.125rem solid transparent;
  background: linear-gradient(var(--pulse-surface), var(--pulse-surface)) padding-box,
              linear-gradient(135deg, var(--pulse-primary), var(--pulse-secondary)) border-box;
}

.glow-primary {
  box-shadow: 0 0 1.25rem rgba(0, 212, 255, 0.3);
}

.glow-accent {
  box-shadow: 0 0 1.25rem rgba(245, 158, 11, 0.3);
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 48rem) {
  .prose {
    font-size: 0.9375rem;
  }
  
  .prose h2 {
    margin-top: 2rem;
  }
  
  .prose h3 {
    margin-top: 1.5rem;
  }
  
  .prose th,
  .prose td {
    padding: 0.75rem;
  }
}

/* ========================================
   SVG Patterns & Decorations
   ======================================== */

.pattern-dots {
  background-image: radial-gradient(var(--pulse-border) 0.0625rem, transparent 0.0625rem);
  background-size: 1.25rem 1.25rem;
}

.pattern-grid {
  background-image: 
    linear-gradient(var(--pulse-border) 0.0625rem, transparent 0.0625rem),
    linear-gradient(90deg, var(--pulse-border) 0.0625rem, transparent 0.0625rem);
  background-size: 2.5rem 2.5rem;
}

/* ========================================
   18+ Badge Styling
   ======================================== */

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