/* --- LUXURY SAAS PREMIUM ANIMATIONS --- */

:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-glow: rgba(99, 102, 241, 0.15);
}

/* 1. GLASSMORPHIC UTILITY */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* 2. SHIMMER BUTTON EFFECT */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: rotate(35deg);
    transition: 0.5s;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-150%) rotate(35deg); }
    100% { transform: translateX(150%) rotate(35deg); }
}

/* 3. FLOATING GLASS SPHERES */
.glass-sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), transparent);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    z-index: -1;
    pointer-events: none;
    animation: drift 20s infinite alternate ease-in-out;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, -50px) scale(1.2); }
}

/* 4. DASHBOARD CONTAINER FIXES */
.dashboard-container {
    position: relative;
    z-index: 10;
}

.preserve-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.dashboard-tilt {
    position: relative; /* REQUIRED for absolute children */
    transition: transform 0.1s ease-out;
    filter: drop-shadow(0 30px 60px rgba(99, 102, 241, 0.15));
}

/* 5. FLOATING CARDS (REFINED) */
.floating-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    position: absolute; /* SHOULD NOT STRETCH NOW */
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content; /* PREVENTS STRETCHING */
    white-space: nowrap;
}

.card-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: white;
}

.card-info { line-height: 1.2; }
.card-label { font-size: 0.7rem; font-weight: 700; color: #64748b; text-transform: uppercase; margin-bottom: 2px; }
.card-value { font-size: 0.9rem; font-weight: 800; color: #0f172a; }

@keyframes floatGentle {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-15px) rotate(2deg); }
}

.float-1 { animation: floatGentle 4s infinite alternate ease-in-out; }
.float-2 { animation: floatGentle 5s infinite alternate-reverse ease-in-out; }
.float-3 { animation: floatGentle 6s infinite alternate ease-in-out; }

/* 6. DYNAMIC HERO BADGE (FIXED) */
.hero-badge-premium {
    background: linear-gradient(135deg, #e0e7ff 0%, #ffffff 100%);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    display: flex; /* USING FLEX */
    width: fit-content; /* PREVENTS STRETCHING */
    align-items: center;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
}

.badge-dot {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.badge-dot::after {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Language Fix */
.nav-item.dropdown .dropdown-toggle::after {
    display: none !important;
}

/* RESPONSIVE REFINEMENTS */
@media (max-width: 991px) {
    .glass-sphere { display: none; }
    .hero-badge-premium { margin: 0 auto 25px auto !important; }
}
