.ach_wrap {
    --ach_bg: #2a2a35;
    --ach_panel: #2e2e39;
    --ach_panel2: #34343f;
    --ach_panel3: #3d3d4a;
    --ach_border: rgba(255,255,255,0.06);
    --ach_border2: rgba(255,255,255,0.10);
    --ach_text: #9292a0;
    --ach_text2: #c7c7d8;
    --ach_muted: #5e5e72;
    --ach_accent: #4fea9f;
    --ach_accent_dim: rgba(79,234,159,0.14);
    --ach_accent_border: rgba(79,234,159,0.32);
    --ach_shadow: 0 6px 24px rgba(0,0,0,.5);
    --ach_r: 13px;
    --ach_rb: 8px;
    font-family: system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
    font-size: 13px;
    color: var(--ach_text);
    margin-top: 14px;
    margin-bottom: 20px;
}

.profile_progress {
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0px 5px 10px #13151a4f;
    background: linear-gradient(1deg, #25252e 30%, #292932 100%);
    margin-bottom: 13px;
    box-shadow: var(--ach_shadow);
    overflow: hidden;
    margin-top: 14px;
    margin-bottom: 20px;
}

/* ========== Ð—ÐÐ“ÐžÐ›ÐžÐ’ÐžÐš ========== */
.ach-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--ach_border);
    /* background: linear-gradient(180deg,rgba(255,255,255,.025),transparent); */
    gap: 10px;
}

.ach-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ach-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ach-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--ach_rb);
    background: var(--ach_panel3);
    border: 1px solid var(--ach_border2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ach_accent);
    flex-shrink: 0;
    font-size: 18px;
}

.ach-title {
    font-weight: 900;
    font-size: 15px;
    letter-spacing: .5px;
    color: var(--ach_text2);
    margin: 0;
    line-height: 1.2;
}

.ach-subtitle {
    margin-top: 2px;
    color: var(--ach_muted);
    font-size: 11px;
    line-height: 1;
}

/* ========== Ð‘Ð•Ð™Ð”Ð– ÐŸÐ ÐžÐ“Ð Ð•Ð¡Ð¡Ð ========== */
.ach-badge-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--ach_accent_dim);
    border: 1px solid var(--ach_accent_border);
    border-radius: 50px;
}

.ach-badge-label {
    font-size: 10px;
    font-weight: 900;
    color: var(--ach_muted);
    text-transform: uppercase;
    letter-spacing: .8px;
}

.ach-badge-num {
    font-size: 13px;
    font-weight: 900;
    color: var(--ach_accent);
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.ach-badge-num span {
    font-size: 11px;
    color: var(--ach_muted);
    font-weight: 700;
}

.ach-badge-bar {
    width: 50px;
    height: 3px;
    background: rgba(79,234,159,.15);
    border-radius: 50px;
    overflow: hidden;
}

.ach-badge-bar-fill {
    height: 100%;
    background: radial-gradient(100% 100% at 50% 0, #4fea9f 0, #38644f 100%);
    border-radius: 50px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== ÐšÐÐžÐŸÐšÐ˜ ========== */
.ach-controls {
    display: flex;
    gap: 6px;
}

.ach-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--ach_border2);
    border-radius: 50px;
    color: var(--ach_text);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
    outline: none;
}

.ach-btn:hover {
    background: var(--ach_accent_dim);
    border-color: var(--ach_accent_border);
    color: var(--ach_accent);
}

.ach-btn:active {
    transform: translateY(1px);
}

.ach-btn.active {
    background: radial-gradient(100% 100% at 50% 0, #4fea9f 0, #38644f 100%);
    border-color: rgba(79,234,159,.5);
    color: #fff;
}

.ach-btn svg {
    flex-shrink: 0;
}

/* ========== Ð¡Ð•Ð¢ÐšÐ ========== */
.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    max-height: 440px;
    overflow-y: auto;
    padding: 14px;
}

/* ========== Ð¡ÐšÐ ÐžÐ›Ð›Ð‘ÐÐ  ========== */
.ach-grid::-webkit-scrollbar {
    width: 4px;
}

.ach-grid::-webkit-scrollbar-track {
    background: rgba(255,255,255,.03);
    border-radius: 4px;
}

.ach-grid::-webkit-scrollbar-thumb {
    background: rgba(79,234,159,.3);
    border-radius: 4px;
}

/* ========== ÐšÐÐ Ð¢ÐžÐ§ÐšÐ ========== */
.ach-card {
    position: relative;
    border-radius: var(--ach_r);
    background: linear-gradient(359deg, var(--ach_panel) 30%, var(--ach_panel2) 100%);
    border: 1px solid var(--ach_border);
    border-top: 1px solid rgba(255,255,255,.07);
    box-shadow: 0 3px 12px rgba(0,0,0,.3);
    padding: 12px;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
    animation: achFadeIn 0.3s ease-out;
    overflow: hidden;
}

.ach-card:hover {
    transform: translateY(-2px);
    border-color: var(--ach_accent_border);
    background: linear-gradient(359deg, var(--ach_panel2) 30%, var(--ach_panel3) 100%);
}

@keyframes achFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Ð‘Ð»ÐµÑÐº Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð½Ñ‹Ñ… */
.ach-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
        transparent 30%,
        rgba(79,234,159,.05) 50%,
        transparent 70%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    pointer-events: none;
    opacity: 0;
}

.ach-card:not(.not-earned) .ach-shine {
    animation: shineEffect 4s ease-in-out infinite;
}

@keyframes shineEffect {
    0%, 60% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
    50%      { opacity: 1; }
    100%     { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 0; }
}

/* ========== Ð’ÐÐ£Ð¢Ð Ð•ÐÐÐ˜Ð™ LAYOUT ========== */
.ach-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

/* ========== Ð˜Ð—ÐžÐ‘Ð ÐÐ–Ð•ÐÐ˜Ð• ========== */
.ach-img-wrap {
    position: relative;
    flex-shrink: 0;
}

.ach-img {
    width: 52px;
    height: 52px;
    border-radius: var(--ach_rb);
    object-fit: cover;
    border: 1px solid var(--ach_border2);
    display: block;
    transition: border-color .15s ease, transform .15s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,.35);
}

.ach-card:hover .ach-img {
    border-color: var(--ach_accent_border);
    transform: scale(1.06);
}

.ach-glow {
    display: none;
}

/* Ð‘ÐµÐ¹Ð´Ð¶ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¾ */
.ach-earned-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(100% 100% at 50% 0, #4fea9f 0, #38644f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(79,234,159,.4);
    animation: badgePulse 2.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(79,234,159,.4); }
    50%       { box-shadow: 0 2px 14px rgba(79,234,159,.7); }
}

.ach-earned-badge svg {
    color: #fff;
}

/* ========== Ð˜ÐÐ¤ÐžÐ ÐœÐÐ¦Ð˜Ð¯ ========== */
.ach-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.ach-name {
    font-size: 13px;
    font-weight: 900;
    color: var(--ach_text2);
    line-height: 1.3;
    word-wrap: break-word;
}

.ach-desc {
    font-size: 10px;
    color: var(--ach_muted);
    line-height: 1.4;
    word-wrap: break-word;
}

/* ========== Ð¡Ð¢ÐÐ¢Ð£Ð¡ ========== */
.ach-footer {
    margin-top: 2px;
}

.ach-status {
    font-size: 10px;
    font-weight: 700;
}

.achievs_success {
    color: var(--ach_accent);
}

.achievs_info {
    color: var(--ach_muted);
}

/* ÐŸÑ€Ð¾Ð³Ñ€ÐµÑÑ-Ð±Ð°Ñ€ */
.ach-progress {
    height: 3px;
    background: rgba(79,234,159,.10);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 3px;
}

.ach-progress-fill {
    height: 100%;
    background: radial-gradient(100% 100% at 50% 0, #4fea9f 0, #38644f 100%);
    border-radius: 50px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ach-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.3) 50%, transparent 100%);
    animation: progressShine 1.8s ease-in-out infinite;
}

@keyframes progressShine {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========== ÐÐ•Ð’Ð«ÐŸÐžÐ›ÐÐ•ÐÐÐ«Ð• ========== */
.ach-card.not-earned {
    opacity: 0.50;
    filter: saturate(30%);
}

.ach-card.not-earned:hover {
    opacity: 0.72;
    filter: saturate(60%);
}

.ach-card.not-earned .ach-name {
    color: var(--ach_text);
}

/* ========== ÐŸÐ£Ð¡Ð¢ÐžÐ• Ð¡ÐžÐ¡Ð¢ÐžÐ¯ÐÐ˜Ð• ========== */
.ach-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 20px;
    text-align: center;
    background: rgba(255,255,255,.02);
    border-radius: var(--ach_rb);
    border: 1px dashed var(--ach_border2);
}

.ach-empty svg {
    width: 42px;
    height: 42px;
    color: var(--ach_muted);
    margin-bottom: 10px;
}

.ach-empty-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--ach_text2);
    margin-bottom: 5px;
}

.ach-empty-text {
    font-size: 11px;
    color: var(--ach_muted);
    max-width: 260px;
    line-height: 1.5;
}

/* ========== Ð—ÐÐ“Ð Ð£Ð—ÐšÐ ========== */
.ach-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 20px;
}

.ach-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(79,234,159,.15);
    border-top-color: var(--ach_accent);
    border-radius: 50%;
    animation: spin .75s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ach-loading-text {
    font-size: 11px;
    font-weight: 900;
    color: var(--ach_accent);
    letter-spacing: .3px;
    text-transform: uppercase;
}

/* ========== ÐÐ”ÐÐŸÐ¢Ð˜Ð’ ========== */
@media (max-width: 1100px) {
    .ach-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .ach-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ach-header-right {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .ach-controls {
        width: 100%;
    }

    .ach-btn {
        flex: 1;
        justify-content: center;
    }

    .ach-grid {
        grid-template-columns: 1fr;
        max-height: 420px;
    }

    .ach-card {
        padding: 10px;
    }

    .ach-card-inner {
        flex-direction: row;
        text-align: left;
        gap: 10px;
    }

    .ach-img {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .ach-header {
        padding: 12px 12px 8px;
    }

    .ach-grid {
        padding: 10px;
    }

    .ach-title {
        font-size: 13px;
    }

    .ach-btn {
        font-size: 10px;
        padding: 5px 9px;
    }

    .ach-badge-compact {
        width: 100%;
        justify-content: space-between;
    }
}
