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


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

:root {
    /* 主色调 - 清新蓝色 */
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --primary-light: #BBDEFB;
    /* 辅助色 */
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #F44336;
    /* 中性色 */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --border-color: #e2e8f0;
    --bg-color: #f7fafc;
    --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: space-between;
    gap: 12px;
}

.site-title {
    font-size: 26px;
    font-weight: 600;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 30%, #FF1493 70%, #9370DB 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.4));
    animation: shimmer 3s ease-in-out infinite;
    position: relative;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}


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

.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: linear-gradient(135deg, #FFF5E6 0%, #FFE8CC 100%);
    padding: 16px var(--spacing);
    border-bottom: 1px solid #FFDAA5;
}

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

.announcement-text {
    font-size: 16px;
    line-height: 1.8;
    color: #D97706;
    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: #D97706;
    text-decoration: none;
    transition: color 0.3s ease;
}

.announcement-text a:hover {
    color: #B45309;
}


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

.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: linear-gradient(135deg, #10B981 0%, #059669 100%);
    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: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.keyword-toggle.active {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
}

.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: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.keyword-item.active {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    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: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    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);
}

.badge-hot {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    color: white;
    padding: 8px 18px 8px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.6), 0 0 30px rgba(236, 72, 153, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: hotGlow 2s ease-in-out infinite;
}

.badge-hot::before {
    content: '✨';
    font-size: 13px;
    animation: hotSpark 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}

.gallery-item:hover .badge-hot {
    background: linear-gradient(135deg, #A855F7 0%, #F472B6 100%);
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.8), 0 0 40px rgba(244, 114, 182, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}


/* 限定标签 - 橙色渐变 */

.badge-limited {
    display: inline-block;
    background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    margin-right: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
    animation: badgeGlow 2s ease-in-out infinite;
}


/* 王牌标签 - 紫色渐变 */

.badge-ace {
    display: inline-block;
    background: linear-gradient(135deg, #9C27B0 0%, #673AB7 100%);
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    margin-right: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.4);
    animation: badgeGlow 2s ease-in-out infinite 0.5s;
}

@keyframes badgeGlow {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(156, 39, 176, 0.4);
    }

    50% {
        box-shadow: 0 4px 16px rgba(156, 39, 176, 0.6);
    }
}


/* 详情页的标签样式 */

.detail-title .badge-limited,
.detail-title .badge-ace {
    font-size: 13px;
    padding: 6px 14px;
    line-height: 1;
}

@keyframes hotSpark {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.2) rotate(-5deg);
        opacity: 0.8;
    }
}

@keyframes hotGlow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.6), 0 0 30px rgba(236, 72, 153, 0.4);
    }

    50% {
        box-shadow: 0 4px 24px rgba(139, 92, 246, 0.8), 0 0 40px rgba(236, 72, 153, 0.6);
    }
}

.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: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%);
    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: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    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: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.nav-btn.nav-back:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

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

.nav-btn.nav-home:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1565C0 100%);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

.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: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    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: linear-gradient(135deg, var(--primary-dark) 0%, #1565C0 100%);
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.5);
}


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

@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;
    }

    .badge-hot {
        top: 0;
        right: 0;
        padding: 6px 14px 6px 10px;
        font-size: 10px;
        gap: 4px;
        letter-spacing: 0.5px;
    }

    .badge-hot::before {
        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;
    }
}


/* =============================================
   语言切换 / WhatsApp / 付费预览
   ============================================= */

.lang-switcher {
    position: relative;
    flex-shrink: 0;
}

.lang-switcher-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.lang-switcher-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 160px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.lang-switcher-menu.active {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 13px;
}

.lang-option:hover,
.lang-option.active {
    background: var(--bg-color);
    color: var(--primary-color);
}

.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 88px;
    z-index: 900;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
    color: #fff;
}

.paywall-locked-wrap {
    position: relative;
    display: block;
    margin: 16px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
}

.paywall-locked-wrap img,
.paywall-locked-wrap video {
    width: 100%;
    display: block;
}

.paywall-locked-wrap[data-paywall="locked"] img {
    filter: blur(40px) brightness(0.55) saturate(0.7);
    transform: scale(1.2);
    pointer-events: none;
    user-select: none;
    -webkit-filter: blur(40px) brightness(0.55) saturate(0.7);
}

.paywall-locked-wrap[data-paywall="locked"] video,
.paywall-locked-wrap[data-paywall="locked"] iframe {
    filter: blur(36px) brightness(0.5);
    pointer-events: none;
    -webkit-filter: blur(36px) brightness(0.5);
}

.paywall-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

.paywall-overlay::before {
    content: '';
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0110 0v4'/%3E%3C/svg%3E") center/contain no-repeat;
}

.paywall-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.paywall-modal[hidden] {
    display: none !important;
}

.paywall-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.paywall-modal-box {
    position: relative;
    background: var(--bg-white);
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.paywall-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 24px;
    line-height: 1;
    color: var(--text-muted);
}

.paywall-modal-icon {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.paywall-modal-box h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.paywall-modal-box p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.paywall-unlock-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
}

.paywall-unlock-btn:disabled {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .whatsapp-float {
        right: 16px;
        bottom: 76px;
        width: 52px;
        height: 52px;
    }
}

/* USDT 支付页 */
.payment-page {
    max-width: 520px;
    margin: 24px auto 48px;
    padding: 0 16px;
}

.payment-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: var(--shadow-md);
}

.payment-card h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.payment-gallery-title {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.payment-amount-box {
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.payment-amount {
    display: block;
    font-size: 28px;
    color: var(--primary-dark);
    margin: 8px 0 12px;
}

.payment-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.payment-field {
    margin-bottom: 16px;
}

.payment-address {
    display: block;
    word-break: break-all;
    font-size: 13px;
    background: var(--bg-color);
    padding: 10px;
    border-radius: 8px;
    margin: 6px 0;
}

.payment-copy-btn {
    font-size: 12px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 6px;
}

.payment-tip {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 16px 0 8px;
}

.payment-expire {
    font-size: 12px;
    color: var(--warning-color);
}

.payment-polling {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.payment-btn-primary {
    display: inline-block;
    margin-top: 16px;
    padding: 14px 28px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
}

.payment-link-back {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.payment-status-success {
    text-align: center;
    padding: 20px 0;
}

.payment-status-success svg {
    color: var(--success-color);
    margin-bottom: 12px;
}

.paywall-price-hint {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.paywall-error {
    color: #dc2626;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #fef2f2;
    border-radius: 8px;
    line-height: 1.4;
}

.paywall-unlock-btn.is-loading {
    opacity: 0.75;
    pointer-events: none;
}