/* =============================================
   Profile Page Visual Enhancements
   Description: Beautiful glassmorphic profile design with UiTM branding
   ============================================= */

/* Profile Main Container - Animated Gradient Background */
.profile-page main,
body.profile-page main {
    background: linear-gradient(135deg,
            #F5F0FA 0%,
            #FFFFFF 25%,
            #FFFEF0 50%,
            #F5F0FA 100%);
    background-size: 400% 400%;
    animation: gradientWave 20s ease-in-out infinite;
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

@keyframes gradientWave {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Profile Header/Banner - Glassmorphic Card */
.profile-header,
.user-profile-header,
.profile-header-card {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 2px solid rgba(255, 215, 0, 0.3) !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 40px rgba(58, 11, 97, 0.15) !important;
    padding: 2.5rem !important;
    margin-bottom: 2rem !important;
    position: relative;
    overflow: hidden;
}

/* Profile Header Gradient Overlay */
.profile-header::before,
.profile-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(135deg,
            rgba(58, 11, 97, 0.1) 0%,
            rgba(255, 215, 0, 0.1) 100%);
    z-index: 0;
}

.profile-header>*,
.profile-header-card>* {
    position: relative;
    z-index: 1;
}

/* Profile Avatar - Enhanced with Golden Ring */
.profile-avatar,
.user-avatar,
.profile-avatar-container img {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    border: 4px solid var(--uitm-gold, #FFD700) !important;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4),
        0 0 0 8px rgba(255, 255, 255, 0.5) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    object-fit: cover !important;
}

.profile-avatar:hover,
.profile-avatar-container img:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.6),
        0 0 0 12px rgba(255, 255, 255, 0.6) !important;
}

/* Profile Info - Beautiful Typography */
.profile-info h2,
.user-info h2,
.profile-text h2 {
    background: linear-gradient(135deg, #3A0B61 0%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.5rem !important;
}

.profile-info p,
.user-info p,
.profile-text p {
    color: #64748B !important;
    font-size: 1rem !important;
    margin: 0.25rem 0 !important;
}

/* Profile Stats Row - Premium Dashboard Style */
.profile-stats-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    margin-top: 2.5rem !important;
    padding-top: 2rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Individual Stat Item - Glassmorphic Card */
.stat-item {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 16px !important;
    padding: 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 0;
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 10px 30px rgba(58, 11, 97, 0.1),
        0 0 0 2px rgba(255, 215, 0, 0.3) !important;
}

/* Stat Icon - Floating & Colorful */
.stat-icon {
    width: 50px !important;
    height: 50px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    position: relative !important;
    z-index: 1 !important;
    transition: transform 0.3s ease !important;
}

/* Specific Icon Colors */
.stat-item:nth-child(1) .stat-icon {
    background: rgba(58, 11, 97, 0.1) !important;
    color: var(--uitm-purple, #3A0B61) !important;
}

.stat-item:nth-child(2) .stat-icon {
    background: rgba(255, 215, 0, 0.15) !important;
    color: #B7950B !important;
    /* Darker gold for visibility */
}

.stat-item:nth-child(3) .stat-icon {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
    /* Emerald green */
}

.stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Stat Details */
.stat-details {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 1 !important;
}

.stat-value {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    background: linear-gradient(135deg, #3A0B61 0%, #2E004F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem !important;
    color: #64748B !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Profile Tabs - Modern Design */
.profile-tabs,
.tab-navigation {
    display: flex !important;
    gap: 0.5rem !important;
    margin-bottom: 2rem !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    padding: 0.75rem !important;
    border-radius: 16px !important;
    border: 2px solid rgba(255, 215, 0, 0.2) !important;
    box-shadow: 0 4px 12px rgba(58, 11, 97, 0.1) !important;
}

.tab-button,
.profile-tabs button {
    flex: 1 !important;
    padding: 0.875rem 1.5rem !important;
    border: none !important;
    background: transparent !important;
    color: #64748B !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}

.tab-button:hover {
    background: rgba(255, 215, 0, 0.1) !important;
    color: var(--uitm-purple, #3A0B61) !important;
}

.tab-button.active,
.profile-tabs button.active {
    background: linear-gradient(135deg, #3A0B61 0%, #2E004F 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(58, 11, 97, 0.3) !important;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #2E004F;
}

/* Book Cards - Enhanced Glassmorphism */
.book-card,
.listing-card {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    border: 2px solid rgba(255, 215, 0, 0.2) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 0 4px 12px rgba(58, 11, 97, 0.1) !important;
}

.book-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--uitm-gold, #FFD700);
    box-shadow: 0 16px 32px rgba(255, 215, 0, 0.3) !important;
}

.book-card img {
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.book-card:hover img {
    transform: scale(1.05);
}

/* Price Tags - Golden Highlight */
.price,
.book-price {
    color: var(--uitm-gold, #FFD700) !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3) !important;
}

/* Action Buttons - UiTM Styled */
.profile-action-btn,
.btn-profile-action {
    background: linear-gradient(135deg, #3A0B61 0%, #2E004F 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(58, 11, 97, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}

.profile-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(58, 11, 97, 0.4) !important;
}

/* Empty State - Beautiful Illustration */
.empty-state {
    text-align: center !important;
    padding: 4rem 2rem !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    border-radius: 16px !important;
    border: 2px dashed rgba(255, 215, 0, 0.3) !important;
}

.empty-state i {
    font-size: 4rem !important;
    color: rgba(58, 11, 97, 0.3) !important;
    margin-bottom: 1rem !important;
}

.empty-state h3 {
    color: var(--uitm-purple, #3A0B61) !important;
    margin-bottom: 0.5rem !important;
}

.empty-state p {
    color: #64748B !important;
}

/* Responsive Design */
@media (max-width: 768px) {

    .profile-header,
    .profile-header-card {
        padding: 1.5rem !important;
    }

    .profile-avatar,
    .profile-avatar-container img {
        width: 90px !important;
        height: 90px !important;
    }

    .profile-stats-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .profile-tabs {
        flex-direction: column !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .profile-page main {
        animation: none !important;
    }

    .profile-avatar:hover,
    .stat-item:hover,
    .book-card:hover {
        transform: none !important;
    }
}