/* Modern presentation styles with gradient and noise */

/* Global styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Enhanced gradient background with visible styling */
#root {
  min-height: 100vh;
  position: relative;
  background: 
    /* Medium-grain high contrast noise texture */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeConvolveMatrix order='3' kernelMatrix='0 -1 0 -1 5 -1 0 -1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.18'/%3E%3C/svg%3E"),
    /* Dark overlay to tone down vibrancy */
    linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
    /* Toned down gradient overlay */
    linear-gradient(135deg, 
      rgba(255, 100, 0, 0.4) 0%, 
      rgba(220, 0, 100, 0.45) 25%,
      rgba(150, 0, 150, 0.5) 50%,
      rgba(0, 100, 200, 0.45) 75%,
      rgba(0, 150, 255, 0.4) 100%
    ),
    /* Subtle radial gradients for depth */
    radial-gradient(circle at 15% 85%, rgba(255, 80, 0, 0.2) 0%, transparent 60%),
    radial-gradient(circle at 85% 15%, rgba(0, 120, 255, 0.2) 0%, transparent 60%),
    /* Very dark base */
    #0a0a15;
  background-attachment: fixed;
}

/* Slide container enhancements with better visibility */
[data-mdxp-slide] {
  background: rgba(10, 10, 21, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
}

@supports (backdrop-filter: blur(1px)) {
  [data-mdxp-slide] {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(10, 10, 21, 0.6);
  }
}

/* Enhanced typography with drop shadows */
h1, h2, h3, h4, h5, h6 {
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Text shadows for body text */
p, li, span, div {
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Smooth animations with reduced scope to avoid performance issues */
a, button, input, textarea, select {
  transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Enhanced focus styles */
*:focus {
  outline: 2px solid #007aff;
  outline-offset: 2px;
}

/* Selection colors */
::selection {
  background: rgba(0, 122, 255, 0.2);
  color: inherit;
}

::-moz-selection {
  background: rgba(0, 122, 255, 0.2);
  color: inherit;
}

/* Slide navigation improvements with fallback */
.mdxp-grid {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@supports (backdrop-filter: blur(1px)) {
  .mdxp-grid {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.8);
  }
}

/* Code block improvements - Clean Glass effect */
pre code {
  background: none !important;
}

pre {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

@supports (backdrop-filter: blur(1px)) {
  pre {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

/* List improvements */
ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

li::marker {
  color: #007aff;
}

/* Link improvements */
a {
  color: #007aff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease-in-out;
}

a:hover {
  border-bottom-color: #007aff;
}

/* Blockquote improvements with fallback */
blockquote {
  background: rgba(245, 245, 247, 0.9);
  border-radius: 8px;
  padding: 1rem 1.5rem;
}

@supports (backdrop-filter: blur(1px)) {
  blockquote {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background: rgba(245, 245, 247, 0.6);
  }
}

/* Table improvements */
table {
  border-collapse: collapse;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

th {
  background: rgba(245, 245, 247, 0.8);
  font-weight: 600;
}

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

/* Image improvements */
img {
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Ensure visibility in all deployment scenarios */
.mdxp-presentation {
  background: #fafbfc !important;
  min-height: 100vh;
}

/* Override any potential theme conflicts */
[data-theme="light"] #root,
[data-theme="default"] #root,
#root {
  background-color: #fafbfc !important;
}


