:root {
    --container: 1100px;
    --text: #111;
    --muted: #777;
    --border: #e6e6e6;
    --bg: #fff;
    --chip: #f6f6f6;
    --primary: #ff7a00; /* tab 底線橘色 */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC",
    "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

.case-page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 85px 24px 80px;
}

/* Header */
.case-header {
    text-align: center;
    margin-bottom: 28px;
}

.case-title {
    font-size: 35px;
    line-height: 1.2;
    margin: 0 0 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #4BAEE5;
}

.case-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* Toolbar */
.case-toolbar {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 22px 0 18px;
    flex-wrap: wrap;
}

.select-wrap {
    position: relative;
    min-width: 180px;
}

.select {
    width: 100%;
    height: 36px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    padding: 0 36px 0 12px;
    outline: none;
    background: #fff;
    font-size: 13px;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.select::-ms-expand {
    display: none;
}

.search-wrap {
    position: relative;
    min-width: 420px;
    max-width: 520px;
    width: min(520px, 92vw);
}

.search {
    width: 100%;
    height: 36px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    padding: 0 12px 0 38px;
    outline: none;
    font-size: 13px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #6b7280;
    pointer-events: none;
}

/* Tabs */
.case-tabs {
    display: flex;
    justify-content: center;
    gap: 26px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 26px;
}

.tab {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 8px 2px;
    font-size: 13px;
    color: #444;
    position: relative;
    white-space: nowrap;
}

.tab.is-active {
    color: #111;
    font-weight: 700;
}

.tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -11px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Grid */
.case-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    transition: opacity 0.2s;
    min-height: 600px;
    gap: 22px 22px;
    margin-top: 18px;
}

.case-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.case-name {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #444;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    color: #111;
    user-select: none;
}

#pageNums {
  display: flex;
  gap: 6px;
  min-width: 260px;
  justify-content: center;
}

.page-btn,
.page-num {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 8px 8px;
    font-size: 17px;
    color: #333;
}

.page-num.is-active {
    font-weight: 800;
    color: #111;
}

.page-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.arrow {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

/* Responsive */
@media (max-width: 1100px) {
    .case-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 700px) {
    .case-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .case-title {
        font-size: 28px;
    }
}