/* ================================================================
   模板展示平台 - 前台自定义样式
   配合 Tailwind CSS CDN 使用
   ================================================================ */

/* ========== CSS 变量 ========== */
:root {
    --bg: #F8FAFC;
    --bg-alt: #F1F5F9;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --border-hover: #3B82F6;
    --text: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #EFF6FF;
    --accent: #8B5CF6;
    --accent-light: #F5F3FF;
    --glow: 0 0 20px rgba(37, 99, 235, 0.15);
    --glow-strong: 0 0 30px rgba(37, 99, 235, 0.25);
    --radius: 10px;
    --radius-lg: 14px;
    --radius-pill: 20px;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.04);
    --shadow: 0 1px 3px 0 rgba(0,0,0,0.06), 0 1px 2px -1px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 32px -4px rgba(0,0,0,0.08), 0 4px 8px -2px rgba(0,0,0,0.04);
    --transition: 200ms ease;
    --transition-slow: 350ms ease;
}

/* ========== 全局重置 & 基础 ========== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 科技感微点纹理 */
    background-image: radial-gradient(circle, #CBD5E1 0.5px, transparent 0.5px);
    background-size: 24px 24px;
}

/* ========== 自定义滚动条 ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
    transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 var(--bg);
}

/* ========== 骨架屏 Shimmer 动画 ========== */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #E2E8F0 0%,
        #EFF6FF 35%,
        #E2E8F0 65%,
        #F1F5F9 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
    border-radius: 6px;
}

.skeleton-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border);
}

.skeleton-card .skeleton-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 0;
    flex-shrink: 0;
}

.skeleton-card .skeleton-text {
    height: 10px;
    margin: 4px 16px;
    border-radius: 4px;
}

.skeleton-card .skeleton-text:last-child {
    margin-bottom: 14px;
}

.skeleton-card .skeleton-text.short {
    width: 55%;
}

/* ========== 白色上图下文卡片 ========== */
.template-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition-slow), transform var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: visible;
}

.template-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3B82F6, #8B5CF6, transparent);
    opacity: 0;
    transition: opacity var(--transition-slow);
    z-index: 1;
    border-radius: 1px;
}

.template-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-lg), var(--glow);
    transform: translateY(-2px);
}

.template-card:hover::before {
    opacity: 1;
}

/* 上栏：预览图 */
.card-left {
    width: 100%;
    position: relative;
    background: #f3f4f6;
    flex-shrink: 0;
    overflow: visible; /* 允许弹窗超出 */
}

/* 图片裁剪容器 */
.card-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

/* 长图滚动模式 — JS 动态添加 .img-scrollable 后生效 */
.card-img-wrap img.img-scrollable {
    height: auto;
    object-fit: initial;
    transition: transform var(--scroll-duration, 2s) cubic-bezier(0.25, 0.1, 0.25, 1);
}

.template-card:hover .card-img-wrap img.img-scrollable {
    transform: translateY(var(--scroll-distance, 0px));
}

/* ========== 手机预览图标（卡片右下角） ========== */
.card-mobile-trigger {
    position: absolute;
    bottom: 8px;
    right: 8px;
    height: 30px;
    padding: 0 10px;
    background: #2563EB;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 5;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    animation: mobile-icon-pulse 2.5s ease-in-out infinite;
}

@keyframes mobile-icon-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3); }
    50%      { box-shadow: 0 2px 16px rgba(37, 99, 235, 0.5); }
}

.card-mobile-trigger:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
    animation: none;
}

.card-mobile-trigger svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.card-mobile-trigger .mobile-trigger-text {
    font-size: 11px;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
}

/* ========== 手机预览弹窗 ========== */
.mobile-popover {
    position: absolute;
    bottom: 44px;
    right: -6px;
    width: 240px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
    padding: 14px 12px 12px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    pointer-events: none;
}

/* 弹出卡片可见 */
.card-mobile-trigger:hover + .mobile-popover,
.mobile-popover:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* 小三角箭头 */
.mobile-popover::after {
    content: '';
    position: absolute;
    bottom: -7px;
    right: 18px;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.06);
}

/* 弹窗标题 */
.mobile-popover .popover-title {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #18181b;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

/* 左右布局容器 */
.mobile-popover .popover-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 手机框 */
.mobile-popover .phone-frame {
    width: 85px;
    height: 160px;
    flex-shrink: 0;
    border: 3px solid #27272a;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #fafafa;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* 顶部刘海 */
.mobile-popover .phone-frame::before {
    content: '';
    display: block;
    width: 30px;
    height: 4px;
    background: #27272a;
    border-radius: 0 0 6px 6px;
    margin: 6px auto 5px;
    flex-shrink: 0;
}

.mobile-popover .phone-frame img {
    width: 100%;
    flex: 1;
    object-fit: cover;
    object-position: top;
    display: block;
    min-height: 0;
}

/* 底部小白条 */
.mobile-popover .phone-frame::after {
    content: '';
    display: block;
    width: 22px;
    height: 2px;
    background: #999;
    border-radius: 2px;
    margin: 6px auto 7px;
    flex-shrink: 0;
}

/* QR 码区域 */
.mobile-popover .qr-section {
    flex: 1;
    min-width: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mobile-popover .qr-section img {
    width: 80px;
    height: 80px;
    display: block;
    border-radius: 6px;
}

.mobile-popover .qr-section .qr-label {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 5px;
    line-height: 1.3;
}

/* 无手机截图时隐藏图标 */
.card-mobile-trigger.no-image {
    display: none;
}

/* 下栏：文字信息 */
.card-right {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* ① 徽章行：推荐 + 行业 */
.card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.card-industry-badge {
    display: inline-block;
    width: fit-content;
    font-size: 10px;
    font-weight: 500;
    color: #2563EB;
    background: #EFF6FF;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

/* 推荐徽章 */
.card-star-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 800;
    color: #B45309;
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(217, 119, 6, 0.15);
}

/* ② 主标题 */
.card-title {
    font-size: 15px;
    font-weight: 700;
    color: #18181b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* ③ 副标题 */
.card-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* ④ 底部行：颜色点 + 日期 */
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 2px;
}

.card-colors {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 小标签文字 */
.card-label {
    font-size: 10px;
    color: #9ca3af;
    flex-shrink: 0;
}

/* 实心色点：无描边，外阴影区分浅色 */
.card-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
}

.card-dot-more {
    font-size: 9px;
    color: #9ca3af;
    font-weight: 600;
    margin-left: 1px;
}

.card-date {
    font-size: 10px;
    color: #9ca3af;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ========== 行业/颜色标签选中状态 ========== */

/* 颜色标签 */
.color-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-slow);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    user-select: none;
}

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

.color-tag.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.color-tag .color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* 卡片内颜色小标签 */
.card-color-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.card-color-tag .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.1);
}

/* 卡片内行业小标签 */
/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.22s ease;
    backdrop-filter: blur(2px);
}

.modal-overlay.closing {
    animation: fadeOut 0.18s ease forwards;
}

.modal-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.22);
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    animation: scaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-box.closing {
    animation: scaleOut 0.18s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes scaleOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.92) translateY(10px); }
}

/* ========== Toast 通知 ========== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 28px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    animation: toastSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    max-width: 500px;
    text-align: center;
    white-space: nowrap;
}

.toast.toast-out {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast-success { background: #10b981; }
.toast-error   { background: #ef4444; }
.toast-warning { background: #f59e0b; }
.toast-info    { background: #3b82f6; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-24px); }
}

/* ========== Spinner 转圈动画 ========== */
.spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
}

.spinner-lg {
    width: 36px;
    height: 36px;
    border-width: 3px;
}

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

/* ========== 悬浮咨询按钮 ========== */
.fab-consult {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB, #4F46E5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transition: transform var(--transition), box-shadow var(--transition);
    z-index: 40;
}

.fab-consult:hover {
    background: linear-gradient(135deg, #1D4ED8, #4338CA);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45);
    transform: scale(1.06);
}

.fab-consult:active {
    transform: scale(0.95);
}

.fab-consult svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 脉冲指示点 */
.fab-consult::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* ========== 搜索建议下拉 ========== */
.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    z-index: 35;
    max-height: 260px;
    overflow-y: auto;
    display: none;
    border: 1px solid var(--border);
}

.search-suggestions.show {
    display: block;
}

.search-suggestions .suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: background 0.12s;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestions .suggestion-item:hover {
    background: #F4F4F5;
    color: var(--text);
}

.search-suggestions .suggestion-item .suggestion-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-suggestions .no-suggestion {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .empty-icon {
    margin-bottom: 16px;
    opacity: 0.3;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state .empty-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 400;
}

/* ========== 加载更多区域 ========== */
.load-more-area {
    text-align: center;
    padding: 24px 0 40px;
    color: var(--text-muted);
    font-size: 13px;
}

.load-more-area .no-more {
    color: var(--border);
}

/* ========== 顶部导航 ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-slow), box-shadow var(--transition-slow), background var(--transition-slow);
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2563EB, #8B5CF6, #2563EB, transparent);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.site-header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.92);
}

.site-header.scrolled::after {
    opacity: 1;
}

/* 站点名称样式 */
#site-name {
    position: relative;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #0F172A;
}

#site-name::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #2563EB;
    border-radius: 50%;
}

/* ========== 页脚 ========== */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3B82F6, transparent);
}

/* ========== 排序按钮 ========== */
.sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    user-select: none;
    min-height: 32px;
}

.sort-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.sort-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.sort-btn.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.sort-btn-starred {
    border-color: #C4B5FD;
    color: #7C3AED;
    background: var(--accent-light);
}

.sort-btn-starred .star-svg {
    flex-shrink: 0;
}

.sort-btn-starred:hover,
.sort-btn-starred.active {
    background: #EDE9FE;
    border-color: #8B5CF6;
    color: #6D28D9;
}

.sort-btn-refresh {
    font-size: 13px;
    padding: 5px 12px;
}

/* ========== 每页数量按钮 ========== */
.page-size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    min-width: 36px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    user-select: none;
    min-height: 32px;
}

.page-size-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.page-size-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.page-size-btn.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

/* ========== 工具栏行业标签 ========== */
.industry-filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    user-select: none;
    min-height: 32px;
}

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

.industry-filter-tag.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.industry-filter-tag.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

/* ========== 表单必填标记 ========== */
.required-star {
    color: #ef4444;
    margin-left: 2px;
}

/* ========== 主内容最小高度 ========== */
.main-content {
    min-height: calc(100vh - 200px);
}

/* 主内容区顶部自然过渡 */
.content-bridge {
    height: 32px;
    background: linear-gradient(to bottom, #fff, transparent);
    margin-top: -1px;
}

/* ========== 响应式 ========== */

/* 1440px+ 大屏：4列 */
@media (min-width: 1440px) {
    .template-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .container {
        max-width: 1400px;
    }
}

/* 1024-1439px 标准：3列 */
@media (min-width: 1024px) and (max-width: 1439px) {
    .template-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .container {
        max-width: 1100px;
    }
}

/* 640-1023px 平板：2列 */
@media (min-width: 640px) and (max-width: 1023px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .container {
        max-width: 92%;
    }
}

/* 480-639px 大手机：1列 */
@media (min-width: 480px) and (max-width: 639px) {
    .template-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .site-header {
        padding: 8px 0;
    }
    .fab-consult {
        width: 48px;
        height: 48px;
        bottom: 18px;
        right: 18px;
    }
    .fab-consult svg {
        width: 22px;
        height: 22px;
    }
}

/* ========== 分页控件 ========== */
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}
.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}
.page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: var(--text-muted);
}

/* ========== 筛选标签展开/折叠 ========== */
.filter-tags-wrapper {
    overflow: hidden;
    transition: max-height var(--transition-slow);
}
.filter-tags-wrapper.collapsed {
    max-height: 34px;
}
.filter-tags-wrapper.expanded {
    max-height: 500px;
}
.filter-expand-btn {
    display: none;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.5;
}
.filter-expand-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.filter-expand-btn.visible {
    display: inline-block;
}

/* <480px 小手机：1列 */
@media (max-width: 479px) {
    .template-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .site-header .search-box {
        display: none;
    }
    .fab-consult {
        width: 44px;
        height: 44px;
        bottom: 14px;
        right: 14px;
    }
    .fab-consult svg {
        width: 20px;
        height: 20px;
    }
}

/* ========== 可访问性：关闭动画 ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
