/**
 * 轻便相册系统 - 前台样式
 * 简约大气配色方案
 */


/* =============================================
   CSS变量定义
   ============================================= */

:root {
    /* 主色调 - 石青，纯色，不用渐变紫 */
    --primary-color: #0f766e;
    --primary-dark: #115e59;
    --primary-light: #ccfbf1;
    /* 辅助色 */
    --success-color: #15803d;
    --warning-color: #c2410c;
    --danger-color: #b91c1c;
    /* 中性色 */
    --text-primary: #1c1917;
    --text-secondary: #44403c;
    --text-muted: #a8a29e;
    --border-color: #e7e5e4;
    --bg-color: #fafaf9;
    --bg-white: #FFFFFF;
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    /* 尺寸 */
    --header-height: 60px;
    --border-radius: 12px;
    --spacing: 16px;
    --max-width: 1280px;
}


/* =============================================
   基础样式
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}


/* =============================================
   头部导航
   ============================================= */

.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.06em;
}


/* =============================================
   分类导航
   ============================================= */

.category-nav {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.category-scroll {
    display: flex;
    padding: 0 var(--spacing);
    max-width: var(--max-width);
    margin: 0 auto;
}

.category-item {
    flex-shrink: 0;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
    position: relative;
    transition: all 0.3s ease;
}

.category-item:hover {
    color: var(--primary-color);
}

.category-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.category-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--primary-color);
}


/* =============================================
   分类导航
   ============================================= */

.category-nav {
    background: var(--bg-white);
    padding: 16px var(--spacing);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar {
    height: 4px;
}

.category-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.category-nav {
    display: flex;
    gap: 12px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.category-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.category-item.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* =============================================
   搜索栏
   ============================================= */

.search-bar {
    background: var(--bg-white);
    padding: 12px var(--spacing);
    border-bottom: 1px solid var(--border-color);
}

.search-form {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 10px 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: var(--primary-color);
}


/* =============================================
   公告栏 - 显示完整内容
   ============================================= */

.announcement-bar {
    background: var(--bg-white);
    padding: 16px var(--spacing);
    border-bottom: 1px solid var(--border-color);
}

.announcement-content-full {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: left;
}

.announcement-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
    word-wrap: break-word;
    margin-bottom: 10px;
    text-align: left;
}

.announcement-text:last-child {
    margin-bottom: 0;
}

.announcement-text a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.announcement-text a:hover {
    color: var(--primary-dark);
}


/* =============================================
   主内容区
   ============================================= */

.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px var(--spacing);
    min-height: calc(100vh - 200px);
}


/* 详情页全屏容器 */

body:has(.detail-container) .main-content {
    max-width: 100%;
    padding: 0;
    margin: 0;
}


/* =============================================
   搜索栏和关键词筛选
   ============================================= */

.search-and-filter {
    background: var(--bg-white);
    padding: 8px var(--spacing);
    border-bottom: 1px solid var(--border-color);
}

.search-and-filter .search-bar {
    display: flex;
    align-items: stretch;
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--bg-color);
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 0;
    border: none;
}

.search-and-filter .search-form {
    flex: 1;
    display: flex;
    align-items: stretch;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.search-and-filter .search-input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.search-and-filter .search-btn {
    padding: 10px 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.search-and-filter .search-btn:hover {
    color: var(--primary-color);
}

.keyword-filter-wrapper {
    position: relative;
    margin-left: 0;
}

.keyword-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 100%;
    padding: 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 24px 24px 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.keyword-toggle:hover {
    background: var(--primary-dark);
}

.keyword-toggle.active {
    background: #134e4a;
}

.keyword-filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 320px;
    max-width: 500px;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.keyword-filter-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.keyword-filter-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.clear-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--danger-color);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.clear-filter:hover {
    background: #D32F2F;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.keyword-list::-webkit-scrollbar {
    width: 6px;
}

.keyword-list::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
}

.keyword-list::-webkit-scrollbar-thumb {
    background: #10B981;
    border-radius: 3px;
}

.keyword-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.keyword-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.keyword-item.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.3);
}


/* =============================================
   图片网格
   ============================================= */

.gallery-container {
    margin-bottom: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.gallery-item {
    background: var(--bg-white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.gallery-link {
    display: block;
}

.gallery-image {
    position: relative;
    width: 100%;
    padding-top: 133%;
    /* 3:4 */
    background: var(--bg-color);
    overflow: hidden;
}

.gallery-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.cover-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: calc(100% - 20px);
    pointer-events: none;
}

.cover-badges .status-badge {
    box-shadow: 0 1px 3px rgba(28, 25, 23, 0.22);
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.detail-badges .status-badge {
    padding: 4px 10px;
    font-size: 13px;
}

.gallery-info {
    padding: 14px 16px;
}

.gallery-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.2px;
    line-height: 1.5;
}

.gallery-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.view-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}


/* =============================================
   空状态
   ============================================= */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin: 0 auto 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}


/* =============================================
   分页
   ============================================= */

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

.page-btn,
.page-num {
    padding: 10px 18px;
    background: var(--bg-white);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.page-btn:hover,
.page-num:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.page-num.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.page-dots {
    padding: 8px;
    color: var(--text-muted);
}

.page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}


/* =============================================
   详情页
   ============================================= */

.detail-container {
    background: var(--bg-white);
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    max-width: 100%;
    margin: 0;
}

.detail-main-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    object-fit: cover;
}

.detail-info {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px var(--spacing);
}


/* 详情页顶部导航 */

.detail-top-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.top-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.top-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.top-nav-btn svg {
    flex-shrink: 0;
}

.detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #F59E0B;
    margin-bottom: 16px;
    line-height: 1.4;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.meta-item svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tags .tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.detail-tags .tag-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.detail-time,
.detail-views {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}


/* 详情页关键词盒子 */

.detail-keywords-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.detail-keywords-box .keyword-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.detail-keywords-box .keyword-tag:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}


/* 旧的样式（保留用于其他地方） */

.detail-keywords {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 32px;
}

.detail-keywords svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--text-muted);
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.keyword-tag:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-color);
}

.detail-description {
    margin-bottom: 32px;
}

.detail-description p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.detail-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-primary);
}

.detail-content img,
.detail-content video {
    max-width: 100%;
    height: auto;
    margin: 32px auto;
    border-radius: 0;
    display: block;
}

.detail-content video {
    background: #000;
}

.detail-content p {
    margin: 16px 0;
}

.detail-content h1,
.detail-content h2,
.detail-content h3 {
    margin: 32px 0 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.detail-content h1 {
    font-size: 28px;
}

.detail-content h2 {
    font-size: 24px;
}

.detail-content h3 {
    font-size: 20px;
}

.detail-content ul,
.detail-content ol {
    margin: 16px 0;
    padding-left: 28px;
}

.detail-content li {
    margin: 8px 0;
}

.detail-content blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-color);
    color: var(--text-secondary);
    font-style: italic;
}

.detail-nav {
    padding: 32px var(--spacing);
    max-width: var(--max-width);
    margin: 0 auto;
    border-top: 2px solid var(--border-color);
    background: var(--bg-white);
}

.nav-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.nav-btn svg {
    flex-shrink: 0;
}

.nav-btn.nav-back {
    background: #44403c;
    color: white;
    font-weight: 600;
}

.nav-btn.nav-back:hover {
    background: #1c1917;
}

.nav-btn.nav-home {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.nav-btn.nav-home:hover {
    background: var(--primary-dark);
}

.nav-btn.nav-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn.nav-disabled:hover {
    transform: none;
    background: var(--bg-color);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}


/* =============================================
   页脚
   ============================================= */

.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 30px var(--spacing);
    margin-top: 40px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}


/* =============================================
   返回顶部按钮
   ============================================= */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 52px;
    height: 52px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}


/* =============================================
   响应式设计
   ============================================= */

@media (max-width: 768px) {
    :root {
        --spacing: 12px;
        --header-height: 56px;
    }

    .category-nav {
        padding: 12px var(--spacing);
        gap: 8px;
    }

    .category-item {
        padding: 6px 16px;
        font-size: 13px;
    }

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

    .gallery-image {
        padding-top: 140%;
        /* 移动端稍微调整比例 */
    }

    .gallery-info {
        padding: 10px 12px;
    }

    .gallery-title {
        font-size: 14px;
        margin-bottom: 0;
        line-height: 1.4;
    }

    .gallery-desc {
        font-size: 12px;
    }

    .cover-badges {
        top: 8px;
        left: 8px;
        gap: 4px;
        max-width: calc(100% - 16px);
    }

    .cover-badges .status-badge {
        padding: 2px 6px;
        font-size: 11px;
    }

    .category-tag {
        font-size: 10px;
        padding: 4px 10px;
    }

    .search-and-filter {
        padding: 10px var(--spacing);
    }

    .search-and-filter .search-form {
        border-radius: 20px;
    }

    .keyword-toggle {
        width: 40px;
        height: 40px;
        border-radius: 0 20px 20px 0;
    }

    .keyword-toggle svg {
        width: 18px;
        height: 18px;
    }

    .keyword-filter-wrapper {
        margin-left: -1px;
    }

    .keyword-filter-dropdown {
        min-width: calc(100vw - 32px);
        left: auto;
        right: 0;
        transform: translateY(-10px);
    }

    .keyword-filter-dropdown.active {
        transform: translateY(0);
    }

    .keyword-list {
        gap: 6px;
        max-height: 200px;
    }

    .keyword-item {
        padding: 5px 12px;
        font-size: 12px;
    }

    .clear-filter {
        font-size: 11px;
        padding: 4px 10px;
    }

    .detail-info {
        padding: 24px var(--spacing);
    }

    .detail-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .detail-meta {
        gap: 12px;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .detail-keywords {
        padding: 16px 0;
        margin-bottom: 24px;
    }

    .detail-keywords-box {
        padding: 16px 0;
        margin-bottom: 20px;
        gap: 8px;
    }

    .detail-keywords-box .keyword-tag {
        font-size: 12px;
        padding: 5px 12px;
    }

    .keyword-tag {
        font-size: 12px;
        padding: 5px 12px;
    }

    .detail-content {
        font-size: 15px;
    }

    .detail-content img,
    .detail-content video {
        margin: 20px 0;
    }

    .detail-top-nav {
        gap: 8px;
        margin-bottom: 16px;
    }

    .top-nav-btn {
        padding: 6px 12px;
        font-size: 13px;
        gap: 4px;
    }

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

    .detail-nav {
        padding: 20px var(--spacing);
    }

    .nav-row {
        gap: 8px;
    }

    .nav-btn {
        padding: 10px 14px;
        font-size: 13px;
        gap: 6px;
    }

    .nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1440px) {
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}


/* =============================================
   动画效果
   ============================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gallery-item {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:nth-child(1) {
    animation-delay: 0s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.05s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.15s;
}

.gallery-item:nth-child(5) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(6) {
    animation-delay: 0.25s;
}

.gallery-item:nth-child(7) {
    animation-delay: 0.3s;
}

.gallery-item:nth-child(8) {
    animation-delay: 0.35s;
}


/* 加载动画 */

.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* 页面加载时的平滑效果 */

body {
    animation: pageLoad 0.5s ease;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}