:root {
    --message-bubble-bg: #0f111a;
    --message-bubble-fg: #ddd;

    --achievement-fg: inherit;
    --achievement-bg: #0f111a;
    --achievement-box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
        0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 3px 3px -2px rgba(0, 0, 0, 0.4);
    --achievement-progress-bg: #444;

    --alert-bg: #0f111a;
    --alert-fg: #999;
    --alert-gap-color: #333;
    --alert-gap-width: 1px;

    --article-card-bg: #0f111a;
    --article-card-fg: #fff;
    --article-card-head-fg: #d8d7dc;
    --article-card-time-fg: #999;
    --article-box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
        0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 3px 3px -2px rgba(0, 0, 0, 0.4);

    --bbcode-input-header-bg: #333;
    --bbcode-input-body-bg: #0c0e15;
    --bbcode-input-border: 1px solid #555;
    --bbcode-input-border-radius: 22px;
    --bbcode-input-bg: #0c0e15;

    --bbcode-rendered-fg-default: #c9d1d9;
    --bbcode-rendered-fg-muted: #808080;
    --bbcode-rendered-fg-subtle: #484f58;
    --bbcode-rendered-canvas-default: transparent;
    --bbcode-rendered-canvas-subtle: #313131;
    --bbcode-rendered-border-default: #3c3d3d;
    --bbcode-rendered-border-muted: #464749;
    --bbcode-rendered-neutral-muted: #0a0b11;
    --bbcode-rendered-accent-fg: #58a6ff;
    --bbcode-rendered-accent-emphasis: #2260be;
    --bbcode-rendered-attention-subtle: #7289da;
    --bbcode-rendered-danger-fg: #ff1410;
    --bbcode-rendered-quote-bg: #0a0b11;
    --bbcode-rendered-quote-border: #3981f6;

    --body-bg: #0a0b11;
    --body-fg: #d8d7dc;

    --breadcrumb-fg: #3981f6;
    --breadcrumb-active-fg: #4991f6;
    --breadcrumb-hover-fg: #4991f6;
    --breadcrumb-inactive-text-decoration: none;

    --button-filled-bg: #0f111a;
    --button-filled-border: none;
    --button-filled-border-radius: 6px;
    --button-filled-fg: #d8d7dc;

    --button-outlined-bg: inherit;
    --button-outlined-border: 1px solid #444;
    --button-outlined-border-radius: 6px;
    --button-outlined-fg: white;

    --button-text-bg: inherit;
    --button-text-border: none;
    --button-text-border-radius: 6px;
    --button-text-fg: white;

    --chatbox-message-bg: #0f111a;
    --chatbox-button-fg: #fff;
    --chatbox-button-hover-fg: #fff;
    --chatbox-users-bg: #302f34;
    --chatbox-tab-delete-fg: #c22222;
    --chatbox-tab-delete-bg: #444;

    --compact-search-bg: #0c0e15;
    --compact-search-box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
        0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 3px 3px -2px rgba(0, 0, 0, 0.4);
    --compact-search-border-radius: 27px;
    --compact-search-fg: #bbb;
    --compact-search-padding: 5px;

    --comparison-divider-fg: #fff;
    --comparison-button-fg: #fff;

    --data-table-border-radius: 22px;
    --data-table-fg: #c0c0c0;
    --data-table-th-bg: #0c0e15;
    --data-table-thead-border: 1px solid #3c3c3c;
    --data-table-tr-border: 1px solid #333;
    --data-table-tr-even-bg: #0c0e15;
    --data-table-tr-hover-bg: #121729;
    --data-table-tr-odd-bg: #0c0e15;
    --data-table-tfoot-border: 3px solid #3c3c3c;

    --dialog-bg: #0c0e15;
    --dialog-border: none;
    --dialog-border-radius: 22px;
    --dialog-box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
        0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 3px 3px -2px rgba(0, 0, 0, 0.4);
    --dialog-fg: #fff;
    --dialog-head-bg: #0c0e15;
    --dialog-head-fg: #fff;

    --donation-primary-text-color: white;
    --donation-chart-daily-bg: rgba(75, 192, 192, 0.2);
    --donation-chart-daily-border: rgba(75, 192, 192, 1);
    --donation-chart-monthly-bg: rgba(153, 102, 255, 0.2);
    --donation-chart-monthly-border: rgba(153, 102, 255, 1);

    --fieldset-bg: inherit;
    --fieldset-fg: #fff;
    --fieldset-border-radius: 20px;
    --fieldset-border: 1px solid #606060;

    --footer-bg: #00000026;
    --footer-hr-fg: #262626;

    --icon-button-bg: inherit;
    --icon-button-border: none;
    --icon-button-border-radius: 9999px;
    --icon-button-fg: white;

    --icon-button-filled-bg: #5cb579
        linear-gradient(to bottom right, #0ba360, #2bb673);
    --icon-button-filled-fg: white;
    --icon-button-filled-border: none;

    --input-text-border: 1px solid #555;
    --input-text-border-active: 2px solid #2195f3;
    --input-text-border-error: 1px solid #ba1b1b;
    --input-text-border-hover: 2px solid #fff;
    --input-text-border-radius: 20px;
    --input-text-fg: #fff;
    --input-text-padding: 12px;
    --input-text-padding-active: 11px;
    --input-text-padding-hover: 11px;

    --key-value-border-radius: 0;
    --key-value-even-bg: transparent;
    --key-value-fg: inherit;
    --key-value-odd-bg: transparent;
    --key-value-padding: 13px;

    --label-bg: #e2e2e2;
    --label-fg: white;
    --label-fg-active: #2195f3;
    --label-fg-error: #ba1b1b;
    --label-fg-hover: #fff;

    --legend-fg: #fff;
    --legend-bg: transparent;
    --legend-border: none;
    --legend-border-radius: 0;

    --mediahub-card-bg: #0f111a;
    --mediahub-card-fg: #ddd;
    --mediahub-card-hover-fg: #fff;
    --mediahub-card-border: none;
    --mediahub-card-border-radius: 22px;
    --mediahub-card-box-shadow: 0px 3px 3px -2px rgba(0, 0, 0, 0.2),
        0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12);

    --meta-backdrop-filter: brightness(30%) blur(100px);
    --meta-dropdown-backdrop-filter: brightness(2) blur(10px);
    --meta-dropdown-bg: #4449;
    --meta-dropdown-backdrop-filter-hover: brightness(2) blur(10px);
    --meta-dropdown-hover-bg: rgba(255, 255, 255, 0.1);
    --meta-dropdown-fg: #bbb;
    --meta-dropdown-hover-fg: #0e111c;
    --meta-description-fg: #ddd;
    --meta-id-tag-fg: #eee;
    --meta-id-tag-bg: transparent;
    --meta-id-tag-hover-fg: #fff;
    --meta-id-tag-hover-bg: rgba(255, 255, 255, 0.1);
    --meta-chips-heading-fg: #bbb;
    --meta-chip-icon-fg: #1f1f1f;
    --meta-chip-icon-hover-bg: #bbb;
    --meta-chip-icon-bg: #cdcdcd;
    --meta-chip-name-fg: #e2e2e2;
    --meta-chip-value-fg: #fff;
    --meta-chip-value-hover-fg: #fff;
    --meta-chip-backdrop-filter-hover: brightness(2) blur(10px);
    --meta-chip-hover-bg: rgba(255, 255, 255, 0.1);
    --meta-popup-bg: #1a1a1a;
    --meta-popup-fg: #7f8c8d;

    --meter-fg: #2260be;
    --meter-bg: #0f111a;

    --notification-read: transparent;
    --notification-unread: #2bb666;

    --option-bg: #0f111a;
    --option-fg: #212121;

    --paginate-bg: #0c0e15;
    --paginate-bg-hover: #121729;
    --paginate-bg-current: #121729;
    --paginate-border-radius: 22px;
    --paginate-fg: #ddd;
    --paginate-fg-disabled: #999;
    --paginate-divider: #0e111c;

    --panel-action-fg: #fff;
    --panel-border: none;
    --panel-bg: #0c0e15;
    --panel-fg: #bbb;
    --panel-body-border-radius: 22px;
    --panel-box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
        0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 3px 3px -2px rgba(0, 0, 0, 0.4);
    --panel-border-radius: 22px;
    --panel-head-bg: #0c0e15;
    --panel-head-fg: #d8d7dc;
    --panel-head-border-radius: 22px;

    --playlist-card-bg: #0f111a;
    --playlist-card-border: none;
    --playlist-card-border-radius: 20px;
    --playlist-card-box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
        0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --playlist-card-fg: #d8d7dc;
    --playlist-card-missing-image-bg: #262626;
    --playlist-card-missing-image-fg: #1d1d1d;

    --post-bg: #0f111a;
    --post-fg: #212121;
    --post-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
        0 3px 3px -2px rgba(0, 0, 0, 0.12), 0 1px 8px 0 rgba(0, 0, 0, 0.2);
    --post-head-fg: var(--panel-fg);
    --post-head-bg: none;
    --post-toolbar-bg: #0f111a;
    --post-toolbar-fg: #999;
    --post-toolbar-hover-bg: #0f111a;
    --post-toolbar-hover-fg: #2195f3;
    --post-like-fg: #5ab15f;
    --post-dislike-fg: #c93120;
    --post-aside-bg: #0f111a;
    --post-aside-fg: #696969;
    --post-footer-fg: var(--panel-fg);

    --prize-bg: #0f111a;
    --prize-border-radius: 20px;
    --prize-border: none;
    --prize-box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
        0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --prize-fg: #d8d7dc;
    --prize-heading-fg: #d8d7dc;
    --prize-icon-primary-color: mediumseagreen;
    --prize-icon-secondary-color: linen;

    --quick-search-bg: #0f111a;
    --quick-search-fg: #fff;
    --quick-search-border: none;
    --quick-search-border-radius: 18px;
    --quick-search-box-shadow: 0 4px 6px rgba(32, 33, 36, 0.28);
    --quick-search-selector-fg: #0e111c;
    --quick-search-selector-hover-bg: #121729;
    --quick-search-selector-hover-fg: #0e111c;
    --quick-search-selector-selected-bg: #0f111a;
    --quick-search-selector-selected-fg: #0e111c;
    --quick-search-result-bg: #0f111a;
    --quick-search-result-fg: #0e111c;
    --quick-search-result-hover-bg: #121729;
    --quick-search-result-hover-fg: #0e111c;
    --quick-search-result-image-border-radius: 5px;
    --quick-search-result-year-fg: #fff;
    --quick-search-result-border: none;

    --scrollbar-color: #0004;

    --secondary-nav-bg: #08090f;
    --secondary-nav-box-shadow: 0 8px 10px 0 rgba(0, 0, 0, 0.3);
    --secondary-nav-tab-fg: #fff;
    --secondary-nav-tab-bg: inherit;
    --secondary-nav-tab-active-text-decoration: underline #0099ff 2px;
    --secondary-nav-tab-hover-fg: #fff;
    --secondary-nav-tab-hover-bg: transparent;
    --secondary-nav-tab-hover-text-decoration: underline #0088ff 2px;
    --secondary-nav-tab-menu-bg: #08090f;
    --secondary-nav-tab-menu-fg: inherit;
    --secondary-nav-tab-menu-border: none;
    --secondary-nav-tab-menu-border-radius: 6px;
    --secondary-nav-tab-menu-box-shadow: 0 12px 17px 2px rgba(0, 0, 0, 0.14),
        0 5px 22px 4px rgba(0, 0, 0, 0.12), 0 7px 8px -4px rgba(0, 0, 0, 0.2);

    --select-border: 1px solid #606060;
    --select-border-active: 2px solid #2195f3;
    --select-border-error: 1px solid #ba1b1b;
    --select-border-hover: 2px solid #999;
    --select-border-radius: 20px;
    --select-fg: white;
    --select-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='%230e111c' d='M6 8l-1 1l5 5l5-5l-1-1l-4 4l-4-4z'/></svg>");
    --select-padding: 11px 23px 11px 11px;
    --select-padding-active: 10px 22px 10px 10px;
    --select-padding-hover: 10px 22px 10px 10px;

    --subforum-listing-odd-bg: transparent;
    --subforum-listing-even-bg: transparent;
    --subforum-listing-border: 1px solid #3c3c3c;

    --textarea-border: 1px solid #555;
    --textarea-border-active: 2px solid #2196f3;
    --textarea-border-error: 1px solid #ba1b1b;
    --textarea-border-hover: 2px solid #999;
    --textarea-border-radius: 20px;
    --textarea-fg: #fff;
    --textarea-padding: 12px;
    --textarea-padding-active: 11px;
    --textarea-padding-hover: 11px;

    --top-nav-bg: #0c0e15;
    --top-nav-box-shadow: 0 8px 10px 0 rgba(0, 0, 0, 0.2);
    --top-nav-dropdown-fg: #eae9ee;
    --top-nav-dropdown-hover-fg: #f0eff4;
    --top-nav-dropdown-hover-bg: #0e111c;
    --top-nav-dropdown-hover-text-decoration: none;
    --top-nav-dropdown-menu-bg: #0c0e15;
    --top-nav-dropdown-menu-border: none;
    --top-nav-dropdown-menu-border-radius: 6px;
    --top-nav-dropdown-menu-box-shadow: 0 12px 17px 2px rgba(0, 0, 0, 0.14),
        0 5px 22px 4px rgba(0, 0, 0, 0.12), 0 7px 8px -4px rgba(0, 0, 0, 0.2);
    --top-nav-dropdown-menu-item-fg: #eae9ee;
    --top-nav-dropdown-menu-item-bg: #0c0e15;
    --top-nav-dropdown-menu-item-hover-fg: inherit;
    --top-nav-dropdown-menu-item-hover-bg: #0e111c;
    --top-nav-dropdown-menu-item-hover-text-decoration: none;
    --top-nav-dropdown-menu-item-icon-fg: #eae9ee;
    --top-nav-dropdown-menu-item-icon-bg: #0e111c;
    --top-nav-ratio-bar-fg: #eae9ee;
    --top-nav-icon-bar-icon-bg: #0e111c;
    --top-nav-icon-bar-icon-fg: #eae9ee;
    --top-nav-icon-bar-icon-border-radius: 50%;
    --top-nav-icon-bar-icon-hover-bg: #0e111c;
    --top-nav-icon-bar-icon-hover-fg: #f0eff4;
    --top-nav-stats-fg: #eae9ee;
    --top-nav-toggle-fg: #eae9ee;

    --torrent-card-bg: #0f111a;
    --torrent-card-fg: #fff;
    --torrent-card-border: none;
    --torrent-card-head-bg: #0f111a;
    --torrent-card-head-fg: #fff;
    --torrent-card-link-fg: #fff;
    --torrent-card-genre-fg: #fff;

    --torrent-group-bg: #0f111a;
    --torrent-group-header-bg: #0f111a;
    --torrent-group-text: #fff;
    --torrent-group-text-muted: #999999;
    --torrent-group-table-stripe-even: rgba(0, 0, 0, 0.18);
    --torrent-group-table-stripe-odd: rgba(0, 0, 0, 0.1);
    --torrent-group-hover-brightness-emphasis: 1.13;
    --torrent-group-chip-border: #444;

    --torrent-row-fg: #bbb;
    --torrent-row-visited-fg: #8768e0;
    --torrent-row-sticky-bg: #302f34;
    --torrent-row-format-fg: #bbb;
    --torrent-row-format-bg: transparent;
    --torrent-row-buttons-fg: #0e111c;
    --torrent-row-seeders-fg: #7ad17f;
    --torrent-row-leechers-fg: #e95140;
    --torrent-row-completed-fg: #4f84d7;
    --torrent-row-comments-fg: #3fb618;
    --torrent-row-internal-fg: #baaf94;
    --torrent-row-personal-fg: #865be9;
    --torrent-row-featured-fg: #f92672;
    --torrent-row-freeleech-fg: #ffb800;
    --torrent-row-double-upload-fg: #4cb828;
    --torrent-row-sticky-fg: #111111;
    --torrent-row-highspeed-fg: #ff0039;
    --torrent-row-bumped-fg: #f9ba13;

    --torrent-tag-fg: #eee;
    --torrent-tag-bg: transparent;
    --torrent-tag-hover-fg: #fff;
    --torrent-tag-hover-bg: rgba(255, 255, 255, 0.1);

    --user-stat-card-bg: #0f111a;
    --user-stat-card-fg: #ddd;
    --user-stat-card-border: none;
    --user-stat-card-border-radius: 22px;
    --user-stat-card-box-shadow: 0px 3px 3px -2px rgba(0, 0, 0, 0.2),
        0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12);
}

.panel__body {
    border-bottom-left-radius: var(--panel-border-radius);
    border-bottom-right-radius: var(--panel-border-radius);
}

.panel__header {
    border-top-left-radius: var(--panel-border-radius);
    border-top-right-radius: var(--panel-border-radius);
}

.panel__header:has(+ [style='display: none;']),
.panel__header:has(+ [style='display: none;']) > .panel__heading,
.panel__header:has(+ [style='display: none;']) > .panel__actions,
.panel__header:has(+ [style='display: none;'])
    > .panel__actions
    > .panel__action,
.panel__heading:has(+ [style='display: none;']),
.panel__heading:has(+ .data-table-wrapper):not(:has(+ .data-table-wrapper tr)) {
    border-bottom-left-radius: var(--panel-border-radius);
    border-bottom-right-radius: var(--panel-border-radius);
}

.panel__heading {
    border-top-left-radius: var(--panel-border-radius);
    border-top-right-radius: var(--panel-border-radius);
    font-size: 19px;
    font-weight: bold;
    padding: 12px 15px;
}

.panel__actions,
.panel__actions > .panel__action:last-child,
.panel__actions > .panel__action:last-child > .form__group {
    border-top-right-radius: var(--panel-border-radius);
}

.featured-carousel__previous {
    border-bottom-left-radius: var(--panel-border-radius);
}

.featured-carousel__next {
    border-bottom-right-radius: var(--panel-border-radius);
}

/* Bottom-left-most table header which doesn't have a following tbody, tfoot nor pagination */
.data-table-wrapper:not(:has(+ .pagination)) >.data-table
    > thead:not(:has(+ tbody > tr)):not(:has(~ tfoot > tr))
    > tr:last-of-type
    > th:first-of-type,
/* Bottom-left-most tbody table row cell which doesn't have a following tfoot nor pagination */
.data-table-wrapper:not(:has(+ .pagination)) >.data-table > tbody:not(:has(~ tfoot > tr)) > tr:last-of-type td:first-of-type,
/* Bottom-left-most tfoot table row cell which doesn't have a following pagination */
.data-table-wrapper:not(:has(+ .pagination)) >.data-table > tfoot > tr:last-of-type > td:first-of-type {
    border-bottom-left-radius: var(--panel-border-radius);
}

/* Unhidden bottom-right-most table cell on bon earning calculation page */
.data-table-wrapper:not(:has(+ .pagination)) >.data-table
    tr:last-of-type
    td:not([style='display: none;']):has(+ td[style='display: none;']),
/* Bottom-right-most table header which doesn't have a following tbody, tfoot nor pagination */
.data-table-wrapper:not(:has(+ .pagination)) >.data-table
    > thead:not(:has(+ tbody > tr)):not(:has(~ tfoot > tr))
    > tr:last-of-type
    > th:last-of-type,
/* Bottom-right-most tbody table row cell which doesn't have a following tfoot nor pagination */
.data-table-wrapper:not(:has(+ .pagination)) >.data-table > tbody:not(:has(~ tfoot > tr)) > tr:last-of-type td:last-of-type,
/* Bottom-right-most tfoot table row cell which doesn't have a following pagination */
.data-table-wrapper:not(:has(+ .pagination)) >.data-table > tfoot > tr:last-of-type > td:last-of-type {
    border-bottom-right-radius: var(--panel-border-radius);
}

/* Bottom-most table header cells which don't have a following tbody nor tfoot */
.data-table
    > thead:not(:has(+ tbody > tr)):not(:has(~ tfoot > tr))
    > tr:last-of-type
    > th {
    border-bottom: none;
}

.data-table tr td:first-of-type:not(.torrent-search--list__poster),
.data-table tr th:first-of-type {
    padding-left: 20px;
}

.data-table tr td:last-of-type,
.data-table tr th:last-of-type {
    padding-right: 20px;
}

.article-preview {
    border-radius: 22px;
}

.page__topic--show .bbcode-input {
    --bbcode-input-border: none;
}

.post {
    border-radius: 22px;
}

a {
    color: #4991f6;
}

.chatroom__whispers {
    border-top: 1px solid #3c3c3c;
}

.chatbox-message {
    border-radius: 26px;
    padding: 0 4px;
    color: #bbb;
}

.chatbox-message::before {
    border-color: transparent;
}

.chatbox__chatroom {
    border-bottom-left-radius: 26px;
    border-bottom-right-radius: 26px;
}

.torrent-search--grouped__result {
    border-radius: 22px;
}

.torrent-card {
    border-radius: 22px;
}

.comment {
    box-shadow: none;
    background-color: var(--panel-bg);
}

.comment__aside {
    background-color: var(--panel-bg);
}

.comment__toolbar {
    background-color: var(--panel-bg);
}

.comment__list-item + .comment__list-item > .comment {
    border-top: 1px solid #444;
    border-radius: 0;
    padding-top: 22px;
}

.comment__replies {
    margin-top: 4px;
}

.meta__title {
    color: #bbb;
}

.meta__backdrop {
    mask-image: linear-gradient(to bottom, #000d 0%, #0002 65%, #0000 100%);
}

.user-card {
    border-radius: 22px;
}

.notification--unread {
    border-left: none !important;
}

.notification--unread::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 4px;
    margin-right: 4px;
    background-color: var(--notification-unread);
    position: relative;
}

.achievement {
    margin: 18px;
    border-radius: 22px;
}

.text-muted {
    color: #808080;
}

hr {
    border-top: 1px solid #444;
}

.pagination:last-child {
    border-bottom-left-radius: var(--panel-border-radius);
    border-bottom-right-radius: var(--panel-border-radius);
}

li.pagination__next,
li.pagination__previous {
    margin: 2px;
}

a.pagination__next,
a.pagination__previous,
li.pagination__next,
li.pagination__previous {
    border-radius: 9999px;
    height: 36px;
    width: 86px;
    line-height: 36px;
}

.pagination__link,
.pagination__current {
    border-radius: 9999px;
    height: 36px;
    width: 36px;
    margin: 2px;
    line-height: 36px;
}
