/* ========================================
   SavePaisa - Professional UI Enhancements
   Custom Styles & Animations
   ======================================== */

/* ===== Custom Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== Animation Utility Classes ===== */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Stagger animations */
.animate-stagger>* {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-stagger>*:nth-child(1) {
    animation-delay: 0.1s;
}

.animate-stagger>*:nth-child(2) {
    animation-delay: 0.2s;
}

.animate-stagger>*:nth-child(3) {
    animation-delay: 0.3s;
}

.animate-stagger>*:nth-child(4) {
    animation-delay: 0.4s;
}

.animate-stagger>*:nth-child(5) {
    animation-delay: 0.5s;
}

.animate-stagger>*:nth-child(6) {
    animation-delay: 0.6s;
}

/* ===== Enhanced Button Effects ===== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

.btn-gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ===== Card Enhancements ===== */
.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-3d-tilt {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.card-3d-tilt:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(5deg);
}

/* ===== Glassmorphism Effects ===== */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, #12bf8a 0%, #0b8057 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Loading Skeleton ===== */
.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 0%,
            #f8f8f8 50%,
            #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

/* ===== Progress Bars ===== */
.progress-gradient {
    background: linear-gradient(90deg, #12bf8a 0%, #5df2bd 100%);
}

.progress-animated {
    position: relative;
    overflow: hidden;
}

.progress-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 2s infinite;
}

/* ===== Badges & Status Indicators ===== */
.badge-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.online {
    background-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-dot.offline {
    background-color: #6b7280;
}

/* ===== Form Enhancements ===== */
.form-floating-custom label {
    transition: all 0.3s ease;
}

.form-floating-custom input:focus~label,
.form-floating-custom input:not(:placeholder-shown)~label {
    transform: translateY(-1.5rem) scale(0.85);
    color: #12bf8a;
}

.input-icon-left {
    padding-left: 2.5rem !important;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    transition: color 0.3s ease;
}

.input-icon-wrapper input:focus~i {
    color: #12bf8a;
}

/* ===== Tooltip Enhancements ===== */
.tooltip-custom {
    position: relative;
}

.tooltip-custom::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 6px 12px;
    background: #1f2937;
    color: white;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tooltip-custom:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ===== Stats Counter ===== */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #12bf8a 0%, #0b8057 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0b8057 0%, #12bf8a 100%);
}

/* ===== Responsive Utilities ===== */
@media (max-width: 768px) {
    .card-hover-lift:hover {
        transform: translateY(-4px);
    }

    .animate-stagger>* {
        animation-delay: 0s !important;
    }
}

/* ===== Print Styles ===== */
@media print {
    .no-print {
        display: none !important;
    }
}

/* ===== Custom Utilities ===== */
.bg-primary-soft {
    background-color: rgba(18, 191, 138, 0.1) !important;
}

.bg-secondary-soft {
    background-color: rgba(93, 242, 189, 0.1) !important;
}

.bg-success-soft {
    background-color: rgba(0, 200, 83, 0.1) !important;
}

.bg-danger-soft {
    background-color: rgba(255, 82, 82, 0.1) !important;
}

.bg-warning-soft {
    background-color: rgba(255, 179, 0, 0.1) !important;
}

.bg-info-soft {
    background-color: rgba(33, 150, 243, 0.1) !important;
}

.text-primary-dark {
    color: var(--primary-dark) !important;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}