/* ===========================
   Sparks Balance – Mobile Optimized
   =========================== */
.hfc-sparks-card {
  position: relative; overflow: hidden; color: #fff;
  border-radius: 20px; padding: 20px 24px; margin: 12px 0 18px;
  background: linear-gradient(90deg, #f24f7c 0%, #7b5ed6 50%, #22c1d6 100%);
  /* Schatten etwas reduziert für Mobile Rendering */
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  /* GPU Layer erzwingen für flüssiges Scrollen wenn Sticky */
  transform: translateZ(0); 
  will-change: transform;
}

.hfc-sparks-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url('https://app.luca1998s.com/wp-content/plugins/youzify/includes/public/assets/images/geopattern.png');
  background-size: 240px auto; background-repeat: repeat;
  opacity: .55;
}

/* --- HEADERS --- */
.hfc-sparks-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; text-transform: uppercase; font-size: 10px; opacity: .95;
}

.hfc-sparks-diamond {
  display: inline-block; width: 13px; height: 13px; background: #fff;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 3 9 8l3 13 3-13-3-5Zm7 5-4-5H9L5 8l7 13 7-13Z"/></svg>') center/contain no-repeat;
  mask: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iYmxhY2siIGQ9Ik0xMiAzIDkgOGwzIDEzIDMtMTMtMy01Wm03IDUtNC01SDlMNSA4bDcgMTMgNy0xM1oiLz48L3N2Zz4=') center/contain no-repeat;
}

/* Betragzeile */
.hfc-sparks-amount {
  display: flex; align-items: center; gap: clamp(4px,1.3vw,10px);
  margin: 12px 0 14px; flex-wrap: nowrap;
}
.hfc-sparks-value {
  font-variant-numeric: tabular-nums;
  font-size: clamp(22px, 6.6vw, 36px);
  line-height: 1; font-weight: 800; letter-spacing: .01em;
}
.hfc-sparks-slash { font-size: clamp(15px,4.5vw,24px); line-height: 1; opacity: .55; margin: 0 2px; }

.hfc-sparks-unit {
  display: inline-flex; align-items: center;
  font-size: clamp(8px,2.5vw,11px); font-weight: 800; letter-spacing: .16em;
  padding: .28rem .65rem; border-radius: 999px; 
  background: rgba(255,255,255,.18);
  white-space: nowrap; line-height: 1;
}
.hfc-sparks-unit::before { content: "⚡"; margin-right: .38rem; font-size: 1em; line-height: 1 }

/* === RANK CONTAINER === */
.hfc-sparks-rank {
  display: flex; align-items: center; gap: 0; 
  padding: 12px 16px; border-radius: 14px; 
  
  /* PERFORMANCE FIX: Kein Blur mehr, dafür solidere Farbe */
  background: rgba(255, 255, 255, 0.25); 
  border: 1px solid rgba(255, 255, 255, 0.2);
}

a.hfc-rank-left {
    display: flex; flex-direction: column; align-items: center;
    margin-right: 14px; flex-shrink: 0;
    text-decoration: none !important; color: #fff !important;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s;
}
a.hfc-rank-left:hover { transform: scale(1.05); opacity: 0.9; }

.hfc-rank-avatar {
    width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hfc-rank-username {
    font-size: 9px; font-weight: 700; opacity: 0.85; margin-top: 4px; letter-spacing: 0.02em;
}

.hfc-rank-info {
    flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 100%; min-width: 0;
}

.hfc-rank-title-row { line-height: 1; display: flex; align-items: baseline; }
.hfc-rank-prefix { font-size: 10px; font-weight: 700; opacity: 0.7; margin-right: 5px; }
.youzify-user-level-title { 
    white-space: nowrap; font-size: clamp(11px, 2.5vw, 13px); font-weight: 800;
    color: inherit; text-transform: uppercase; letter-spacing: .12em;
}

.hfc-rank-progress-wrap {
    display: flex; align-items: center; gap: 8px; width: 100%; padding-right: 5px; box-sizing: border-box;
}

.hfc-rank-bar-bg {
    flex: 1; height: 6px; 
    background: rgba(0,0,0,0.3); 
    padding: 1px; border-radius: 4px; position: relative;
}

.hfc-rank-bar-width-wrap { height: 100%; position: relative; }

.hfc-fill-visual {
    width: 100%; height: 100%; border-radius: 2px;
    background-image: linear-gradient(90deg, #ffffff 0%, #e08aff 50%, #00c3ff 100%);
    position: relative; overflow: hidden; 
}

/* Shimmer Animation leicht angepasst */
.hfc-fill-visual::after {
    content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 50%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
    mix-blend-mode: normal; /* Overlay ist teuer, normal ist billig */
    opacity: 0.7;
    transform: translateX(-150%);
    animation: hfc-color-pulse 2.5s infinite linear;
}

@keyframes hfc-color-pulse {
    0% { transform: translateX(-150%); }
    100% { transform: translateX(250%); }
}

.hfc-moving-rank-icon {
    position: absolute; top: 50%; right: 0; transform: translate(50%, -50%); 
    width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); z-index: 2; 
}

.hfc-percent-text {
    font-size: 10px; font-weight: 700; opacity: 0.9;
    font-variant-numeric: tabular-nums; z-index: 5; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.hfc-sparks-card.is-sticky { position: sticky; top: 8px; z-index: 3; }

/* Mobile Anpassungen */
@media (max-width: 768px){
  .hfc-sparks-head { font-size: 14px }
  .hfc-sparks-diamond { width: 18px; height: 18px }
  .hfc-sparks-value { font-size: clamp(32px, 9.5vw, 52px) }
  .hfc-sparks-slash { font-size: clamp(22px,6.5vw,34px) }
  .hfc-sparks-unit { font-size: clamp(12px,3.6vw,16px); padding: .35rem .85rem; }
  .hfc-rank-avatar { width: 38px; height: 38px; }
  .youzify-user-level-title { font-size: 14px; }
  .hfc-percent-text { font-size: 11px; }
  .hfc-rank-bar-bg { height: 7px; }
  .hfc-moving-rank-icon { width: 30px; height: 30px; }
}

@media (max-width: 380px){
  .hfc-sparks-value { font-size: clamp(28px, 11vw, 44px) }
  .hfc-sparks-unit { letter-spacing: .12em; padding: .24rem .56rem }
}