@import "tailwindcss";
@plugin "daisyui";

/* ------------------------------------------------------ */
/* 🚀 Source Paths                                         */
/* ------------------------------------------------------ */

@source "../../../templates/**/*.html";
@source "../../../**/*.py";

/* ------------------------------------------------------ */
/* 🛡️ Safelist - Dynamic Classes                          */
/* ------------------------------------------------------ */

@source inline("tab-active");
@source inline("input select textarea file-input file-input-primary");
@source inline("btn btn-primary btn-secondary btn-success btn-error btn-info btn-outline btn-ghost btn-sm btn-lg btn-circle");
@source inline("card card-body card-title card-actions");
@source inline("form-control label label-text label-text-alt");
@source inline("alert alert-error alert-info alert-success alert-warning");
@source inline("badge badge-primary badge-secondary badge-outline badge-sm badge-lg");
@source inline("modal modal-box modal-action modal-backdrop modal-bottom modal-middle");
@source inline("navbar footer footer-center divider avatar tabs tabs-boxed tab tab-lg");
@source inline("table thead tbody tr th td");
@source inline("shadow shadow-sm shadow-md shadow-lg shadow-xl shadow-2xl");
@source inline("ring ring-primary ring-offset-base-100 ring-offset-2");
@source inline("w-full h-full min-h-screen max-w-lg max-w-md max-w-2xl max-w-4xl");
@source inline("flex flex-col flex-row flex-grow flex-1 items-center justify-center justify-between gap-2 gap-3 gap-4 gap-6");
@source inline("text-center text-right text-left text-xs text-sm text-lg text-xl text-2xl text-3xl text-4xl");
@source inline("text-white text-primary text-gray-400 text-gray-500 text-gray-600 text-gray-700 text-gray-800 text-error text-green-600 text-blue-600");
@source inline("bg-base-100 bg-base-200 bg-base-300 bg-gray-50 bg-gray-200 bg-primary bg-primary/10 bg-blue-50");
@source inline("font-bold font-semibold font-medium font-mono");
@source inline("border border-b border-t border-gray-100 border-gray-200 border-gray-300 rounded rounded-lg rounded-xl rounded-2xl rounded-3xl rounded-b-lg rounded-full");
@source inline("p-1 p-2 p-4 p-6 p-8 px-2 px-4 px-6 px-8 py-2 py-3 py-4 py-6 py-10 py-12");
@source inline("m-0 mb-0.5 mb-1 mb-2 mb-3 mb-4 mb-6 mb-8 mt-1 mt-4 mt-6 mt-8 mt-10 mx-auto ml-2");
@source inline("space-y-4 space-y-6 space-x-2 space-x-4");
@source inline("overflow-x-auto overflow-y-auto overflow-hidden max-h-48");
@source inline("absolute relative fixed sticky z-10 z-20 z-30 z-40 z-50 top-0 top-3.5 left-0 left-4 right-0 bottom-0 inset-0");
@source inline("opacity-0 opacity-50 opacity-75 opacity-90 opacity-100 translate-y-0 translate-y-2");
@source inline("transition transition-all transition-colors transition-transform transition-opacity duration-150 duration-200 duration-300 duration-500 ease-out ease-in-out");
@source inline("animate-pulse animate-spin animate-bounce hover:bg-primary hover:bg-gray-50 hover:bg-blue-50 hover:text-white hover:text-primary hover:border-gray-400 hover:scale-105 hover:scale-110 hover:-translate-y-1");
@source inline("cursor-pointer whitespace-nowrap uppercase lowercase capitalize inline inline-block leading-none leading-tight leading-relaxed tracking-tight tracking-wide");
@source inline("object-contain object-cover object-center no-animation last:border-0 first:mt-0");
@source inline("grid grid-cols-1 grid-cols-2 grid-cols-3 md:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 md:flex-row md:w-1/3 md:w-1/4 md:mt-0 sm:flex-row sm:modal-middle");
@source inline("h-4 h-6 h-8 h-10 h-12 h-16 h-20 h-24 h-32 h-auto w-3/4 w-10 w-12 w-16 w-20 w-24 w-32 w-40 w-48");
@source inline("dark:bg-gray-900 dark:bg-gray-800 dark:text-white dark:text-gray-100 dark:border-gray-700");
@source inline("backdrop-blur backdrop-blur-sm backdrop-blur-md backdrop-blur-lg backdrop-blur-xl bg-opacity-50 bg-opacity-75 bg-opacity-90");
@source inline("blur blur-sm blur-md grayscale saturate-150 brightness-110");
@source inline("group group-hover:opacity-100 group-hover:translate-y-0 group-hover:scale-105");
@source inline("hover:shadow-lg hover:shadow-xl hover:shadow-2xl focus:ring-2 focus:ring-primary focus:outline-none");
@source inline("before:absolute after:absolute before:content-[''] after:content-['']");

/* ------------------------------------------------------ */
/* 🎨 Google Fonts                                         */
/* ------------------------------------------------------ */

@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* ------------------------------------------------------ */
/* 🎯 Theme Configuration                                  */
/* ------------------------------------------------------ */

@theme {
  --font-sans: "Cairo", "Inter", ui-sans-serif, system-ui, sans-serif;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-accent: #8b5cf6;
  --color-accent-hover: #7c3aed;

  /* Modern Shadows */
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07),
    0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 4px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 30px -5px rgba(0, 0, 0, 0.04);
  --shadow-large: 0 10px 40px -10px rgba(0, 0, 0, 0.15),
    0 20px 50px -15px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px -10px rgba(37, 99, 235, 0.3);
  --shadow-glow-accent: 0 0 40px -10px rgba(139, 92, 246, 0.3);

  /* Animations */
  --animate-fade-in: fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --animate-slide-up: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --animate-slide-down: slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --animate-scale-in: scale-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --animate-blur-in: blur-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------------------------------ */
/* 🌈 Modern DaisyUI Theme - Light                         */
/* ------------------------------------------------------ */

:root {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Premium Light Theme */
  --primary: #2563eb;
  --primary-content: #ffffff;

  --secondary: #0ea5e9;
  --secondary-content: #ffffff;

  --accent: #8b5cf6;
  --accent-content: #ffffff;

  --neutral: #1e293b;
  --neutral-content: #f8fafc;

  --base-100: #ffffff;
  --base-200: #f8fafc;
  --base-300: #f1f5f9;
  --base-content: #0f172a;

  --info: #06b6d4;
  --info-content: #ffffff;

  --success: #10b981;
  --success-content: #ffffff;

  --warning: #f59e0b;
  --warning-content: #ffffff;

  --error: #ef4444;
  --error-content: #ffffff;

  /* Modern Rounded Corners */
  --rounded-box: 1.25rem;
  --rounded-btn: 0.75rem;
  --rounded-badge: 1.5rem;

  --border: 1px;
  --depth: 1;
  --animation-btn: 0.2s;
  --animation-input: 0.15s;
}

/* ------------------------------------------------------ */
/* 🌙 Modern DaisyUI Theme - Dark                          */
/* ------------------------------------------------------ */

[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-content: #ffffff;

  --secondary: #22d3ee;
  --secondary-content: #000000;

  --accent: #a78bfa;
  --accent-content: #000000;

  --neutral: #1e293b;
  --neutral-content: #e2e8f0;

  --base-100: #0f172a;
  --base-200: #1e293b;
  --base-300: #334155;
  --base-content: #f1f5f9;

  --info: #22d3ee;
  --info-content: #000000;

  --success: #34d399;
  --success-content: #000000;

  --warning: #fbbf24;
  --warning-content: #000000;

  --error: #f87171;
  --error-content: #000000;
}

/* ------------------------------------------------------ */
/* ✨ Premium Keyframe Animations                          */
/* ------------------------------------------------------ */

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes blur-in {
  from {
    opacity: 0;
    filter: blur(10px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(1deg);
  }
  75% {
    transform: translateY(-5px) rotate(-1deg);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

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

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.4);
  }
}

@keyframes border-flow {
  0%,
  100% {
    border-color: var(--primary);
  }
  50% {
    border-color: var(--accent);
  }
}

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

@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(3deg);
  }
}

@keyframes ping-slow {
  75%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ------------------------------------------------------ */
/* 🎯 Modern Animation Utilities                           */
/* ------------------------------------------------------ */

@layer utilities {
  /* RTL */
  .rtl-flip {
    @apply -scale-x-100;
  }

  /* Fade Animations */
  .animate-fade-in {
    animation: fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .animate-fade-in-fast {
    animation: fade-in 0.3s ease-out forwards;
  }

  /* Slide Animations */
  .animate-slide-up {
    animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .animate-slide-down {
    animation: slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .animate-slide-in-right {
    animation: slide-in-right 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  /* Scale Animations */
  .animate-scale-in {
    animation: scale-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .animate-bounce-in {
    animation: bounce-in 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  }

  /* Continuous Animations */
  .animate-float {
    animation: float 6s ease-in-out infinite;
  }

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

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

  .animate-wiggle {
    animation: wiggle 0.5s ease-in-out infinite;
  }

  .animate-ping-slow {
    animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  }

  /* Shimmer Effects */
  .animate-shimmer {
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.5) 50%,
      transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
  }

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

  .animate-text-shimmer {
    background: linear-gradient(
      90deg,
      var(--primary) 0%,
      var(--accent) 50%,
      var(--primary) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-shimmer 3s linear infinite;
  }

  /* Blur Animation */
  .animate-blur-in {
    animation: blur-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  /* Stagger Delays */
  .stagger-1 {
    animation-delay: 0.1s;
  }
  .stagger-2 {
    animation-delay: 0.2s;
  }
  .stagger-3 {
    animation-delay: 0.3s;
  }
  .stagger-4 {
    animation-delay: 0.4s;
  }
  .stagger-5 {
    animation-delay: 0.5s;
  }

  /* ------------------------------------------------------ */
  /* 🌟 Glassmorphism Effects                               */
  /* ------------------------------------------------------ */

  .glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .glass-premium {
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
      inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  /* ------------------------------------------------------ */
  /* 🎨 Gradient Utilities                                  */
  /* ------------------------------------------------------ */

  .bg-gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  }

  .bg-gradient-accent {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  }

  .bg-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  }

  .bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  }

  .bg-gradient-cool {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }

  .bg-gradient-warm {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  }

  .bg-gradient-ocean {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  }

  .bg-gradient-sunset {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  }

  .bg-gradient-mesh {
    background: radial-gradient(
        at 40% 20%,
        hsla(228, 100%, 74%, 0.3) 0px,
        transparent 50%
      ),
      radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 0.3) 0px, transparent 50%),
      radial-gradient(at 0% 50%, hsla(355, 100%, 93%, 0.3) 0px, transparent 50%),
      radial-gradient(
        at 80% 50%,
        hsla(340, 100%, 76%, 0.3) 0px,
        transparent 50%
      ),
      radial-gradient(
        at 0% 100%,
        hsla(269, 100%, 77%, 0.3) 0px,
        transparent 50%
      ),
      radial-gradient(
        at 80% 100%,
        hsla(242, 100%, 70%, 0.3) 0px,
        transparent 50%
      ),
      radial-gradient(at 0% 0%, hsla(343, 100%, 76%, 0.3) 0px, transparent 50%);
    background-color: var(--base-100);
  }

  /* Text Gradients */
  .text-gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .text-gradient-accent {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* ------------------------------------------------------ */
  /* 🌊 Modern Shadow Utilities                             */
  /* ------------------------------------------------------ */

  .shadow-soft {
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07),
      0 10px 20px -2px rgba(0, 0, 0, 0.04);
  }

  .shadow-medium {
    box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.1),
      0 10px 30px -5px rgba(0, 0, 0, 0.04);
  }

  .shadow-large {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15),
      0 20px 50px -15px rgba(0, 0, 0, 0.1);
  }

  .shadow-glow {
    box-shadow: 0 0 40px -10px rgba(37, 99, 235, 0.3);
  }

  .shadow-glow-accent {
    box-shadow: 0 0 40px -10px rgba(139, 92, 246, 0.3);
  }

  .shadow-glow-success {
    box-shadow: 0 0 40px -10px rgba(16, 185, 129, 0.3);
  }

  .shadow-inner-glow {
    box-shadow: inset 0 0 20px rgba(37, 99, 235, 0.1);
  }

  /* Colored shadows */
  .shadow-primary {
    box-shadow: 0 10px 40px -10px rgba(37, 99, 235, 0.4);
  }

  .shadow-accent {
    box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.4);
  }

  /* ------------------------------------------------------ */
  /* 🎯 Interactive Hover Effects                           */
  /* ------------------------------------------------------ */

  .hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
  }

  .hover-scale {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .hover-scale:hover {
    transform: scale(1.02);
  }

  .hover-glow {
    transition: all 0.3s ease;
  }

  .hover-glow:hover {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
  }

  .hover-shine {
    position: relative;
    overflow: hidden;
  }

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

  .hover-shine:hover::before {
    left: 100%;
  }

  .hover-border-glow {
    position: relative;
    transition: all 0.3s ease;
  }

  .hover-border-glow::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(
      45deg,
      var(--primary),
      var(--accent),
      var(--primary)
    );
    background-size: 200% 200%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradient-shift 3s ease infinite;
  }

  .hover-border-glow:hover::before {
    opacity: 1;
  }

  /* Magnetic hover effect container */
  .hover-magnetic {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* ------------------------------------------------------ */
  /* 📝 Modern Typography                                   */
  /* ------------------------------------------------------ */

  .text-balance {
    text-wrap: balance;
  }

  .text-pretty {
    text-wrap: pretty;
  }

  .prose-modern {
    font-feature-settings: "kern" 1, "liga" 1;
    letter-spacing: -0.01em;
  }

  .heading-xl {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .heading-lg {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  .heading-md {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
  }

  /* ------------------------------------------------------ */
  /* 🔲 Card Utilities                                      */
  /* ------------------------------------------------------ */

  .card-modern {
    background: var(--base-100);
    border-radius: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.12);
  }

  .card-interactive {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .card-interactive:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
  }

  .card-interactive:active {
    transform: translateY(-2px) scale(0.99);
  }

  /* ------------------------------------------------------ */
  /* 🔘 Button Utilities                                    */
  /* ------------------------------------------------------ */

  .btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-modern::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      135deg,
      transparent 40%,
      rgba(255, 255, 255, 0.2) 50%,
      transparent 60%
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
  }

  .btn-modern:hover::before {
    transform: translateX(100%);
  }

  .btn-glow {
    transition: all 0.3s ease;
  }

  .btn-glow:hover {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.5);
  }

  /* ------------------------------------------------------ */
  /* 📊 Skeleton Loading                                    */
  /* ------------------------------------------------------ */

  .skeleton-modern {
    background: linear-gradient(
      90deg,
      var(--base-200) 0%,
      var(--base-300) 50%,
      var(--base-200) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
  }

  .skeleton-text {
    height: 1em;
    border-radius: 0.25rem;
  }

  .skeleton-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
  }

  /* ------------------------------------------------------ */
  /* 🎚️ Focus States                                        */
  /* ------------------------------------------------------ */

  .focus-ring-modern {
    transition: all 0.2s ease;
  }

  .focus-ring-modern:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--base-100), 0 0 0 4px var(--primary);
  }

  .focus-glow:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
  }
}

/* ------------------------------------------------------ */
/* 🎨 Enhanced Component Styles                            */
/* ------------------------------------------------------ */

@layer components {
  /* Premium Input Styling */
  .input,
  .select,
  .textarea {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-color: var(--base-300);
    background-color: var(--base-100);
  }

  .input:hover,
  .select:hover,
  .textarea:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.05);
  }

  .input:focus,
  .select:focus,
  .textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1),
      0 4px 12px rgba(37, 99, 235, 0.08);
  }

  /* Premium Button Styling */
  .btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
  }

  .btn:not(.btn-ghost):not(.btn-outline):not(.btn-link):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.15);
  }

  .btn:active {
    transform: translateY(0) scale(0.98);
  }

  .btn-primary:hover {
    box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.4);
  }

  .btn-secondary:hover {
    box-shadow: 0 8px 24px -4px rgba(14, 165, 233, 0.4);
  }

  .btn-accent:hover {
    box-shadow: 0 8px 24px -4px rgba(139, 92, 246, 0.4);
  }

  .btn-success:hover {
    box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.4);
  }

  .btn-error:hover {
    box-shadow: 0 8px 24px -4px rgba(239, 68, 68, 0.4);
  }

  /* Premium Card Styling */
  .card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
  }

  .card:hover {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.12);
  }

  /* Premium Badge Styling */
  .badge {
    transition: all 0.2s ease;
    font-weight: 500;
  }

  .badge:hover {
    transform: scale(1.05);
  }

  /* Premium Alert Styling */
  .alert {
    animation: slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.1);
  }

  /* Premium Modal Styling */
  .modal-box {
    animation: scale-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 80px -20px rgba(0, 0, 0, 0.25);
  }

  /* Premium Table Styling */
  .table tbody tr {
    transition: all 0.2s ease;
  }

  .table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.03);
  }

  /* Premium Tabs Styling */
  .tab {
    transition: all 0.2s ease;
    position: relative;
  }

  .tab:hover:not(.tab-active) {
    background-color: rgba(37, 99, 235, 0.05);
  }

  .tabs-boxed .tab-active {
    background: linear-gradient(
      135deg,
      var(--primary) 0%,
      rgba(37, 99, 235, 0.9) 100%
    );
    color: white;
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.3);
  }

  /* Premium Navbar Styling */
  .navbar {
    transition: all 0.3s ease;
  }

  /* Premium Divider */
  .divider {
    opacity: 0.5;
  }

  .divider::before,
  .divider::after {
    background: linear-gradient(
      90deg,
      transparent,
      var(--base-300),
      transparent
    );
  }
}

/* ------------------------------------------------------ */
/* 🌙 Dark Mode Enhancements                               */
/* ------------------------------------------------------ */

[data-theme="dark"] {
  .input,
  .select,
  .textarea {
    background-color: var(--base-200);
    border-color: var(--base-300);
  }

  .input:hover,
  .select:hover,
  .textarea:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }

  .input:focus,
  .select:focus,
  .textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15),
      0 4px 12px rgba(59, 130, 246, 0.1);
  }

  .card {
    background-color: var(--base-200);
    border: 1px solid var(--base-300);
  }

  .card:hover {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    border-color: rgba(59, 130, 246, 0.2);
  }

  .btn:not(.btn-ghost):not(.btn-outline):not(.btn-link):hover {
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  }

  .table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
  }

  .glass {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .shadow-glow {
    box-shadow: 0 0 40px -10px rgba(59, 130, 246, 0.4);
  }

  .bg-gradient-mesh {
    background: radial-gradient(
        at 40% 20%,
        hsla(228, 100%, 50%, 0.15) 0px,
        transparent 50%
      ),
      radial-gradient(
        at 80% 0%,
        hsla(189, 100%, 40%, 0.15) 0px,
        transparent 50%
      ),
      radial-gradient(at 0% 50%, hsla(355, 100%, 50%, 0.1) 0px, transparent 50%),
      radial-gradient(
        at 80% 50%,
        hsla(340, 100%, 50%, 0.1) 0px,
        transparent 50%
      );
    background-color: var(--base-100);
  }
}

/* ------------------------------------------------------ */
/* 🌊 Page & Element Transitions                           */
/* ------------------------------------------------------ */

main {
  animation: fade-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Staggered children animation */
.stagger-children > * {
  opacity: 0;
  animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stagger-children > *:nth-child(1) {
  animation-delay: 0.1s;
}
.stagger-children > *:nth-child(2) {
  animation-delay: 0.2s;
}
.stagger-children > *:nth-child(3) {
  animation-delay: 0.3s;
}
.stagger-children > *:nth-child(4) {
  animation-delay: 0.4s;
}
.stagger-children > *:nth-child(5) {
  animation-delay: 0.5s;
}
.stagger-children > *:nth-child(6) {
  animation-delay: 0.6s;
}

/* ------------------------------------------------------ */
/* 📐 Premium Scrollbar                                    */
/* ------------------------------------------------------ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--base-300);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
  border: 2px solid transparent;
  background-clip: content-box;
}

[data-theme="dark"]::-webkit-scrollbar-thumb {
  background: var(--base-300);
  border: 2px solid transparent;
  background-clip: content-box;
}

[data-theme="dark"]::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
  border: 2px solid transparent;
  background-clip: content-box;
}

/* ------------------------------------------------------ */
/* ✅ Premium Selection                                    */
/* ------------------------------------------------------ */

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

/* ------------------------------------------------------ */
/* 🎭 View Transitions (Modern Browsers)                   */
/* ------------------------------------------------------ */

@supports (view-transition-name: none) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.3s;
  }
}

/* ------------------------------------------------------ */
/* 📱 Responsive Utilities                                 */
/* ------------------------------------------------------ */

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