/* --- Layout --- */
.page-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-container h1 {
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1.75rem;
}


/* --- Controls --- */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.input {
    min-width: 360px;
    padding: 0.45rem 0.6rem;
    border: 1px solid #cfd3d7;
    border-radius: 8px;
}

.input.search {
    min-width: 280px;
}

.btn {
    border: 1px solid #cfd3d7;
    background: #fff;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 120ms ease, transform 120ms ease;
}

.btn:hover { background: #f4f6f8; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn.primary {
    background: #1f6feb;
    border-color: #1f6feb;
    color: #fff;
}

.btn.primary:hover { background: #195fc9; }

/* --- Difficulty chips --- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0.75rem 0;
}

.chip {
    border: 1px solid #cfd3d7;
    background: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
}

.chip.active {
    background: #eef2ff;
    border-color: #9aa7ff;
}

/* --- Table --- */
.ach-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.ach-table th {
    text-align: left;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    user-select: none;
}

.ach-table td {
    padding: 0.6rem 0.5rem;
    vertical-align: top;
}

/* Small columns: stable width by character count */
.ach-table th:nth-child(2),
.ach-table td:nth-child(2),
.ach-table th:nth-child(3),
.ach-table td:nth-child(3){
    width: 10ch;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

/* First column takes remaining space */
.ach-table th:nth-child(1),
.ach-table td:nth-child(1) { width: auto; }

/* Alternating rows */
.ach-table tbody tr:nth-child(odd) { background: #ffffff; }
.ach-table tbody tr:nth-child(even) { background: #e3e7eb; }

.ach-table tbody tr:hover {
    background: #dde3ea;
}

.ach-cell {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.ach-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
}

.muted { opacity: 0.75; }
