/*设置根元素的样式，包括字体、背景颜色*/
html
{
    height: 100%;
    font-size: 14px;
    font-family:
        "Open Sans", sans-serif;
}

body {
    min-height: 100%;
    margin: 0;
}

h1
{
    font-size: 60px;
    text-align: center;
    margin: 0;
    padding: 20px 0;
    color: #00539f;
    text-shadow: 3px 2px 1px black;
}

p,
li
{
    font-size: 16px;
    line-height: 1;
    letter-spacing: 1px;
}

/*图像*/
img
{
    display: block;
    margin: 0 auto;
}

/*分割线*/
hr
{
    border: none;
    height: 4px;
    background-color: black;
    width: 100%;
}

/*超链接*/
a:link
{
    font-size: 22px;
    color: blue;
    text-decoration: none;
    
}

a:hover
{
    color: purple;
    text-decoration: none;
}

.link
{
    text-align: center;
    font-size: 25px;
}

/*左中右三区块*/
.grid-layout
{
    border: 4px solid #000;
    min-height: 100vh;
    display: grid;
    grid-template-columns:1fr 800px 1fr;
}

.grid-layout .left
{
    border:4px solid #000;
    background: #00539f;
}

.grid-layout .middle
{
    border:4px solid #000;
    background: #ff9500;
    padding: 0 28px 36px;
    box-sizing: border-box;
}

.grid-layout .right
{
    border:4px solid #000;
    background: #00539f;
}

.post-browser {
    max-width: 680px;
    margin: 0 auto;
}

.post-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 10px;
}

.post-toolbar label {
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
}

#post-search {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 3px solid #000;
    border-radius: 0;
    background: #fff;
    font: inherit;
    font-size: 16px;
}

#post-search:focus {
    outline: 3px solid #00539f;
    outline-offset: 2px;
}

.post-summary {
    min-height: 22px;
    margin: 10px 0;
    font-size: 15px;
}

.post-list {
    display: grid;
    gap: 10px;
}

.post-item {
    display: block;
    padding: 12px 16px;
    border: 3px solid #000;
    background: #fff;
    color: #000;
    text-decoration: none;
}

.post-item:hover,
.post-item:focus {
    background: #00539f;
    color: #fff;
}

.post-title {
    display: block;
    font-size: 22px;
    font-weight: bold;
}

.post-meta {
    display: block;
    margin-top: 4px;
    font-size: 14px;
}

.empty-state {
    padding: 28px 16px;
    border: 3px dashed #000;
    text-align: center;
    font-size: 18px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button,
.page-number {
    min-width: 42px;
    min-height: 38px;
    padding: 6px 10px;
    border: 2px solid #000;
    border-radius: 0;
    background: #fff;
    color: #000;
    font: inherit;
    cursor: pointer;
}

.pagination button:hover:not(:disabled),
.page-number:hover {
    background: #00539f;
    color: #fff;
}

.pagination button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.page-numbers {
    display: flex;
    gap: 6px;
}

.page-number.active {
    background: #000;
    color: #fff;
}

@media (max-width: 900px) {
    .grid-layout {
        grid-template-columns: 18px minmax(0, 1fr) 18px;
    }
}

@media (max-width: 520px) {
    h1 {
        font-size: 42px;
    }

    .grid-layout .middle {
        padding-right: 14px;
        padding-left: 14px;
    }

    .post-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .pagination {
        gap: 4px;
    }

    .pagination button,
    .page-number {
        min-width: 36px;
        padding: 6px;
    }
}
