
/* ══════════════════════════════════════════════
   achievement.css  —  Premium Achievements Panel
   Only touch this file for Achievements-tab
   iterations (cards, rarity styling, modal, filters).
   Reuses app-wide vars (--gold, --surface2, --border,
   --text-muted, --font-mono, --xp-bar-bg, etc.) and the
   shared .settings-overlay / .settings-card modal chrome.
   ══════════════════════════════════════════════ */

:root {
    --gold-dim: #b8974e;
}

/* ── Header card: stat pills + overall progress ── */
.ach-header-card {
    padding-bottom: var(--space-5);
}

.ach-stat-pills {
    display: flex;
    gap: var(--space-2);
    margin: var(--space-3) 0 var(--space-4);
    flex-wrap: wrap;
}

.ach-pill {
    flex: 1;
    min-width: 84px;
    text-align: center;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-2);
}

.ach-pill-value {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: var(--text-2xl);
    color: var(--gold);
}

.ach-pill-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.ach-progress-track {
    height: 8px;
    background: var(--xp-bar-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid var(--border);
}

.ach-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-glow));
    transition: width var(--progress-duration) var(--progress-easing);
}

.ach-progress-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-2);
    text-align: right;
}

/* ── Category filter chips ── */
.ach-filter-row {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-1);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ach-filter-row::-webkit-scrollbar { display: none; }

.ach-chip {
    flex-shrink: 0;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    font-family: var(--font);
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.ach-chip:hover {
    color: var(--text);
    border-color: var(--gold);
}

.ach-chip.active {
    background: rgba(226, 176, 74, 0.12);
    border-color: var(--gold);
    color: var(--gold);
}

/* ── Achievement grid & cards ── */
.ach-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
}

@media (min-width: 420px) {
    .ach-grid { grid-template-columns: 1fr 1fr; }
    .ach-card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

.ach-card {
    position: relative;
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.25s, border-color 0.25s;
    overflow: hidden;
}

.ach-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--rarity-color, var(--gold));
}

.ach-card:hover {
    border-color: var(--rarity-color, var(--gold));
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}

.ach-card:active { transform: scale(0.98); }

.ach-card.locked {
    opacity: 0.55;
    filter: saturate(0.5);
}

.ach-card.locked:hover { opacity: 0.75; }

.ach-card.unlocked .ach-card-icon {
    box-shadow: 0 0 14px var(--rarity-color, var(--gold));
}

.ach-check,
.ach-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
}

.ach-check {
    background: rgba(92, 201, 138, 0.15);
    border: 1px solid rgba(92, 201, 138, 0.4);
    color: var(--xp-green);
}

.ach-lock {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.ach-card-icon {
    font-size: 1.7rem;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--rarity-color, var(--border));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ach-card.locked .ach-card-icon {
    filter: grayscale(1);
    opacity: 0.5;
}

.ach-card-body {
    flex: 1;
    min-width: 0;
    padding-right: var(--space-6);
}

.ach-card-top {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.ach-rarity-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rarity-color, var(--gold));
    flex-shrink: 0;
}

.ach-rarity-label {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rarity-color, var(--gold));
}

.ach-points {
    margin-left: auto;
    font-size: var(--text-xs);
    color: var(--gold-dim);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.ach-card-name {
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--text-bright);
}

.ach-card.locked .ach-card-name { color: var(--text-muted); }

.ach-card-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-1);
    line-height: 1.4;
}

.ach-card-progress-track {
    height: 5px;
    background: var(--xp-bar-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: var(--space-2);
}

.ach-card-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--rarity-color, var(--gold)), var(--gold-glow));
    transition: width var(--progress-duration) var(--progress-easing);
}

.ach-card-progress-text {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
    font-family: var(--font-mono);
}

/* ── Almost There section (reuses card styles) ── */
.ach-almost-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ach-almost-list .ach-card { border-color: rgba(226, 176, 74, 0.2); }

/* ── Detail Modal (content only — chrome is .settings-overlay/.settings-card) ── */
.ach-modal-card {
    text-align: center;
    padding-top: 52px;
}

.ach-modal-icon {
    font-size: 2.6rem;
    width: 88px;
    height: 88px;
    border-radius: var(--radius-lg);
    margin: var(--space-2) auto var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--rarity-color, var(--gold));
    box-shadow: 0 0 30px var(--rarity-color, var(--gold));
}

.ach-modal-rarity {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rarity-color, var(--gold));
    margin-bottom: var(--space-2);
}

.ach-modal-name {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: var(--space-2);
}

.ach-modal-desc {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: var(--space-4);
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.ach-modal-status.unlocked {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    background: rgba(92, 201, 138, 0.1);
    border: 1px solid rgba(92, 201, 138, 0.3);
    color: var(--xp-green);
    font-weight: 700;
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
}

.ach-modal-progress-track {
    height: 8px;
    background: var(--xp-bar-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
    border: 1px solid var(--border);
}

.ach-modal-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--rarity-color, var(--gold)), var(--gold-glow));
    transition: width var(--progress-duration) var(--progress-easing);
}

.ach-modal-progress-text {
    font-size: var(--text-base);
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: var(--space-3);
}

.ach-modal-points {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gold);
    font-family: var(--font-mono);
}
