/* ============================================
   PassFid — Custom Styles & Animations
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed, #06b6d4);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8b5cf6, #22d3ee);
}

/* ===== Keyframe Animations ===== */

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-1deg); }
}

@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -50px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 50px) scale(1.05); }
}

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

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

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

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

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

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

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

@keyframes card-shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* ===== Animation Classes ===== */

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

.animate-float-delayed {
    animation: float-delayed 6s ease-in-out infinite;
    animation-delay: 1.5s;
}

.animate-blob {
    animation: blob 12s ease-in-out infinite;
}

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

.animate-scroll {
    animation: scroll-left 30s linear infinite;
}

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

.animate-shimmer {
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* ===== Glassmorphism ===== */

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

.glass-strong {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.glass-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.9) 100%);
    border-color: rgba(124, 58, 237, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -15px rgba(124, 58, 237, 0.15);
}

/* ===== Gradient Text ===== */

.gradient-text {
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-hero {
    background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 30%, #06b6d4 60%, #4c1d95 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-shift 6s ease infinite;
}

/* ===== Card Shine Effect ===== */

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

.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: rotate(25deg);
    animation: card-shine 6s ease-in-out infinite;
}

/* ===== Gradient Borders ===== */

.gradient-border {
    position: relative;
    background: #ffffff;
    border-radius: 1rem;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #7c3aed, #06b6d4, #7c3aed);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ===== Phone Mockup Styles ===== */

.phone-frame {
    background: linear-gradient(145deg, #1e1b34 0%, #13111f 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 2.5rem;
    padding: 12px;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 25px 80px -15px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.phone-notch {
    width: 120px;
    height: 28px;
    background: #0d0b15;
    border-radius: 0 0 1.2rem 1.2rem;
    margin: 0 auto;
    position: relative;
    top: -1px;
}

.phone-camera {
    width: 24px;
    height: 24px;
    background: #0d0b15;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}

/* ===== Wallet Card Styles ===== */

.wallet-card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-card:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 50px -10px rgba(0, 0, 0, 0.5);
}

/* ===== Barcode Pattern ===== */

.barcode {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    height: 50px;
}

.barcode span {
    display: block;
    height: 100%;
    background: #333;
    border-radius: 1px;
}

/* ===== Button Effects ===== */

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #7c3aed, #06b6d4, #a855f7);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
    filter: blur(8px);
}

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

/* ===== Modal Backdrop ===== */

.modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ===== Input Styles ===== */

input[type="color"] {
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* ===== Section Dividers ===== */

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.3), transparent);
}

/* ===== KPI Card Pulse ===== */

.kpi-pulse {
    position: relative;
}

.kpi-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: inherit;
    border: 1px solid rgba(124, 58, 237, 0.2);
    animation: pulse-ring 3s ease-out infinite;
    pointer-events: none;
}

/* ===== Recharts Tooltip Custom ===== */

.recharts-default-tooltip {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(124, 58, 237, 0.15) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.recharts-tooltip-label {
    color: #7c3aed !important;
    font-weight: 600 !important;
}

.recharts-tooltip-item {
    color: #334155 !important;
}

/* ===== Responsive tweaks ===== */

@media (max-width: 768px) {
    .phone-frame {
        border-radius: 1.8rem;
        padding: 8px;
    }
    
    .phone-notch {
        width: 90px;
        height: 22px;
    }
}
