/* ===================================
   VISUAL POLISH
   =================================== */

/* Subtle Background Patterns */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(229, 9, 20, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(229, 9, 20, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Noise Texture Overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

/* Glass Morphism Effects */
.glass {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-light {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Enhanced Header with Glass Effect */
header {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Elevation System (Material Design Inspired) */
.elevation-1 {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12),
              0 1px 2px rgba(0, 0, 0, 0.24);
}

.elevation-2 {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15),
              0 2px 4px rgba(0, 0, 0, 0.12);
}

.elevation-3 {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15),
              0 3px 6px rgba(0, 0, 0, 0.10);
}

.elevation-4 {
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15),
              0 5px 10px rgba(0, 0, 0, 0.05);
}

.elevation-5 {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2),
              0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Glow Effects */
.glow-primary {
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.3),
              0 0 40px rgba(229, 9, 20, 0.1);
}

.glow-primary-strong {
  box-shadow: 0 0 30px rgba(229, 9, 20, 0.5),
              0 0 60px rgba(229, 9, 20, 0.2);
}

/* Gradient Backgrounds */
.gradient-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.gradient-dark {
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
}

.gradient-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

/* Border Radius System */
.radius-sm {
  border-radius: 4px;
}

.radius-md {
  border-radius: 8px;
}

.radius-lg {
  border-radius: 12px;
}

.radius-xl {
  border-radius: 16px;
}

.radius-2xl {
  border-radius: 24px;
}

.radius-full {
  border-radius: 9999px;
}

/* Typography Hierarchy */
.text-display {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.text-h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
}

.text-h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
}

.text-h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.text-body-lg {
  font-size: 1.125rem;
  line-height: 1.6;
}

.text-body {
  font-size: 1rem;
  line-height: 1.6;
}

.text-body-sm {
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-caption {
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* Enhanced Color Contrast */
.text-high-contrast {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.bg-high-contrast {
  background: #000000;
  color: #ffffff;
}

/* Subtle Dividers */
.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-subtle),
    transparent
  );
  margin: 2rem 0;
}

.divider-vertical {
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--border-subtle),
    transparent
  );
}

/* Enhanced Cards */
.card-enhanced {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
}

.card-enhanced:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(229, 9, 20, 0.3);
}

/* Frosted Glass Panels */
.frosted-panel {
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

.gradient-text-gold {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shimmer Effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer-slide 2s infinite;
}

@keyframes shimmer-slide {
  to {
    left: 100%;
  }
}

/* Spotlight Effect */
.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.spotlight:hover::before {
  opacity: 1;
}

/* Enhanced Buttons */
.btn-enhanced {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
  transition: all 0.3s ease;
}

.btn-enhanced::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-enhanced:hover::before {
  left: 100%;
}

.btn-enhanced:hover {
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
  transform: translateY(-2px);
}

/* Neon Glow Effect */
.neon-glow {
  text-shadow:
    0 0 10px rgba(229, 9, 20, 0.8),
    0 0 20px rgba(229, 9, 20, 0.6),
    0 0 30px rgba(229, 9, 20, 0.4);
}

/* Subtle Animations */
.float-subtle {
  animation: float-subtle 3s ease-in-out infinite;
}

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

/* Gradient Borders */
.gradient-border {
  position: relative;
  background: var(--bg-card);
  border-radius: 12px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 6px;
  border: 2px solid var(--bg-tertiary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* Selection Styling */
::selection {
  background: var(--accent-primary);
  color: white;
}

::-moz-selection {
  background: var(--accent-primary);
  color: white;
}

/* Smooth Transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Focus States */
*:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.1);
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .modal,
  .dropdown-menu,
  .toast {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* Color Palette Variables Enhancement */
:root {
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
}

/* Responsive Typography */
@media (max-width: 768px) {
  .text-display {
    font-size: 2rem;
  }

  .text-h1 {
    font-size: 1.75rem;
  }

  .text-h2 {
    font-size: 1.5rem;
  }

  .text-h3 {
    font-size: 1.25rem;
  }
}

/* Print Optimization */
@media print {
  .glass,
  .glass-light,
  .glass-strong,
  .frosted-panel {
    background: white !important;
    backdrop-filter: none !important;
  }

  .gradient-text {
    -webkit-text-fill-color: initial !important;
    color: black !important;
  }
}
