*,
*::before,
*::after {
    box-sizing: border-box;
}
body {
    font-family: "Inter", Arial, sans-serif;
    font-weight: 300;
    margin: 0;
    padding: 0;
    background-color: #0e0f14;
    color: #f4f4f6;
    font-size: 0.875rem;
    line-height: calc(1.25 / 0.875);
}
#controls {
    display: flex;
    margin-bottom: 10px;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
}
#lastUpdate {
    align-self: center;
    font-size: 0.875rem;
}
#aliasSearchContainer {
    position: relative;
    width: 280px;
    height: 40px;
}
#aliasSearch {
    width: 100%;
    height: 40px;
    padding: 10px 40px 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #f4f4f6;
    background-color: transparent;
    border: 1.5px solid #202127;
    border-radius: 8px;
    outline: none;
    appearance: none;
}
#aliasSearch::placeholder {
    color: #969faf;
}
#aliasSearchContainer::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='%23969faf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 14px 14px;
    pointer-events: none;
}
#periodSelect {
    width: 190px;
    height: 40px;
    background-color: #202127;
    color: inherit;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    padding-right: 34px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}
select {
    padding: 5px;
    font-size: 14px;
}
.table-container {
    width: 80%;
    margin: 0 auto;
    padding: 10px;
    background-color: #14151c;
    border-radius: 10px;
    padding-bottom: 50px;
}
table {
    width: 100%;
    height: calc(100vh - 100px);
    padding-bottom: 50px;
    border-collapse: collapse;
    table-layout: fixed;
}
th,
td {
    text-align: left;
}
th {
    cursor: pointer;
    padding: 8px;
    user-select: none;
    color: #969faf;
}
th.sort-asc::after,
th.sort-desc::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 6px;
    background-repeat: no-repeat;
    background-size: 14px 14px;
    vertical-align: middle;
}
th.sort-asc::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23969faf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E");
}
th.sort-desc::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23969faf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
th.place {
    width: 10%;
}
th.alias {
    overflow: hidden;
}
th.sortable {
    width: 25%;
}
td {
    padding: 8px;
    border-bottom: 1px solid #202128;
}
#pagination {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    background: linear-gradient(to top, #0e0f14 0%, rgba(14, 15, 20, 0) 100%);
    text-align: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}
#pagination button {
    margin: 0 5px;
    padding: 9px;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: content-box;
}
#pagination button:disabled {
    cursor: default;
    opacity: 0.4;
}
.pagination-input-group {
    display: inline-flex;
    align-items: center;
    margin-left: 16px;
    gap: 4px;
}

.pagination-input {
    width: 44px;
    padding: 4px 6px;
    background: transparent;
    border: 1px solid #2c2f35;
    border-radius: 6px;
    color: #f4f4f6;
    font-size: 1em;
    text-align: center;
    outline: none;
}

.pagination-input:focus {
    border-color: #e43e3e;
    background: #181922;
}

.pagination-total {
    font-size: 1em;
    margin-left: 2px;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Для Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

.progress-container {
    display: inline-block;
    width: 80%;
    height: 12px;
    background: #f4f4f6;
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: #e43e3e;
    transition: width 0.4s ease-out;
}

.alias {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.alias-link {
    flex: none;
}
.alias-icon {
    display: inline-flex;
    align-items: center;
    opacity: 0.65;
    transition: opacity 0.2s;
    margin-left: 1px;
}
tr:not(.clickable-row) .alias {
    cursor: default;
}
tr:hover .alias-icon {
    opacity: 1;
}
tr:hover .alias-link {
    color: #fff;
}
@media (max-width: 1280px) {
    body {
        font-size: 0.7rem;
        line-height: calc(1.25 / 0.7);
    }
    #controls {
        padding: 0;
    }
    .table-container {
        width: 100%;
    }
}
@media (max-width: 640px) {
    body {
        font-size: 0.6rem;
        line-height: calc(1.25 / 0.6);
    }
    .last-update {
        font-size: 0.6rem !important;
        line-height: 1.25;
    }
    #controls {
        gap: 10px;
    }
    #periodSelect {
        width: 120px;
        height: 35px;
        font-size: 0.6rem;
        padding: 8px 12px;
    }
    #aliasSearchContainer {
        height: 35px;
    }
    #aliasSearch {
        height: 35px;
        font-size: 0.6rem;
        padding: 8px 35px 8px 12px;
    }
    .alias {
        gap: 0px;
    }
    .alias-link {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        overflow: scroll;
        white-space: nowrap;
        display: block;
    }
}
