* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: #fff;
    background:
        radial-gradient(circle at top left, #182a4a, transparent 35%),
        radial-gradient(circle at bottom right, #102f38, transparent 35%),
        #070b14;
}

.topbar {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    background: rgba(10,15,25,.7);
    backdrop-filter: blur(15px);
}

.back-btn {
    color: #fff;
    text-decoration: none;
    font-size: 30px;
    margin-right: 20px;
}

.brand {
    font-size: 20px;
    font-weight: bold;
}

.logout-btn {
    margin-left: auto;
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    color: #fff;
    background: rgba(255,255,255,.08);
    cursor: pointer;
}

.profile-page {
    width: min(1000px, 92%);
    margin: 35px auto;
}

.profile-hero {
    text-align: center;
    padding: 35px 20px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 25px;
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(18px);
}

.profile-avatar {
    width: 90px;
    height: 90px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 38px;
    font-weight: bold;
    background: linear-gradient(135deg, #16d9e3, #5b86e5);
    box-shadow: 0 0 30px rgba(22,217,227,.25);
}

.profile-hero h1 {
    margin-top: 18px;
    font-size: 30px;
}

.profile-hero p {
    margin-top: 8px;
    color: #aeb8c9;
}

.rank-badge {
    display: inline-block;
    margin-top: 15px;
    padding: 7px 16px;
    border-radius: 20px;
    background: rgba(22,217,227,.12);
    border: 1px solid rgba(22,217,227,.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 20px;
}

.stat-card {
    padding: 22px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(15px);
}

.stat-card span {
    display: block;
    font-size: 25px;
    margin-bottom: 10px;
}

.stat-card strong {
    display: block;
    font-size: 25px;
}

.stat-card small {
    display: block;
    margin-top: 6px;
    color: #9da8ba;
}

.profile-card {
    margin-top: 20px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(15px);
}

.profile-card h2 {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span {
    color: #9da8ba;
}

.info-row strong {
    text-align: right;
    word-break: break-word;
}

.achievement-summary {
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-summary strong {
    font-size: 30px;
}

.achievement-summary span {
    color: #aeb8c9;
}

.view-achievements {
    display: inline-block;
    margin-top: 20px;
    color: #6ee7f2;
    text-decoration: none;
}

@media (max-width: 700px) {

    .topbar {
        padding: 0 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-page {
        width: 94%;
    }

    .info-row {
        flex-direction: column;
        gap: 5px;
    }

    .info-row strong {
        text-align: left;
    }

}

@media (max-width: 420px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .brand {
        font-size: 17px;
    }

}
.profile-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    flex-wrap: wrap;
}

.premium-profile-badge {
    padding: 5px 8px;

    border-radius: 20px;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: .7px;

    color: #e0e7ff;

    background:
        linear-gradient(
            135deg,
            rgba(99, 102, 241, .18),
            rgba(168, 85, 247, .18)
        );

    border:
        1px solid rgba(167, 139, 250, .28);

    box-shadow:
        0 0 15px
        rgba(139, 92, 246, .12);
}

.premium-profile-badge[hidden] {
    display: none;
}
/* ======================================
   FEATURED BEHAVIOR BADGES
====================================== */

.profile-badges-section {
    margin-top: 24px;
    padding: 20px;

    border-radius: 18px;

    border:
        1px solid rgba(255,255,255,.06);

    background:
        rgba(255,255,255,.025);
}

.profile-badges-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;
}

.profile-badges-header small {
    color: #67e8f9;

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 1.2px;
}

.profile-badges-header h3 {
    margin-top: 4px;

    font-size: 16px;
}

.choose-badges-btn {
    padding: 9px 12px;

    border-radius: 10px;

    border:
        1px solid rgba(103,232,249,.15);

    color: #67e8f9;

    background:
        rgba(34,211,238,.06);

    font-size: 9px;
    font-weight: 700;

    cursor: pointer;
}

.profile-badges-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;

    margin-top: 17px;
}

.profile-badge-slot {
    min-height: 105px;

    padding: 14px 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    border-radius: 14px;

    border:
        1px solid rgba(103,232,249,.13);

    background:
        linear-gradient(
            135deg,
            rgba(34,211,238,.06),
            rgba(99,102,241,.035)
        );
}

.profile-badge-slot .badge-icon {
    font-size: 24px;
}

.profile-badge-slot strong {
    margin-top: 8px;

    font-size: 10px;
}

.profile-badge-slot small {
    margin-top: 4px;

    color: rgba(255,255,255,.42);

    font-size: 7px;
}

.profile-badge-slot.empty {
    opacity: .35;
    filter: grayscale(1);
}

@media (max-width: 550px) {

    .profile-badges-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .profile-badge-slot {
        min-height: 90px;
        padding: 10px 5px;
    }

}
/* ======================================
   BADGE PICKER MODAL
====================================== */

.badge-picker-modal {
    position: fixed;
    inset: 0;

    z-index: 9999;

    display: grid;
    place-items: center;

    padding: 20px;

    background:
        rgba(0, 0, 0, .72);

    backdrop-filter: blur(10px);
}

.badge-picker-modal[hidden] {
    display: none;
}

.badge-picker-panel {
    width: min(650px, 100%);
    max-height: 80vh;

    overflow-y: auto;

    padding: 22px;

    border-radius: 20px;

    border:
        1px solid rgba(255,255,255,.08);

    background:
        #0b171c;

    box-shadow:
        0 25px 70px
        rgba(0,0,0,.45);
}

.badge-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 15px;
}

.badge-picker-header small {
    color: #67e8f9;

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 1px;
}

.badge-picker-header h3 {
    margin-top: 5px;

    font-size: 19px;
}

.badge-picker-header p {
    margin-top: 5px;

    color: rgba(255,255,255,.42);

    font-size: 9px;
}

.close-badge-picker {
    border: none;

    color: rgba(255,255,255,.60);
    background: transparent;

    font-size: 16px;

    cursor: pointer;
}

.badge-picker-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;

    margin-top: 20px;
}

.badge-picker-item {
    padding: 14px 10px;

    text-align: center;

    border-radius: 14px;

    border:
        1px solid rgba(255,255,255,.06);

    background:
        rgba(255,255,255,.025);

    cursor: pointer;

    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.badge-picker-item:hover {
    transform: translateY(-2px);
}

.badge-picker-item.selected {
    border-color:
        rgba(103,232,249,.40);

    background:
        rgba(34,211,238,.09);

    box-shadow:
        0 0 16px
        rgba(34,211,238,.08);
}

.badge-picker-item .picker-icon {
    font-size: 24px;
}

.badge-picker-item strong {
    display: block;

    margin-top: 7px;

    font-size: 10px;
}

.badge-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: 20px;
}

.badge-picker-footer span {
    color: rgba(255,255,255,.45);

    font-size: 9px;
}

.save-featured-badges {
    padding: 10px 14px;

    border: none;
    border-radius: 10px;

    color: #03171b;
    background: #67e8f9;

    font-size: 9px;
    font-weight: 800;

    cursor: pointer;
}

@media (max-width: 560px) {

    .badge-picker-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}