.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1200px;
    margin: 24px auto;
}

@media (max-width: 980px) {
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ach-card,
    .ach-card.ach-shape-hex,
    .ach-card.scope-character {
        clip-path: none;
        border-radius: 16px;
        padding-left: 16px;
        padding-right: 16px;
    }
}

.ach-card {
    --card-bg: rgba(12, 16, 22, 0.92);
    --card-border: rgba(173, 255, 0, 0.22);
    --card-glow: rgba(173, 255, 0, 0.18);

    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 18px 16px 16px;
    border: 1px solid var(--card-border);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
        linear-gradient(135deg, color-mix(in srgb, var(--bg-color, #222) 32%, #0b0f14 68%), #0b0f14);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.02) inset,
        0 10px 30px rgba(0,0,0,0.35),
        0 0 24px var(--card-glow);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ach-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(130deg, rgba(173,255,0,0.12), transparent 28%),
        linear-gradient(320deg, rgba(255,255,255,0.04), transparent 30%);
    pointer-events: none;
}

.ach-card::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        #adff00 0%,
        #d7ff70 var(--prog-percent, 0%),
        rgba(255,255,255,0.08) var(--prog-percent, 0%),
        rgba(255,255,255,0.08) 100%
    );
    box-shadow: 0 0 14px rgba(173,255,0,0.35);
}

.ach-card:hover {
    transform: translateY(-4px);
    border-color: rgba(173, 255, 0, 0.45);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 16px 38px rgba(0,0,0,0.42),
        0 0 34px rgba(173,255,0,0.24);
}

/* ACCOUNT = diament / hex */
.ach-card.ach-shape-hex {
    clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
    border-radius: 0;
    padding-left: 22px;
    padding-right: 22px;
}

/* CHARACTER = prostokąt */
.ach-card.scope-character {
    clip-path: none;
    border-radius: 18px;
    padding-left: 18px;
    padding-right: 18px;
    border-color: rgba(120, 210, 255, 0.35);
    box-shadow:
        0 0 0 1px rgba(120,210,255,0.08) inset,
        0 12px 32px rgba(0,0,0,0.36),
        0 0 22px rgba(120,210,255,0.14);
}

.ach-card.scope-character .ach-badge {
    border-color: rgba(120,210,255,0.45);
    background: rgba(120,210,255,0.12);
    color: #9be7ff;
}

.ach-card.scope-character .ach-icon {
    background: rgba(120,210,255,0.10);
    border-color: rgba(120,210,255,0.24);
    color: #9be7ff;
    box-shadow: inset 0 0 18px rgba(120,210,255,0.08);
}

.ach-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(173,255,0,0.10);
    border: 1px solid rgba(173,255,0,0.24);
    color: #adff00;
    box-shadow: inset 0 0 18px rgba(173,255,0,0.08);
}

.ach-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.9;
}

.ach-title {
    font-family: "Chakra Petch", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    color: #f5f7fb;
    letter-spacing: 0.02em;
}

.ach-desc {
    font-size: 0.85rem;
    line-height: 1.4;
    color: rgba(255,255,255,0.78);
    margin-top: 4px;
    max-width: 30em;
}

.ach-progress {
    margin-top: auto;
    font-family: "Chakra Petch", sans-serif;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.72);
}

.ach-card.status-hidden {
    opacity: 0.78;
    border-color: rgba(255,255,255,0.1);
    backdrop-filter: blur(3px);
}

.ach-card.status-hidden::before {
    background:
        linear-gradient(130deg, rgba(255,255,255,0.18), transparent 30%),
        linear-gradient(320deg, rgba(255,255,255,0.08), transparent 32%);
}

.ach-card.status-hidden .ach-icon {
    background: rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.78);
}

.ach-card.status-hidden .ach-title,
.ach-card.status-hidden .ach-desc {
    color: rgba(255,255,255,0.82);
}

.ach-card.status-hidden .ach-badge {
    border-color: rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.3);
    color: rgba(255,255,255,0.7);
}

.ach-card.status-hidden .ach-icon svg {
    opacity: 0.9;
}

.ach-card.status-locked {
    filter: saturate(0.9);
}

.ach-card.status-unlocked {
    border-color: rgba(173,255,0,0.45);
    box-shadow:
        0 0 0 1px rgba(173,255,0,0.08) inset,
        0 12px 32px rgba(0,0,0,0.36),
        0 0 30px rgba(173,255,0,0.22);
}

.ach-card.status-unlocked .ach-icon {
    background: rgba(173,255,0,0.16);
    border-color: rgba(173,255,0,0.36);
}

.ach-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-family: "Chakra Petch", sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.65);
}

.ach-badge {
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(173,255,0,0.4);
    background: rgba(173,255,0,0.12);
    color: #adff00;
}

.ach-percent {
    opacity: 0.8;
}

.ach-percent-done {
    color: #adff00;
    font-weight: 600;
}

.ach-filter-form {
    max-width: 1200px;
    margin: 0 auto 18px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ach-filter-label {
    font-family: "Chakra Petch", sans-serif;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ach-filter-form select {
    min-width: 220px;
    background: #10161d;
    color: #f5f7fb;
    border: 1px solid rgba(173,255,0,0.28);
    border-radius: 12px;
    padding: 10px 12px;
    font-family: "Chakra Petch", sans-serif;
}
