/* 神马小说下载 - 界面样式
   设计：浅色卡片 + 橙红渐变强调 + 移动优先
   约束：不改 HTML 语义结构，保证 h1/面包屑/alt/链接可被爬虫正常解析 */

:root {
    --brand: #ff6a3d;
    --brand-2: #f23f1f;
    --brand-soft: #fff1ec;
    --text: #1f2329;
    --text-2: #5a6169;
    --text-3: #9aa1a9;
    --line: #eceef1;
    --bg: #f6f7f9;
    --card: #ffffff;
    --link: #1f6feb;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .05);
    --shadow-hover: 0 4px 10px rgba(16, 24, 40, .07), 0 14px 34px rgba(16, 24, 40, .10);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color .18s ease;
}

a:hover {
    color: var(--brand-2);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ============ 顶部 ============ */
.topbar {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
}

.logo {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .5px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
    flex: 0 0 auto;
}

.searchbox {
    flex: 1;
    display: flex;
    max-width: 400px;
    margin-left: auto;
    background: #f2f3f5;
    border-radius: 999px;
    padding: 3px;
    border: 1px solid transparent;
    transition: border-color .2s, background .2s;
}

.searchbox:focus-within {
    background: #fff;
    border-color: var(--brand);
}

.searchbox input {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: var(--text);
}

.searchbox button {
    height: 34px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .2s;
}

.searchbox button:hover {
    opacity: .9;
}

.nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 14px 10px;
    scrollbar-width: none;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav a {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--text-2);
    font-size: 14px;
    background: #f2f3f5;
    transition: all .18s ease;
}

.nav a:hover {
    background: var(--brand-soft);
    color: var(--brand-2);
}

.nav a.on {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
}

/* ============ 首页 Hero ============ */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 30px 26px;
    margin-bottom: 16px;
    color: #fff;
    background: linear-gradient(135deg, #ff8a5c 0%, #f23f1f 100%);
    box-shadow: 0 10px 30px rgba(242, 63, 31, .22);
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
}

.hero::before {
    width: 190px;
    height: 190px;
    right: -50px;
    top: -70px;
}

.hero::after {
    width: 120px;
    height: 120px;
    right: 90px;
    bottom: -70px;
}

.hero h1 {
    position: relative;
    font-size: 26px;
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: .5px;
}

.hero p {
    position: relative;
    margin: 0 0 18px;
    font-size: 14.5px;
    opacity: .92;
    max-width: 640px;
}

.hero-stats {
    position: relative;
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
}

.hero-stats div {
    line-height: 1.3;
}

.hero-stats b {
    display: block;
    font-size: 22px;
    font-weight: 700;
}

.hero-stats span {
    font-size: 12.5px;
    opacity: .88;
}

/* ============ 主体区块 ============ */
.main {
    padding: 16px 14px 30px;
    min-height: 50vh;
}

.page-title {
    font-size: 22px;
    margin: 2px 0 8px;
    font-weight: 700;
}

.site-desc {
    color: var(--text-2);
    font-size: 14px;
    margin: 0 0 16px;
}

.block {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.block-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 14px;
    padding-left: 11px;
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, var(--brand), var(--brand-2)) 1;
    line-height: 1.35;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.block-title a {
    color: var(--text);
}

.block-title a:hover {
    color: var(--brand-2);
}

.more {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-3);
}

.more a {
    color: var(--text-3);
}

/* ============ 面包屑 ============ */
.crumbs {
    font-size: 13px;
    color: var(--text-3);
    margin: 4px 0 12px;
}

.crumbs a {
    color: var(--text-2);
}

.crumbs a:hover {
    color: var(--brand-2);
}

.crumbs .sep {
    margin: 0 7px;
    color: #ccd0d6;
}

.crumbs .cur {
    color: var(--brand-2);
}

/* ============ 小说网格 ============ */
.grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 18px 14px;
}

.grid li {
    text-align: center;
}

.grid .cover {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f0f1f3;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
    transition: transform .22s ease, box-shadow .22s ease;
    position: relative;
}

.grid .cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .18));
    opacity: 0;
    transition: opacity .22s ease;
}

.grid .cover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.grid .cover:hover::after {
    opacity: 1;
}

.grid .cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: #f0f1f3;
}

.grid .t {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 9px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
    font-weight: 500;
}

.grid .t:hover {
    color: var(--brand-2);
}

.grid .meta,
.grid .author {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ 热门榜 ============ */
.hot-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hot-list li {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 14.5px;
}

.hot-list li:last-child {
    border-bottom: 0;
}

.hot-list .rank {
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: #f2f3f5;
    color: var(--text-3);
    border-radius: 6px;
    font-size: 12px;
    flex: 0 0 auto;
    font-weight: 600;
}

.hot-list .rank.top {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
}

.hot-list a {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-weight: 500;
}

.hot-list a:hover {
    color: var(--brand-2);
}

.hot-list em {
    font-style: normal;
    font-size: 12px;
    color: var(--text-3);
    background: #f6f7f9;
    border-radius: 5px;
    padding: 2px 8px;
    flex: 0 0 auto;
}

/* ============ 详情页 ============ */
.detail {
    background: var(--card);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.d-hero {
    padding: 22px 18px;
    background: linear-gradient(160deg, #fff4ef 0%, #fff 55%);
}

.d-top {
    display: flex;
    gap: 16px;
}

.d-cover {
    flex: 0 0 128px;
}

.d-cover img {
    width: 128px;
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 18px rgba(16, 24, 40, .18);
}

.d-head {
    flex: 1;
    min-width: 0;
}

.d-head h1 {
    font-size: 21px;
    margin: 0 0 10px;
    line-height: 1.4;
    font-weight: 700;
}

.d-line {
    margin: 0 0 5px;
    font-size: 14px;
    color: var(--text-2);
}

.d-line a {
    color: var(--text-2);
}

.d-line a:hover {
    color: var(--brand-2);
}

.d-tags {
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.d-tags span {
    font-size: 12px;
    color: var(--brand-2);
    background: var(--brand-soft);
    border-radius: 6px;
    padding: 3px 9px;
}

.d-intro,
.d-download {
    padding: 4px 18px 18px;
}

.d-intro h2,
.d-download h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 12px 0 10px;
    padding-left: 11px;
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, var(--brand), var(--brand-2)) 1;
    line-height: 1.35;
}

.d-intro .intro {
    font-size: 14.5px;
    color: #3d454d;
    line-height: 1.9;
    word-break: break-word;
    max-height: 132px;
    overflow: hidden;
    position: relative;
    transition: max-height .25s ease;
}

.d-intro .intro.expanded {
    max-height: 2000px;
}

.d-intro .intro::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}

.d-intro .intro.expanded::after {
    opacity: 0;
}

.d-more {
    display: block;
    margin: 10px auto 0;
    padding: 5px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-2);
    font-size: 13.5px;
    cursor: pointer;
    transition: all .18s;
}

.d-more:hover {
    border-color: var(--brand);
    color: var(--brand-2);
}

/* 下载按钮 */
.dl-row {
    margin-bottom: 12px;
}

.dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 12px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff !important;
    font-size: 16.5px;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(242, 63, 31, .28);
    transition: transform .15s ease, box-shadow .2s ease;
}

.dl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(242, 63, 31, .34);
    color: #fff !important;
}

.dl-btn:active {
    transform: translateY(0);
}

.dl-code {
    text-align: center;
    font-size: 13.5px;
    color: var(--text-2);
    margin: 8px 0 0;
}

.dl-code b {
    color: var(--brand-2);
    background: var(--brand-soft);
    border-radius: 5px;
    padding: 2px 10px;
    user-select: all;
    cursor: pointer;
    letter-spacing: 1px;
}

.dl-report {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: #b42318;
    text-decoration: none;
}

.dl-report:hover {
    text-decoration: underline;
}

.dl-tip {
    font-size: 12px;
    color: var(--text-3);
    text-align: center;
    margin: 12px 0 0;
    line-height: 1.6;
}

.intro {
    font-size: 14.5px;
    color: #3d454d;
    line-height: 1.9;
    word-break: break-word;
}

/* 同类热门横滑 */
.scroll-books {
    list-style: none;
    margin: 0;
    padding: 0 0 6px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.scroll-books::-webkit-scrollbar {
    display: none;
}

.scroll-books li {
    flex: 0 0 92px;
    text-align: center;
}

.scroll-books .cover {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f0f1f3;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
    transition: transform .22s ease;
}

.scroll-books .cover:hover {
    transform: translateY(-3px);
}

.scroll-books .cover img {
    width: 92px;
    height: 122px;
    object-fit: cover;
}

.scroll-books .t {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.scroll-books .meta {
    display: block;
    font-size: 12px;
    color: var(--text-3);
}

.prevnext {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.prevnext span {
    flex: 1 1 260px;
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    box-shadow: var(--shadow);
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ 分页 ============ */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 4px 0 10px;
}

.pager a {
    min-width: 38px;
    text-align: center;
    padding: 7px 13px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
    color: var(--text-2);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
    transition: all .18s;
}

.pager a:hover {
    border-color: var(--brand);
    color: var(--brand-2);
}

.pager a.on {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(242, 63, 31, .25);
}

.empty {
    color: var(--text-3);
    font-size: 14px;
    padding: 26px 0;
    text-align: center;
}

/* Logo 图片模式 */
.logo-img {
    display: flex;
    align-items: center;
}

.logo-img img {
    height: 34px;
    width: auto;
    object-fit: contain;
}

/* ============ 后台统计 ============ */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-cards .sc {
    background: linear-gradient(160deg, #fff7f3, #fff);
    border: 1px solid #ffe8dd;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    line-height: 1.4;
}

.stat-cards .sc span {
    display: block;
    font-size: 12.5px;
    color: var(--text-3);
}

.stat-cards .sc b {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-2);
    margin: 2px 0;
}

.stat-cards .sc em {
    font-style: normal;
    font-size: 12px;
    color: var(--text-3);
}

.sub-title {
    font-size: 14.5px;
    font-weight: 600;
    margin: 22px 0 12px;
    color: var(--text);
}

.chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 170px;
    padding: 10px 4px 0;
    border-bottom: 1px solid var(--line);
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.chart-col .bars {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
}

.chart-col .bar {
    width: 13px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
    transition: opacity .2s;
}

.chart-col .bar.dl {
    background: linear-gradient(180deg, #7fb3ff, #3b7ddd);
}

.chart-col .cx {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 6px;
}

.chart-col .cv {
    font-size: 11px;
    color: var(--text-2);
}

.lg {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin: 0 3px 0 12px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
    vertical-align: middle;
}

.lg.dl {
    background: linear-gradient(180deg, #7fb3ff, #3b7ddd);
}

.tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 14px;
    overflow-x: auto;
}

.tabs a {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-2);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tabs a.on,
.tabs a:hover {
    color: var(--brand-2);
    border-bottom-color: var(--brand);
}

/* ============ 底部 ============ */
.footer {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 24px 0 28px;
    font-size: 13px;
    color: var(--text-3);
    text-align: center;
}

.flinks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin: 0 0 10px;
}

.flinks a {
    color: var(--text-2);
}

.flinks a:hover {
    color: var(--brand-2);
}

.copy,
.icp {
    margin: 4px 0;
}

/* ============ 后台外壳 ============ */
.admin-body {
    background: #f2f3f5;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-side {
    width: 224px;
    flex: 0 0 224px;
    background: linear-gradient(180deg, #262d40 0%, #1b2130 100%);
    color: #fff;
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 18px;
    color: #fff;
}

.sb-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 4px 12px rgba(242, 63, 31, .35);
}

.side-brand .sb-text {
    min-width: 0;
}

.side-brand .sb-text b {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-brand .sb-text i {
    display: block;
    font-style: normal;
    font-size: 11.5px;
    color: #8d95a8;
}

.side-menu {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.side-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #aeb6c7;
    font-size: 14.5px;
    transition: background .18s, color .18s;
}

.side-menu a svg {
    flex: 0 0 18px;
    opacity: .9;
}

.side-menu a:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.side-menu a.on {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 4px 14px rgba(242, 63, 31, .32);
}

.side-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .09);
}

.side-foot a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 13.5px;
    color: #8d95a8;
}

.side-foot a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 13px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.admin-topbar h1 {
    font-size: 17px;
    margin: 0;
    font-weight: 600;
    color: var(--text);
}

.admin-topbar .right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.at-btn {
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(242, 63, 31, .25);
}

.at-btn:hover {
    opacity: .92;
    color: #fff !important;
}

.at-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-2);
}

.at-user .ava {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6f7bf7, #4a5bd6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.at-out {
    color: var(--text-3);
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: 8px;
}

.at-out:hover {
    color: var(--brand-2);
    background: var(--brand-soft);
}

.admin-content {
    padding: 20px 22px 44px;
    flex: 1;
}

.admin-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.admin-card h2 {
    font-size: 15.5px;
    font-weight: 600;
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, var(--brand), var(--brand-2)) 1;
    line-height: 1.35;
}

table.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table.tbl th,
table.tbl td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

table.tbl th {
    background: #fafbfc;
    color: var(--text-2);
    font-weight: 500;
    font-size: 13px;
}

table.tbl tr:hover td {
    background: #fcfcfd;
}

.form-row {
    margin-bottom: 13px;
}

.form-row label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #3d454d;
    font-weight: 500;
}

.form-row input[type=text],
.form-row input[type=password],
.form-row input[type=number],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #fff;
    color: var(--text);
    transition: border-color .18s, box-shadow .18s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(255, 106, 61, .12);
}

.form-row textarea {
    min-height: 110px;
    resize: vertical;
}

.form-row .tip {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 5px;
}

.btn {
    display: inline-block;
    padding: 9px 22px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: opacity .2s, transform .15s;
}

.btn:hover {
    opacity: .92;
    color: #fff;
    transform: translateY(-1px);
}

.btn.gray {
    background: #9aa1a9;
}

.btn.small {
    padding: 5px 13px;
    font-size: 13px;
}

.flash {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
}

.flash.ok {
    background: #eef8f0;
    color: #237804;
    border: 1px solid #c6e6cd;
}

.flash.err {
    background: #fff2f0;
    color: #b42318;
    border: 1px solid #ffd5cf;
}

.banner-err {
    background: #fff1f0;
    color: #b42318;
    border: 1px solid #ffa39e;
    border-left: 4px solid #ff4d4f;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.banner-err form {
    margin: 0;
}

.batch-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px 0 12px;
}

.batch-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: #fafbfc;
    border: 1px solid #eef0f2;
    border-radius: 8px;
    margin-bottom: 12px;
}

.batch-bar select {
    padding: 6px 8px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-size: 13px;
}

.chkall {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #4b5563;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 登录页 */
.login-shell {
    min-height: 100vh;
    display: flex;
}

.login-side {
    flex: 1;
    background: linear-gradient(160deg, #2b3348 0%, #1a2030 100%);
    color: #fff;
    padding: 60px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-side::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    right: -140px;
    bottom: -160px;
    background: radial-gradient(circle, rgba(255, 106, 61, .35), transparent 70%);
}

.ls-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 6px 20px rgba(242, 63, 31, .4);
    margin-bottom: 20px;
}

.login-side h2 {
    font-size: 24px;
    margin: 0 0 8px;
    font-weight: 600;
}

.login-side>p {
    margin: 0 0 26px;
    color: #a8b0c2;
    font-size: 14px;
}

.ls-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.ls-list li {
    padding: 9px 0 9px 22px;
    font-size: 14px;
    color: #c3cad8;
}

.ls-list li::before {
    content: '';
    position: absolute;
    left: 0;
    margin-top: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
}

.login-panel {
    flex: 0 0 440px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 44px;
}

.login-form {
    width: 100%;
    max-width: 320px;
}

.login-form h1 {
    font-size: 20px;
    margin: 0 0 6px;
    font-weight: 600;
}

.lf-sub {
    color: var(--text-3);
    font-size: 13.5px;
    margin: 0 0 22px;
}

.lf-btn {
    width: 100%;
    padding: 11px;
    font-size: 15px;
    border-radius: 9px;
    margin-top: 4px;
}

.lf-foot {
    margin: 20px 0 0;
    text-align: center;
    font-size: 13px;
}

.lf-foot a {
    color: var(--text-3);
}

.login-box {
    max-width: 380px;
    margin: 70px auto;
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.login-box h1 {
    font-size: 18px;
    margin: 0 0 18px;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 900px) {
    .login-shell {
        flex-direction: column;
    }

    .login-side {
        padding: 34px 24px 30px;
        flex: none;
    }

    .ls-list {
        display: none;
    }

    .login-panel {
        flex: 1;
        padding: 30px 24px 44px;
        align-items: flex-start;
    }

    .login-form {
        max-width: none;
    }
}

/* ============ 后台响应式 ============ */
@media (max-width: 900px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-side {
        width: 100%;
        flex: none;
        height: auto;
        position: static;
        padding: 10px 12px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
    }

    .side-brand {
        padding: 0 6px 0 0;
        flex: 0 0 auto;
    }

    .side-brand .sb-text i {
        display: none;
    }

    .side-menu {
        flex-direction: row;
        gap: 6px;
    }

    .side-menu a {
        white-space: nowrap;
        padding: 8px 12px;
    }

    .side-foot {
        display: none;
    }

    .admin-topbar {
        padding: 12px 16px;
    }

    .admin-topbar .at-user .nm {
        display: none;
    }

    .admin-content {
        padding: 14px 14px 34px;
    }

    .admin-card {
        padding: 14px;
    }
}

/* ============ 移动端 ============ */
@media (max-width: 640px) {
    body {
        font-size: 14.5px;
    }

    .topbar-inner {
        flex-wrap: wrap;
        padding-bottom: 6px;
        gap: 10px;
    }

    .searchbox {
        max-width: none;
        width: 100%;
        margin-left: 0;
    }

    .hero {
        padding: 24px 18px;
    }

    .hero h1 {
        font-size: 21px;
    }

    .hero-stats {
        gap: 20px;
    }

    .d-hero {
        padding: 18px 14px;
    }

    .d-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .d-cover img {
        width: 132px;
    }

    .d-tags {
        justify-content: center;
    }

    .d-intro,
    .d-download {
        padding: 4px 14px 16px;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
        gap: 14px 10px;
    }

    .grid .t {
        font-size: 13px;
    }

    .page-title {
        font-size: 19px;
    }

    .block {
        padding: 14px;
    }

    .prevnext span {
        flex: 1 1 100%;
    }
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(134px, 1fr));
    }
}
