/* =====================================================
   你能看见艺术馆 - 首页样式
   移动端优先，兼容桌面端
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg: #1a1a24;
    --card: #201c17;
    --ink: #f0e9df;
    --ink-2: #a89f90;
    --ink-3: #6d6559;
    --gold: #c9a86a;
    --gold-deep: #e0c088;
    --line: #322c24;
    --shadow: 0 6px 20px rgba(0, 0, 0, .35);
    --radius: 14px;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ===================== 顶部 ===================== */
.header {
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 10px 14px 0;
}

.header-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    flex: 0 0 auto;
}

.logo img {
    height: 52px;
    width: auto;
}

.search-box {
    flex: 1;
    max-width: 300px;
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    height: 40px;
    padding: 0 6px 0 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--ink);
    min-width: 0;
}

.search-box input::placeholder {
    color: var(--ink-3);
}

.search-btn {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    position: relative;
    transition: background .2s;
}

.search-btn:hover {
    background: var(--gold-deep);
}

.search-btn::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 9px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
}

.search-btn::after {
    content: "";
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 6px;
    height: 2px;
    background: #fff;
    transform: rotate(45deg);
    border-radius: 1px;
}

/* ===================== 热搜 ===================== */
.hot-bar {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 14px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.hot-label {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 4px;
    padding: 1px 5px;
    letter-spacing: 1px;
}

.hot-words {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
}

.hot-words::-webkit-scrollbar {
    display: none;
}

.hot-word {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--ink-2);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 3px 10px;
    transition: all .2s;
}

.hot-word:hover {
    color: var(--gold-deep);
    border-color: var(--gold);
}

/* ===================== 用户信息区 ===================== */
.user-bar {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 14px 12px;
}

.user-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 18px;
    box-shadow: var(--shadow);
}

/* 登录前 */
.guest-actions {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.guest-actions a {
    flex: 1;
    text-align: center;
    padding: 11px 0;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    transition: background .2s, color .2s;
}

.btn-login {
    background: var(--gold);
    color: var(--bg);
}

.btn-login:hover {
    background: var(--gold-deep);
}

.btn-register {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}

.btn-register:hover {
    background: var(--gold);
    color: var(--bg);
}

/* 登录后 */
.user-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-image: url('../images/icons/avatar-active.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    font-size: 0;
    line-height: 30px;
    display: block;
    text-align: center;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.user-level {
    font-size: 11px;
    color: var(--ink-2);
    background: rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 2px 8px;
    margin-left: 4px;
}

.user-logout {
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--ink-2);
    border: 1px solid rgba(255, 255, 255, .2);
    background: transparent;
    white-space: nowrap;
    transition: background .2s, color .2s;
}

.user-logout:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* 统计区 */
.user-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.stat-item {
    flex: 1;
    text-align: center;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: color .2s;
}

.stat-item:hover .stat-num {
    color: var(--gold);
}

.stat-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--ink-3);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--line);
    opacity: .8;
}

/* ===================== Banner ===================== */
.banner-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 14px 18px;
}

.banner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
    background: #2a251f;
}

.banner-track {
    position: relative;
    height: 100%;
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease, visibility .6s ease;
}

.banner-slide.active {
    opacity: 1;
    visibility: visible;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 34px 14px 12px;
    background: linear-gradient(transparent, rgba(20, 16, 10, .72));
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.banner-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.banner-sub {
    font-size: 11px;
    opacity: .85;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.banner-btn {
    display: inline-block;
    font-family: inherit;
    font-size: 12px;
    color: #fff;
    background: rgba(201, 168, 106, .92);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 16px;
    padding: 5px 16px;
    margin-top: 8px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.banner-btn:hover {
    background: #e0c088;
    color: #1a1a24;
}

.banner-dots {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 5px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    transition: all .3s;
}

.dot.active {
    width: 16px;
    background: #fff;
}

/* ===================== 限时展区 ===================== */
.gallery {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 14px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    position: relative;
    padding-left: 12px;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--gold);
}

.section-more {
    font-size: 12px;
    color: var(--ink-2);
}

.section-more:hover {
    color: var(--gold-deep);
}

.section-total {
    font-size: 11px;
    color: var(--ink-3);
}

/* 时期页子世纪筛选链接（当代时期：20世纪 | 21世纪） */
.century-links {
    font-size: 12px;
    font-weight: 400;
    color: var(--ink-2);
    margin-left: 6px;
}

.century-link {
    color: var(--ink-2);
    text-decoration: none;
    padding: 1px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.century-link:hover {
    color: var(--gold-deep);
    border-color: var(--gold);
}

.century-link.on {
    color: var(--gold);
    border-color: var(--gold);
}

.century-sep {
    margin: 0 4px;
    color: var(--ink-3);
}

.section-head-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.section-head-right .clear-btn {
    margin: 0;
    font-size: 11px;
    padding: 3px 10px;
    border: 1px solid var(--gold);
    border-radius: 12px;
    background: none;
    color: var(--gold);
    cursor: pointer;
    line-height: 1.4;
    transition: background .2s ease, color .2s ease;
}

.section-head-right .clear-btn:hover {
    background: var(--gold);
    color: #fff;
}

/* ===================== 分页器 ===================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 24px 0 6px;
    flex-wrap: wrap;
}

.page-link {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 11px;
    color: var(--ink-2);
    background: var(--card);
    border: 1px solid var(--line);
    box-sizing: border-box;
    transition: color .2s, border-color .2s;
}

a.page-link:hover {
    color: var(--gold-deep);
    border-color: var(--gold);
}

.page-link.cur {
    color: var(--bg);
    background: var(--gold);
    border-color: var(--gold);
    font-weight: 600;
}

.page-link.disabled {
    opacity: .4;
    cursor: default;
}

.page-link.ellipsis {
    color: var(--ink-3);
    background: transparent;
    border-color: transparent;
    cursor: default;
    min-width: 20px;
    padding: 0;
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.art-card {
    background: #f5efe4;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    transition: transform .2s, box-shadow .2s;
}

.art-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
}

.art-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #e2d9c8;
    overflow: hidden;
}

.art-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.art-card:hover .art-thumb img {
    transform: scale(1.05);
}

.art-info {
    padding: 8px 10px 10px;
}

.art-name {
    font-size: 13px;
    font-weight: 600;
    color: #2f2a24;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.art-author {
    font-size: 11px;
    color: #8a8175;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.art-visited {
    font-size: 11px;
    color: #b07a3f;
    margin-top: 3px;
}

.art-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: inherit;
    font-size: 11px;
    color: #8a8175;
    background: #f0ede5;
    border: none;
    border-radius: 14px;
    padding: 3px 10px;
    cursor: default;
    line-height: 1.4;
    user-select: none;
}

.act-btn svg {
    width: 14px;
    height: 14px;
}

/* 点赞拇指 - 淡红 */
.like-btn svg {
    color: #e88981;
}

/* 收藏心形 - 淡金 */
.fav-btn svg {
    color: #e3bd7d;
}

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

/* ===================== 底部 Tab Bar ===================== */
.tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: #201c17;
    display: flex;
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 0 5px;
    color: var(--ink-3);
    transition: color .2s;
}

.tab-item.active {
    color: var(--gold-deep);
}

.tab-text {
    font-size: 10px;
}

.tab-icon {
    width: 22px;
    height: 22px;
    position: relative;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* 首页 */
.tab-icon.home {
    background-image: url('../images/icons/home.png');
}
.tab-item.active .tab-icon.home {
    background-image: url('../images/icons/home-active.png');
}

/* 现代时期 */
.tab-icon.era1 {
    background-image: url('../images/icons/xiandai.png');
}
.tab-item.active .tab-icon.era1 {
    background-image: url('../images/icons/xiandai-active.png');
}

/* 20世纪当代 */
.tab-icon.era2 {
    background-image: url('../images/icons/y1978.png');
}
.tab-item.active .tab-icon.era2 {
    background-image: url('../images/icons/y1978-active.png');
}

/* 21世纪当代 */
.tab-icon.era3 {
    background-image: url('../images/icons/y2000.png');
}
.tab-item.active .tab-icon.era3 {
    background-image: url('../images/icons/y2000-active.png');
}

/* ===================== 页脚 ===================== */
.footer {
    max-width: 720px;
    margin: 24px auto 0;
    padding: 20px 14px 10px;
    text-align: center;
    line-height: 1.8;
}

.footer::before {
    content: "";
    display: block;
    width: 100%;
    margin: 0 auto 14px;
    border-top: 1px solid var(--line);
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 0;
    margin-bottom: 6px;
    font-size: 12px;
}

.footer-links a {
    color: var(--ink-2);
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--gold-deep);
}

.footer-links .divider {
    color: var(--ink-3);
    padding: 0 8px;
    opacity: .55;
}

.footer-copy {
    font-size: 11px;
    color: var(--ink-3);
}

.footer-copy a {
    color: inherit;
    text-decoration: none;
}
.footer-copy a:hover {
    text-decoration: underline;
}

/* ===================== 登录/注册弹窗 ===================== */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .55);
}

.auth-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 22px 20px 18px;
    color: #222;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
    animation: authFadeIn .25s ease-out;
}

@keyframes authFadeIn {
    from { transform: scale(.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.auth-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a24;
}

.auth-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #999;
    font-size: 22px;
    line-height: 32px;
    text-align: center;
    transition: background .2s, color .2s;
}

.auth-close:hover {
    background: #eee;
    color: #666;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 18px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 9px 0;
    border-radius: 10px;
    font-size: 14px;
    color: #888;
    transition: color .2s, background .2s;
}

.auth-tab.active {
    background: #fff;
    color: #1a1a24;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
    font-weight: 600;
}

.auth-error {
    background: #fff2f0;
    color: #d93025;
    border: 1px solid #ffccc7;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.field-label {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}

.field {
    background: #f7f7f7;
    border-radius: 12px;
    padding: 2px 14px;
    margin-bottom: 14px;
}

.field input {
    width: 100%;
    height: 44px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #222;
    outline: none;
}

.field input::placeholder {
    color: #aaa;
}

.captcha-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 6px;
}

.captcha-field input {
    flex: 1;
}

.captcha-img {
    width: 86px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    pointer-events: auto;
    background: #eee;
}

.captcha-tip {
    font-size: 11px;
    color: #999;
    margin: -8px 0 18px;
}

.auth-submit {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 50px;
    background: #f2bc38;
    color: #1a1a24;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background .2s;
}

.auth-submit:hover {
    background: #e5b030;
}

.auth-foot {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 16px;
}

.auth-foot a {
    color: #e5b030;
    font-weight: 500;
}

.auth-foot a:hover {
    text-decoration: underline;
}

.auth-wechat {
    padding: 30px 0;
    text-align: center;
    color: #888;
}

.wechat-placeholder p {
    font-size: 15px;
    margin-bottom: 6px;
}

.wechat-sub {
    font-size: 12px;
    color: #bbb;
}

/* ===================== 微信登录 ===================== */
.wechat-icon,
.wechat-qr-mark {
    width: 78px;
    height: 78px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #07c160; /* 微信绿 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(7, 193, 96, .35);
}
.wechat-qr-mark {
    background: #1a1a24;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.wechat-placeholder p:first-of-type {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a24;
    margin-bottom: 4px;
}
.wechat-placeholder .wechat-sub {
    margin-bottom: 20px;
    font-size: 12px;
    color: #999;
}
.wechat-btn {
    display: inline-block;
    height: 46px;
    line-height: 44px;
    padding: 0 34px;
    border-radius: 50px;
    background: #07c160;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background .2s, transform .15s;
    text-decoration: none;
}
.wechat-btn:hover {
    background: #06ad56;
    transform: translateY(-1px);
}
.wechat-btn:active {
    transform: translateY(0);
}
.wechat-btn-lg {
    height: 52px;
    line-height: 50px;
    width: 100%;
    max-width: 340px;
    font-size: 16px;
}
.auth-wechat-compact {
    padding: 0 0 6px;
}
.auth-modal-wechat {
    margin: 14px 0 2px;
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 18px;
    color: #bbb;
    font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #eee;
}

/* ===================== 图片防截屏 ===================== */
img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.banner-slide img,
.art-thumb img {
    pointer-events: auto;
}

/* ===================== 滚动渐入 ===================== */
html.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .55s ease, transform .55s ease;
}

html.js .reveal.reveal-in {
    opacity: 1;
    transform: none;
}

/* ===================== 图片懒加载 ===================== */
/* 仅 JS 启用时隐藏未加载的懒加载图；无 JS 时图片保持可见 */
html.js img.lazy-img {
    opacity: 0;
    transition: opacity .4s ease;
}
html.js img.lazy-img.lazy-loaded {
    opacity: 1;
}

/* ===================== 榜单列表视图（人气榜/热度榜） ===================== */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5efe4;
    border-radius: var(--radius);
    padding: 10px;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: transform .2s, box-shadow .2s;
}

.rank-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.rank-num {
    flex: none;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border-radius: 8px;
    box-sizing: border-box;
}
.rank-num.top1 { background: linear-gradient(135deg, #ffd700, #e6a800); }
.rank-num.top2 { background: linear-gradient(135deg, #f7b733, #e65c00); }
.rank-num.top3 { background: linear-gradient(135deg, #d4a056, #a06a1f); }

.rank-row-thumb {
    flex: none;
    width: 96px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #e2d9c8;
    position: relative;
}

.rank-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: auto;
    transition: transform .4s ease;
}

.rank-row:hover .rank-row-thumb img {
    transform: scale(1.05);
}

.rank-row-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rank-row-title {
    font-size: 14px;
    font-weight: 600;
    color: #2f2a24;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-row-author {
    font-size: 12px;
    color: #8a8175;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-row-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    margin-top: 2px;
}

.rank-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.rank-meta-item.fav { color: #ea925b; font-weight: 700; }
.rank-meta-item.like { color: #ea925b; font-weight: 700; }

.rank-meta-item svg {
    width: 12px;
    height: 12px;
    vertical-align: -2px;
}

@media (min-width: 540px) {
    .rank-row-thumb {
        width: 120px;
        height: 90px;
    }

    .rank-row-title {
        font-size: 15px;
    }

    .rank-row-author {
        font-size: 13px;
    }

    .rank-row-meta {
        font-size: 12px;
    }
}

/* ===================== 宽屏适配（手机横屏/平板/桌面） ===================== */
@media (min-width: 540px) {
    .art-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .header {
        padding: 14px 20px 0;
    }

    .header-inner {
        gap: 14px;
    }

    .logo img {
        height: 66px;
    }

    .search-box {
        max-width: 440px;
        height: 46px;
        border-radius: 23px;
    }

    .search-box input {
        font-size: 15px;
    }

    .banner-title {
        font-size: 20px;
    }

    .banner-sub {
        font-size: 13px;
    }

    .art-name {
        font-size: 14px;
    }

    .art-author {
        font-size: 12px;
    }
}

/* ===================== 作品详情页 ===================== */
.art-link {
    display: block;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.detail-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 10px 14px 24px;
}

/* 面包屑导航 */
.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 0;
    font-size: 14px;
}

.bc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
    position: relative;
    padding-left: 10px;
}

.bc-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1px;
    bottom: 1px;
    width: 4px;
    background: var(--gold);
    border-radius: 2px;
}

.bc-divider {
    color: #888;
    font-size: 12px;
}

.bc-current {
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #1e2127;
    aspect-ratio: 3 / 2;
    box-sizing: border-box;
    border: 5px solid #ccc;
}

.detail-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: auto;
    transform: scale(1.2);
}

.detail-section {
    margin-top: 14px;
    background: #fff;
    border-radius: 14px;
    padding: 18px 16px;
    color: #333;
}

.detail-sec-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 12px;
}

.detail-sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 12px;
    width: 4px;
    background: var(--gold);
    border-radius: 2px;
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 10px;
}

.param-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.param-label {
    font-size: 12px;
    color: #666;
}

.param-val {
    font-size: 13px;
    color: #e5b030;
    font-weight: normal;
    word-break: break-all;
    line-height: 1.35;
}

.desc-section p {
    font-size: 14px;
    line-height: 1.85;
    color: #555;
    margin: 0 0 12px;
    text-indent: 2em; /* 段落首行缩进 2 个中文字符 */
}

.desc-section img {
    display: block;
    width: 100%;
    border-radius: 10px;
    margin-top: 12px;
    pointer-events: auto;
}

.desc-section .desc-copyright {
    font-size: 12px;
    color: #bbb;
    line-height: 1.7;
    text-align: left;
    margin: 10px 4px 0;
    text-indent: 0; /* 版权说明不缩进 */
}

.desc-section .desc-copyright::before {
    content: '（';
}

.desc-section .desc-copyright::after {
    content: '）';
}

/* ===== 详情页彩蛋：规格参数九宫格滤镜 ===== */
.param-item[data-filter] {
    cursor: pointer;
    border-radius: 8px;
    padding: 6px 8px;
    margin: -6px -8px;
    transition: background .5s ease;
}
/* 仅支持真实悬停的设备（PC 鼠标）才显示 hover 背景，
   避免手机 touch 点击后 :hover 粘住导致背景色无法消失 */
@media (hover: hover) {
    .param-item[data-filter]:hover {
        background: #f6f4ee;
    }
}
.param-item[data-filter].param-hit {
    background: #f6f4ee;
}
.param-filter-empty {
    min-height: 42px;
}

.detail-hero img.hf-red    { filter: sepia(1) saturate(6) hue-rotate(-30deg); }
.detail-hero img.hf-orange { filter: sepia(1) saturate(5) hue-rotate(-12deg); }
.detail-hero img.hf-yellow { filter: sepia(1) saturate(4) hue-rotate(0deg); }
.detail-hero img.hf-green  { filter: sepia(1) saturate(4) hue-rotate(70deg); }
.detail-hero img.hf-cyan   { filter: sepia(1) saturate(4) hue-rotate(130deg); }
.detail-hero img.hf-blue   { filter: sepia(1) saturate(5) hue-rotate(175deg); }
.detail-hero img.hf-purple { filter: sepia(1) saturate(5) hue-rotate(225deg); }
.detail-hero img.hf-gray   { filter: grayscale(1); }
.detail-hero img.hf-none   { filter: none; }
.detail-hero img {
    transition: filter .35s ease;
}

.artist-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.artist-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.artist-name {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.artist-tag {
    display: inline-block;
    background: #ff4757;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 6px;
}

.artist-meta {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.artist-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-follow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 20px;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    background: var(--gold);
    color: #fff;
}

.btn-follow .btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-follow.secondary {
    background: #b8b8b8;
    color: #fff;
}

.btn-follow:disabled {
    background: #d4d4d4;
    color: #9a9a9a;
    opacity: 1;
    cursor: not-allowed;
    box-shadow: none;
}

#btn-favorite:disabled {
    background: #f5f5f5;
    color: #999;
}

.artist-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.artist-stats div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    flex: 1;
}

.artist-stats span {
    font-size: 12px;
    color: #999;
}

.artist-stats b {
    font-size: 16px;
    color: #222;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.related-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: auto;
}

.related-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.related-title {
    font-size: 14px;
    color: #222;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-year {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.related-author {
    font-size: 12px;
    line-height: 1.5;
    color: #d0b36a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-back-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding: 12px 0;
    font-size: 14px;
    color: #e5b030;
    font-weight: 600;
    background: #f5f5f5;
    border-radius: 10px;
    text-decoration: none;
}

.btn-back-top::before {
    content: "↑";
    font-size: 14px;
}

@media (min-width: 768px) {
    .detail-wrap {
        padding: 16px 20px 28px;
    }

    .params-grid {
        gap: 20px 16px;
    }

    .param-val {
        font-size: 14px;
    }

}

/* ===================== 搜索警示弹窗 ===================== */
.alert-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .55);
    animation: alertFadeIn .2s ease;
}
.alert-overlay.show { display: flex; }
@keyframes alertFadeIn { from { opacity: 0; } to { opacity: 1; } }

.alert-box {
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: 16px;
    padding: 26px 20px 20px;
    color: #333;
    text-align: center;
    box-shadow: 0 12px 45px rgba(0, 0, 0, .35);
    animation: alertBoxScale .25s ease-out;
}
@keyframes alertBoxScale {
    from { transform: scale(.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.alert-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #fff3f0;
    border: 2px solid #ffd8cc;
    color: #ff4d2e;
    font-size: 26px;
    line-height: 50px;
    text-align: center;
}

.alert-title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
}

.alert-msg {
    font-size: 13px;
    line-height: 1.6;
    color: #777;
    word-break: break-all;
}

.alert-btn {
    width: 100%;
    margin-top: 18px;
    padding: 10px 0;
    border: none;
    border-radius: 20px;
    background: var(--gold);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* ===================== 搜索轻提示（toast） ===================== */
.search-toast {
    position: fixed;
    left: 50%;
    top: 18%;
    transform: translateX(-50%) translateY(-8px);
    z-index: 500;
    max-width: 80%;
    padding: 10px 20px;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 20px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}
.search-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
