

.achievement-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.achievement-popup.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.achievement-card {
    position: relative;
    width: 100%;
    max-width: 390px;
    padding: 28px;
    box-sizing: border-box;
    color: #fff;
    background: #20242d;
    border: 1px solid #414653;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);

    transform: scale(0.92) translateY(12px);
    transition: transform 0.3s ease;
}

.achievement-popup.is-visible .achievement-card {
    transform: scale(1) translateY(0);
}

.achievement-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: 0;
    background: transparent;
    color: #a8afbc;
    font-size: 28px;
    cursor: pointer;
}

.achievement-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
}

.achievement-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 16px;
    background: #423923;
    font-size: 42px;
}

.achievement-label {
    display: block;
    margin-bottom: 7px;
    color: #ffd76a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.achievement-info h2 {
    margin: 0 0 7px;
    font-size: 22px;
    line-height: 1.2;
}

.achievement-info p {
    margin: 0;
    color: #d0d4dc;
    font-size: 13px;
    line-height: 1.5;
}

.achievement-progress-track {
    height: 9px;
    overflow: hidden;
    border-radius: 20px;
    background: #444955;
}

.achievement-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #e5ad36, #ffe18a);
    transition: width 0.7s ease;
}

.achievement-progress-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: #d0d4dc;
    font-size: 12px;
}

#achievement-progress-percent {
color: #ffd76a;
font-weight: 700;
}

.achievement-continue {
    width: 100%;
    margin-top: 24px;
    padding: 12px 18px;
    border: 0;
    border-radius: 9px;
    background: #ffd76a;
    color: #20242d;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.achievement-continue:hover {
    background: #ffe49a;
}

@media (max-width: 420px) {
    .achievement-card {
        padding: 24px 20px;
    }

    .achievement-header {
        gap: 12px;
    }

    .achievement-icon {
        width: 60px;
        height: 60px;
        font-size: 34px;
    }

    .achievement-info h2 {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .achievement-popup,
    .achievement-card,
    .achievement-progress-bar {
        transition: none;
    }
}
