@layer pages {
.cs-page {
    --cs-bg: #080d12;
    --cs-surface: rgba(15, 19, 27, 0.9);
    --cs-surface-strong: rgba(19, 25, 35, 0.96);
    --cs-border: rgba(255, 255, 255, 0.08);
    --cs-border-strong: rgba(255, 62, 62, 0.38);
    --cs-text: #fff;
    --cs-text-muted: #fff;
    --cs-accent: #ff3e3e;
    --cs-accent-soft: rgba(255, 62, 62, 0.14);
    --cs-success: #48ff8b;
    --cs-shadow: 0 24px 64px rgba(0, 0, 0, 0.38);
}

    .body {
     --cs-bg: #080d12;
    --cs-surface: rgba(15, 19, 27, 0.9);
    --cs-surface-strong: rgba(19, 25, 35, 0.96);
    --cs-border: rgba(255, 255, 255, 0.08);
    --cs-border-strong: rgba(255, 62, 62, 0.38);
    --cs-text: #fff;
    --cs-text-muted: #fff;
    --cs-accent: #ff3e3e;
    --cs-accent-soft: rgba(255, 62, 62, 0.14);
    --cs-success: #48ff8b;
    --cs-shadow: 0 24px 64px rgba(0, 0, 0, 0.38); 
    }

.cs-resource-card-link {
    position: absolute;
    z-index: 3;
    inset: 0;
    border-radius: inherit;
}

.cs-resource-card-link:focus-visible {
    outline: 3px solid var(--red-bright);
    outline-offset: -4px;
}

.cs-index-page .cs-resource-card:focus-within,
.cs-similar-grid .cs-resource-card:focus-within {
    border-color: var(--red-bright);
    box-shadow: 0 0 0 2px rgba(240, 68, 77, 0.22);
}

.cs-description .mt-emoji,
.cs-comment-message .mt-emoji {
    width: 1.2em;
    height: 1.2em;
    margin: 0 0.04em;
    vertical-align: -0.22em;
}

.cs-description .custom-emoji--inline,
.cs-comment-message .custom-emoji--inline {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.22em;
}

.cs-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(255, 39, 39, 0.12), transparent 24%),
        linear-gradient(180deg, #090b10 0%, #0b0d13 100%);
    color: var(--cs-text);
    --font-current: 'Segoe UI', Inter, sans-serif;
}

.cs-light-pillar-canvas {
    position: fixed;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: screen;
}

.cs-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 80px;
}

.cs-hero {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 28px;
    align-items: center;
    padding: 38px 32px;
    background: linear-gradient(135deg, rgba(255, 62, 62, 0.11), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--cs-border);
    border-radius: 26px;
    box-shadow: var(--cs-shadow);
}

.cs-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(2.4rem, 4vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
    --font-current: 'Segoe UI', Inter, sans-serif;
    font-weight: 800;
}

.cs-hero p {
    color: #969090;
    margin: 0 0 22px;
    max-width: 60ch;
    font-size: 1.04rem;
    line-height: 1.7;
}

.cs-hero-search {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cs-hero-search input,
.cs-hero-search select,
.cs-filter-group select,
.cs-filter-group input {
    border-radius: 12px;
    border: 1px solid var(--cs-border);
    background: rgba(11, 15, 20, 0.9);
    color: var(--cs-text);
    padding: 0.9rem 1rem;
    font: inherit;
}

.cs-hero-search input {
    flex: 1 1 260px;
    min-width: 0;
}

.cs-hero-search button,
.cs-primary-btn,
.cs-btn,
.cs-filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: 3px;
    outline: 2px solid var(--red-bright);
    outline-offset: -2px;
    background: var(--red-bright);
    color: #969090;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: 400ms;
    white-space: nowrap;
    --font-current: inherit;
}

.cs-hero-search button:hover,
.cs-primary-btn:hover,
.cs-btn:hover,
.cs-filter-panel button:hover {
    background: transparent;
    color: var(--red-bright);
}

.cs-hero-search button:active,
.cs-primary-btn:active,
.cs-btn:active,
.cs-filter-panel button:active {
    transform: scale(0.97);
}

.cs-hero-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: #969090;
    font-size: 0.9rem;
}

.cs-stat-box {
    background: rgba(16, 22, 30, 0.78);
    border: 1px solid var(--cs-border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--cs-shadow);
}

.cs-stat-box strong {
    display: block;
    font-size: 1.8rem;
    letter-spacing: -0.05em;
    color: var(--cs-text);
    margin-bottom: 4px;
}

.cs-section {
    margin-top: 30px;
}

.cs-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.cs-section-header h2,
.cs-section-header h3 {
    margin: 0;
    font-size: clamp(1.3rem, 2vw, 2rem);
    letter-spacing: -0.05em;
    --font-current: 'Segoe UI', Inter, sans-serif;
}

.cs-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.cs-direct-browser {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.cs-direct-browser-item {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 88px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--cs-border);
    background: linear-gradient(135deg, rgba(255, 62, 62, 0.06), rgba(17, 23, 31, 0.92));
    color: var(--cs-text);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cs-direct-browser-item:hover {
    border-color: var(--cs-border-strong);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.cs-direct-index {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
}

.cs-direct-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 62, 62, 0.1);
    border: 1px solid rgba(255, 62, 62, 0.2);
}

.cs-direct-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.cs-direct-copy strong {
    display: block;
    font-size: 1rem;
    color: var(--cs-text);
    line-height: 1.2;
    text-transform: none;
}

.cs-direct-copy small {
    display: block;
    color: #969090;
    font-size: 0.75rem;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-direct-count {
    min-width: 42px;
    text-align: center;
    padding: 0.5rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--cs-text);
    font-size: 0.8rem;
    font-weight: 700;
}

.cs-resource-card {
    display: flex;
    flex-direction: column;
    background: rgba(17, 23, 31, 0.92);
    border: 1px solid var(--cs-border);
    border-radius: 1px;
    overflow: hidden;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cs-resource-card:hover {
    border-color: var(--cs-border-strong);
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.22);
}

.cs-resource-card img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.03);
}

.cs-resource-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    flex: 1;
}

.cs-resource-body h3 {
    margin: 0;
    font-size: 1.08rem;
    color: var(--cs-text);
    --font-current: 'Segoe UI', Inter, sans-serif;
}

.cs-resource-body p {
    margin: 0;
    color: #969090;
    line-height: 1.6;
}

.cs-resource-meta,
.cs-resource-tags,
.cs-resource-actions,
.cs-badges,
.cs-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cs-badges {
    margin-bottom: 4px;
}

.cs-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
    background: rgba(255, 62, 62, 0.14);
    color: #ffd0d0;
    border: 1px solid rgba(255, 62, 62, 0.26);
}

.cs-badge--neutral {
    background: rgba(148, 163, 184, 0.16);
    color: #dfeaf6;
    border-color: rgba(148, 163, 184, 0.2);
}

.cs-resource-tags {
    color: #969090;
    font-size: 0.78rem;
}

.cs-resource-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1px;
    padding: 0.34rem 0.68rem;
    background: rgba(148, 163, 184, 0.09);
    color: #dfeaf6;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.cs-resource-tag:hover {
    border-color: rgba(255, 62, 62, 0.48);
    background: rgba(255, 62, 62, 0.13);
    color: #ff0000;
    transform: translateY(-1px);
}

.cs-resource-tag:focus-visible {
    outline: 2px solid var(--red-bright);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .cs-resource-tag {
        transition: none;
    }

    .cs-resource-tag:hover {
        transform: none;
    }

    .cs-vote-progress-like,
    .cs-vote-progress-dislike,
    .cs-vote-actions .cs-vote-button,
    .cs-detail-actions .cs-detail-download {
        transition: none;
    }
}

.cs-resource-meta {
    color: #969090;
    font-size: 0.8rem;
    align-items: center;
}

.cs-resource-meta span,
.cs-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.cs-resource-actions {
    margin-top: auto;
    justify-content: space-between;
    align-items: center;
}

.cs-resource-link {
    color: #969090;
    text-decoration: none;
    font-weight: 700;
}

.cs-category-card {
    padding-top: 12px;
}

.cs-category-header {
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.cs-category-badge {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 62, 62, 0.09);
    border: 1px solid rgba(255, 62, 62, 0.24);
}

.cs-category-icon,
.cs-inline-icon {
    display: inline-block;
    object-fit: contain;
    vertical-align: middle;
    filter: drop-shadow(0 0 12px rgba(255, 62, 62, 0.18));
}

.cs-inline-icon {
    width: 14px;
    height: 14px;
}

.cs-search-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
    margin-top: 28px;
}

.cs-filter-panel {
    padding: 20px;
    background: rgba(17, 23, 31, 0.92);
    border: 1px solid var(--cs-border);
    border-radius: 20px;
    height: fit-content;
    position: sticky;
    top: 24px;
}

.cs-filter-panel h3 {
    margin-top: 0;
    font-size: 1.2rem;
    --font-current: 'Segoe UI', Inter, sans-serif;
}

.cs-filter-group {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.cs-filter-group label {
    color: #969090;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cs-filter-panel button {
    width: 100%;
    margin-top: 16px;
}

.cs-results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.cs-listing-heading > span {
    color: #969090;
    font-size: 0.9rem;
}

.cs-empty-results {
    grid-column: 1 / -1;
}

.cs-empty-panel {
    display: grid;
    gap: 8px;
    padding: 28px 24px;
    border-radius: 20px;
    border: 1px solid var(--cs-border);
    background: linear-gradient(135deg, rgba(255, 62, 62, 0.08), rgba(17, 23, 31, 0.9));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.cs-empty-panel h3 {
    margin: 0;
    font-size: 1.3rem;
}

.cs-empty-panel p {
    margin: 0;
    color: #969090;
}

.cs-resource-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 24px;
    margin-top: 28px;
}

.cs-detail-main,
.cs-detail-side {
    background: rgba(17, 23, 31, 0.92);
    border: 1px solid var(--cs-border);
    border-radius: 24px;
    padding: 24px;
}

.cs-detail-main img {
    width: 100%;
    border-radius: 18px;
    max-height: 400px;
    object-fit: contain;
    border: 1px solid var(--cs-border);
    background: #060b10;
}

.cs-description {
    color: #969090;
    font-size: 1.06rem;
    margin-top: 18px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.cs-vote-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.cs-vote-actions button {
    border: 1px solid var(--cs-border);
    border-radius: 9px;
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--cs-text);
    font: inherit;
    cursor: pointer;
}

.cs-vote-actions button:hover:not(:disabled) {
    border-color: var(--cs-border-strong);
}

.cs-vote-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.cs-vote-status,
.cs-download-unavailable {
    display: block;
    margin-top: 10px;
    color: #969090;
    font-size: 0.85rem;
}

.cs-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #969090;
    margin: 18px 0;
}

.cs-detail-side .cs-stat-box {
    margin-bottom: 16px;
}

.cs-comment-panel {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    margin-top: 30px;
    background: rgba(17, 23, 31, 0.92);
    border: 1px solid var(--cs-border);
    border-radius: 24px;
    padding: 24px;
}

.cs-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.cs-comment-header h3 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    letter-spacing: -0.05em;
}

.cs-comment-header span {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: #969090;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.cs-comment-form {
    display: grid;
    min-width: 0;
    height: auto;
    overflow: visible;
    gap: 12px;
    margin-bottom: 0;
}

.cs-comment-message-label {
    margin-bottom: -6px;
    color: #969090;
    font-size: 0.78rem;
    font-weight: 700;
}

.cs-comment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 12px;
}

.cs-profile-avatar {
    display: block;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 62, 62, 0.2), rgba(255, 255, 255, 0.06));
    object-fit: cover;
}

.cs-comment-profile {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-content: center;
    min-height: 60px;
    padding: 9px 12px;
    border: 1px solid var(--cs-border);
    border-radius: 12px;
    background: rgba(8, 12, 17, 0.62);
}

.cs-comment-profile .cs-profile-avatar {
    grid-row: 1 / 3;
    align-self: center;
}

.cs-comment-profile-name {
    align-self: end;
    overflow: hidden;
    color: var(--cs-text);
    font-size: 0.9rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-comment-profile-status {
    align-self: start;
    color: #969090;
    font-size: 0.72rem;
}

.cs-comment-form input,
.cs-comment-form textarea,
.cs-comment-form select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--cs-border);
    background: rgba(8, 12, 17, 0.9);
    color: var(--cs-text);
    padding: 0.9rem 1rem;
    font: inherit;
    box-sizing: border-box;
}

.cs-comment-rating-picker {
    display: grid;
    align-content: start;
    justify-items: start;
    min-width: 0;
    margin: 0;
    padding: 10px 14px 9px;
    border: 1px solid rgba(255, 211, 111, 0.2);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 211, 111, 0.07), rgba(8, 12, 17, 0.82) 65%);
}

.cs-comment-rating-picker legend {
    padding: 0 6px;
    color: var(--cs-text);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.cs-comment-rating-input-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
    gap: 2px;
}

.cs-comment-rating-input-stars input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.cs-comment-rating-input-stars label {
    display: inline-grid;
    width: 38px;
    height: 44px;
    place-items: center;
    color: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: color 150ms ease, transform 150ms ease, filter 150ms ease;
}

.cs-comment-rating-input-stars label::before {
    content: '\2605';
    font-size: 32px;
    line-height: 1;
}

.cs-comment-rating-input-stars input:checked ~ label,
.cs-comment-rating-input-stars label:hover,
.cs-comment-rating-input-stars label:hover ~ label {
    color: #ffd36f;
}

.cs-comment-rating-input-stars label:hover {
    transform: translateY(-2px) scale(1.08);
    filter: drop-shadow(0 2px 5px rgba(255, 211, 111, 0.32));
}

.cs-comment-rating-input-stars input:focus-visible + label {
    outline: 2px solid #ffd36f;
    outline-offset: 1px;
    border-radius: 6px;
}

.cs-comment-rating-hint {
    color: #969090;
    font-size: 0.72rem;
    line-height: 1.4;
}

.cs-comment-form textarea {
    display: block;
    min-width: 0;
    min-height: 120px;
    resize: vertical;
}

.cs-page .cs-comment-form > textarea#cs-resource-comment-message {
    display: block;
    width: 100%;
    min-height: 150px;
    visibility: visible;
    opacity: 1;
    border: 1px solid var(--border-soft);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-light);
    line-height: 1.55;
}

.cs-comment-form .bbcode-toolbar {
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
}

.cs-comment-form textarea {
    border-radius: 0 0 12px 12px;
}

.cs-comment-list {
    display: grid;
    min-width: 0;
    height: auto;
    overflow: visible;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.cs-page .cs-comment-panel > .cs-comment-list {
    display: grid;
    visibility: visible;
    opacity: 1;
}

.cs-comment-item {
    display: grid;
    min-width: 0;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    background:
        linear-gradient(135deg, rgba(255, 62, 62, 0.035), transparent 45%),
        rgba(8, 12, 17, 0.72);
    transition: border-color 160ms ease;
}

.cs-comment-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.cs-comment-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    gap: 12px;
    flex-wrap: wrap;
}

.cs-comment-author {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--cs-text);
}

.cs-comment-author .cs-profile-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
}

.cs-comment-author-details {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.cs-comment-author-name {
    overflow-wrap: anywhere;
    color: var(--cs-text);
    font-size: 0.88rem;
    line-height: 1.25;
}

.cs-comment-author-details time {
    color: #969090;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.2;
}

.cs-comment-author1 {
    gap: 0.6rem;
    font-weight: 700;
    color: var(--cs-text);
}

.cs-comment-author1 .cs-profile-avatar1 {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
}

.cs-comment-rating {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.55rem;
    max-width: 100%;
    padding: 0.4rem 0.65rem;
    border: 1px solid rgba(255, 211, 111, 0.2);
    border-radius: 999px;
    background: rgba(255, 211, 111, 0.07);
    color: #ffe2a1;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.cs-comment-rating-stars {
    color: #ffd36f;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    line-height: 1;
    white-space: nowrap;
}

.cs-comment-rating-value {
    color: var(--cs-text);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.cs-comment-rating[aria-label="No rating recorded"] {
    border-color: var(--cs-border);
    background: rgba(255, 255, 255, 0.035);
    color: #969090;
    font-weight: 500;
}

.cs-comment-item .cs-comment-message {
    margin: 0;
    min-width: 0;
    color: var(--cs-text);
    line-height: 1.7;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.94rem;
    overflow-wrap: anywhere;
}

.cs-comment-item .cs-comment-message p {
    margin: 0;
    color: inherit;
    line-height: inherit;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.cs-comment-item .cs-comment-message p + p {
    margin-top: 0.7em;
}

.cs-detail-breadcrumb {
    margin-bottom: 20px;
}

.cs-detail-breadcrumb .forum-divider-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.cs-detail-breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 160ms ease;
}

.cs-detail-breadcrumb a:hover {
    color: var(--red-bright);
}

.cs-detail-breadcrumb [aria-hidden="true"] {
    color: var(--text-faint);
}

.cs-resource-detail {
    align-items: start;
    gap: 22px;
}

.cs-detail-main,
.cs-detail-side,
.cs-comment-panel {
    border-color: rgba(255, 255, 255, 0.075);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 38%),
        linear-gradient(180deg, rgba(18, 24, 33, 0.98), rgba(12, 17, 24, 0.98));
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.24);
}

.cs-detail-main {
    min-width: 0;
    padding: clamp(16px, 2.2vw, 28px);
}

.cs-detail-main > img,
.cs-gallery-image-button img {
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: #090d12;
}

.cs-detail-main > img {
    display: block;
    max-height: min(58vw, 560px);
    object-fit: contain;
}

.cs-detail-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.cs-detail-meta {
    align-items: center;
    gap: 8px 16px;
    margin: 22px 0 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.8rem;
}

.cs-detail-meta span {
    min-height: 28px;
    padding: 0.3rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
}

.cs-detail-heading h1 {
    margin: 0 0 14px;
    color: var(--text-light);
    --font-current: inherit;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
}

.cs-detail-heading .cs-badges {
    gap: 7px;
}

.cs-badge--status {
    text-transform: capitalize;
}

.cs-badge--status-published {
    border-color: rgba(72, 255, 139, 0.24);
    background: rgba(72, 255, 139, 0.08);
    color: #a5f4bd;
}

.cs-description {
    margin-top: 22px;
    padding: clamp(16px, 2vw, 24px);
    border: 2px solid rgba(255, 255, 255, 0.065);
    border-radius: 14px;
    background: rgba(4, 8, 13, 0.26);
    color: #c9c6c6;
    font-size: 0.98rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.cs-description > :first-child {
    margin-top: 0;
}

.cs-description > :last-child {
    margin-bottom: 0;
}

.cs-description h2,
.cs-description h3,
.cs-description h4 {
    color: var(--text-light);
    line-height: 1.3;
}

.cs-description a {
    color: var(--red-bright);
    text-decoration-color: rgba(255, 62, 62, 0.45);
    text-underline-offset: 3px;
}

.cs-description img,
.cs-description video,
.cs-description iframe {
    max-width: 100%;
    border-radius: 10px;
}

.cs-description .bbcode-video-wrap {
    width: min(720px, 100%);
    max-width: 100%;
}

.cs-detail-tags {
    gap: 8px;
    margin-top: 18px;
}

.cs-detail-side {
    position: relative;
    min-width: 0;
    padding: 16px;
}

.cs-detail-side,
.cs-detail-gallery,
.cs-gallery-image-button,
.cs-gallery-thumbnails {
    position: relative;
    top: auto;
    z-index: auto;
}

.cs-detail-side .cs-stat-box {
    margin: 0;
    border-color: rgba(255, 255, 255, 0.075);
    border-radius: 14px;
    background: rgba(5, 9, 14, 0.34);
    box-shadow: none;
}

.cs-detail-side .cs-stat-box > strong {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.cs-detail-side .cs-stat-box > span {
    color: var(--text-faint);
    font-size: 0.78rem;
}

.cs-detail-rating {
    padding: 20px;
    border-color: rgba(255, 62, 62, 0.22);
    background: linear-gradient(135deg, rgba(255, 62, 62, 0.09), rgba(5, 9, 14, 0.5));
}

.cs-detail-side .cs-stat-box .cs-detail-stat-label {
    display: block;
    margin-bottom: 9px;
    color: #969090;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cs-detail-side .cs-detail-rating > strong {
    font-size: 2.35rem;
    letter-spacing: -0.06em;
}

.cs-detail-rating-scale {
    margin-left: 0.25rem;
    color: var(--text-faint);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0;
}

.cs-detail-side .cs-stat-box .cs-detail-stat-note {
    display: block;
    margin-top: 5px;
    color: var(--text-faint);
    font-size: 0.78rem;
}

.cs-detail-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.cs-detail-stats .cs-stat-box {
    padding: 14px;
}

.cs-detail-stats .cs-stat-box > strong {
    font-size: 1.3rem;
}

.cs-detail-voting {
    margin-top: 10px;
    padding: 16px;
}

.cs-detail-main .cs-stat-box.cs-detail-voting {
    margin-top: 10px;
}

.cs-detail-voting .cs-inline-icon {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.cs-vote-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cs-vote-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.cs-vote-actions button .cs-inline-icon {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    filter: grayscale(1) brightness(1.7);
}

.cs-vote-actions button:hover:not(:disabled) {
    border-color: var(--red-bright);
    background: rgba(255, 62, 62, 0.1);
    color: #969090;
    transform: translateY(-1px);
}

.cs-vote-actions button:hover:not(:disabled) .cs-inline-icon {
    filter: none;
}

.cs-vote-actions button:disabled {
    border-color: rgba(255, 62, 62, 0.22);
    background: rgba(255, 62, 62, 0.07);
    color: #969090;
    opacity: 0.78;
}

.cs-detail-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-top: 12px;
}

.cs-detail-actions .btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 46px;
    box-sizing: border-box;
}

.cs-detail-actions .cs-detail-back {
    outline: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.035);
    color: #969090;
}

.cs-detail-actions .cs-detail-back:hover {
    outline-color: var(--red-bright);
    color: var(--red-bright);
}

.cs-download-unavailable {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.025);
    line-height: 1.5;
}

.cs-detail-author {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 12px;
    padding: 15px;
}

.cs-detail-side .cs-stat-box.cs-detail-author {
    margin-top: 12px;
}

.cs-detail-side .cs-stat-box.cs-detail-author .cs-profile-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-detail-side .cs-stat-box.cs-detail-author .cs-profile-avatar {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
}

.cs-detail-side .cs-stat-box.cs-detail-author .cs-profile-identity strong {
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.cs-developer-credit {
    color: #969090;
    font-size: 0.78rem;
    line-height: 1.5;
}

.cs-comment-panel {
    padding: clamp(18px, 3vw, 30px);
}

.cs-comment-notice {
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.035);
}

.cs-comment-notice p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.5;
}

.cs-comment-notice--success {
    border-color: rgba(72, 255, 139, 0.24);
    background: rgba(72, 255, 139, 0.055);
}

.cs-comment-notice--error {
    border-color: rgba(255, 62, 62, 0.3);
    background: rgba(255, 62, 62, 0.065);
}

.cs-comment-form input,
.cs-comment-form textarea,
.cs-comment-form select {
    min-width: 0;
    border-radius: var(--radius-sm);
    border-color: var(--border-soft);
    background: var(--bg-input);
    color: var(--text-light);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.cs-comment-form input::placeholder,
.cs-comment-form textarea::placeholder {
    color: var(--text-faint);
}

.cs-comment-form input:focus,
.cs-comment-form textarea:focus,
.cs-comment-form select:focus {
    border-color: var(--red-bright);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 62, 62, 0.14);
}

.cs-comment-submit {
    display: flex;
    justify-content: flex-end;
}

.cs-comment-submit .btn {
    min-height: 42px;
    border: 1px solid rgba(240, 68, 77, 0.4);
    background: rgba(240, 68, 77, 0.12);
    color: var(--text-light);
    box-shadow: none;
}

.cs-comment-submit .btn:hover {
    border-color: rgba(240, 68, 77, 0.7);
    background: rgba(240, 68, 77, 0.2);
}

.cs-vote-actions button:focus-visible,
.cs-comment-form input:focus-visible,
.cs-comment-form textarea:focus-visible,
.cs-comment-form select:focus-visible,
.cs-comment-rating-input-stars input:focus-visible + label,
.cs-detail-actions a:focus-visible,
.cs-comment-submit button:focus-visible {
    outline: 2px solid var(--red-bright);
    outline-offset: 3px;
}

@media (max-width: 980px) {
    .cs-hero,
    .cs-search-layout,
    .cs-resource-detail {
        grid-template-columns: 1fr;
    }

    .cs-detail-side {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 10px;
    }

    .cs-detail-rating,
    .cs-detail-voting,
    .cs-detail-actions,
    .cs-detail-author {
        grid-column: 1 / -1;
    }

    .cs-detail-main .cs-stat-box.cs-detail-voting {
        margin-top: 0;
    }

    .cs-detail-stats {
        margin-top: 0;
    }

    .cs-card-grid,
    .cs-results-grid,
    .cs-direct-browser {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .cs-shell {
        width: min(100% - 18px, 1280px);
    }

    .cs-card-grid,
    .cs-results-grid,
    .cs-direct-browser,
    .cs-comment-row {
        grid-template-columns: 1fr;
    }

    .cs-hero {
        padding: 24px 18px;
    }

    .cs-hero-search,
    .cs-resource-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cs-comment-rating-picker {
        justify-items: start;
        width: fit-content;
        max-width: 100%;
    }

    .cs-comment-topline {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .cs-filter-panel {
        position: static;
    }

    .cs-detail-main,
    .cs-detail-side {
        padding: 14px;
        border-radius: 18px;
    }

    .cs-detail-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .cs-detail-rating,
    .cs-detail-voting,
    .cs-detail-actions,
    .cs-detail-author {
        grid-column: auto;
    }

    .cs-detail-gallery {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .cs-detail-meta {
        gap: 6px;
        margin: 16px 0 12px;
    }

    .cs-detail-meta span {
        font-size: 0.72rem;
    }

    .cs-comment-panel {
        padding: 16px;
        border-radius: 18px;
    }

    .cs-comment-submit .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs-page *,
    .cs-page *::before,
    .cs-page *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Counter-Strike resource index */
.cs-index-page .cs-shell {
    position: relative;
    z-index: 1;
    width: min(1360px, calc(100% - 48px));
    padding-top: clamp(28px, 5vw, 58px);
}

.cs-index-page .cs-index-hero {
    position: relative;
    isolation: isolate;
    grid-template-columns: minmax(0, 1.6fr) minmax(250px, 0.72fr);
    gap: clamp(28px, 5vw, 72px);
    overflow: hidden;
    padding: clamp(24px, 3.8vw, 48px);
    border-color: rgba(240, 68, 77, 0.2);
    border-radius: 8px;
    background:
        radial-gradient(ellipse at 88% 8%, rgba(240, 68, 77, 0.16), transparent 34%),
        linear-gradient(112deg, rgba(18, 20, 24, 0.98), rgba(13, 16, 21, 0.97) 62%, rgba(23, 17, 20, 0.98));
    box-shadow: 0 28px 78px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.035);
}

.cs-index-page .cs-index-hero::before,
.cs-index-page .cs-index-hero::after {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    content: "";
}

.cs-index-page .cs-index-hero::before {
    inset: 0 0 0 auto;
    width: min(44%, 480px);
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: linear-gradient(90deg, transparent, #000 65%);
}

.cs-index-page .cs-index-hero::after {
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--red-bright), transparent 82%);
}

.cs-index-page .cs-hero-copy {
    min-width: 0;
}

.cs-index-page .cs-index-kicker {
    justify-content: flex-start;
    margin: 0 0 15px;
}

.cs-index-page .cs-index-kicker .forum-divider-label {
    padding: 0;
    color: var(--red-bright);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.cs-index-page .cs-hero h1 {
    max-width: 14ch;
    margin-bottom: 14px;
    color: var(--text-light);
    font-size: clamp(2.45rem, 5vw, 4.65rem);
    line-height: 1;
    letter-spacing: -0.055em;
}

.cs-index-page .cs-hero p {
    max-width: 62ch;
    margin-bottom: 20px;
    color: #969090;
    font-size: clamp(0.96rem, 1.35vw, 1.08rem);
    line-height: 1.75;
}

.cs-index-page .cs-hero-search {
    max-width: 740px;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 20px;
}

.cs-index-page .cs-hero-search input {
    min-height: 52px;
    padding: 0.85rem 1rem;
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    background: rgba(5, 8, 12, 0.72);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.cs-index-page .cs-hero-search input:focus,
.cs-index-page .cs-filter-group input:focus,
.cs-index-page .cs-filter-group select:focus {
    border-color: var(--red-bright);
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 68, 77, 0.14);
}

.cs-index-page .cs-hero-search button,
.cs-index-page .cs-filter-panel button {
    min-height: 52px;
    padding-inline: 1.5rem;
    border-radius: 5px;
    outline: 1px solid var(--red-bright);
    outline-offset: -1px;
    background: var(--red-bright);
    color: #969090;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.cs-index-page .cs-hero-search button:hover,
.cs-index-page .cs-filter-panel button:hover {
    background: transparent;
    color: var(--red-bright);
}

.cs-index-page .cs-hero-meta {
    gap: 8px 22px;
    color: var(--text-faint);
    font-size: 0.8rem;
}

.cs-index-page .cs-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cs-index-page .cs-hero-meta span::before {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--red-bright);
    content: "";
}

.cs-index-page .cs-index-hero-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 188px;
    padding: clamp(22px, 3vw, 34px);
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(8, 10, 14, 0.62));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.04);
}

.cs-index-page .cs-index-stat-label,
.cs-index-page .cs-index-section-kicker {
    color: var(--red-bright);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cs-index-page .cs-index-hero-stat > strong {
    margin: 10px 0 3px;
    color: var(--text-light);
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.075em;
}

.cs-index-page .cs-index-hero-stat > span:not(.cs-index-stat-label) {
    max-width: 22ch;
    color: #969090;
    font-size: 0.88rem;
    line-height: 1.55;
}

.cs-index-page .cs-index-stat-footer {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    color: #969090;
    font-size: 0.74rem;
}

.cs-index-page .cs-index-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.cs-index-page .cs-index-live > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #54d88b;
    box-shadow: 0 0 12px rgba(84, 216, 139, 0.55);
}

.cs-index-page .cs-section {
    margin-top: clamp(34px, 5vw, 56px);
}

.cs-index-page .cs-listing-heading {
    align-items: flex-end;
    margin-bottom: 22px;
}

.cs-index-page .cs-listing-heading > div {
    display: grid;
    gap: 7px;
}

.cs-index-page .cs-listing-heading h2 {
    color: var(--text-light);
    font-size: clamp(1.55rem, 2.8vw, 2.15rem);
    letter-spacing: -0.045em;
}

.cs-index-page .cs-index-result-count {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    color: #969090;
    font-size: 0.76rem;
    font-weight: 700;
}

.cs-index-page .cs-search-layout {
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
    gap: clamp(16px, 2.4vw, 28px);
    margin-top: 0;
}

.cs-index-page .cs-index-filter {
    padding: 12px;
}

.cs-index-page .cs-filter-panel {
    top: 18px;
    padding: 12px;
    border-color: rgba(255, 255, 255, 0.075);
    border-radius: 6px;
    background: linear-gradient(155deg, rgba(20, 23, 29, 0.98), rgba(12, 15, 20, 0.98));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.cs-index-page .cs-index-filter-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.cs-index-page .cs-filter-disclosure > summary {
    list-style: none;
}

.cs-index-page .cs-filter-disclosure > summary::-webkit-details-marker {
    display: none;
}

.cs-index-page .cs-filter-disclosure > summary {
    display: none;
}

.cs-index-page .cs-filter-disclosure:not([open]) > form {
    display: none;
}

.cs-index-page .cs-index-filter-title {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.cs-index-page .cs-index-filter-name {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 700;
}

@media (max-width: 760px) {
    .cs-index-page .cs-index-filter {
        padding: 12px 14px;
    }

    .cs-index-page .cs-filter-disclosure > summary {
        display: flex;
        min-height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
        cursor: pointer;
    }

    .cs-index-page .cs-filter-disclosure > summary:focus-visible {
        outline: 2px solid var(--red-bright);
        outline-offset: 3px;
    }

    .cs-index-page .cs-filter-disclosure > summary::after {
        display: grid;
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
        place-items: center;
        margin-left: auto;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        color: var(--text-light);
        content: "+";
        font-size: 1.1rem;
        line-height: 1;
    }

    .cs-index-page .cs-filter-disclosure[open] > summary {
        margin-bottom: 12px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    }

    .cs-index-page .cs-filter-disclosure[open] > summary::after {
        content: "−";
    }
}

.cs-index-page .cs-index-filter-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-content: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid rgba(240, 68, 77, 0.25);
    border-radius: 5px;
    background: rgba(240, 68, 77, 0.08);
}

.cs-index-page .cs-index-filter-icon::before,
.cs-index-page .cs-index-filter-icon::after {
    width: 13px;
    height: 2px;
    border-radius: 2px;
    background: var(--red-bright);
    box-shadow: 0 6px 0 rgba(240, 68, 77, 0.65);
    content: "";
}

.cs-index-page .cs-index-filter-icon::after {
    display: none;
}

.cs-index-page .cs-filter-group {
    margin-top: 11px;
}

.cs-index-page .cs-filter-group label {
    color: var(--text-faint);
    font-size: 0.65rem;
    letter-spacing: 0.09em;
}

.cs-index-page .cs-filter-group input,
.cs-index-page .cs-filter-group select {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 0.7rem 0.75rem;
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 4px;
    background-color: rgba(5, 8, 12, 0.72);
    color: var(--text-light);
    font-size: 0.88rem;
}

.cs-index-page .cs-filter-panel button {
    width: 100%;
    margin-top: 14px;
    font-size: 0.8rem;
}

.cs-index-page .cs-results-toolbar {
    min-height: 38px;
    margin: 0 0 12px;
}

.cs-index-page .cs-results-toolbar h3 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--text-light);
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.cs-index-page .cs-results-toolbar h3 span {
    color: var(--text-faint);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0;
}

.cs-index-page .cs-results-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    justify-content: start;
    gap: 14px;
}

.cs-index-page .cs-resource-card {
    min-width: 0;
    max-width: 380px;
    border-color: rgba(255, 255, 255, 0.075);
    border-radius: 5px;
    background: linear-gradient(155deg, rgba(21, 24, 30, 0.98), rgba(12, 15, 20, 0.98));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.cs-index-page .cs-resource-card:hover {
    border-color: rgba(240, 68, 77, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
}

.cs-index-page .cs-resource-body {
    gap: 12px;
    min-width: 0;
    padding: 16px;
}

.cs-index-page .cs-resource-visual {
    aspect-ratio: 16 / 9;
}

.cs-index-page .cs-resource-verified {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    border: 1px solid rgba(104, 200, 146, 0.32);
    border-radius: 4px;
    background: rgba(8, 16, 13, 0.86);
    color: #b8f4cf;
    font-size: 0.66rem;
    font-weight: 750;
    backdrop-filter: blur(6px);
}

.cs-index-page .cs-resource-body .cs-badges {
    min-height: 0;
    margin: 0;
}

.cs-index-page .cs-resource-body .cs-resource-card-title {
    display: -webkit-box;
    min-height: 2.6em;
    overflow: hidden;
    margin: 0;
    padding: 0;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.cs-index-page .cs-resource-body h3 {
    display: block;
    overflow-wrap: anywhere;
}

.cs-index-page .cs-resource-body .cs-resource-summary {
    display: -webkit-box;
    overflow: hidden;
    min-height: 0;
    color: #969090;
    font-size: 0.82rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.cs-index-page .cs-resource-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 10px;
    row-gap: 8px;
    padding-top: 9px;
    border-top: 1px solid rgba(255, 255, 255, 0.065);
    font-size: 0.68rem;
}

.cs-index-page .cs-resource-meta span {
    min-width: 0;
}

.cs-index-page .cs-resource-meta .cs-inline-icon {
    flex: 0 0 auto;
}

.cs-index-page .cs-resource-meta time,
.cs-index-page .cs-resource-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cs-index-page .cs-card-open-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.065);
    color: var(--text-light);
    font-size: 0.74rem;
    font-weight: 700;
}

.cs-index-page .cs-resource-card:hover .cs-card-open-label {
    color: var(--red-bright);
}

.cs-index-page .cs-resource-actions {
    gap: 8px;
    color: var(--text-faint);
    font-size: 0.7rem;
}

.cs-index-page .cs-resource-actions > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-index-page .cs-card-uploader {
    display: inline-flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
}

.cs-index-page .cs-card-uploader .cs-profile-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
}

.cs-index-page .cs-card-uploader-label {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.cs-index-page .cs-card-uploader-label small {
    color: var(--text-faint);
    font-size: 0.62rem;
    line-height: 1.1;
}

.cs-index-page .cs-card-uploader-label strong {
    overflow: hidden;
    color: var(--text-light);
    font-size: 0.72rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-index-page .cs-card-developer-credit {
    overflow: hidden;
    color: #969090;
    font-size: 0.68rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-index-page .cs-resource-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(240, 68, 77, 0.32);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 0.72rem;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.cs-index-page .cs-resource-link:hover {
    border-color: var(--red-bright);
    background: rgba(240, 68, 77, 0.1);
    color: #969090;
}

.cs-index-page .cs-empty-panel {
    min-height: 230px;
    align-content: center;
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background:
        radial-gradient(ellipse at 100% 0, rgba(240, 68, 77, 0.09), transparent 38%),
        linear-gradient(145deg, rgba(19, 22, 28, 0.96), rgba(11, 14, 19, 0.98));
}

.cs-index-page .cs-empty-panel h3 {
    color: var(--text-light);
    font-size: 1.15rem;
}

.cs-index-page .cs-empty-panel p {
    max-width: 52ch;
    color: #969090;
    font-size: 0.86rem;
    line-height: 1.65;
}

.cs-index-page .cs-empty-panel .cs-resource-link {
    width: fit-content;
    margin-top: 6px;
    text-decoration: none;
}

.cs-index-page .cs-pagination {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.cs-index-page .cs-pagination > span {
    color: var(--text-faint);
    font-size: 0.78rem;
}

.cs-index-page .cs-pagination .cs-resource-actions {
    margin: 0;
}

.cs-index-page .cs-btn {
    min-height: 38px;
    padding: 0.5rem 0.95rem;
    border: 1px solid rgba(240, 68, 77, 0.36);
    border-radius: 4px;
    outline: none;
    background: rgba(240, 68, 77, 0.08);
    color: var(--text-light);
    font-size: 0.76rem;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.cs-index-page .cs-btn:hover {
    border-color: var(--red-bright);
    background: var(--red-bright);
    color: #969090;
}

.cs-index-page a:focus-visible,
.cs-index-page button:focus-visible,
.cs-index-page input:focus-visible,
.cs-index-page select:focus-visible {
    outline: 2px solid var(--red-bright);
    outline-offset: 3px;
}

@media (max-width: 980px) {
    .cs-index-page .cs-search-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .cs-index-page .cs-filter-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .cs-index-page .cs-shell {
        width: min(100% - 24px, 1280px);
    }

    .cs-index-page .cs-index-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 22px 18px;
    }

    .cs-index-page .cs-hero h1 {
        font-size: clamp(2.25rem, 11vw, 3.25rem);
    }

    .cs-index-page .cs-hero-search {
        flex-direction: column;
        align-items: stretch;
    }

    .cs-index-page .cs-hero-search button {
        width: 100%;
    }

    .cs-index-page .cs-index-hero-stat {
        min-height: 165px;
    }
}

@media (max-width: 390px) {
    .cs-index-page .cs-listing-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Resource hub cards, detail gallery and image preview */
.cs-index-page .cs-resource-card,
.cs-similar-grid .cs-resource-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0;
}

.cs-index-page .cs-resource-card {
    color: inherit;
    text-decoration: none;
}

.cs-resource-card-title {
    min-width: 0;
    margin: 0;
    padding: 15px 16px 12px;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cs-index-page .cs-resource-card-title {
    transition: color 220ms ease-in-out;
}

.cs-index-page .cs-resource-card:hover .cs-resource-card-title,
.cs-index-page .cs-resource-card:focus-within .cs-resource-card-title {
    color: var(--red-bright);
}

.cs-resource-card-title a {
    color: inherit;
    text-decoration: none;
}

.cs-resource-card-title a:hover {
    color: var(--red-bright);
}

.cs-index-page .cs-resource-visual,
.cs-similar-grid .cs-resource-visual {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #090c10;
}

.cs-index-page .cs-resource-visual > img,
.cs-similar-grid .cs-resource-visual > img {
    position: relative;
    z-index: 1;
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border: 0;
    background: #090c10;
}

.cs-index-page .cs-resource-visual > .cs-resource-placeholder,
.cs-similar-grid .cs-resource-visual > .cs-resource-placeholder {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
}

.cs-resource-category-overlay,
.cs-resource-likes-overlay {
    position: absolute;
    z-index: 2;
    top: 10px;
    display: inline-flex;
    max-width: calc(100% - 20px);
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 4px;
    background: rgba(8, 11, 16, 0.82);
    color: #969090;
    font-size: 0.72rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.cs-resource-category-overlay {
    left: 10px;
}

.cs-resource-likes-overlay {
    right: 10px;
}

.cs-resource-category-overlay .cs-inline-icon,
.cs-resource-likes-overlay .cs-inline-icon {
    flex: 0 0 auto;
}

.cs-index-page .cs-resource-card-body,
.cs-index-page .cs-resource-body,
.cs-similar-grid .cs-resource-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    flex: 1;
}

.cs-index-page .cs-resource-body {
    gap: 10px;
    padding: 12px 16px 15px;
}

.cs-index-page .cs-resource-body p,
.cs-similar-grid .cs-resource-body p {
    min-height: 0;
    margin: 0;
    color: #969090;
    font-size: 0.82rem;
    line-height: 1.5;
}

.cs-resource-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--text-faint);
    font-size: 0.76rem;
}

.cs-resource-card-meta time,
.cs-resource-card-meta > span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.cs-resource-card-meta .cs-inline-icon {
    flex: 0 0 auto;
}

.cs-pagination {
    align-items: center;
    margin-top: 22px;
}

.cs-page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.cs-page-numbers .cs-btn,
.cs-page-number {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-light);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.cs-page-numbers .cs-btn {
    background: var(--red-bright);
}

.cs-page-number.is-current,
.cs-page-number:hover,
.cs-page-numbers .cs-btn:hover {
    border-color: var(--red-bright);
    background: rgba(240, 68, 77, 0.15);
    color: #969090;
}

.cs-resource-detail {
    grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
    align-items: start;
    gap: 18px;
}

.cs-detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    gap: 14px;
    padding: clamp(16px, 2vw, 24px);
}

.cs-detail-main > * {
    min-width: 0;
    max-width: 100%;
}

.cs-detail-heading h1 {
    margin-bottom: 12px;
}

.cs-detail-subtitle {
    margin: 10px 0 0;
    color: #969090;
    font-size: 0.82rem;
    line-height: 1.5;
}

.cs-detail-subtitle [aria-hidden="true"] {
    padding: 0 0.3em;
    color: var(--text-faint);
}

.cs-detail-actions {
    margin-top: 0;
}

.cs-detail-actions .cs-detail-back {
    justify-content: flex-start;
    min-height: 38px;
    padding: 10px;
    border: solid 1px rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: transparent;
    color: #fafafa;
    text-decoration: none;
}

.cs-detail-actions .cs-detail-back:hover {
    color: var(--text-light);
}

.cs-detail-fact--size > strong {
    color: #fafafa;
    font-size: 1rem;
    font-weight: 750;
}

.cs-detail-fact--uploader > strong {
    min-width: 0;
    text-align: right;
}

.cs-detail-uploader {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    text-decoration: none;
}

.cs-detail-uploader:hover {
    color: var(--red-bright);
}

.cs-detail-uploader:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--red-bright);
    outline-offset: 3px;
}

.cs-detail-uploader .cs-profile-avatar1 {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    object-fit: cover;
}

.cs-detail-uploader > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-detail-content {
    display: grid;
    min-width: 0;
    gap: 16px;
    margin-top: 18px;
}

.cs-detail-content > * {
    min-width: 0;
}

.cs-detail-overview {
    display: grid;
    gap: 10px;
}

.cs-detail-overview h2,
.cs-description-heading {
    margin: 0;
    color: var(--text-light);
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.cs-description-header {
    display: grid;
    gap: 7px;
    padding: 0 0 15px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 3px solid var(--red-bright);
}

.cs-description-eyebrow {
    color: var(--red-bright);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.cs-detail-summary {
    margin: 0;
    padding: 14px 16px;
    border-left: 3px solid var(--red-bright);
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-light);
    font-size: 0.94rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.cs-detail-content .cs-description {
    margin: 0;
    color: #969090;
    font-size: 0.96rem;
    line-height: 1.75;
}

.cs-detail-content .forum-code-block {
    max-width: 100%;
    margin: 1rem 0;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.13);
    background: #0b1016;
    color: #e5edf4;
    font-size: clamp(0.88rem, 1vw, 0.98rem);
}

.cs-detail-content .forum-code-block.cs-resource-config {
    border-left: 3px solid rgba(240, 68, 77, 0.75);
}

.cs-detail-content .forum-code-header {
    min-height: 42px;
    padding: 0.45rem 0.75rem;
    border-color: rgba(255, 255, 255, 0.09);
}

.cs-detail-content .forum-code-block pre.line-numbers {
    max-width: 100%;
    margin: 0;
    padding: 1rem 1.1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    color: #e5edf4;
    font-size: inherit;
    line-height: 1.75;
    scrollbar-color: #596575 #111820;
    scrollbar-width: thin;
}

.cs-detail-content .forum-code-block pre.line-numbers code {
    min-width: max-content;
    color: inherit;
    font-size: inherit;
    tab-size: 4;
}

.cs-detail-content .forum-code-block.cs-resource-config pre.line-numbers code > span {
    display: inline;
}

.cs-description .cs-code-command {
    color: #8bd5ff;
    font-weight: 700;
}

.cs-description .cs-code-variable {
    color: #f4ca7a;
}

.cs-description .cs-code-value {
    color: #a8e6b3;
}

.cs-description .cs-code-comment {
    color: #94a3b8;
}

.cs-detail-rating-label {
    color: #969090;
    font-weight: 700;
}

.cs-description-toc {
    display: grid;
    gap: 9px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 8px;
    background: rgba(5, 9, 14, 0.4);
}

.cs-description-toc > strong {
    color: var(--text-light);
    font-size: 0.82rem;
}

.cs-description-toc ol {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 7px 16px;
    margin: 0;
    padding-left: 1.2rem;
}

.cs-description-toc a {
    color: #969090;
    font-size: 0.78rem;
    text-decoration: none;
}

.cs-description-toc a:hover {
    color: var(--red-bright);
}

.cs-description-tools {
    display: flex;
    justify-content: flex-end;
}

.cs-copy-all-code {
    min-height: 36px;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-light);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.cs-copy-all-code:hover:not(:disabled) {
    border-color: var(--red-bright);
    background: rgba(240, 68, 77, 0.1);
}

.cs-copy-all-code:focus-visible {
    outline: 2px solid var(--red-bright);
    outline-offset: 2px;
}

.cs-copy-all-code:disabled {
    cursor: wait;
    opacity: 0.7;
}

.cs-detail-content .cs-description-tools {
    align-items: center;
    gap: 12px;
    margin-bottom: -8px;
}

.cs-detail-side {
    display: grid;
    gap: 14px;
    padding: 14px;
}

.cs-detail-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 0;
}

.cs-gallery-image-button {
    position: relative;
    display: block;
    min-width: 0;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 4px solid #414651;
    border-radius: 5px;
    background: #070a0f;
    color: inherit;
    cursor: zoom-in;
    font: inherit;
    text-align: left;
    text-decoration: none;
    appearance: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.cs-gallery-image-button--main {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}

.cs-gallery-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
    object-fit: cover;
    background: #070a0f;
}

.cs-gallery-image-button--main > span:not(.visually-hidden) {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 8px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.72);
    color: #969090;
    font-size: 0.7rem;
}

.cs-gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.cs-gallery-thumbnails .cs-gallery-image-button {
    aspect-ratio: 4 / 3;
    border-width: 3px;
}

.cs-gallery-thumbnails .cs-gallery-image-button:hover,
.cs-gallery-image-button--main:hover {
    border-color: var(--red-bright);
    box-shadow: 0 0 0 2px rgba(240, 68, 77, 0.16);
}

.cs-gallery-empty {
    display: grid;
    min-height: 220px;
    place-items: center;
    padding: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-faint);
    text-align: center;
}

.cs-detail-facts {
    display: grid;
    gap: 0;
    padding: 4px 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(5, 9, 14, 0.48);
}

.cs-detail-fact {
    display: flex;
    min-width: 0;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.88rem;
}

.cs-detail-fact:last-child {
    border-bottom: 0;
}

.cs-detail-fact > span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: #969090;
}

.cs-detail-fact > span .cs-inline-icon {
    width: 17px;
    height: 17px;
    opacity: 0.86;
}

.cs-detail-fact > strong {
    min-width: 0;
    color: var(--text-light);
    font-size: 0.88rem;
    text-align: right;
    overflow-wrap: anywhere;
}

.cs-detail-main .cs-detail-voting {
    margin: 0;
}

.cs-detail-voting {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(5, 9, 14, 0.34);
}

.cs-vote-heading {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.cs-vote-heading .cs-detail-stat-label {
    margin: 0;
    color: #969090;
    font-size: 0.88rem;
    font-weight: 700;
}

.cs-vote-total,
.cs-vote-empty {
    color: var(--text-faint);
    font-size: 0.72rem;
    white-space: nowrap;
}

.cs-vote-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.cs-vote-actions .cs-vote-button {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 78px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    gap: 2px 10px;
    padding: 11px 13px;
    overflow: hidden;
    border: 1px solid;
    border-radius: 12px;
    font: inherit;
    text-align: left;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.cs-vote-actions .cs-vote-button--like {
    --cs-vote-accent: 72, 211, 132;
    border-color: rgba(72, 211, 132, 0.32);
    background-color: #141a20;
    background-image: none;
    color: #f1f5f8;
}

.cs-vote-actions .cs-vote-button--dislike {
    --cs-vote-accent: 240, 88, 91;
    border-color: rgba(240, 88, 91, 0.38);
    background-color: #141a20;
    background-image: none;
    color: #f1f5f8;
}

.cs-vote-actions .cs-vote-button .cs-vote-icon {
    display: grid;
    width: 26px;
    height: 26px;
    grid-row: 1 / 3;
    grid-column: 1;
    place-items: center;
    background: transparent;
}

.cs-vote-actions .cs-vote-button .cs-vote-icon svg {
    display: block;
    width: 23px;
    height: 23px;
    fill: none;
    stroke: #48d384;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.cs-vote-actions .cs-vote-button.is-selected .cs-vote-icon svg {
    fill: rgb(var(--cs-vote-accent));
    stroke: rgb(var(--cs-vote-accent));
}

.cs-vote-actions .cs-vote-button--dislike .cs-vote-icon svg {
    stroke: #f0585b;
}

.cs-vote-actions .cs-vote-button--dislike.is-selected .cs-vote-icon svg {
    fill: #f0585b;
    stroke: #f0585b;
}

.cs-vote-actions .cs-vote-button .cs-vote-label {
    min-width: 0;
    grid-row: 1;
    grid-column: 2;
    align-self: end;
    color: #72e6a1;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.2;
}

.cs-vote-actions .cs-vote-button--dislike .cs-vote-label {
    color: #ff8588;
}

.cs-vote-actions .cs-vote-button strong {
    grid-row: 1;
    grid-column: 3;
    align-self: end;
    margin: 0;
    color: #969090;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.cs-vote-actions .cs-vote-button small {
    grid-row: 2;
    grid-column: 2 / 4;
    align-self: start;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    text-align: left;
}

.cs-vote-actions .cs-vote-button--like:hover:not(:disabled) {
    border-color: rgba(72, 211, 132, 0.85);
    background-color: #19241f;
    background-image: none;
    color: #969090;
    box-shadow: 0 0 18px rgba(72, 211, 132, 0.2), inset 0 0 0 1px rgba(72, 211, 132, 0.12);
    transform: translateY(-1px);
}

.cs-vote-actions .cs-vote-button--dislike:hover:not(:disabled) {
    border-color: rgba(240, 88, 91, 0.88);
    background-color: #261a1d;
    background-image: none;
    color: #969090;
    box-shadow: 0 0 18px rgba(240, 88, 91, 0.2), inset 0 0 0 1px rgba(240, 88, 91, 0.12);
    transform: translateY(-1px);
}

.cs-vote-actions .cs-vote-button:focus-visible {
    outline: 2px solid rgba(var(--cs-vote-accent), 0.9);
    outline-offset: 3px;
}

.cs-vote-actions .cs-vote-button.is-selected:disabled {
    border-color: rgba(var(--cs-vote-accent), 0.82);
    background-color: #151c21;
    background-image: none;
    color: #969090;
    opacity: 1;
    box-shadow: inset 0 0 0 1px rgba(var(--cs-vote-accent), 0.12);
}

.cs-vote-actions .cs-vote-button:disabled:not(.is-selected) {
    border-color: rgba(var(--cs-vote-accent), 0.24);
    background-color: #141a20;
    background-image: none;
    color: #dce3e8;
    cursor: not-allowed;
    opacity: 0.72;
    box-shadow: none;
    transform: none;
}

.cs-vote-actions[aria-busy="true"] .cs-vote-button {
    cursor: progress;
}

.cs-vote-progress {
    display: flex;
    width: 100%;
    height: 9px;
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.cs-vote-progress-like {
    background: #39bd76;
    transition: width 240ms ease;
}

.cs-vote-progress-dislike {
    background: #e94c54;
    transition: width 240ms ease;
}

.cs-vote-empty {
    text-align: center;
}

.cs-detail-voting .cs-vote-status[hidden],
.cs-detail-voting .cs-vote-empty[hidden] {
    display: none;
}

.cs-detail-voting .cs-vote-status.is-error {
    color: #ffb4b7;
}

.cs-vote-actions .cs-vote-button:active:not(:disabled) {
    transform: translateY(0) scale(0.99);
}

.cs-detail-actions .cs-detail-download {
    min-height: 54px;
    gap: 0.65rem;
    border: 1px solid rgba(255, 87, 92, 0.7);
    border-radius: 8px;
    background: linear-gradient(135deg, #ff5159, #df343f);
    box-shadow: 0 8px 20px rgba(223, 52, 63, 0.2);
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.cs-detail-actions .cs-detail-download .cs-inline-icon {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: none;
}

.cs-detail-actions .cs-detail-download:hover {
    background: linear-gradient(135deg, #f7040494, #df343f57);
    color: #faf8f8;
    transform: translateY(-1px);
    box-shadow: 0 11px 24px rgba(223, 52, 63, 0.3);
    filter: brightness(1.06);
    opacity: 0.3s;
    animation: bordercolor-moving 0.5s infinite;
}

.btn-primary-cs {
    position: relative;
    align-items: center;
    padding: 0.5rem 18.2rem;
    display: inline-flex;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

@property --snake-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.cs-detail-actions .cs-detail-download {
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(255, 62, 70, 0.4);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.cs-detail-actions .cs-detail-download::before {
    content: "";
    position: absolute;
    inset: -2px;
    padding: 2px;
    border-radius: inherit;
    background: conic-gradient(
        from var(--snake-angle),
        transparent 0deg 285deg,
        rgba(255, 62, 70, 0.25) 310deg,
        #ff303c 335deg,
        #ffffff 345deg,
        #ff303c 355deg,
        transparent 360deg
    );

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;

    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;

    pointer-events: none;
    opacity: 0;
}

.cs-detail-actions .cs-detail-download:hover {
    background: linear-gradient(135deg, #f7040494, #df343f57);
    color: #faf8f8;
    transform: translateY(-1px);
    box-shadow: 0 11px 24px rgba(223, 52, 63, 0.3);
    filter: brightness(1.06);
}

.cs-detail-actions .cs-detail-download:hover::before {
    opacity: 1;
    animation: snake-border 1.4s linear infinite;
}

@keyframes snake-border {
    0% {
        --snake-angle: 0deg;
        animation-timing-function: linear;
    }

    50% {
        --snake-angle: 180deg;
        animation-timing-function: linear;
    }

    100% {
        --snake-angle: 360deg;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs-detail-actions .cs-detail-download:hover::before {
        animation: none;
    }
}


.cs-detail-actions .cs-detail-download:hover .cs-inline-icon {
    filter: none;
}

.cs-detail-actions .cs-detail-download:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(223, 52, 63, 0.2);
}

.cs-detail-fact--size > strong {
    color: #969090;
    font-size: 1rem;
    font-weight: 750;
}

.cs-detail-fact--uploader > strong {
    text-align: right;
}

.cs-detail-uploader {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    text-decoration: none;
}

.cs-detail-uploader:hover {
    color: var(--red-bright);
}

.cs-detail-uploader .cs-profile-avatar1 {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    object-fit: cover;
}

.cs-detail-uploader > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-detail-rating-summary {
    display: grid;
    min-width: 0;
    justify-items: start;
    gap: 6px;
    margin: 0;
    padding: 16px 18px;
    border: 1px solid rgba(255, 211, 111, 0.24);
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 211, 111, 0.11), transparent 48%),
        linear-gradient(145deg, rgba(255, 211, 111, 0.06), rgba(8, 12, 17, 0.82) 72%);
    color: #969090;
}

.cs-detail-rating-label {
    color: #969090;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.cs-detail-rating-main {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.cs-detail-rating-value {
    color: #fff4d5;
    font-size: clamp(2rem, 5vw, 2.55rem);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
}

.cs-detail-rating-stars {
    color: #ffd36f;
    font-size: 32px;
    letter-spacing: 0.1em;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 0 14px rgba(255, 211, 111, 0.2);
}

.cs-detail-rating-count {
    color: #969090;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.cs-detail-rating-summary[aria-label="No ratings yet (0 ratings)"] .cs-detail-rating-value {
    color: #969090;
}

.cs-detail-summary {
    border-radius: 6px;
}

.cs-description {
    border-radius: 6px;
}

.cs-view-error {
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 62, 62, 0.42);
    border-radius: 6px;
    background: rgba(255, 62, 62, 0.09);
    color: #ffd6d6;
    line-height: 1.5;
}

.cs-similar-divider {
    margin: 36px 0 16px;
}

.cs-similar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.cs-gallery-image-button:focus-visible,
.cs-page-numbers a:focus-visible {
    outline: 2px solid var(--red-bright);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 980px) {
    .cs-resource-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    .cs-detail-side {
        position: relative;
        grid-template-columns: minmax(0, 1fr);
    }

    .cs-similar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .cs-detail-main,
    .cs-detail-side {
        padding: 14px;
    }

    .cs-resource-detail {
        gap: 12px;
        margin-top: 16px;
    }

    .cs-detail-content {
        gap: 12px;
        margin-top: 12px;
    }

    .cs-gallery-thumbnails {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .cs-gallery-image-button {
        border-width: 3px;
    }

    .cs-index-page .cs-resource-visual,
    .cs-similar-grid .cs-resource-visual {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .cs-index-page .cs-resource-visual > img,
    .cs-similar-grid .cs-resource-visual > img {
        height: 100%;
    }

    .cs-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .cs-page-numbers {
        justify-content: flex-start;
    }

    .cs-detail-gallery {
        grid-template-columns: minmax(0, 1fr);
    }

    .cs-gallery-image-button--main {
        height: min(65vw, 360px);
        min-height: 190px;
    }

    .cs-gallery-thumbnails {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .cs-similar-grid {
        grid-template-columns: minmax(0, 1fr);
    }

}

@media (max-width: 420px) {
    .cs-vote-actions {
        gap: 7px;
    }

    .cs-vote-actions .cs-vote-button {
        min-height: 72px;
        grid-template-columns: 32px minmax(0, 1fr) auto;
        gap: 2px 7px;
        padding: 9px;
    }

    .cs-vote-actions .cs-vote-button .cs-vote-icon {
        width: 24px;
        height: 24px;
    }

    .cs-vote-actions .cs-vote-button .cs-vote-icon svg {
        width: 22px;
        height: 22px;
    }
}

.cs-index-page .cs-hero-search {
    display: flex;
    width: 100%;
    max-width: 740px;
    align-items: stretch;
    gap: 10px;
}

.cs-index-page .cs-hero-search input[type="search"] {
    display: block;
    flex: 1 1 0%;
    width: 0;
    min-width: 0;
    box-sizing: border-box;
}

.cs-index-page .cs-hero-search .btn-primary {
    flex: 0 0 auto;
    width: auto;
    min-width: 132px;
}

.cs-index-page .cs-hero h1 {
    max-width: 19ch;
    font-size: clamp(2.35rem, 4.6vw, 4.1rem);
    line-height: 1.04;
}

.cs-index-page .cs-results-toolbar {
    justify-content: space-between;
    gap: 12px;
}

.cs-index-page .cs-index-clear-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 4px;
    color: #969090;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.cs-index-page .cs-index-clear-filters:hover {
    border-color: rgba(240, 68, 77, 0.55);
    background: rgba(240, 68, 77, 0.08);
    color: var(--text-light);
}

.cs-index-page .cs-index-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: -2px 0 14px;
}

.cs-index-page .cs-index-active-filters > span {
    max-width: 100%;
    padding: 0.35rem 0.6rem;
    overflow-wrap: anywhere;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-faint);
    font-size: 0.72rem;
}

.cs-index-page .cs-index-active-filters strong {
    color: var(--text-light);
    font-weight: 700;
}

.cs-index-page .cs-results-grid {
    align-content: start;
}

.cs-index-page .cs-resource-card {
    position: relative;
    min-height: 100%;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.cs-index-page .cs-resource-placeholder {
    width: 100%;
    height: clamp(145px, 14vw, 190px);
    min-height: 0;
    aspect-ratio: 16 / 10;
    box-sizing: border-box;
}

.cs-index-page .cs-resource-visual {
    position: relative;
    display: grid;
    min-width: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #090c10;
}

.cs-index-page .cs-resource-visual > img,
.cs-index-page .cs-resource-visual > .cs-resource-placeholder {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
}

.cs-index-page .cs-resource-visual > img {
    position: relative;
    z-index: 1;
    object-fit: cover;
    object-position: center;
}

.cs-index-page .cs-resource-visual > img[hidden] {
    display: none;
}

.cs-index-page .cs-resource-visual .cs-resource-placeholder {
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.cs-index-page .cs-resource-placeholder {
    display: grid;
    place-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    background:
        radial-gradient(circle at 50% 35%, rgba(240, 68, 77, 0.13), transparent 42%),
        linear-gradient(145deg, rgba(28, 31, 38, 0.98), rgba(10, 13, 18, 0.98));
}

.cs-index-page .cs-resource-placeholder-icon {
    width: 40px;
    height: 40px;
    opacity: 0.78;
    filter: drop-shadow(0 5px 16px rgba(240, 68, 77, 0.2));
}

.cs-index-page .cs-resource-link:focus-visible,
.cs-index-page .cs-index-clear-filters:focus-visible {
    outline: 2px solid var(--red-bright);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .cs-index-page .cs-hero-search {
        flex-direction: column;
        align-items: stretch;
    }

    .cs-index-page .cs-hero-search input[type="search"] {
        flex: 0 0 auto;
        width: 100%;
        min-height: 48px;
    }

    .cs-index-page .cs-hero-search .btn-primary {
        width: 100%;
    }

    .cs-index-page .cs-hero h1 {
        max-width: 16ch;
        font-size: clamp(2.2rem, 10vw, 3.2rem);
    }

}

.cs-index-page .cs-category-browser {
    margin-top: clamp(24px, 3vw, 38px);
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(20, 23, 29, 0.92), rgba(12, 15, 20, 0.94));
}

.cs-index-page .cs-category-browser-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.cs-index-page .cs-category-browser-heading h2 {
    margin: 0;
    color: var(--text-light);
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.cs-index-page .cs-category-browser-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.cs-index-page .cs-category-browser-item {
    display: grid;
    min-width: 0;
    min-height: 48px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.025);
    color: #969090;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.cs-index-page .cs-category-browser-item:hover,
.cs-index-page .cs-category-browser-item.is-active {
    border-color: rgba(240, 68, 77, 0.42);
    background: rgba(240, 68, 77, 0.08);
    color: var(--text-light);
}

.cs-index-page .cs-category-browser-item:focus-visible {
    outline: 2px solid var(--red-bright);
    outline-offset: 2px;
}

.cs-index-page .cs-category-browser-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgba(240, 68, 77, 0.2);
    border-radius: 4px;
    background: rgba(240, 68, 77, 0.075);
}

.cs-index-page .cs-category-browser-image {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.cs-index-page .cs-category-browser-name {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-index-page .cs-category-browser-count {
    min-width: 24px;
    padding: 3px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text-faint);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: center;
}

.cs-index-page .cs-category-browser-item.is-active .cs-category-browser-count {
    background: rgba(240, 68, 77, 0.18);
    color: var(--text-light);
}

.cs-index-page .cs-resource-visual > img {
    object-fit: cover;
    object-position: center;
}

@media (max-width: 1120px) {
    .cs-index-page .cs-category-browser-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .cs-index-page .cs-category-browser-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .cs-index-page .cs-category-browser {
        padding: 14px;
    }

    .cs-index-page .cs-category-browser-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .cs-index-page .cs-category-browser-item {
        grid-template-columns: 26px minmax(0, 1fr) auto;
        gap: 7px;
        padding: 7px;
    }

    .cs-index-page .cs-category-browser-icon {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 640px) {
    .cs-index-page .cs-resource-visual {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .cs-index-page .cs-resource-visual > .cs-resource-placeholder {
        height: 100%;
        min-height: 0;
        aspect-ratio: auto;
    }
}

@media (max-width: 350px) {
    .cs-index-page .cs-category-browser-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
}
