/* =========================================
   HFL PROFILE HUB STYLES (V11.0 - FINAL)
   ========================================= */

/* 
   1. KILL OLD LAYOUT (NUR AUF PROFILSEITEN!)
   WICHTIG: 'body.bp-user' sorgt dafür, dass wir nur auf Profilen löschen.
   Der Feed (/now/) bleibt dadurch sichtbar!
*/
body.bp-user .youzify-right-sidebar-layout, 
body.bp-user .youzify-main-column,
body.bp-user .youzify-sidebar-column {
    display: none !important;
}

body.bp-user .youzify-page-main-content {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: block !important;
}

/* 2. HUB CONTAINER */
.hfl-profile-hub {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
    color: #fff; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 3. GLASS BOXEN */
.hfl-hub-section {
    background: rgba(255, 255, 255, 0.25); 
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative; 
}

/* Header */
.hfl-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 15px;
}

.hfl-hub-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #fff; 
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.hfl-hub-header h3 .dashicons { color: rgba(255,255,255,0.9); }

.hfl-hub-count {
    font-size: 11px;
    background: rgba(0,0,0,0.2);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
}

.hfl-hub-tag {
    font-size: 9px;
    background: linear-gradient(90deg, #f24f7c, #7b5ed6);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

/* 4. PFEILE */
.hfl-scroll-arrow {
    display: none; 
    position: absolute;
    top: 60%; 
    transform: translateY(-50%);
    width: 24px;
    height: auto;
    z-index: 10;
    opacity: 0.8;
    pointer-events: none; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.hfl-arrow-left { left: 5px; }
.hfl-arrow-right { right: 5px; }


/* 5. RANK SCROLL CONTAINER */
.hfl-hub-ranks-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto; 
    padding: 0 0 15px 0;
    scroll-behavior: smooth; 
    scrollbar-width: none;
    
    /* Scroll Snap für Einrast-Effekt */
    scroll-snap-type: x mandatory;
}
.hfl-hub-ranks-scroll::-webkit-scrollbar { display: none; }

/* Einzelne Rank Karte */
.hfl-rank-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px; 
    max-width: 100px;
    text-align: center;
    position: relative;
    
    /* Items rasten in der Mitte ein */
    scroll-snap-align: center;
}

/* Ausnahme: Erstes Item rastet links ein */
.hfl-rank-item:first-child {
    scroll-snap-align: start;
}

.hfl-rank-locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* BADGE WRAPPER */
.hfl-rank-img-wrap {
    width: 90px; height: 90px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
    transition: transform 0.2s;
    filter: drop-shadow(0 5px 8px rgba(0,0,0,0.25));
}

.hfl-rank-item:hover .hfl-rank-img-wrap { transform: translateY(-3px); }

.hfl-rank-icon-inner {
    width: 45px; height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.hfl-rank-name {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
    text-transform: uppercase;
    color: #fff; 
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    white-space: normal; 
    word-wrap: break-word;
    height: 28px; 
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.hfl-status-wrapper {
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* STATUS LABEL */
.hfl-rank-status {
    font-size: 9px;
    font-family: monospace;
    border-radius: 4px;
    padding: 2px 8px;
    font-weight: bold;
    letter-spacing: 0.05em;
    white-space: nowrap; 
}

.hfl-rank-status.earned {
    color: #fff;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.hfl-rank-status.locked {
    color: rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.1);
}

/* MINI PROGRESS ROW */
.hfl-mini-progress-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.hfl-mini-bar-bg {
    flex: 1;
    height: 6px; 
    background: rgba(0,0,0,0.3); 
    padding: 1px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
    border-radius: 4px;
    overflow: hidden;
    box-sizing: border-box;
}

.hfl-mini-bar-fill {
    height: 100%;
    background-image: linear-gradient(90deg, #ffffff 0%, #e08aff 50%, #00c3ff 100%);
    background-repeat: no-repeat;
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(224, 138, 255, 0.7);
    position: relative;
    overflow: hidden;
}

.hfl-mini-bar-fill::after {
    content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 60%;
    background: linear-gradient(90deg, transparent 0%, rgba(100, 255, 255, 0.8) 50%, transparent 100%);
    mix-blend-mode: overlay; filter: blur(3px);
    transform: translateX(-150%);
    animation: hfc-color-pulse 2.5s infinite cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes hfc-color-pulse {
    0% { transform: translateX(-150%); }
    60% { transform: translateX(250%); } 
    100% { transform: translateX(250%); }
}

.hfl-mini-percent {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    font-family: monospace;
}

/* EMPTY STATES */
.hfl-hub-empty-state {
    text-align: center;
    padding: 40px 0;
    color: rgba(255,255,255,0.6);
}
.hfl-hub-placeholder-icon {
    margin-bottom: 10px;
    display: block;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* MEDIA QUERY */
@media (max-width: 768px) {
    .hfl-hub-ranks-scroll {
        padding-left: 0;
        padding-right: 0;
    }
}