:root {
    --maximum-width: 680px;
}

body {
    font-size: 16px;
    font-family: system-ui, sans-serif;
    margin: 10px;
}

#header {
    max-width: var(--maximum-width);
    margin: 0 auto;
}

#header .top-blocks {
    display: flex;
    margin-bottom: 10px;
    justify-content: space-between;
}

#header .top-blocks .top-left {
    flex-grow: 1;
}

#header .top-blocks .top-right {
    flex-grow: 1;
    text-align: right;
}

#logo {
    clear: left;
    display: block;
    width: fit-content;
    text-align: center;
    margin: 0 auto;
    text-decoration: none;
    background: #5c89fe;
    color: #fff;
    padding: 0 10px 5px;
    border-radius: 10px;
}

#logo .title {
    margin: 0;
    font-size: 24px;
    font-family: "Xingkai SC";
}

#logo .domain {
    font-size: 18px;
}

#controls {
    max-width: 460px;
    margin: 20px auto 0;
}

#search-box {
    margin: auto 0;
    display: flex;
    position: relative;
}

#search-box .type {
    flex-shrink: 0;
    appearance: none;
    border: 2px solid #5c89fe;
    text-align: center;
    text-align-last: center;
    border-radius: 5px 0 0 5px;
    width: 80px;
    padding-right: 16px;
    background: transparent;
}

#search-box .type:focus {
    outline: none;
}

#search-box .type-arrow {
    position: absolute;
    top: 50%;
    left: 58px;
    display: block;
    width: 1px;
    height: 1px;
    border: solid #5c89fe;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 2px;
    margin-top: -2px;
    pointer-events: none;
    transform: rotate(45deg) translateY(-50%);
}

#search-box .keywords {
    width: 100%;
    flex-grow: 1;
    padding: 10px;
    font-size: 16px;
    border: none;
    border-top: 2px solid #5c89fe;
    border-bottom: 2px solid #5c89fe;
}

#search-box .keywords:focus {
    outline: none;
}

#search-box .submit {
    flex-shrink: 0;
    padding: 10px 15px;
    font-size: 16px;
    background: #5c89fe;
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

#controls .above-search-box {
    text-align: center;
    margin-bottom: 5px;
}

#controls .below-search-box {
    text-align: center;
    margin-top: 5px;
}

#menu {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#menu .menu-item .menu-link {
    display: block;
    text-decoration: none;
    background: #5c89fe;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
}

#menu .menu-item.active .menu-link {
    background: #3a5dde;
}

#content {
    max-width: var(--maximum-width);
    margin: 20px auto 0;
}

#links {
    list-style-position: outside;
    margin: 0;
    padding: 0;
}

@media (max-width: 800px) {
    #links {
        padding-left: 16px;
    }
}

#links .link:not(:first-child) {
    margin-top: 5px;
}

#links .link .link-title {
    font-size: 18px;
    text-decoration: none;
    color: #002cce;
}

#links .link .link-title .highlight {
    font-weight: bold;
    color: red;
}

.pagination {
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 600px) {
    .pagination {
        align-items: center;
    }
}

.pagination .item .label {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    background: #5c89fe;
    color: #fff;
    border-radius: 5px;
    font-size: 14px;
    height: 20px;
}

.pagination .item .label:visited {
    color: #fff;
}

.pagination .item.active .label {
    background: #3a5dde;
    pointer-events: none;
}

.pagination .pages {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
}

.pagination .actions {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination .page-selection {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination .page-selection .submit {
    background: #5c89fe;
    color: #fff;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

#footer {
    max-width: var(--maximum-width);
    margin: 20px auto 0;
}

#footer .pages {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0 0 10px;
}

#footer .pages .page .page-link {
    display: block;
    padding: 5px 10px;
    text-decoration: none;
    background: #5c89fe;
    color: #fff;
    border-radius: 5px;
}

#footer .pages .page.active .page-link {
    background: #3a5dde;
    pointer-events: none;
}

#footer .copyright {
    text-align: center;
    color: #888;
    margin: 0;
}
