/* ============================================
   CHIFFTOWN ACHIEVEMENTS / TROPHY CASE
   ============================================ */

.ach-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    opacity: 0; transition: opacity 0.2s ease;
}
.ach-overlay.visible { opacity: 1; }

.ach-modal {
    background: linear-gradient(170deg, #0f1a2e 0%, #0a0f1e 100%);
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: 16px;
    width: 90vw; max-width: 680px;
    max-height: 85vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(201,168,76,0.08);
    transform: scale(0.95); transition: transform 0.2s ease;
}
.ach-overlay.visible .ach-modal { transform: scale(1); }

/* Header */
.ach-header {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
}
.ach-title {
    font-size: 1.3rem; font-weight: 700;
    color: #c9a84c;
    display: flex; align-items: center; gap: 8px;
}
.ach-title-icon { font-size: 1.5rem; }
.ach-summary {
    font-size: 0.85rem; color: rgba(255,255,255,0.5);
    margin-left: auto; margin-right: 36px;
}
.ach-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; color: rgba(255,255,255,0.4);
    font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.ach-close:hover { color: #fff; }

/* Tabs */
.ach-tabs {
    display: flex; gap: 4px; padding: 12px 24px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.ach-tab {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; padding: 6px 14px;
    color: rgba(255,255,255,0.6); font-size: 0.8rem;
    cursor: pointer; white-space: nowrap;
    transition: all 0.15s ease;
}
.ach-tab:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ach-tab.active {
    background: rgba(201,168,76,0.12);
    border-color: rgba(201,168,76,0.4);
    color: #c9a84c;
}

/* Grid */
.ach-grid {
    padding: 16px 24px 24px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 10px;
}

/* Card */
.ach-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
}
.ach-card.unlocked {
    background: rgba(201,168,76,0.04);
    border-color: rgba(201,168,76,0.15);
}
.ach-card.locked { opacity: 0.65; }
.ach-card:hover { background: rgba(255,255,255,0.06); }

/* Icon */
.ach-icon-wrap {
    width: 52px; height: 52px; min-width: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}
.ach-icon { font-size: 1.5rem; }

/* Info */
.ach-info { flex: 1; min-width: 0; }
.ach-name {
    font-size: 0.95rem; font-weight: 600; color: #e8e8f0;
    margin-bottom: 2px;
}
.ach-desc { font-size: 0.78rem; color: rgba(255,255,255,0.45); margin-bottom: 8px; }

/* Progress bar */
.ach-progress-bar {
    height: 6px; border-radius: 3px;
    background: rgba(255,255,255,0.08);
    overflow: hidden; margin-bottom: 4px;
}
.ach-progress-fill {
    height: 100%; border-radius: 3px;
    transition: width 0.5s ease;
}
.ach-progress-text {
    font-size: 0.72rem; color: rgba(255,255,255,0.4);
}
.ach-reward {
    font-size: 0.72rem; color: #c9a84c; margin-top: 2px;
}

/* Tier badge */
.ach-tier-badge {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em;
    writing-mode: vertical-rl; text-orientation: mixed;
    opacity: 0.5;
}

/* Mobile */
@media (max-width: 600px) {
    .ach-modal { width: 96vw; max-height: 90vh; }
    .ach-header { padding: 16px 16px 12px; }
    .ach-grid { padding: 12px 16px 20px; }
    .ach-tabs { padding: 10px 16px 0; }
    .ach-icon-wrap { width: 42px; height: 42px; min-width: 42px; }
    .ach-icon { font-size: 1.2rem; }
}
