/**
 * 美图主题 - 内页样式
 * @package Saotheme
 */

/* ===== 页面基础 ===== */
.gallery-page { background: #f8f9fb; min-height: 100vh; }
[data-bs-theme="dark"] .gallery-page { background: #0f1117; }

.gallery-container { max-width: 1200px; margin: 0 auto; padding: 16px; }

/* 面包屑 */
.gallery-breadcrumb { font-size: 13px; color: #94a3b8; margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.gallery-breadcrumb a { color: #94a3b8; text-decoration: none; transition: color .2s; }
.gallery-breadcrumb a:hover { color: #ec4899; }
.gallery-breadcrumb i { font-size: 10px; color: #cbd5e1; }
.gallery-breadcrumb .current { color: #ec4899; font-weight: 600; }

/* 主布局 */
.gallery-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding-bottom: 40px; }
@media(max-width:991px) { .gallery-layout { grid-template-columns: 1fr; } }

/* ===== 左侧主图区 ===== */
.gallery-main { min-width: 0; }

/* 主图（拟物模糊背景） */
.gallery-hero { position: relative; background: #0a0a0a; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
[data-bs-theme="dark"] .gallery-hero { background: #050508; border: 1px solid rgba(255,255,255,.06); }

/* 主图区 */
.gallery-hero-img-wrap {
    position: relative; z-index: 1; width: 100%; aspect-ratio: 16/9;
    overflow: hidden; cursor: zoom-in;
    display: flex; align-items: center; justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* 伪元素做模糊背景，filter 不影响前景图 */
.gallery-hero-img-wrap::before {
    content: ''; position: absolute; inset: 0; z-index: 0;
    background: inherit;
    -webkit-filter: blur(5px) brightness(0.45) saturate(1.4);
    filter: blur(5px) brightness(0.45) saturate(1.4);
    transform: scale(1.2);
    margin: -30px;
}
/* 主图 */
.gallery-hero-img-wrap .gallery-hero-img {
    max-width: 100%; max-height: 100%; object-fit: contain;
    transition: opacity .3s ease; display: block;
    position: relative; z-index: 1;
    -webkit-filter: drop-shadow(0 4px 20px rgba(0,0,0,.3));
    filter: drop-shadow(0 4px 20px rgba(0,0,0,.3));
}

/* [清理] 旧方案 */
.gallery-hero-blur { display: none; }
.gallery-hero-blur-bg { display: none; }

/* 角标 */
.gallery-badge { position: absolute; top: 16px; left: 16px; z-index: 5; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .5px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.gallery-original-badge { position: absolute; top: 16px; right: 16px; z-index: 5; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #ec4899, #f43f5e); box-shadow: 0 4px 12px rgba(236,72,153,.3); }

/* 计数器 */
.gallery-hero-counter { position: absolute; bottom: 16px; right: 16px; z-index: 5; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 16px; backdrop-filter: blur(8px); }

/* 导航箭头 */
.gallery-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff; font-size: 16px; cursor: pointer; backdrop-filter: blur(8px); transition: all .2s; display: flex; align-items: center; justify-content: center; opacity: 0; }
.gallery-hero-img-wrap:hover .gallery-nav-btn { opacity: 1; }
.gallery-nav-btn:hover { background: rgba(236,72,153,.7); }
.gallery-nav-prev { left: 16px; }
.gallery-nav-next { right: 16px; }

/* 放大按钮 */
.gallery-zoom-btn { position: absolute; bottom: 16px; left: 16px; z-index: 5; width: 36px; height: 36px; border-radius: 8px; border: none; background: rgba(0,0,0,.5); color: #fff; font-size: 14px; cursor: pointer; backdrop-filter: blur(8px); transition: all .2s; display: flex; align-items: center; justify-content: center; opacity: 0; }
.gallery-hero-img-wrap:hover .gallery-zoom-btn { opacity: 1; }
.gallery-zoom-btn:hover { background: rgba(236,72,153,.7); }

/* 缩略图条 */
.gallery-thumbs { display: flex; gap: 8px; padding: 12px; overflow-x: auto; background: #fff; border-radius: 0 0 16px 16px; }
[data-bs-theme="dark"] .gallery-thumbs { background: #1a1b23; }
.gallery-thumb-item { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 2.5px solid #e2e8f0; cursor: pointer; flex-shrink: 0; transition: all .2s; }
.gallery-thumb-item.active { border-color: #ec4899; box-shadow: 0 0 0 2px rgba(236,72,153,.2); }
.gallery-thumb-item:hover { border-color: #ec4899; }
.gallery-thumb-item img { width: 100%; height: 100%; object-fit: cover; }

/* 内容卡片 */
.gallery-content-card { background: #fff; border-radius: 16px; overflow: hidden; margin-top: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
[data-bs-theme="dark"] .gallery-content-card { background: #1a1b23; border: 1px solid rgba(255,255,255,.06); }
.gallery-content-title { font-size: 15px; font-weight: 700; color: #1e293b; padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 8px; }
[data-bs-theme="dark"] .gallery-content-title { color: #e2e8f0; border-color: rgba(255,255,255,.06); }
.gallery-content-title i { color: #ec4899; }
.gallery-content-body { padding: 20px; font-size: 14px; line-height: 1.8; color: #475569; }
[data-bs-theme="dark"] .gallery-content-body { color: #94a3b8; }
/* 内容区图片：自动识别比例排列 */
.gallery-content-body img {
    max-width: 100%; height: auto; display: block;
    border-radius: 10px; object-fit: cover;
    cursor: zoom-in; transition: transform .2s, box-shadow .2s;
}
.gallery-content-body img:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
}

/* 多图段落：自动网格，根据图片比例自适应 */
.gallery-content-body .cb-img-grid {
    display: grid; gap: 10px; margin: 0; padding: 0;
}
/* 横屏图（宽>高）：一行放多张 */
.gallery-content-body .cb-img-grid.cb-landscape {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.gallery-content-body .cb-img-grid.cb-landscape img {
    width: 100%; aspect-ratio: 16/10; object-fit: cover;
}
/* 竖屏图（高>宽）：一行放2-3张，高度更大 */
.gallery-content-body .cb-img-grid.cb-portrait {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.gallery-content-body .cb-img-grid.cb-portrait img {
    width: 100%; aspect-ratio: 3/4; object-fit: cover;
}
/* 混合比例：统一用正方形 */
.gallery-content-body .cb-img-grid.cb-mixed {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.gallery-content-body .cb-img-grid.cb-mixed img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
}
/* WP自带画廊 */
.gallery-content-body .wp-block-gallery,
.gallery-content-body .gallery {
    display: grid !important; gap: 10px; padding: 0;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.gallery-content-body .wp-block-gallery li,
.gallery-content-body .wp-block-gallery figure,
.gallery-content-body .gallery .gallery-item {
    margin: 0 !important; padding: 0 !important;
    border-radius: 10px; overflow: hidden;
}
.gallery-content-body .wp-block-gallery img,
.gallery-content-body .gallery img {
    width: 100%; height: 180px; object-fit: cover;
    border-radius: 10px; cursor: zoom-in;
    transition: transform .3s;
}
.gallery-content-body .wp-block-gallery img:hover,
.gallery-content-body .gallery img:hover {
    transform: scale(1.05);
}
/* 散图：单独一张时按自然比例 */
.gallery-content-body > p > img:only-child,
.gallery-content-body > img {
    width: 100%; height: auto; max-height: 500px;
    object-fit: cover; border-radius: 10px; cursor: zoom-in;
}

/* 内容区图片灯箱 */
.gallery-cbody-lightbox {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,.92); display: none;
    align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.gallery-cbody-lightbox.show { display: flex; }
.gallery-cbody-lightbox img {
    max-width: 92vw; max-height: 90vh; object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.gallery-cbody-lb-close {
    position: absolute; top: 20px; right: 24px;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
    color: #fff; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s; z-index: 2;
}
.gallery-cbody-lb-close:hover {
    background: rgba(236,72,153,.8); border-color: transparent; transform: rotate(90deg);
}
.gallery-cbody-lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
    color: #fff; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s; z-index: 2;
}
.gallery-cbody-lb-nav:hover { background: rgba(236,72,153,.6); border-color: transparent; }
.gallery-cbody-lb-prev { left: 20px; }
.gallery-cbody-lb-next { right: 20px; }
.gallery-cbody-lb-counter {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,.6); color: rgba(255,255,255,.7);
    padding: 6px 16px; border-radius: 20px; font-size: 13px; z-index: 2;
}

/* ===== 右侧边栏 ===== */
.gallery-sidebar { position: sticky; top: 20px; align-self: start; }

/* 信息卡片 */
.gallery-info-card { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 2px 16px rgba(0,0,0,.06); }
[data-bs-theme="dark"] .gallery-info-card { background: #1a1b23; border: 1px solid rgba(255,255,255,.06); }
.gallery-title { font-size: 20px; font-weight: 800; color: #1e293b; line-height: 1.4; padding: 24px 24px 0; margin: 0; }
[data-bs-theme="dark"] .gallery-title { color: #e2e8f0; }

/* 元信息 */
.gallery-meta { display: flex; gap: 16px; padding: 12px 24px; font-size: 12px; color: #94a3b8; }
.gallery-meta i { margin-right: 3px; }

/* 参数表 */
.gallery-params { padding: 0 24px 16px; }
.gallery-param-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 13px; }
[data-bs-theme="dark"] .gallery-param-row { border-color: rgba(255,255,255,.06); }
.gallery-param-row:last-child { border: none; }
.gallery-param-label { color: #94a3b8; }
.gallery-param-value { font-weight: 600; color: #334155; }
[data-bs-theme="dark"] .gallery-param-value { color: #e2e8f0; }

/* 标签 */
.gallery-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 24px 16px; }
.gallery-tag { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; background: linear-gradient(135deg, rgba(236,72,153,.08), rgba(139,92,246,.06)); color: #ec4899; border: 1px solid rgba(236,72,153,.12); }

/* 价格区 */
.gallery-price-section { padding: 0 24px 16px; }
.gallery-price-wrap { display: flex; align-items: baseline; gap: 4px; }
.gallery-price-val { font-size: 32px; font-weight: 900; color: #ec4899; line-height: 1; }
.gallery-price-unit { font-size: 14px; color: #ec4899; font-weight: 600; }
.gallery-price-free { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 20px; background: linear-gradient(135deg, #10b981, #34d399); color: #fff; font-size: 13px; font-weight: 600; }
.gallery-vip-prices { margin-top: 8px; background: #f8fafc; border-radius: 10px; overflow: hidden; }
[data-bs-theme="dark"] .gallery-vip-prices { background: rgba(255,255,255,.04); }
.gallery-vip-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 14px; font-size: 12px; }
.gallery-vip-row + .gallery-vip-row { border-top: 1px solid #f0f0f0; }
[data-bs-theme="dark"] .gallery-vip-row + .gallery-vip-row { border-color: rgba(255,255,255,.06); }
.gallery-vip-label { color: #94a3b8; display: flex; align-items: center; gap: 5px; }
.gallery-vip-value { font-weight: 600; color: #334155; }
[data-bs-theme="dark"] .gallery-vip-value { color: #e2e8f0; }
.gallery-vip-value del { color: #94a3b8; font-size: 11px; margin-right: 4px; }

/* 按钮区 */
.gallery-action-area { padding: 0 24px 24px; }
.gallery-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; border: none; transition: all .3s; gap: 8px; }
.gallery-btn i { font-size: 15px; }
.gallery-btn-download { background: linear-gradient(135deg, #ec4899, #f43f5e); color: #fff; box-shadow: 0 4px 20px rgba(236,72,153,.3); }
.gallery-btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(236,72,153,.4); }
.gallery-btn-buy { background: linear-gradient(135deg, #ec4899, #8b5cf6); color: #fff; box-shadow: 0 4px 20px rgba(236,72,153,.3); }
.gallery-btn-buy:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(236,72,153,.4); }
.gallery-btn-login { background: linear-gradient(135deg, #3b82f6, #60a5fa); color: #fff; text-decoration: none; }

/* 相关推荐 */
.gallery-related-card { background: #fff; border-radius: 20px; overflow: hidden; margin-top: 16px; padding: 20px; box-shadow: 0 2px 16px rgba(0,0,0,.06); }
[data-bs-theme="dark"] .gallery-related-card { background: #1a1b23; border: 1px solid rgba(255,255,255,.06); }
.gallery-related-title { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
[data-bs-theme="dark"] .gallery-related-title { color: #e2e8f0; }
.gallery-related-title i { color: #ec4899; }
.gallery-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-related-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; display: block; }
.gallery-related-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-related-item:hover img { transform: scale(1.08); }
.gallery-related-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,.7)); display: flex; align-items: flex-end; padding: 8px; opacity: 0; transition: opacity .3s; }
.gallery-related-item:hover .gallery-related-overlay { opacity: 1; }
.gallery-related-overlay span { color: #fff; font-size: 11px; font-weight: 600; }

/* ===== 灯箱 ===== */
.gallery-lightbox { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.95); display: none; align-items: center; justify-content: center; backdrop-filter: blur(12px); }
.gallery-lightbox.show { display: flex; }
.gallery-lightbox-overlay { position: absolute; inset: 0; }
.gallery-lightbox-img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); transition: transform .3s; cursor: grab; z-index: 1; }
.gallery-lightbox-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); color: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; z-index: 2; }
.gallery-lightbox-close:hover { background: rgba(236,72,153,.8); border-color: transparent; transform: rotate(90deg); }
.gallery-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; z-index: 2; }
.gallery-lightbox-nav:hover { background: rgba(236,72,153,.6); border-color: transparent; }
.gallery-lightbox-prev { left: 20px; }
.gallery-lightbox-next { right: 20px; }
.gallery-lightbox-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); color: rgba(255,255,255,.7); padding: 6px 16px; border-radius: 20px; font-size: 13px; z-index: 2; }
.gallery-lightbox-toolbar { position: absolute; bottom: 20px; right: 24px; display: flex; gap: 8px; z-index: 2; }
.gallery-lb-tool { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.gallery-lb-tool:hover { background: rgba(236,72,153,.5); border-color: transparent; }

/* ===== 响应式 ===== */
@media(max-width:991px) {
    .gallery-sidebar { position: static; }
    .gallery-related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media(max-width:575px) {
    .gallery-container { padding: 10px; }
    .gallery-title { font-size: 17px; padding: 16px 16px 0; }
    .gallery-meta { padding: 10px 16px; }
    .gallery-params { padding: 0 16px 12px; }
    .gallery-tags { padding: 0 16px 12px; }
    .gallery-price-section { padding: 0 16px 12px; }
    .gallery-action-area { padding: 0 16px 16px; }
    .gallery-nav-btn { width: 36px; height: 36px; font-size: 13px; }
    .gallery-thumb-item { width: 56px; height: 56px; }
    .gallery-related-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

/* ===== 锁定缩略图 ===== */
.gallery-thumb-locked {
    width: 72px; height: 72px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, #1e1e2e, #2a2a3e);
    border: 2.5px dashed rgba(236,72,153,.35);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; color: #94a3b8; font-size: 11px; cursor: default;
    position: relative; overflow: hidden;
    transition: all .2s;
}
.gallery-thumb-locked::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(236,72,153,.08), rgba(139,92,246,.06));
}
.gallery-thumb-locked i { font-size: 16px; color: #ec4899; position: relative; z-index: 1; }
.gallery-thumb-locked span { font-weight: 700; font-size: 12px; color: #ec4899; position: relative; z-index: 1; }
[data-bs-theme="dark"] .gallery-thumb-locked { background: linear-gradient(135deg, #0f0f1a, #1a1a2e); }
@media(max-width:575px) {
    .gallery-thumb-locked { width: 56px; height: 56px; }
    .gallery-thumb-locked i { font-size: 14px; }
    .gallery-thumb-locked span { font-size: 10px; }
}

/* ===== 付费提示条 ===== */
.gallery-paywall-hint {
    display: flex; align-items: center; gap: 14px;
    background: linear-gradient(135deg, rgba(236,72,153,.06), rgba(139,92,246,.04));
    border: 1px solid rgba(236,72,153,.15);
    border-radius: 12px; padding: 14px 20px; margin-top: 16px;
    position: relative; overflow: hidden;
}
.gallery-paywall-hint::before {
    content: ''; position: absolute; top: -50%; right: -20%; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(236,72,153,.06) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}
[data-bs-theme="dark"] .gallery-paywall-hint {
    background: linear-gradient(135deg, rgba(236,72,153,.08), rgba(139,92,246,.05));
    border-color: rgba(236,72,153,.2);
}
.gallery-paywall-icon {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px;
    box-shadow: 0 4px 12px rgba(236,72,153,.25);
}
.gallery-paywall-text { display: flex; flex-direction: column; gap: 2px; }
.gallery-paywall-text strong { font-size: 14px; color: #1e293b; }
[data-bs-theme="dark"] .gallery-paywall-text strong { color: #e2e8f0; }
.gallery-paywall-text span { font-size: 12px; color: #94a3b8; }

/* ===== 下载按钮下拉 ===== */
.gallery-down-dropdown { position: relative; width: 100%; }
.gallery-down-list {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: #fff; border-radius: 12px; overflow: hidden; z-index: 100;
    box-shadow: 0 12px 40px rgba(0,0,0,.15); border: 1px solid rgba(0,0,0,.06);
}
.gallery-down-dropdown.open .gallery-down-list { display: block; }
.gallery-down-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; text-decoration: none; color: #334155; font-size: 13px;
    border-bottom: 1px solid #f1f5f9; transition: all .2s;
}
.gallery-down-item:last-child { border-bottom: none; }
.gallery-down-item:hover { background: #fdf2f8; color: #ec4899; }
.gallery-down-name { display: flex; align-items: center; gap: 8px; }
.gallery-down-name i { color: #ec4899; font-size: 12px; }
.gallery-down-pwd { font-size: 11px; color: #94a3b8; background: #f8fafc; padding: 2px 8px; border-radius: 6px; }
.gallery-down-pwd-hint { text-align: center; margin-top: 8px; font-size: 12px; color: #94a3b8; }
.gallery-down-pwd-hint code { background: #fdf2f8; color: #ec4899; padding: 2px 8px; border-radius: 4px; font-size: 13px; }
[data-bs-theme="dark"] .gallery-down-list { background: #1e293b; border-color: #334155; }
[data-bs-theme="dark"] .gallery-down-item { color: #e2e8f0; border-color: #334155; }
[data-bs-theme="dark"] .gallery-down-item:hover { background: #3b1530; color: #f472b6; }
[data-bs-theme="dark"] .gallery-down-pwd { background: #334155; color: #94a3b8; }

/* ===== AI分析卡片 ===== */
.gallery-ai-card {
    background: #fff; border-radius: 20px; padding: 0; margin-bottom: 16px;
    border: none; overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
[data-bs-theme="dark"] .gallery-ai-card { background: #1a1b23; border: 1px solid rgba(255,255,255,.06); box-shadow: none; }
.gallery-ai-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.05));
    border-bottom: 1px solid rgba(99,102,241,.1);
}
[data-bs-theme="dark"] .gallery-ai-header { background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.08)); border-color: rgba(99,102,241,.15); }
.gallery-ai-title { font-size: 15px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 8px; }
.gallery-ai-title i { color: #6366f1; }
[data-bs-theme="dark"] .gallery-ai-title { color: #e2e8f0; }
.gallery-ai-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 20px; border: none; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .25s; box-shadow: 0 2px 8px rgba(99,102,241,.25);
}
.gallery-ai-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.35); }
.gallery-ai-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.gallery-ai-btn i { font-size: 12px; }
.gallery-ai-body { padding: 20px; }
.gallery-ai-loading { display: flex; align-items: center; gap: 12px; padding: 20px 0; justify-content: center; }
.gallery-ai-spinner {
    width: 24px; height: 24px; border: 3px solid #e2e8f0; border-top-color: #6366f1;
    border-radius: 50%; animation: gallery-ai-spin .8s linear infinite;
}
@keyframes gallery-ai-spin { to { transform: rotate(360deg); } }
.gallery-ai-loading span { font-size: 13px; color: #94a3b8; }
.gallery-ai-result { }
.gallery-ai-text {
    font-size: 14px; line-height: 1.8; color: #334155;
    background: #f8fafc; border-radius: 12px; padding: 16px 20px;
    border: 1px solid #e2e8f0;
}
[data-bs-theme="dark"] .gallery-ai-text { background: #0f172a; border-color: #334155; color: #cbd5e1; }
.gallery-ai-meta { margin-top: 10px; text-align: right; }
.gallery-ai-meta span { font-size: 11px; color: #94a3b8; display: inline-flex; align-items: center; gap: 4px; }
.gallery-ai-error {
    text-align: center; padding: 16px; font-size: 13px;
    color: #ef4444; background: #fef2f2; border-radius: 10px;
}
[data-bs-theme="dark"] .gallery-ai-error { background: #2d1215; color: #fca5a5; }

/* ===== AI识别参数卡片 ===== */
.gallery-ai-params {
    padding: 0 24px 16px;
}
.gallery-ai-params-title {
    font-size: 13px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gallery-ai-params-title i {
    font-size: 12px;
}
.gallery-ai-params-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.gallery-ai-param {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(16,185,129,.05), rgba(59,130,246,.03));
    border: 1px solid rgba(16,185,129,.12);
    border-radius: 10px;
    transition: all .2s;
}
.gallery-ai-param:hover {
    border-color: rgba(16,185,129,.25);
    box-shadow: 0 2px 8px rgba(16,185,129,.08);
}
.gallery-ai-param-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    flex-shrink: 0;
}
.gallery-ai-param-info {
    display: flex;
    flex-direction: column;
}
.gallery-ai-param-val {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}
.gallery-ai-param-label {
    font-size: 10.5px;
    color: #9ca3af;
    margin-top: 1px;
}
.gallery-ai-params-note {
    margin-top: 10px;
    font-size: 10.5px;
    color: #9ca3af;
    text-align: center;
    padding: 6px 10px;
    background: rgba(16,185,129,.04);
    border-radius: 6px;
}
[data-bs-theme="dark"] .gallery-ai-param {
    background: rgba(16,185,129,.06);
    border-color: rgba(16,185,129,.15);
}
[data-bs-theme="dark"] .gallery-ai-param-val { color: #e5e7eb; }
[data-bs-theme="dark"] .gallery-ai-params-title { color: #34d399; }

/* ===== 标签卡片模块 ===== */
.gallery-tags-card {
    background: #fff;
    border: none;
    border-radius: 16px;
    margin-bottom: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.gallery-tags-card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.gallery-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: rgba(99,102,241,.06);
    border: 1px solid rgba(99,102,241,.12);
    border-radius: 12px;
    font-size: 11px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: all .2s;
    white-space: nowrap;
    line-height: 1.4;
}
.gallery-tag-chip:hover {
    background: rgba(99,102,241,.12);
    border-color: rgba(99,102,241,.25);
    color: #4f46e5;
    text-decoration: none;
}
[data-bs-theme="dark"] .gallery-tags-card {
    background: #1a1b23;
    box-shadow: none;
}
[data-bs-theme="dark"] .gallery-tag-chip {
    background: rgba(99,102,241,.12);
    border-color: rgba(99,102,241,.2);
    color: #a5b4fc;
}
[data-bs-theme="dark"] .gallery-tag-chip:hover {
    background: rgba(99,102,241,.2);
    color: #c7d2fe;
}

/* ===== 响应式 ===== */
@media (max-width: 767px) {
    .gallery-ai-params { padding: 0 16px 12px; }
    .gallery-ai-params-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .gallery-ai-param { padding: 8px 10px; }
    .gallery-ai-param-icon { width: 28px; height: 28px; font-size: 11px; }
    .gallery-ai-param-val { font-size: 13px; }
    .gallery-tags-card { padding: 10px 12px; }
}

/* ===== 文章内容区标签 ===== */
.gallery-content-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.gallery-content-tag {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.05));
    border: 1px solid rgba(99,102,241,.15);
    border-radius: 14px;
    font-size: 12px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: all .2s;
}
.gallery-content-tag:hover {
    background: rgba(99,102,241,.15);
    border-color: rgba(99,102,241,.3);
    color: #4f46e5;
    text-decoration: none;
}
[data-bs-theme="dark"] .gallery-content-tags { background: #1a1b23; }
[data-bs-theme="dark"] .gallery-content-tag { background: rgba(99,102,241,.12); border-color: rgba(99,102,241,.2); color: #a5b4fc; }

/* ===== 手机样机展示区 ===== */
.phone-mockup-area {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
    padding: 24px;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
    border-radius: 16px;
    margin-bottom: 20px;
}

.phone-mockup {
    flex: 0 0 auto;
    text-align: center;
}

.phone-frame {
    position: relative;
    width: 220px;
    border-radius: 36px;
    background: #1a1a1a;
    padding: 12px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,.5),
        0 0 0 2px rgba(255,255,255,.1),
        inset 0 0 0 1px rgba(255,255,255,.05);
}

.phone-mockup-iphone .phone-frame {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
}

.phone-mockup-android .phone-frame {
    background: linear-gradient(145deg, #222, #181818);
    border-radius: 32px;
}

.phone-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 9/19.5;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
}

.phone-mockup-android .phone-screen {
    border-radius: 28px;
}

.phone-screen-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* iPhone 刘海 */
.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 28px;
    background: #1a1a1a;
    border-radius: 0 0 18px 18px;
    z-index: 10;
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #2a2a2a;
    border-radius: 50%;
}

/* Android 挖孔 */
.phone-punch-hole {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #000;
    border-radius: 50%;
    z-index: 10;
    border: 2px solid #2a2a2a;
}

/* 底部横条 */
.phone-home-bar {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,.3);
    border-radius: 2px;
    z-index: 10;
}

.phone-label {
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255,255,255,.5);
    font-weight: 500;
}

/* 手机壁纸布局 */
.gallery-layout-phone {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    padding-bottom: 40px;
}

@media(max-width:991px) {
    .gallery-layout-phone { grid-template-columns: 1fr; }
    .phone-mockup-area { flex-direction: row; gap: 16px; }
    .phone-frame { width: 180px; }
}

@media(max-width:575px) {
    .phone-mockup-area { gap: 12px; padding: 16px; }
    .phone-frame { width: 140px; border-radius: 28px; padding: 8px; }
    .phone-screen { border-radius: 20px; }
    .phone-mockup-android .phone-screen { border-radius: 24px; }
    .phone-notch { width: 80px; height: 22px; border-radius: 0 0 14px 14px; }
    .phone-label { font-size: 10px; }
}

[data-bs-theme=dark] .phone-mockup-area {
    background: linear-gradient(135deg, #0a0a12, #12121e, #0a0a12);
}
