/* 01. 主题变量 */
:root {
    --pink: #e957a4;
    --pink-light: #fff0f8;
    --ink: #28253c;
    --muted: #8c8a9c;
    --bg: #f8f8fc;
    --panel: #fff;
    --line: #eeeaf3;
    --shadow: 0 5px 24px #2420440a;
}

/* 02. 基础样式 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { text-decoration: none; color: inherit; }
.container { width: min(1440px, 94%); margin: auto; }

/* 03. 顶部导航 */
.site-header { position: absolute; z-index: 2; width: 100%; color: white; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 28px; height: 78px; }
.brand { display: flex; align-items: center; font-size: 26px; font-weight: 800; letter-spacing: 2px; white-space: nowrap; line-height: 1; }
.brand small { display: block; font-size: 9px; letter-spacing: 4px; font-weight: 500; margin-top: 8px; }
.moon { font-size: 48px; color: #ffa7d9; margin-right: 9px; }
.nav nav { display: flex; gap: 32px; font-size: 14px; font-weight: 600; }
.nav nav a:hover { color: #ffaad9; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.search-top { display: flex; align-items: center; background: #ffffffeb; border-radius: 25px; color: #7b738d; padding: 8px 14px; min-width: 260px; }
.search-top input { border: 0; background: none; outline: 0; width: 100%; font-size: 13px; }
.search-top span { font-size: 22px; margin-right: 8px; }
.icon-btn { border: 0; background: #ffffff21; color: white; border-radius: 50%; width: 36px; height: 36px; font-size: 23px; }
.icon-btn.selected { color: #ff80be; }

/* 04. 首页横幅 */
.hero {
    min-height: 440px;
    background:
        linear-gradient(90deg, #191a39 0%, #262445e8 31%, #31254855 65%, #24204222 100%),
        url('../assets/images/hero.webp') right center / auto 100% no-repeat,
        #211f3c;
    color: white;
    display: flex;
    align-items: center;
}
.hero-content { padding: 105px 0 65px; }
.eyebrow { color: #ffadd8; font-size: 13px; letter-spacing: 4px; }
.hero h1 { font-family: serif; font-size: clamp(56px, 7vw, 96px); font-weight: 600; letter-spacing: 10px; text-shadow: 0 5px 14px #150e33; margin: 8px 0; }
.hero h2 { font-size: 24px; letter-spacing: 2px; margin: 5px 0; }
.hero p { font-size: 15px; line-height: 1.9; color: #e4dce9; }
.hero-buttons { display: flex; gap: 15px; margin-top: 22px; }
.primary-btn, .outline-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 28px; font-size: 14px; border: 1px solid transparent; }
.primary-btn { background: linear-gradient(90deg, #e846a3, #f786bf); color: white; }
.outline-btn { background: #ffffff12; border-color: #fff; color: #fff; }

/* 05. 快捷分类 */
.categories { display: flex; justify-content: space-around; align-items: center; gap: 10px; background: var(--panel); border-radius: 15px; box-shadow: var(--shadow); padding: 14px 10px; position: relative; margin-top: -20px; margin-bottom: 25px; }
.category { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 90px; color: var(--ink); font-size: 13px; padding: 10px; border-radius: 12px; }
.category span { display: grid; place-items: center; border-radius: 50%; width: 45px; height: 45px; background: #f9f0fa; color: #bd75c3; font-size: 25px; }
.category.active { color: var(--pink); background: var(--pink-light); }

/* 06. 内容布局及通用面板 */
.content-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr) 230px; gap: 18px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.panel-heading { font-size: 15px; font-weight: 700; padding: 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.text-btn { border: 0; background: none; color: var(--pink); font-size: 12px; }

/* 07. 左侧筛选 */
.filter-section { padding: 10px 18px 18px; border-bottom: 1px solid var(--line); }
.filter-section h3 { font-size: 13px; }
.filter-options { display: flex; flex-direction: column; gap: 11px; }
.filter-options label { font-size: 13px; color: var(--muted); cursor: pointer; }
.filter-options input { accent-color: var(--pink); margin-right: 9px; }

/* 08. 图库工具栏 */
.gallery-heading { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.gallery-heading h2 { font-size: 22px; margin: 0; }
.gallery-heading p { color: var(--muted); font-size: 12px; margin: 7px 0; }
.sort-control { font-size: 12px; color: var(--muted); }
.sort-control select { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); color: var(--ink); padding: 9px; }
.status-line { font-size: 12px; color: var(--muted); margin: 0 0 12px; }

/* 09. 作品卡片 */
.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.work-card { background: var(--panel); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .2s; }
.work-card:hover { transform: translateY(-4px); }
.work-image { display: block; position: relative; padding: 0; border: 0; background: #e9dbea; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; }
.work-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.like-count { position: absolute; bottom: 7px; right: 7px; background: #221c38a8; color: white; border-radius: 15px; padding: 4px 8px; font-size: 11px; }
.work-info { padding: 10px; }
.work-title { border: 0; background: none; color: var(--ink); font-size: 14px; font-weight: 700; text-align: left; padding: 0; }
.work-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 9px 0; }
.work-tags span { font-size: 10px; background: #f5edf8; color: #a574ae; border-radius: 4px; padding: 3px 5px; }
.favorite { font-size: 11px; color: var(--muted); border: 0; background: none; padding: 4px 0; }
.favorite.is-favorite { color: var(--pink); }

/* 10. 分页和空状态 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 25px 0; }
.pagination button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 8px 14px; border-radius: 9px; }
.pagination button:disabled { opacity: .4; }
.empty-state { text-align: center; padding: 70px 12px; color: var(--muted); }

/* 11. 右侧侧边栏 */
.promo { padding: 22px; color: white; min-height: 210px; background: radial-gradient(circle at 80% 12%, #ffe7bd 0 7%, transparent 8%), linear-gradient(135deg, #1b254d, #62477b 75%, #9c6699); }
.promo h2 { font-family: serif; font-size: 24px; }
.promo p { line-height: 1.8; }
.promo a { display: inline-block; border: 1px solid #ffffffaa; padding: 8px 15px; border-radius: 20px; font-size: 12px; }
.promo-moon { text-align: right; font-size: 30px; color: #ffd5e9; }
.announcements, .sidebar-note { margin-top: 14px; }
.announcements ul { padding: 0 17px 0 30px; color: var(--muted); font-size: 12px; line-height: 2.4; }
.sidebar-note { padding: 17px; font-size: 12px; color: var(--muted); line-height: 1.9; }
.sidebar-note h3 { color: var(--ink); }

/* 12. 关于我们及页脚 */
.about-section { text-align: center; padding: 60px 0 65px; margin-top: 50px; background: var(--panel); }
.about-section h2 { font-family: serif; font-size: 30px; }
.about-section p { color: var(--muted); line-height: 2; }
.disclaimer { font-size: 12px; }
footer { background: #211d39; color: #c4bcd1; padding: 26px 0; font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; }

/* 13. 作品详情弹窗 */
.detail-dialog { border: 0; border-radius: 18px; padding: 0; width: min(720px, 92vw); max-height: 90vh; background: var(--panel); color: var(--ink); overflow: auto; }
.detail-dialog::backdrop { background: #0b0b1bc9; }
.detail-dialog #dialogBody { display: grid; grid-template-columns: 1fr 1fr; }
.detail-dialog img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.dialog-info { padding: 28px; line-height: 1.8; }
.dialog-info p { font-size: 13px; color: var(--muted); }
.dialog-close { position: absolute; top: 10px; right: 12px; border: 0; background: #ffffffdf; border-radius: 50%; font-size: 24px; width: 36px; height: 36px; }
.mobile-search { display: none; }

/* 14. 深色模式 */
.dark {
    --bg: #171525;
    --panel: #242139;
    --ink: #f5f1fc;
    --muted: #b2aac5;
    --line: #38334e;
    --pink-light: #4b2b48;
    --shadow: none;
}
.dark .work-tags span { background: #43344d; color: #eab3e1; }
.dark .category span { background: #4b3559; }
.dark .search-top input { color: #28253c; }

/* 15. 平板布局：1150px 以下 */
@media (max-width: 1150px) {
    .content-layout { grid-template-columns: 185px minmax(0, 1fr); }
    .sidebar { display: none; }
    .nav nav { gap: 16px; }
    .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 16. 手机布局：760px 以下 */
@media (max-width: 760px) {
    .nav { height: 68px; }
    .brand { font-size: 21px; }
    .moon { font-size: 36px; }
    .nav nav, .search-top { display: none; }
    .hero { min-height: 440px; background: linear-gradient(90deg, #1d1a39e8, #211b39a8), url('../assets/images/hero.webp') center / cover; }
    .hero-content { padding: 105px 0 60px; }
    .hero h1 { font-size: 60px; }
    .hero h2 { font-size: 18px; }
    .hero p { font-size: 13px; }
    .categories { overflow-x: auto; justify-content: flex-start; padding: 8px; scrollbar-width: thin; }
    .category { flex: 0 0 85px; font-size: 11px; }
    .content-layout { display: block; }
    .filters { display: none; }
    .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-heading h2 { font-size: 19px; }
    .mobile-search { display: block; margin: 10px 0; }
    .mobile-search input { width: 100%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 20px; padding: 12px 15px; }
    .footer-inner { flex-direction: column; gap: 10px; }
    .detail-dialog #dialogBody { grid-template-columns: 1fr; }
    .detail-dialog img { max-height: 300px; }
    .about-section { padding: 40px 0; }
    .hero-buttons { gap: 8px; }
    .primary-btn, .outline-btn { padding: 11px 15px; font-size: 12px; }
}

/* 17. 小屏手机：360px 以下 */
@media (max-width: 360px) {
    .work-grid { gap: 7px; }
    .work-info { padding: 7px; }
    .work-tags span { font-size: 9px; }
    .brand { font-size: 18px; }
}

/* 18. 首页横幅：主标题与操作按钮（覆盖前面的基础样式） */
.hero h2 { font-size: clamp(30px, 3.5vw, 48px); letter-spacing: 2px; line-height: 1.35; max-width: 850px; }
.hero-content > p:not(.eyebrow) { font-size: clamp(14px, 1.35vw, 18px); line-height: 1.85; }
.hero-buttons .primary-btn, .hero-buttons .outline-btn { padding: 15px 26px; font-size: 16px; font-weight: 600; }
.hero-buttons { flex-wrap: wrap; }

/* 19. 详情页操作按钮与大图预览 */
.dialog-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.preview-btn { background: var(--panel); border: 1px solid var(--pink); color: var(--pink); }
.preview-dialog { border: 0; border-radius: 16px; padding: 16px; background: var(--panel); max-width: 95vw; max-height: 95vh; position: relative; }
.preview-dialog::backdrop { background: #0b0b1bd9; }
.preview-dialog img { display: block; max-width: min(1100px, 90vw); max-height: 85vh; width: auto; height: auto; object-fit: contain; }

/* 20. 手机端横幅样式覆盖：放在文件末尾以保持原优先级 */
@media (max-width: 760px) {
    .hero h2 { font-size: clamp(27px, 7vw, 38px); }
    .hero-buttons .primary-btn, .hero-buttons .outline-btn { padding: 12px 16px; font-size: 14px; }
}
