/* ═══════════════════════════════════════════════════════════════════
   RASID DESIGN SYSTEM — Ultra Premium Overlay v2.0
   Enhances the existing design with advanced effects
   ═══════════════════════════════════════════════════════════════════ */

/* ═══ ENHANCED NEBULA BACKGROUND ═══ */
body::before {
  content: '';
  position: fixed;
  top: -15%;
  right: -10%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--nebula-1, rgba(39,52,112,0.06)) 0%, transparent 70%);
  filter: blur(100px);
  animation: nebula-drift-ultra 22s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -15%;
  left: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--nebula-2, rgba(61,177,172,0.05)) 0%, transparent 70%);
  filter: blur(120px);
  animation: nebula-drift-ultra-2 28s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes nebula-drift-ultra {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  25% { transform: translate(40px, -30px) scale(1.08); opacity: 0.7; }
  50% { transform: translate(-30px, 20px) scale(0.92); opacity: 0.6; }
  75% { transform: translate(20px, 35px) scale(1.04); opacity: 0.55; }
}
@keyframes nebula-drift-ultra-2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  33% { transform: translate(-35px, 25px) scale(0.93); opacity: 0.6; }
  66% { transform: translate(25px, -20px) scale(1.07); opacity: 0.5; }
}

/* ═══ ENHANCED CARD HOVER EFFECTS ═══ */
[class*="glass-card"],
[class*="premium-card"],
[class*="card-hover"],
[data-slot="card"] {
  transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[class*="glass-card"]:hover,
[class*="premium-card"]:hover,
[class*="card-hover"]:hover {
  transform: translateY(-5px) !important;
  box-shadow: var(--glass-hover-shadow), 0 0 30px var(--glow-color, rgba(39,52,112,0.15)) !important;
}

/* ═══ ENHANCED GLASSMORPHISM ═══ */
[class*="glass-card"],
[class*="glass-surface"] {
  backdrop-filter: blur(28px) saturate(1.6) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.6) !important;
}

.dark [class*="glass-card"],
.dark [class*="glass-surface"] {
  backdrop-filter: blur(32px) saturate(2) !important;
  -webkit-backdrop-filter: blur(32px) saturate(2) !important;
}

/* ═══ ENHANCED SCROLLBAR ═══ */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(39, 52, 112, 0.03);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(39, 52, 112, 0.22), rgba(100, 89, 167, 0.22));
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(39, 52, 112, 0.4), rgba(100, 89, 167, 0.4));
}
.dark ::-webkit-scrollbar-track {
  background: rgba(10, 22, 40, 0.5);
}
.dark ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(61, 177, 172, 0.3), rgba(100, 89, 167, 0.3));
  border-color: rgba(61, 177, 172, 0.1);
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(61, 177, 172, 0.5), rgba(100, 89, 167, 0.5));
}

/* ═══ ENHANCED SELECTION ═══ */
::selection {
  background: rgba(61, 177, 172, 0.2);
  color: inherit;
}
.dark ::selection {
  background: rgba(61, 177, 172, 0.3);
}

/* ═══ ENHANCED BUTTONS ═══ */
button, [role="button"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
button:active, [role="button"]:active {
  transform: scale(0.97) !important;
}

/* ═══ ENHANCED FOCUS STATES ═══ */
input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: var(--glow-color, rgba(39, 52, 112, 0.4)) !important;
  box-shadow: 0 0 0 3px rgba(39, 52, 112, 0.12), 0 0 16px rgba(39, 52, 112, 0.06) !important;
}
.dark input:focus, .dark textarea:focus, .dark select:focus {
  border-color: rgba(61, 177, 172, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(61, 177, 172, 0.15), 0 0 16px rgba(61, 177, 172, 0.08) !important;
}

/* ═══ ENHANCED TABLE STYLING ═══ */
table tbody tr {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
table tbody tr:hover {
  background: rgba(39, 52, 112, 0.04) !important;
  transform: scale(1.002);
}
.dark table tbody tr:hover {
  background: rgba(61, 177, 172, 0.06) !important;
}

/* ═══ ENHANCED BADGES ═══ */
[data-slot="badge"] {
  backdrop-filter: blur(8px) !important;
  transition: all 0.3s ease !important;
}

/* ═══ ENHANCED DIALOG/MODAL ═══ */
[data-slot="dialog-overlay"] {
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}
.dark [data-slot="dialog-overlay"] {
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}
[data-slot="dialog-content"] {
  backdrop-filter: blur(28px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.5) !important;
}

/* ═══ ENHANCED TOOLTIPS ═══ */
[data-slot="tooltip-content"] {
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* ═══ ENHANCED DROPDOWNS ═══ */
[data-slot="select-content"],
[data-slot="dropdown-menu-content"] {
  backdrop-filter: blur(24px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.5) !important;
}

/* ═══ ENHANCED TABS ═══ */
[role="tablist"] {
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
[role="tab"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
[role="tab"][data-state="active"] {
  box-shadow: 0 2px 12px rgba(39, 52, 112, 0.08) !important;
}
.dark [role="tab"][data-state="active"] {
  box-shadow: 0 2px 12px rgba(61, 177, 172, 0.12) !important;
}

/* ═══ ADDITIONAL PREMIUM KEYFRAMES ═══ */
@keyframes ultra-glow-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--glow-color, rgba(39,52,112,0.2)); }
  50% { box-shadow: 0 0 28px var(--glow-color, rgba(39,52,112,0.4)); }
}

@keyframes ultra-border-breathe {
  0%, 100% { border-color: var(--glass-border, rgba(39,52,112,0.1)); }
  50% { border-color: var(--glow-color, rgba(39,52,112,0.3)); }
}

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

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

/* ═══ SMOOTH THEME TRANSITION ═══ */
html {
  transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s ease !important;
}
* {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease, box-shadow 0.3s ease;
}

/* ═══ ENHANCED SKELETON LOADING ═══ */
[class*="skeleton"],
[class*="Skeleton"] {
  background: linear-gradient(90deg, 
    rgba(39, 52, 112, 0.04) 0%, 
    rgba(39, 52, 112, 0.08) 50%, 
    rgba(39, 52, 112, 0.04) 100%) !important;
  background-size: 200% 100% !important;
  animation: ultra-shimmer 1.8s ease-in-out infinite !important;
}
.dark [class*="skeleton"],
.dark [class*="Skeleton"] {
  background: linear-gradient(90deg, 
    rgba(61, 177, 172, 0.04) 0%, 
    rgba(61, 177, 172, 0.1) 50%, 
    rgba(61, 177, 172, 0.04) 100%) !important;
}

/* ═══ ENHANCED FONT RENDERING ═══ */
body {
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}

/* ═══ REDUCED MOTION SUPPORT ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
