body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: white;
}

/* ===== CARD ===== */
.card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 25px;
    border-radius: 20px;
    margin-top: 160px;

}

/* ===== AVATAR ===== */
.avatar-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}



.avatar-img,
.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;

    position: relative;
    z-index: 2;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #6c63ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ===== INFO ===== */
.info {
    width: 200px;
    z-index: 999;
}

.username {
    margin: 0;
    font-size: 20px;
}

.title {
    margin: 0;
    color: #94a3b8;
}

.level {
    font-size: 13px;
    color: #38bdf8;
}

/* ===== XP BAR ===== */
.xp-bar {
    margin-top: 10px;
    margin-left: 10px;
    width: 250px;
    height: 10px;
    background: #020617;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(56, 248, 130, 0.5);
}


.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    transition: width 1s ease;
}

/* ===== UPLOAD ===== */
.upload-div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ===== BUTTON ===== */
.file-upload {
    padding: 8px 14px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 999px;

    color: #38bdf8;
    cursor: pointer;

    transition: 0.2s;
}

.file-upload:hover {
    background: rgba(56, 189, 248, 0.25);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

#cropBtn {
    padding: 8px 14px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 999px;

    color: #38bdf8;
    cursor: pointer;

    transition: 0.2s;

    margin-bottom: 5px;



}

#cropBtn:hover {
    background: rgba(56, 189, 248, 0.25);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}





.section {
    margin-top: 30px;
}

#customBtn {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.section button {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;

    padding: 6px 8px;
    border-radius: 50px;
    cursor: pointer;

    transition: 0.2s;
}

.section button:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;

    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);

}

.badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
}

.badge {
    background: #1e293b;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.badge:hover {
    transform: scale(1.1);
}

.locked {
    opacity: 0.3;
}

.stats {
    display: flex;
    gap: 20px;
}

.stat {
    background: #1e293b;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    flex: 1;
}

textarea {
    width: 100%;
    background: rgba(2, 6, 23, 0.25);
    /* 0.5 = 50% trasparente */
    color: white;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    padding: 10px;
}

/* ===== CROP CONTAINER ===== */
#cropContainer {
    margin-top: 20px;
    max-width: 350px;
    /* limite desktop */
    width: 100%;
    text-align: center;
}

.container {
    width: 50%;
    margin: auto;

}



/* immagine crop */
#cropImage {
    max-width: 100%;
    max-height: 300px;
    /* evita immagini enormi */
    display: block;
    border-radius: 10px;
}

.avatar-img,
.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    /*border: 4px solid #020617;*/
}

/* immagine dentro avatar */
.avatar-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    width: 120px;
}

#avatarInput {
    max-width: 300px;
    display: none;
    margin-bottom: 10px;
}

.upload-div {
    width: auto;
    height: 100px;
    margin-left: auto;
    align-self: flex-start;
    margin-top: -50px;
}

.avatar-div {
    margin-right: auto;
}

/* bottone custom */
.file-upload {
    display: inline-block;
    padding: 10px 16px;

    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;

    border-radius: 999px;
    cursor: pointer;

    font-size: 14px;
    font-weight: 500;

    transition: 0.2s;
}

/* hover effetto glow */
.file-upload:hover {
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
    transform: translateY(-2px);
}

/* nome file */
#fileName {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #94a3b8;
}

.file-upload {
    border: 2px dashed rgba(56, 189, 248, 0.5);
}




/* ===== HEADER ===== */
.profile-header {
    position: relative;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 60px;

}

/* banner */
.banner {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
}

/* overlay anime */
.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, #020617);
}

/* contenuto sopra */
.header-content {
    position: absolute;
    bottom: 20px;
    left: 20px;

    display: flex;
    display: flex;
    flex-direction: column;
    /* 🔥 QUESTO RISOLVE */
    align-items: flex-start;
    /* allinea a sinistra */
    gap: 20px;
}

/* testo */
.header-info h1 {
    margin: 0;
    font-size: 28px;
}

.header-info p {
    margin: 0;
    color: #94a3b8;
}

.top-row {
    display: flex;
    align-items: center;
    gap: 15px;
}




.banner-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
}

.banner-pagination button {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    cursor: pointer;
}

.banner-pagination button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.banner-loading {
    color: #94a3b8;
}











@media (max-width: 768px) {

    .card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: auto;
    }

    .xp-bar {
        width: 50%;
    }

    .info {
        margin-right: 30%;
        margin-top: 50px;
    }

    .file-upload {
        margin-top: -25px;
    }

    .container {
        width: 75%;
    }


    .avatar,
    .avatar-img {
        width: 90px;
        height: 90px;
        font-size: 30px;
    }

    #cropImage {
        max-height: 220px;
    }


    .profile-header {
        height: 200px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        top: 20px;
    }

    .upload-div {
        align-items: center;
    }

}














.user-card-banner {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

.user-card-banner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: end;
    padding: 16px;
}










.banner-modal[hidden] {
    display: none;
}

.banner-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.banner-modal-content {
    width: min(900px, 100%);
    max-height: 85vh;
    overflow-y: auto;

    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 22px;

    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.banner-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;
}

.banner-modal-header h3 {
    margin: 0;
}

.banner-close {
    border: 0;
    background: transparent;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.banner-option {
    position: relative;
    padding: 0;
    height: 130px;

    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;

    cursor: pointer;
    overflow: hidden;

    transition: 0.2s;
}

.banner-option:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.banner-option.active {
    border-color: #38bdf8;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
}

.banner-option video {
    width: 100%;
    height: 100%;
    object-fit: cover;

    display: block;
    border-radius: 16px;
}

.banner-option small {
    position: absolute;
    right: 10px;
    bottom: 10px;

    padding: 4px 8px;
    border-radius: 999px;

    background: rgba(2, 6, 23, 0.75);
    color: #4ade80;

    font-size: 12px;
    backdrop-filter: blur(6px);
}

.banner-option span {
    display: block;
    margin-top: 8px;

    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .banner-modal {
        align-items: flex-end;
        padding: 0;
    }

    .banner-modal-content {
        border-radius: 22px 22px 0 0;
        max-height: 90vh;
    }

    .banner-grid {
        grid-template-columns: 1fr;
    }

    .banner-option {
        height: 160px;
    }

    .banner-option video {
        height: 140px;
    }
}









/*
.avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    display: grid;
    place-items: center;
}

.avatar-img,
.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    /*border: 4px solid #020617;
    position: relative;
    z-index: 999;
}

.avatar-frame-img {
    position: absolute;
    inset: 0;
    width: 175px;
    height: 175px;
    object-fit: contain;
    z-index: 3;
    pointer-events: none;
    top: -42px;
    left: -17px;

}
    */

.avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    display: grid;
    place-items: center;
}

/* avatar sopra */
.avatar-img,
.avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

/* frame centrato perfetto */
.avatar-frame-img {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 160%;
    /* controlla quanto “esce” */
    height: 160%;

    transform: translate(-50%, -50%);

    object-fit: contain;
    pointer-events: none;
    z-index: 1;
}





.avatar-frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.avatar-frame-option {
    height: 140px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(2, 6, 23, 0.7);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: 0.2s;
}

.avatar-frame-option:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.avatar-frame-preview {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.8);
}

.avatar-frame-preview img {
    width: 110px;
    height: 110px;
    object-fit: contain;
}

.avatar-frame-preview.no-frame {
    border: 1px dashed rgba(148, 163, 184, 0.45);
}


.extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}

.extra-option {
    height: 160px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(2, 6, 23, 0.7);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: 0.2s;
    overflow: hidden;
}

.extra-option:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.extra-preview {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #94a3b8;
}

.extra-preview img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.extra-preview.no-extra {
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 14px;
}




.extra-wrapper {
    position: fixed;
    left: 50%;
    top: 75%;
    bottom: clamp(-280px, -30dvh, -320px);
    transform: translate(-50%, -50%);
    z-index: -1000;
}

.extra-wrapper img {
    width: clamp(300px, 30vw, 320px);
    display: block;
}

html,
body {
    overflow-x: hidden;
}






.extra-wrapper:has(.extra-bigcat) img {
    width: clamp(600px, 60vw, 650px);
}

.extra-wrapper:has(.extra-bigcat) {
    bottom: clamp(-350px, -35dvh, -450px);
    padding-left: 7%;

}

@media (max-width: 768px) {
    .extra-wrapper {
        left: 75%;
        top: clamp(320px, 32dvh, 420px);
        transform: translateX(-50%);
    }

    .extra-wrapper img {
        width: clamp(150px, 35vw, 220px);
    }






    .extra-wrapper:has(.extra-bigcat) img {
        width: clamp(220px, 30vw, 350px);
    }

    .extra-wrapper:has(.extra-bigcat) {
        top: clamp(460px, 46dvh, 550px);

    }

    .extra-wrapper:has(.extra-cat1, .extra-cat2, .extra-cat3) img {
        width: clamp(220px, 30vw, 350px);
    }

    .extra-wrapper:has(.extra-cat1, .extra-cat2, .extra-cat3) {
        top: clamp(370px, 35dvh, 400px);

    }



}












.frame-fire {
    width: 130%;
    top: 25%;
}

.frame-heart {
    width: 120%;
}

.frame-evilheart {
    width: 120%;
}

.frame-headphones {
    width: 115%;
    top: 20%;
    z-index: 9999;
}

.frame-penguin {
    width: 100%;
    top: 29%;
    left: 45%;
}

.frame-panda {
    width: 81%;
    top: 46.7%;
}

.frame-greek {

    width: 75%;
    top: 89%;
}

.avatar-wrapper:has(.frame-greek) {
    top: -50px !important;
}

.frame-caterpillar {
    width: 105%;
    top: 56%;
    left: 37%;
    z-index: 9999;
}

@media (min-width: 769px) {
    .avatar-wrapper:has(.frame-caterpillar) .avatar-img {
        height: 80px !important;
        width: 80px !important;
    }
}

.frame-bird {
    width: 95%;
    z-index: 9999;
    top: 38%;
    left: 40%;
}

.frame-creature {
    width: 105%;
    z-index: 9999;
    top: 40%;
    left: 49%;
}







.cosmetic-card {
    position: relative;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    text-align: left;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.cosmetic-card:hover:not(.locked) {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}

.cosmetic-card.locked {
    opacity: 0.45;
    cursor: not-allowed;
}

.cosmetic-card.locked::after {
    content: "Locked";
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
}

.cosmetic-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cosmetic-preview img,
.cosmetic-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.avatar-frame-grid .cosmetic-preview,
.extra-grid .cosmetic-preview {
    aspect-ratio: 1 / 1;
}

.avatar-frame-grid .cosmetic-preview img,
.extra-grid .cosmetic-preview img {
    object-fit: contain;
    padding: 14px;
}

.cosmetic-info {
    padding: 12px;
}

.cosmetic-info strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.cosmetic-info span {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.cosmetic-none-preview {
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
}

.rarity-common {
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.rarity-rare {
    border: 1px solid rgba(59, 130, 246, 0.7);
}

.rarity-epic {
    border: 1px solid rgba(168, 85, 247, 0.8);
}

.rarity-legendary {
    border: 1px solid rgba(245, 158, 11, 0.9);
}







/* =========================
   BADGES SHOWCASE
========================= */

.badges-showcase-section {
    margin-top: 28px;
    padding: 22px;
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badges-showcase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-bottom: 18px;
}

.badges-showcase-header h3 {
    margin: 0;
}

.show-all-badges-btn {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;

    cursor: pointer;
    font-weight: 800;

    color: white;
    background: rgba(255, 255, 255, 0.12);

    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.show-all-badges-btn:hover {
    transform: translateY(-2px);
    opacity: 0.92;
    background: rgba(255, 255, 255, 0.18);
}

.featured-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 150px));
    gap: 18px;

    align-items: center;
}

/* Badge grandi visibili nella UserPage */
.featured-badge-card {
    position: relative;

    width: 150px;
    height: 150px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 0;
    background: transparent;

    cursor: pointer;

    transition: transform 0.2s ease, filter 0.2s ease;
}

.featured-badge-card:hover {
    transform: translateY(-4px) scale(1.04);
    z-index: 4;
}

.featured-badge-icon {
    width: 100%;
    height: 100%;

    object-fit: contain;
    display: block;

    pointer-events: none;
    user-select: none;
}

.no-badges {
    color: rgba(255, 255, 255, 0.58);
}


/* =========================
   BADGES MODAL
========================= */

.badges-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.badges-modal[hidden] {
    display: none;
}

.badges-modal-content {
    width: min(1050px, 100%);
    max-height: 86vh;
    overflow-y: auto;

    padding: 26px;
    border-radius: 28px;

    background: rgba(18, 18, 28, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.badges-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;

    margin-bottom: 22px;
}

.badges-modal-header h3 {
    margin: 0 0 5px;
}

.badges-modal-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
}

.badges-modal-close {
    width: 38px;
    height: 38px;
    min-width: 38px;

    border-radius: 50%;
    border: 0;

    cursor: pointer;

    font-size: 1.5rem;
    line-height: 1;

    color: white;
    background: rgba(255, 255, 255, 0.12);

    transition: background 0.2s ease, transform 0.2s ease;
}

.badges-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(8deg);
}

.all-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 18px;
}

.modal-badge-card {
    position: relative;

    min-height: 220px;
    padding: 14px 12px 16px;
    border-radius: 22px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);

    color: white;
    cursor: pointer;
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        opacity 0.2s ease;
}

.modal-badge-card:disabled {
    cursor: default;
}

.modal-badge-card:hover:not(:disabled) {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
}

.modal-badge-card.is-featured {
    outline: 2px solid rgba(34, 197, 94, 0.85);
    background: rgba(34, 197, 94, 0.08);
}

.modal-badge-icon {
    width: 132px;
    height: 132px;

    object-fit: contain;
    display: block;

    margin: 0 auto 12px;

    pointer-events: none;
    user-select: none;
}

.modal-badge-info {
    width: 100%;
}

.modal-badge-info strong {
    display: block;

    font-size: 0.95rem;
    margin-bottom: 5px;
}

.modal-badge-info span {
    display: block;

    font-size: 0.78rem;
    line-height: 1.35;

    color: rgba(255, 255, 255, 0.62);
}

.featured-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: auto;
    padding: 5px 9px;
    border-radius: 999px;

    font-size: 0.72rem;
    font-weight: 800;

    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.78);
}

.modal-badge-card.is-featured .featured-marker {
    background: rgba(34, 197, 94, 0.22);
    color: #86efac;
}

.featured-badges-status {
    margin-top: 16px;

    color: #86efac;
    font-weight: 700;
}

.featured-badges-status.error {
    color: #f87171;
}


/* =========================
   RARITY EFFECTS
========================= */

.featured-badge-card.rarity-common .featured-badge-icon,
.modal-badge-card.rarity-common .modal-badge-icon {
    filter: drop-shadow(0 0 10px rgba(160, 190, 255, 0.14));
}

.featured-badge-card.rarity-rare .featured-badge-icon,
.modal-badge-card.rarity-rare .modal-badge-icon {
    filter: drop-shadow(0 0 14px rgba(0, 180, 255, 0.34));
}

.featured-badge-card.rarity-epic .featured-badge-icon,
.modal-badge-card.rarity-epic .modal-badge-icon {
    filter: drop-shadow(0 0 16px rgba(190, 70, 255, 0.45));
}

.featured-badge-card.rarity-legendary .featured-badge-icon,
.modal-badge-card.rarity-legendary .modal-badge-icon {
    filter: drop-shadow(0 0 18px rgba(255, 185, 45, 0.55));
}

.featured-badge-card.rarity-common:hover .featured-badge-icon,
.modal-badge-card.rarity-common:hover:not(:disabled) .modal-badge-icon {
    filter: drop-shadow(0 0 14px rgba(160, 190, 255, 0.24));
}

.featured-badge-card.rarity-rare:hover .featured-badge-icon,
.modal-badge-card.rarity-rare:hover:not(:disabled) .modal-badge-icon {
    filter: drop-shadow(0 0 18px rgba(0, 180, 255, 0.5));
}

.featured-badge-card.rarity-epic:hover .featured-badge-icon,
.modal-badge-card.rarity-epic:hover:not(:disabled) .modal-badge-icon {
    filter: drop-shadow(0 0 22px rgba(190, 70, 255, 0.62));
}

.featured-badge-card.rarity-legendary:hover .featured-badge-icon,
.modal-badge-card.rarity-legendary:hover:not(:disabled) .modal-badge-icon {
    filter: drop-shadow(0 0 24px rgba(255, 185, 45, 0.75));
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {
    .badges-showcase-section {
        padding: 18px;
    }

    .badges-showcase-header {
        margin-bottom: 16px;
    }

    .featured-badges-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 12px;
    }

    .featured-badge-card {
        width: 108px;
        height: 108px;
    }

    .badges-modal {
        padding: 14px;
    }

    .badges-modal-content {
        padding: 20px;
        border-radius: 22px;
    }

    .all-badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
        gap: 14px;
    }

    .modal-badge-card {
        min-height: 190px;
        padding: 12px 10px 14px;
    }

    .modal-badge-icon {
        width: 104px;
        height: 104px;
    }

    .modal-badge-info strong {
        font-size: 0.86rem;
    }

    .modal-badge-info span {
        font-size: 0.74rem;
    }
}

@media (max-width: 420px) {
    .featured-badge-card {
        width: 96px;
        height: 96px;
    }

    .modal-badge-icon {
        width: 94px;
        height: 94px;
    }

    .all-badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    }
}











@media (max-width: 768px) {




    .header-content {
        left: 0px;
        top: 25%;
        gap: 0px;
        margin-bottom: 0px;
    }

    .xp-bar {
        margin-top: -15px;
    }

    .avatar-img,
    .avatar {
        width: 50px;
        height: 50px;
    }

    .avatar-frame-img {
        width: 80%;
        height: 80%;
    }

    .frame-fire {
        width: 70%;
        top: 37%;
    }

    .frame-heart {
        width: 70%;
    }

    .frame-evilheart {
        width: 70%;
    }

    .frame-headphones {
        width: 70%;
        top: 32%;
    }

    .frame-penguin {
        width: 56%;
        top: 38%;
        left: 48%;
    }

    .frame-panda {
        width: 45%;
        top: 48%;
    }

    .frame-greek {
        width: 45%;
        top: 70%;
    }


    .avatar-wrapper:has(.frame-greek) {
        top: -20% !important;
    }

    .frame-caterpillar {
        width: 65%;
        top: 53%;
        left: 42%;
    }

    .frame-bird {
        width: 55%;
        top: 43%;
        left: 45%;
    }


    .frame-creature {
        top: 45%;
    }
}