﻿/* 表盘市场样式 */

/* ========== 浮动筛选按钮组（始终可见） ========== */
.dynamic-filter-bar.wf-sticky-filter {
    position: sticky !important;
    top: 60px;            /* 紧贴顶部导航栏下方 */
    z-index: 100;
    background: var(--bg-primary, #fff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-left: -8px;    /* 抵消 layout-container 的 padding，撑满宽度 */
    margin-right: -8px;
    padding-left: 8px;
    padding-right: 8px;
}

@media (max-width: 768px) {
    .dynamic-filter-bar.wf-sticky-filter {
        top: 56px;        /* 移动端导航栏较矮 */
    }
}

/* ========== 页面布局 ========== */
.watchface-page {
    min-height: 100vh;
    background: var(--bg-primary, #fff);
}

.watchface-header {
    background: #fff;
    color: #1a1a2e;
    padding: 1.5rem 0 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.watchface-header .header-content {
    text-align: center;
}

.watchface-header .header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.watchface-header .header-title i {
    font-size: 2.5rem;
}

.watchface-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.watchface-header .header-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* ========== 表盘筛选条件标签 & 清除按钮 ========== */
/* 注意: 按钮/滚动/分隔线样式统一使用 MainLayout 的 .dynamic-filter-bar 类 */

/* 当前筛选条件标签栏 */
.wf-active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 12px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.wf-filter-token {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
    color: #4f46e5;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #c7d2fe;
    animation: tokenSlideIn 0.3s ease;
}

@keyframes tokenSlideIn {
    from { opacity: 0; transform: translateX(-8px) scale(0.9); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

.wf-filter-token .token-icon {
    font-size: 14px;
}

.wf-filter-token .token-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    margin-left: 2px;
    background: rgba(79,70,229,0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.wf-filter-token .token-remove:hover {
    background: rgba(79,70,229,0.25);
}

.wf-filter-token .token-remove .bi {
    font-size: 12px;
    color: #4f46e5;
}

.wf-clear-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: transparent;
    color: var(--text-secondary, #6b7280);
    border: 1px dashed var(--border-color, #d1d5db);
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.wf-clear-all:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background: #fef2f2;
}

.wf-clear-all .bi {
    font-size: 14px;
}

/* ========== 旧版筛选栏（保留兼容） ========== */
.filter-bar {
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* 搜索区域（新布局：独立于动态按钮组下方） */
.wf-search-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.wf-search-section .search-box {
    flex: 1 1 300px;
    min-width: 250px;
}

.wf-search-section .result-info {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    flex-shrink: 0;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.search-box {
    position: relative;
    flex: 1 1 300px;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary, #666);
}

.search-box input {
    width: 100%;
    padding: 0.6rem 2.5rem;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.search-box .clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary, #666);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #666);
    margin: 0;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color, #ddd);
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.brand-filter select {
    padding: 0.6rem 1rem;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 8px;
    font-size: 0.9rem;
    min-width: 150px;
}

.result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #ddd);
}

.result-info strong {
    color: #667eea;
}

.reset-btn {
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-color, #ddd);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.reset-btn:hover {
    background: #f8f9fa;
}

/* ========== 表盘瀑布流（与首页壁纸瀑布一致） ========== */
.watchface-grid {
    column-count: 4;
    column-gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 响应式列数（与首页瀑布一致） */
@media (min-width: 1920px) {
    .watchface-grid { column-count: 6; }
}
@media (min-width: 1600px) and (max-width: 1919px) {
    .watchface-grid { column-count: 5; }
}
@media (min-width: 1200px) and (max-width: 1599px) {
    .watchface-grid { column-count: 4; }
}
@media (min-width: 900px) and (max-width: 1199px) {
    .watchface-grid { column-count: 3; }
}
@media (min-width: 640px) and (max-width: 899px) {
    .watchface-grid { column-count: 2; }
}
@media (max-width: 639px) {
    .watchface-grid { column-count: 2; column-gap: 0.75rem; }
    .watchface-card { margin-bottom: 0.75rem; }
}
@media (max-width: 399px) {
    .watchface-grid { column-count: 1; }
}

.watchface-card {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
}

.watchface-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.card-preview {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    overflow: hidden;
}

.card-preview img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    max-width: 100%;
    max-height: none;
}

/* 不同形状的预览样式 */
.shape-round .card-preview img {
    border-radius: 50%;
}

.shape-square .card-preview img {
    border-radius: 10%;
}

.shape-rectangle .card-preview img {
    border-radius: 8%;
}

.card-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-dynamic {
    background: rgba(102, 126, 234, 0.9);
    color: white;
}

.badge-shape {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.card-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.watchface-card:hover .card-hover-overlay {
    opacity: 1;
}

.btn-preview {
    padding: 0.6rem 1.2rem;
    background: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
}

.meta-brand {
    font-weight: 500;
}

.meta-downloads {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 加载和错误状态 ========== */
.loading-state,
.error-state,
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.loading-state p,
.error-state p,
.empty-state p {
    margin-top: 1rem;
    color: var(--text-secondary, #666);
}

.error-state i,
.empty-state i {
    font-size: 4rem;
    color: var(--text-secondary, #999);
}

.error-state h3,
.empty-state h3 {
    margin-top: 1rem;
    font-size: 1.5rem;
}

/* ========== 分页 ========== */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #ddd);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-num {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color, #ddd);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-num:hover {
    background: #f8f9ff;
    border-color: #667eea;
}

.page-num.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-info {
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
}

/* ========== 详情页 ========== */
.watchface-detail {
    min-height: 100vh;
    background: var(--bg-primary, #fff);
}

.detail-nav {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color, #eee);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--bg-secondary, #f8f9fa);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    padding: 2rem 0;
}

/* 左侧预览区 */
.detail-left {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.preview-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.main-preview {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.main-preview img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.main-preview.shape-round img {
    border-radius: 50%;
}

.main-preview.shape-square img {
    border-radius: 10%;
}

.main-preview.shape-rectangle img {
    border-radius: 8%;
}

.creator-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
}

.creator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-info {
    flex: 1;
}

.creator-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.creator-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
}

/* 右侧信息区 */
.detail-right {
    max-width: 100%;
}

.info-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.info-header {
    margin-bottom: 1.5rem;
}

.watchface-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.watchface-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge-brand {
    background: #764ba2;
    color: white;
}

.info-description {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
}

.info-description p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-primary, #333);
}

.info-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.info-group {
    margin-bottom: 1.5rem;
}

.group-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.4rem 0.8rem;
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    font-size: 0.85rem;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 6px;
}

.feature-item i {
    color: #667eea;
}

/* 操作按钮 */
.action-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color, #eee);
}

.btn-download {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transition: all 0.3s;
}

.btn-download:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    position: relative;
}

.action-buttons button {
    flex: 1;
}

.share-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    min-width: 150px;
}

.share-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.share-item:hover {
    background: var(--bg-secondary, #f8f9fa);
}

/* 推荐区域 */
.recommend-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color, #eee);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.recommend-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s;
}

.recommend-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.recommend-card .card-preview {
    padding-top: 100%;
}

.recommend-card .card-info {
    padding: 0.75rem;
}

.recommend-card .card-info h4 {
    font-size: 0.9rem;
    margin: 0 0 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommend-card .card-info p {
    font-size: 0.8rem;
    margin: 0;
    color: var(--text-secondary, #666);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .watchface-header .header-title {
        font-size: 2rem;
    }
    
    .watchface-header h1 {
        font-size: 2rem;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .watchface-grid {
        column-count: 2;
        column-gap: 1rem;
    }
    
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .detail-left {
        position: relative;
        top: auto;
    }
    
    .info-details {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   表盘主页面升级样式 - P0/P1/P2/P3 新增功能
   ============================================================ */

/* ========== P2: 精选轮播区 ========== */
.wf-hero-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin: 16px 24px 24px;
    height: 200px;
}
.wf-hero-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}
.wf-hero-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: relative;
}
.wf-hero-content {
    flex: 1;
    color: #fff;
    z-index: 1;
}
.wf-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
}
.wf-hero-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.wf-hero-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
    max-width: 400px;
}
.wf-hero-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.wf-hero-tag {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}
.wf-hero-btn {
    background: #fff;
    color: #333;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wf-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.wf-hero-preview {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wf-hero-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.wf-hero-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.wf-hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.wf-hero-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #fff;
}
.wf-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}
.wf-hero-arrow:hover { background: rgba(255,255,255,0.5); }
.wf-hero-prev { left: 12px; }
.wf-hero-next { right: 12px; }

/* ========== P1: 分类快捷入口 ========== */
.wf-category-bar {
    margin: 16px 0;
    overflow: hidden;
}
.wf-category-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px;
    scrollbar-width: none;
}
.wf-category-scroll::-webkit-scrollbar { display: none; }
.wf-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 64px;
    cursor: pointer;
    padding: 8px 6px;
    border-radius: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.wf-category-item:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}
.wf-category-item.active {
    background: #f0f2ff;
}
.wf-category-item.active .wf-category-name {
    color: #667eea;
    font-weight: 600;
}
.wf-category-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.wf-category-name {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

/* ========== P0: 卡片悬浮操作按钮 ========== */
.card-hover-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}
.watchface-card:hover .card-hover-actions {
    opacity: 1;
}
.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-action:hover {
    transform: scale(1.1);
    background: #fff;
}
.btn-action.favorited {
    color: #ff4757;
}
.btn-action.favorited i { color: #ff4757; }

/* ========== P2: HOT/NEW标签 ========== */
.badge-hot {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    font-weight: 600;
}
.badge-new {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: #fff;
    font-weight: 600;
}

/* ========== P3: 搜索建议下拉 ========== */
.search-box { position: relative; }
.search-box.focused { z-index: 100; }
.wf-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
}
.wf-suggest-group {
    padding: 4px 0;
}
.wf-suggest-title {
    display: block;
    padding: 6px 16px;
    font-size: 12px;
    color: #999;
    font-weight: 600;
}
.wf-suggest-clear {
    float: right;
    margin-right: 16px;
    font-size: 12px;
    color: #667eea;
    background: none;
    border: none;
    cursor: pointer;
}
.wf-suggest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
}
.wf-suggest-item:hover { background: #f5f7ff; }
.wf-suggest-item i { font-size: 14px; color: #999; }

/* ========== P1: 加载更多 ========== */
.wf-loading-more {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #999;
    font-size: 14px;
}
.wf-load-more-container {
    text-align: center;
    padding: 24px 0;
}
.wf-load-more-btn {
    padding: 10px 32px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.wf-load-more-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f8f9ff;
}

/* ========== P3: 热门标签云 ========== */
.wf-tag-cloud-section {
    margin-top: 40px;
    padding: 24px;
    background: #fafbfc;
    border-radius: 12px;
}
.wf-tag-cloud-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wf-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.wf-tag {
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.wf-tag small { opacity: 0.7; font-size: 11px; }
.wf-tag:hover { transform: scale(1.05); }
.wf-tag-1 { font-size: 12px; background: #f5f5f5; color: #888; }
.wf-tag-2 { font-size: 13px; background: #eef0ff; color: #667eea; }
.wf-tag-3 { font-size: 14px; background: #e0e4ff; color: #5568d3; font-weight: 500; }
.wf-tag-4 { font-size: 15px; background: #667eea; color: #fff; font-weight: 600; }

/* ========== 响应式适配 ========== */
@media (max-width: 768px) {
    .wf-hero-carousel { height: 180px; margin: 12px 16px 0; }
    .wf-hero-title { font-size: 20px; }
    .wf-hero-preview { width: 100px; height: 100px; }
    .wf-hero-desc { display: none; }
    .card-hover-actions { opacity: 1; }
}


/* ========== 表盘无限滚动 ========== */
.infinite-scroll-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    gap: 0.75rem;
    width: 100%;
    clear: both;
}

.loader-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid var(--border-color, #e0e0e0);
    border-top-color: var(--primary-color, #667eea);
    border-radius: 50%;
    animation: wf-spin 1s linear infinite;
}

@keyframes wf-spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-size: 0.875rem;
    color: var(--text-secondary, #666);
    font-weight: 500;
    margin: 0;
}

.wf-scroll-end {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem 3rem;
    color: var(--text-secondary, #888);
    font-size: 0.9rem;
    clear: both;
}

.wf-scroll-end i {
    font-size: 1rem;
    color: #4caf50;
}


/* ========== 表盘筛选栏与顶部导航对齐 ========== */
.wf-sticky-filter .dynamic-filter-inner {
    max-width: 1400px;   /* 与顶部导航 .header-content 一致 */
    padding: 0 1rem;     /* 与顶部导航左右留白一致 */
}
