.pd-themes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 28px;
    background-color: var(--pd-bg-card);
    border: 1px solid var(--pd-border);
    border-radius: 12px;
    padding: 14px 22px;
}

.pd-theme-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-top: 1px solid var(--pd-border-soft);
    text-decoration: none;
}

.pd-theme-item:nth-child(-n+2) { border-top: none; }

.pd-theme-name {
    width: 160px;
    flex-shrink: 0;
    font: 600 12px/1.25 system-ui, sans-serif;
    color: var(--pd-text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-theme-item:hover .pd-theme-name { color: var(--pd-accent-text); }

.pd-theme-track {
    flex: 1;
    height: 9px;
    background-color: var(--pd-bg-track);
    border-radius: 3px;
    overflow: hidden;
    min-width: 20px;
}

.pd-theme-bar { height: 100%; background-color: var(--pd-accent); border-radius: 3px; min-width: 2px; }

.pd-theme-bar--p5  { width: 5%;  }
.pd-theme-bar--p10 { width: 10%; }
.pd-theme-bar--p15 { width: 15%; }
.pd-theme-bar--p20 { width: 20%; }
.pd-theme-bar--p25 { width: 25%; }
.pd-theme-bar--p30 { width: 30%; }
.pd-theme-bar--p35 { width: 35%; }
.pd-theme-bar--p40 { width: 40%; }
.pd-theme-bar--p45 { width: 45%; }
.pd-theme-bar--p50 { width: 50%; }
.pd-theme-bar--p55 { width: 55%; }
.pd-theme-bar--p60 { width: 60%; }
.pd-theme-bar--p65 { width: 65%; }
.pd-theme-bar--p70 { width: 70%; }
.pd-theme-bar--p75 { width: 75%; }
.pd-theme-bar--p80 { width: 80%; }
.pd-theme-bar--p85 { width: 85%; }
.pd-theme-bar--p90 { width: 90%; }
.pd-theme-bar--p95 { width: 95%; }
.pd-theme-bar--p100 { width: 100%; }

.pd-theme-count {
    width: 30px;
    flex-shrink: 0;
    text-align: right;
    font: 700 11.5px/1 ui-monospace, Menlo, monospace;
    color: var(--pd-text-body);
}

.pd-themes-more {
    margin-top: 12px;
    font: 400 11px/1.5 system-ui, sans-serif;
    color: var(--pd-text-muted);
}

.pd-new-head-subtitle {
    font: 400 12px/1.5 system-ui, sans-serif;
    color: var(--pd-text-sec);
    margin: 0 0 14px;
}

.pd-new-table {
    border: 1px solid var(--pd-border);
    border-radius: 12px;
    overflow: hidden;
}

.pd-new-thead {
    display: grid;
    grid-template-columns: 96px 44px 1.5fr 86px 64px 92px 80px 130px;
    padding: 9px 16px;
    background-color: var(--pd-bg-card-hd);
    font: 600 9px/1 ui-monospace, Menlo, monospace;
    color: var(--pd-text-ghost);
    letter-spacing: 0.07em;
}

.pd-new-row {
    display: grid;
    grid-template-columns: 96px 44px 1.5fr 86px 64px 92px 80px 130px;
    align-items: center;
    padding: 9px 16px;
    border-top: 1px solid var(--pd-border-soft);
    background-color: var(--pd-bg-row);
}

.pd-new-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: var(--pd-bg-avatar);
    display: flex;
    align-items: center;
    justify-content: center;
    font: 800 11px/1 ui-monospace, Menlo, monospace;
    color: var(--pd-logo-ph-text);
    overflow: hidden;
    flex-shrink: 0;
}

.pd-new-logo img { width: 36px; height: 36px; object-fit: contain; display: block; }

.pd-new-name-wrap { min-width: 0; padding: 0 10px; }

.pd-new-name {
    font: 600 12px/1.25 system-ui, sans-serif;
    color: var(--pd-text-body);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-new-name:hover { color: var(--pd-accent-text); }

.pd-new-provider {
    font: 400 9px/1 ui-monospace, Menlo, monospace;
    color: var(--pd-text-ghost);
    margin-top: 3px;
}

.pd-new-released { font: 400 10px/1 ui-monospace, Menlo, monospace; color: var(--pd-text-sec); }
.pd-new-rtp { font: 700 11.5px/1 ui-monospace, Menlo, monospace; color: var(--pd-success); }
.pd-new-vol { font: 600 10.5px/1 system-ui, sans-serif; color: var(--pd-text-sec); }
.pd-new-maxwin { font: 500 10.5px/1 ui-monospace, Menlo, monospace; color: var(--pd-text-dim); }
.pd-new-actions { display: flex; gap: 5px; justify-content: flex-end; }

.pd-freshness-badge {
    display: inline-block;
    text-align: center;
    font: 700 8.5px/1 ui-monospace, Menlo, monospace;
    letter-spacing: 0.04em;
    border-radius: 5px;
    padding: 6px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    width: 90px;
}

.pd-freshness-badge--new { color: var(--pd-success); background-color: rgba(15, 157, 107, 0.12); }
.pd-freshness-badge--recent { color: #b45309; background-color: rgba(180, 83, 9, 0.1); }
.pd-freshness-badge--older { color: var(--pd-text-ghost); background-color: var(--pd-bg-card-hd); }

@media (prefers-color-scheme: dark) {
    .pd-freshness-badge--recent { color: #f59e0b; background-color: rgba(245, 158, 11, 0.12); }
}

@media (max-width: 900px) {
    .pd-themes-grid { grid-template-columns: 1fr; }
    .pd-theme-item:nth-child(-n+2) { border-top: 1px solid var(--pd-border-soft); }
    .pd-theme-item:first-child { border-top: none; }
    .pd-theme-name { width: 140px; }

    .pd-series-thead { display: none; }
    .pd-series-row { grid-template-columns: 1fr auto; gap: 2px 8px; }
    .pd-series-row-name { grid-column: 1; }
    .pd-series-row-maxwin { grid-column: 1; font-size: 9.5px; color: var(--pd-text-ghost); }
    .pd-series-row-mechanic { display: none; }
    .pd-series-row-actions { grid-column: 2; grid-row: 1 / 3; align-self: center; }

    .pd-new-thead { display: none; }
    .pd-new-row {
        grid-template-columns: 90px 40px 1fr auto;
        grid-template-rows: auto auto;
        row-gap: 3px;
        column-gap: 8px;
    }
    .pd-new-row > .pd-freshness-badge { grid-column: 1; grid-row: 1 / 3; align-self: center; }
    .pd-new-row > .pd-new-logo { grid-column: 2; grid-row: 1 / 3; align-self: center; }
    .pd-new-name-wrap { grid-column: 3; grid-row: 1; padding: 0; }
    .pd-new-released { grid-column: 3; grid-row: 2; padding: 0; font-size: 9px; }
    .pd-new-rtp { display: none; }
    .pd-new-vol { display: none; }
    .pd-new-maxwin { display: none; }
    .pd-new-actions { grid-column: 4; grid-row: 1 / 3; align-self: center; }

    .pd-find-search-wrap { min-width: 0; }
}

@media (max-width: 375px) {
    .pd-series-hdr { padding: 11px 14px; gap: 8px; }
    .pd-series-hdr-name { font-size: 13px; }
    .pd-series-api-row { padding: 8px 14px 10px; }
    .pd-series-row { padding: 8px 14px; }
    .pd-new-row { padding: 9px 12px; }
    .pd-themes-grid { padding: 10px 14px; }
    .pd-theme-name { width: 110px; }
    .pd-find-sort-select { font-size: 10px; padding: 9px 10px; }
}
