/* Frontend User Badges Styling */
.user-badges-frontend {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Single Badge Styling */
.single-badge {
    position: relative;
    overflow: hidden;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    min-width: 140px;
    padding: 12px 20px !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.single-badge:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
}

.single-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.8s;
}

.single-badge:hover::before {
    left: 100%;
}

.single-badge i {
    font-size: 1.3em !important;
    margin-right: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.single-badge span {
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-size: 0.95em;
}

.user-badges-frontend .badge-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    margin: 0;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--badge-color, #007bff) 0%, var(--badge-color, #007bff)dd 100%);
    color: white;
}

.user-badges-frontend .badge-custom::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.6s;
}

.user-badges-frontend .badge-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    border-color: rgba(255,255,255,0.4);
}

.user-badges-frontend .badge-custom:hover::before {
    left: 100%;
}

.user-badges-frontend .badge-custom i {
    font-size: 1.2em;
    margin: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.user-badges-frontend .badge-custom span {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Badge Card Styling */
.badge-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
    margin-bottom: 20px;
}

.badge-card .card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-bottom: none;
    padding: 15px 20px;
}

.badge-card .card-header h5 {
    margin: 0;
    font-weight: 600;
    color: white;
}

.badge-card .card-header i {
    margin-right: 8px;
    color: #ffc107;
}

.badge-card .card-body {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-badges-frontend {
        gap: 8px;
        justify-content: center;
    }
    
    .user-badges-frontend .badge-custom {
        padding: 8px 15px;
        font-size: 0.85em;
    }
    
    .user-badges-frontend .badge-custom i {
        font-size: 1.1em;
    }
}

@media (max-width: 576px) {
    .user-badges-frontend {
        gap: 6px;
    }
    
    .user-badges-frontend .badge-custom {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .user-badges-frontend .badge-custom i {
        font-size: 1em;
    }
}

/* Animation for badge loading */
@keyframes badgeFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-badges-frontend .badge-custom {
    animation: badgeFadeInUp 0.4s ease-out;
}

.user-badges-frontend .badge-custom:nth-child(1) { animation-delay: 0.1s; }
.user-badges-frontend .badge-custom:nth-child(2) { animation-delay: 0.2s; }
.user-badges-frontend .badge-custom:nth-child(3) { animation-delay: 0.3s; }
.user-badges-frontend .badge-custom:nth-child(4) { animation-delay: 0.4s; }
.user-badges-frontend .badge-custom:nth-child(5) { animation-delay: 0.5s; }
.user-badges-frontend .badge-custom:nth-child(6) { animation-delay: 0.6s; }

/* Badge count indicator for frontend */
.badge-count-frontend {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65em;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Enhanced hover effects */
.badge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

/* User Welcome Section with Icon */
.user-welcome-section {
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.user-welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.welcome-content {
    position: relative;
    z-index: 2;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-icon {
    font-size: 3.5em;
    color: rgba(255,255,255,0.9);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: userIconFloat 3s ease-in-out infinite;
    z-index: 2;
}

#fallback-icon,
#alt-icon-1,
#alt-icon-2 {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

@keyframes userIconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.user-icon-clicked {
    animation: userIconClick 0.5s ease-out;
}

@keyframes userIconClick {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.user-details {
    flex: 1;
}

.welcome-text {
    color: rgba(255,255,255,0.8);
    font-size: 1.1em;
    font-weight: 400;
    margin: 0 0 5px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-name {
    color: white;
    font-size: 2.2em;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.user-badge-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    backdrop-filter: blur(10px);
}

.badge-icon {
    color: #ffc107;
    font-size: 1.1em;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.badge-text {
    color: white;
    font-weight: 600;
    font-size: 0.9em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Responsive Design for Welcome Section */
@media (max-width: 768px) {
    .user-welcome-section {
        padding: 20px;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .user-icon {
        font-size: 3em;
    }
    
    .user-name {
        font-size: 1.8em;
    }
    
    .welcome-text {
        font-size: 1em;
    }
}

@media (max-width: 576px) {
    .user-welcome-section {
        padding: 15px;
    }
    
    .user-name {
        font-size: 1.5em;
    }
    
    .user-icon {
        font-size: 2.5em;
    }
}

/* Badge glow effect */
.user-badges-frontend .badge-custom {
    position: relative;
}

.user-badges-frontend .badge-custom::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    border-radius: 27px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-badges-frontend .badge-custom:hover::after {
    opacity: 1;
}

/* Click animation */
.badge-clicked {
    animation: badgeClick 0.3s ease-out;
}

@keyframes badgeClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Pulse animation for badge count */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Enhanced badge card hover */
.badge-card:hover .card-header {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transition: all 0.3s ease;
}

/* Badge tooltip effect */
.badge-custom {
    cursor: pointer;
}

.badge-custom:hover {
    position: relative;
}

.badge-custom:hover::before {
    content: attr(data-badge-name);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
} 