/* ==========================================================================
   Variables & Theme
   ========================================================================== */

:root {
    --bg-color: #f2f3f5;
    --text-color: #34495e;
    --header-bg: #1c7cd6;
    --card-bg: #fff;
    --border-color: #0000001a;
}

body:has(#theme-toggle:checked) {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --header-bg: #2c2c2c;
    --card-bg: #2d2d2d;
    --border-color: #ffffff1a;
}

body:has(#theme-toggle:checked) a:visited {
    color: #666;
}

body:has(#theme-toggle:checked) .item-list,
body:has(#theme-toggle:checked) .item-list-nav,
body:has(#theme-toggle:checked) .no-item {
    background-color: var(--card-bg);
}


/* ==========================================================================
   Base
   ========================================================================== */

body {
    margin: 0;
    padding-top: 55px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 15px;
}

input,
button,
textarea,


a {
    color: var(--text-color);
    text-decoration: none;
}

a:visited {
    color: #ccc;
}


/* ==========================================================================
   Header
   ========================================================================== */

header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 999;
    background-color: var(--header-bg);
}

header .inner {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 5px;
    text-align: center;
}

header a {
    display: inline-block;
    margin-right: 1.8em;
    color: #fffc;
    font-weight: 400; /* Google Fonts 仅加载 400/700，声明 300 会以 400 伪粗渲染 */
    line-height: 24px;
    letter-spacing: 0.075em;
    vertical-align: middle;
    transition: color 0.15s;
}

.setup {
    float: left;
    width: 30px;
    height: 30px;
    vertical-align: middle;
}

.setup label {
    display: inline-block;
    margin: 0;
    line-height: 0;
    cursor: pointer;
}

.logo {
    height: 30px;
    vertical-align: middle;
}

.theme-toggle {
    float: right;
    width: 30px;
    height: 30px;
    vertical-align: middle;
}

.theme-toggle a,
.theme-toggle label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    margin: 0;
    cursor: pointer;
}

.theme-icon-sun {
    display: none;
}

body:has(#theme-toggle:checked) .theme-icon-moon {
    display: none;
}

body:has(#theme-toggle:checked) .theme-icon-sun {
    display: block;
}


/* ==========================================================================
   Layout
   ========================================================================== */

.view {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}


/* ==========================================================================
   Selector
   ========================================================================== */

.selector {
    display: none;
    margin-bottom: 8px;
    padding: 12px 15px 10px;
    background-color: var(--card-bg);
    border-radius: 2px;
    box-shadow: 0 1px 2px #0000001a;
}

#selector-toggle:checked ~ .view .selector {
    display: block;
}

.selector .sites {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 8px;
    line-height: 28px;
}

.selector .sites a {
    display: inline-block;
    margin: 0;
    color: #fff;
    font-size: 14px;
    line-height: 28px;
}

.selector .sites a:visited {
    color: #fff;
}

.selector .sort,
.selector .scope,
.selector .open {
    margin-top: 6px;
}

.selector .sort a,
.selector .scope a,
.selector .open a {
    display: inline-block;
    margin: 0 4px 4px 0;
    font-size: 0.9em;
}

.scope a,
.sort a,
.open a {
    padding: 0 10px;
}

.selected {
    color: #fff;
    background-color: #363f48;
}

.inactive {
    background-color: #ddd;
}


/* ==========================================================================
   Post List
   ========================================================================== */

.item-list-nav,
.item-list {
    background-color: #fff;
    border-radius: 2px;
}

.item-list-nav {
    position: fixed;
    top: 55px;
    right: 0;
    left: 0;
    z-index: 998;
    padding: 15px 30px;
    text-align: center;
    box-shadow: 0 1px 2px #0000001a;
}

.item-list-nav a {
    margin: 0 1em;
}

.item-list-nav .disabled {
    color: #ccc;
}

.item-list {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.item-list ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.item {
    position: relative;
    padding: 15px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    line-height: 20px;
}

.item .title {
    color: #555555;
}

.item .title:visited {
    color: #555555;
}

body:has(#theme-toggle:checked) .item .title,
body:has(#theme-toggle:checked) .item .title:visited {
    color: var(--text-color);
}

.no-item {
    padding: 15px;
    background-color: #fff;
    text-align: center;
}


/* ==========================================================================
   Post Meta
   ========================================================================== */

.item .meta {
    color: #999;
    font-size: 0.85em;
}

.item .meta a {
    color: #999;
    text-decoration: underline;
}

.item .meta a:hover {
    color: #f60;
}

.meta span {
    margin-right: 10px;
}

.meta span em {
    color: #f60;
    font-style: normal;
}


/* ==========================================================================
   Site Badges
   ========================================================================== */

.s {
    padding: 0 10px;
    color: #fff;
}

.s-bobae { background-color: #0070bc; }
.s-inven { background-color: #6eba33; }
.s-ddanzi { background-color: #dfceb0; }
.s-slrclub { background-color: #4892db; }
.s-ppomppu { background-color: #363f48; }
.s-clien { background-color: #374273; }
.s-mlbpark { background-color: #ff6a0b; }
.s-82cook { background-color: #459f39; }
.s-bestiz { background-color: #bbcae7; }
.s-ruliweb { background-color: #1a70dc; }
.s-todayhumor { background-color: #3ba1c7; }
.s-humoruniv { background-color: #ed1746; }


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (width <= 860px) {
    .header .inner {
        padding: 5px;
    }
}

@media (width <= 600px) {
    body {
        font-size: 14px;
    }

    .header a {
        margin-right: 1em;
    }

    .selector {
        font-size: 20px;
    }
}

/* ==========================================================================
   Footer (.bottom)
   ========================================================================== */

.bottom {
    text-align: center;
    padding: 28px 8px 4px;
    font-size: 0.78rem;
    color: #999;
    line-height: 1.8;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.bottom a {
    margin-left: 6px;
    color: #999;
}

.bottom a:hover {
    color: #1c7cd6;
}

body:has(#theme-toggle:checked) .bottom,
body:has(#theme-toggle:checked) .bottom a {
    color: #888;
}

body:has(#theme-toggle:checked) .bottom a:hover {
    color: #5a9fd4;
}

/* ==========================================================================
   Pagination & empty state
   ========================================================================== */

.item-list .no-item {
    padding: 48px 16px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

body:has(#theme-toggle:checked) .item-list .no-item {
    color: #aaa;
}

.moa-pager,
.sec.pager,
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 8px;
    padding: 0 16px;
}

.moa-pager .pager-btn,
.sec.pager .pager-btn,
.pager .pager-btn {
    display: inline-block;
    padding: 9px 16px;
    border: 1.5px solid #d8e3f0;
    border-radius: 10px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.moa-pager .pager-btn:hover,
.sec.pager .pager-btn:hover,
.pager .pager-btn:hover {
    border-color: #1c7cd6;
    background: #eef5fc;
    color: #1c7cd6;
}

.moa-pager .pager-btn.is-disabled,
.sec.pager .pager-btn.is-disabled,
.pager .pager-btn.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.moa-pager .pager-info,
.sec.pager .pager-info,
.pager .pager-info {
    font-size: 14px;
    color: #888;
}

body:has(#theme-toggle:checked) .moa-pager .pager-btn,
body:has(#theme-toggle:checked) .sec.pager .pager-btn,
body:has(#theme-toggle:checked) .pager .pager-btn {
    background: #2a2a2a;
    border-color: #444;
    color: #ddd;
}

body:has(#theme-toggle:checked) .moa-pager .pager-btn:hover,
body:has(#theme-toggle:checked) .sec.pager .pager-btn:hover,
body:has(#theme-toggle:checked) .pager .pager-btn:hover {
    border-color: #5a9fd4;
    background: #1e3a52;
    color: #5a9fd4;
}

body:has(#theme-toggle:checked) .moa-pager .pager-info,
body:has(#theme-toggle:checked) .sec.pager .pager-info,
body:has(#theme-toggle:checked) .pager .pager-info {
    color: #aaa;
}


/* ==========================================================================
   News Category Badges (nmoa)
   ========================================================================== */

.s-n-all { background-color: #363f48; }
.s-n-general { background-color: #4a6fa5; }
.s-n-politics { background-color: #c0392b; }
.s-n-economy { background-color: #2e8b57; }
.s-n-society { background-color: #d35400; }
.s-n-world { background-color: #6c3483; }
.s-n-it { background-color: #2471a3; }
.s-n-sports { background-color: #1e8449; }
.s-n-entertainment { background-color: #c2185b; }


/* ==========================================================================
   News Hero (nmoa)
   ========================================================================== */

.nmoa-hero {
    margin-bottom: 8px;
}

.nmoa-hero-card {
    position: relative;
    overflow: hidden;
    padding: 28px 24px 24px;
    background: linear-gradient(135deg, var(--header-bg) 0%, #124f8f 100%);
    border-radius: 2px;
    box-shadow: 0 1px 2px #0000001a;
    color: #fff;
}

.nmoa-hero-card::before,
.nmoa-hero-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.nmoa-hero-card::before {
    top: -48px;
    right: -32px;
    width: 150px;
    height: 150px;
}

.nmoa-hero-card::after {
    bottom: -56px;
    left: -24px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
}

.nmoa-hero-kicker,
.nmoa-hero-title,
.nmoa-hero-desc {
    position: relative;
    z-index: 1;
}

.nmoa-hero-kicker {
    margin: 0 0 12px;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    opacity: 0.92;
}

.nmoa-hero-kicker strong {
    display: inline-block;
    margin-left: 4px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-weight: 700;
}

.nmoa-hero-title {
    margin: 0 0 10px;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.nmoa-hero-desc {
    margin: 0;
    max-width: 34em;
    font-size: 0.92rem;
    line-height: 1.65;
    opacity: 0.9;
}

body:has(#theme-toggle:checked) .nmoa-hero-card {
    background: linear-gradient(135deg, var(--header-bg) 0%, #111 100%);
    box-shadow: 0 1px 2px #00000040;
}

@media (width <= 600px) {
    .nmoa-hero-card {
        padding: 22px 18px 20px;
    }

    .nmoa-hero-title {
        font-size: 1.22rem;
    }

    .nmoa-hero-desc {
        font-size: 0.88rem;
    }
}
