/* Global Styles */
html,
body,
#root {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Ensure backdrop blur works and no white gaps */
body {
    overflow-x: hidden;
}

/* Mobile-first responsive utilities */
@media (max-width: 640px) {
    /* Reduce padding on mobile */
    .mobile-p {
        padding: 1rem !important;
    }
    
    /* Stack flex items on mobile */
    .mobile-stack {
        flex-direction: column !important;
    }
    
    /* Full width on mobile */
    .mobile-full {
        width: 100% !important;
    }
    
    /* Hide on mobile */
    .mobile-hidden {
        display: none !important;
    }
    
    /* Smaller text on mobile */
    .mobile-text-sm {
        font-size: 0.75rem !important;
    }
}

/* Touch-friendly tap targets */
@media (pointer: coarse) {
    button, a, [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Prevent text size adjustment on mobile */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Prevent overscroll on iOS */
body {
    -webkit-overflow-scrolling: touch;
}

/* Fix for input zoom on iOS */
@media screen and (max-width: 640px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Table responsive wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 600px;
}

/* Glassmorphism Utilities - Default (Dark Mode) */
.glass-card {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    border-radius: 30px;
}

/* Light mode glass card - white background */
html:not(.dark) .glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.08);
    border-radius: 30px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

/* Light mode glass panel */
html:not(.dark) .glass-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
}

.glass-glow-blue {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

.glass-glow-purple {
    background: radial-gradient(circle, hsla(260, 80%, 65%, 0.25) 0%, hsla(260, 80%, 65%, 0) 70%);
}

.glass-glow-rose {
    background: radial-gradient(circle, rgba(244, 63, 94, 0.1) 0%, transparent 70%);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

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

/* Custom Scrollbar - Thin, Rounded, Premium Feel */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #64748b 0%, #94a3b8 100%);
    border-radius: 10px;
    border: 1px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #94a3b8 0%, #cbd5e1 100%);
    background-clip: content-box;
}

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

/* Custom scrollbar class for dropdowns/smaller areas */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #94a3b8 0%, #cbd5e1 100%);
    border-radius: 6px;
    border: 1px solid transparent;
    background-clip: content-box;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #cbd5e1 0%, #e2e8f0 100%);
    background-clip: content-box;
}

/* Firefox */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

/* Animated Gradient Text */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient-text {
    animation: gradientShift 3s ease infinite;
}@tailwind base;
@tailwind components;
@tailwind utilities;

body {
  @apply bg-slate-50 text-slate-900 transition-colors duration-300;
}

/* Dark mode override */
.dark body {
  @apply bg-[#0f172a] text-slate-100;
}

/* ================================
    WINDOW ANIMATOR ANIMATIONS
    ================================ */

/* Backdrop Animation */
@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Scale Animations */
@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes scaleOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.animate-scale-in {
  animation-name: scaleIn;
}

.animate-scale-out {
  animation-name: scaleOut;
}

/* Toast Animations - Slide from right */
@keyframes toastSlideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.animate-slide-in {
  animation: toastSlideIn 0.3s ease-out forwards;
}

.animate-slide-out {
  animation: toastSlideOut 0.2s ease-in forwards;
}

/* Dropdown Animations */
@keyframes dropdownIn {
  0% {
    transform: translateY(-10px) scale(0.95);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes dropdownOut {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-10px) scale(0.95);
    opacity: 0;
  }
}

.animate-dropdown-in {
  animation: dropdownIn 0.2s ease-out forwards;
}

.animate-dropdown-out {
  animation: dropdownOut 0.15s ease-in forwards;
}

/* Fade Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.animate-fade-in {
  animation-name: fadeIn;
}

.animate-fade-out {
  animation-name: fadeOut;
}

/* Bounce Animations */
@keyframes bounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  30% {
    transform: scale(1.15);
  }
  50% {
    transform: scale(0.95);
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bounceOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.animate-bounce-in {
  animation-name: bounceIn;
}

.animate-bounce-out {
  animation-name: bounceOut;
}

/* Flip Animations */
@keyframes flipIn {
  0% {
    transform: perspective(400px) rotateY(90deg);
    opacity: 0;
  }
  100% {
    transform: perspective(400px) rotateY(0deg);
    opacity: 1;
  }
}

@keyframes flipOut {
  0% {
    transform: perspective(400px) rotateY(0deg);
    opacity: 1;
  }
  100% {
    transform: perspective(400px) rotateY(90deg);
    opacity: 0;
  }
}

.animate-flip-in {
  animation-name: flipIn;
  backface-visibility: visible;
}

.animate-flip-out {
  animation-name: flipOut;
  backface-visibility: visible;
}

/* Shrink/Fade Animations (Opening effect) */
@keyframes shrinkFadeIn {
  0% {
    transform: scale(1.1);
    opacity: 0;
    filter: blur(10px);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes expandFadeOut {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: scale(0.9);
    opacity: 0;
    filter: blur(10px);
  }
}

.animate-shrink-fade-in {
  animation-name: shrinkFadeIn;
}

.animate-expand-fade-out {
  animation-name: expandFadeOut;
}

/* Shrink Animations */
@keyframes shrinkIn {
  0% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes expandOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.animate-shrink-in {
  animation-name: shrinkIn;
}

.animate-expand-out {
  animation-name: expandOut;
}

/* Wobble Animations */
@keyframes wobbleIn {
  0% {
    transform: scale(0) rotate(-10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  70% {
    transform: scale(0.95) rotate(-3deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes wobbleOut {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(0) rotate(10deg);
    opacity: 0;
  }
}

.animate-wobble-in {
  animation-name: wobbleIn;
}

.animate-wobble-out {
  animation-name: wobbleOut;
}

/* Pulse Animations */
@keyframes pulseIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 20px rgba(99, 102, 241, 0);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

@keyframes pulseOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0;
  }
}

.animate-pulse-in {
  animation-name: pulseIn;
}

.animate-pulse-out {
  animation-name: pulseOut;
}

/* ================================
   CHARACTER SHAKE TEXT ANIMATION
   ================================ */

@keyframes charShake {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  10% {
    transform: translateY(-3px) rotate(-5deg);
  }
  20% {
    transform: translateY(3px) rotate(5deg);
  }
  30% {
    transform: translateY(-3px) rotate(-3deg);
  }
  40% {
    transform: translateY(3px) rotate(3deg);
  }
  50% {
    transform: translateY(-2px) rotate(-2deg);
  }
  60% {
    transform: translateY(2px) rotate(2deg);
  }
  70% {
    transform: translateY(-1px) rotate(-1deg);
  }
  80% {
    transform: translateY(1px) rotate(1deg);
  }
  90% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

.char-shake {
  animation-name: charShake;
}

/* ================================
   USAGE CLASSES (Optional)
   ================================ */

.window-container {
  @apply rounded-2xl border shadow-2xl;
}

.window-container.dark {
  @apply bg-slate-900 border-slate-700;
}

.window-container.light {
  @apply bg-white border-slate-200;
}
