:root {
    --ut-ink: #f3e7d4;
    --ut-muted: #ad9e88;
    --ut-panel: rgba(33, 25, 20, .78);
    --ut-panel-strong: rgba(18, 14, 12, .92);
    --ut-line: rgba(173, 158, 136, .28);
    --ut-accent: #b4e9fd;
    --ut-gold: #d7b56d;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: transparent;
    color: var(--ut-ink);
    font-family: "Quicksand", Calibri, Arial, sans-serif;
    font-size: 16px;
    letter-spacing: 0;
}

body {
    padding: 0;
}

.ut-rank {
    width: 100%;
    max-width: 981px;
    margin: 0 auto;
    padding: 14px;
}

.ut-rank-card {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--ut-line);
    border-radius: 5px;
    background: var(--ut-panel);
    box-shadow: 0 0 8px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.ut-rank--compact {
    max-width: 980px;
    padding: 0;
    font-size: 13px;
}

.ut-rank-card--compact {
    border-radius: 0;
}

.ut-rank-card--compact .ut-rank-table {
    min-width: 0;
}

.ut-rank-card--compact .ut-rank-table th,
.ut-rank-card--compact .ut-rank-table td {
    padding: 4px 10px;
    font-size: 13px;
    line-height: 1.2;
}

.ut-rank-card--compact .ut-rank-table th {
    font-size: 11px;
}

.ut-rank-card--compact .ut-col-pos {
    width: 60px;
}

.ut-rank-card--compact .ut-col-number {
    width: 120px;
}

.ut-rank-card--compact .ut-position {
    width: 28px;
    height: 24px;
    font-size: 13px;
}

.ut-rank-card--compact .ut-class {
    min-height: 30px;
    gap: 7px;
}

.ut-rank-card--compact .ut-class img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.ut-rank-header {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 22px;
    border-bottom: 1px solid rgba(215, 181, 109, .2);
    background:
        linear-gradient(90deg, rgba(9, 6, 5, .86), rgba(46, 33, 23, .76)),
        linear-gradient(180deg, rgba(180, 233, 253, .08), transparent);
}

.ut-rank-eyebrow {
    display: block;
    color: var(--ut-accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.ut-rank-header h1 {
    margin: 2px 0 0;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
}

.ut-rank-count {
    display: inline-flex;
    min-width: 44px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(180, 233, 253, .24);
    border-radius: 5px;
    background: rgba(8, 11, 13, .42);
    color: var(--ut-accent);
    font-weight: 700;
}

.ut-rank-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(173, 158, 136, .16);
    background: rgba(0, 0, 0, .16);
}

.ut-rank-filter label {
    color: var(--ut-muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.ut-rank-options,
.ut-rank-filter-control,
.ut-rank-local-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.ut-rank-filter select,
.ut-rank-filter input,
.ut-rank-filter button {
    min-height: 34px;
    border: 1px solid rgba(173, 158, 136, .35);
    border-radius: 5px;
    background: rgba(16, 13, 11, .96);
    color: var(--ut-ink);
    font: inherit;
}

.ut-rank-filter select {
    min-width: 150px;
    padding: 0 10px;
}

.ut-rank-filter input {
    min-width: 240px;
    padding: 0 12px;
}

.ut-rank-filter button {
    padding: 0 16px;
    color: #12100d;
    background: linear-gradient(180deg, #e4c77c, #a87a3e);
    font-weight: 700;
    cursor: pointer;
}

.ut-filter-clear {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 10px;
    color: var(--ut-accent);
    font-weight: 700;
    text-decoration: none;
}

.ut-filter-clear:hover {
    color: #fff;
}

.ut-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ut-rank-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    table-layout: fixed;
}

.ut-rank-table th,
.ut-rank-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(173, 158, 136, .14);
    color: var(--ut-muted);
    line-height: 1.35;
    text-align: left;
    vertical-align: middle;
    word-break: break-word;
}

.ut-rank-table th {
    color: var(--ut-gold);
    background: rgba(0, 0, 0, .22);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.ut-rank-table tbody tr {
    background: rgba(255, 255, 255, .015);
}

.ut-rank-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, .12);
}

.ut-rank-table tbody tr:hover {
    background: rgba(180, 233, 253, .08);
}

.ut-rank-table a {
    color: var(--ut-accent);
    font-weight: 700;
    text-decoration: none;
}

.ut-rank-table a:hover {
    color: #fff;
}

.ut-col-pos {
    width: 70px;
    text-align: center !important;
}

.ut-col-number,
.ut-col-date {
    width: 150px;
}

.ut-position {
    display: inline-flex;
    width: 34px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: rgba(0, 0, 0, .28);
    color: #fff;
    font-weight: 700;
}

.ut-class,
.ut-clan {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 9px;
}

.ut-class img,
.ut-clan img {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    image-rendering: auto;
}

.ut-empty {
    padding: 38px 18px;
    color: var(--ut-muted);
    text-align: center;
}

.ut-widget-body {
    width: 220px;
    min-height: 100px;
    overflow: hidden;
}

.ut-widget {
    display: flex;
    width: 220px;
    min-height: 100px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 10px;
    color: var(--ut-muted);
    text-align: center;
}

.ut-widget--list {
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    text-align: center;
}

.ut-widget-icon {
    width: 38px;
    flex: 0 0 38px;
}

.ut-widget-icon img {
    width: 32px;
    height: 32px;
}

.ut-widget-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1.35;
}

.ut-widget-copy strong {
    width: 100%;
    overflow: hidden;
    color: var(--ut-ink);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ut-widget-copy span,
.ut-widget-empty {
    color: var(--ut-muted);
}

.ut-widget-debug {
    width: 220px;
    margin: 0;
    padding: 6px;
    overflow: auto;
    color: #f3e7d4;
    background: rgba(0, 0, 0, .78);
    font: 10px Consolas, monospace;
    white-space: pre-wrap;
}

.ut-widget-status {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1.2;
}

.ut-widget-status-main,
.ut-widget-status-line {
    display: flex;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.ut-widget-status-main span,
.ut-widget-status-line span {
    color: var(--ut-muted);
    font-weight: 700;
}

.ut-widget-status-main strong,
.ut-widget-status-line strong {
    overflow: hidden;
    color: #45d96a;
    font-weight: 700;
    text-overflow: ellipsis;
}

.ut-widget-status-main .ut-widget-status-offline {
    color: #ff5858;
}

.ut-widget-status-main .ut-widget-status-online {
    color: #64fe72;
}

.ut-widget-list {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.ut-widget--carousel .ut-widget-list {
    position: relative;
    min-height: 72px;
}

.ut-widget-leader {
    display: flex;
    width: 100%;
    max-width: 188px;
    min-width: 0;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0 auto;
}

.ut-widget--carousel .ut-widget-leader {
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity .24s ease;
}

.ut-widget--carousel .ut-widget-leader.is-active {
    opacity: 1;
    pointer-events: auto;
}

.ut-widget-crown {
    display: inline-flex;
    width: 40px;
    min-height: 18px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 3px;
    background: rgba(0, 0, 0, .25);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.ut-widget-crown--gold {
    color: #ffd86a;
    border-color: rgba(255, 216, 106, .45);
}

.ut-widget-crown--silver {
    color: #d8e4ef;
    border-color: rgba(216, 228, 239, .42);
}

.ut-widget-crown--bronze {
    color: #d99a5f;
    border-color: rgba(217, 154, 95, .42);
}

.ut-widget-leader-icon {
    width: 28px;
    flex: 0 0 28px;
}

.ut-widget-leader-icon img {
    width: 26px;
    height: 26px;
}

.ut-widget-leader-copy {
    display: flex;
    min-width: 0;
    max-width: 110px;
    flex: 0 1 110px;
    flex-direction: column;
    gap: 1px;
    line-height: 1.2;
    text-align: left;
}

.ut-widget-leader-copy strong,
.ut-widget-leader-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ut-widget-leader-copy strong {
    color: var(--ut-ink);
    font-size: 13px;
}

.ut-widget-leader-copy span {
    color: var(--ut-muted);
    font-size: 11px;
}

@media (max-width: 760px) {
    .ut-rank {
        padding: 8px;
    }

    .ut-rank-header {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        padding: 15px;
    }

    .ut-rank-header h1 {
        font-size: 20px;
    }

    .ut-rank-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .ut-rank-options,
    .ut-rank-filter-control,
    .ut-rank-local-search {
        align-items: stretch;
        flex-direction: column;
    }

    .ut-rank-filter select,
    .ut-rank-filter input,
    .ut-rank-filter button {
        width: 100%;
    }
}
