:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #f72585;
    --light-gray: #f8f9fa;
    --dark-gray: #495057;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

/* ========== 基础重置 ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100vh;
}

html {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== 页面容器 - PC端全宽 ========== */
.page-wrapper {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.page-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* PC端主内容区域 */
.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== 顶部区域布局 ========== */
.top-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.top-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

/* 768px及以上：左右布局 */
@media (min-width: 768px) {
    .top-section {
        flex-direction: row;
        gap: 20px;
        align-items: stretch;
    }
    
    .banner-container {
        flex: 0 0 60%;
        max-width: 60%;
        height: auto;
        align-self: stretch;
    }
    
    .top-right {
        flex: 1;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
    }
}

/* 1200px及以上：调整比例 */
@media (min-width: 1200px) {
    .banner-container {
        flex: 0 0 55%;
        max-width: 55%;
    }
}

/* ========== Banner 轮播图 ========== */
.banner-container {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.banner {
    position: relative;
    width: 100%;
    height: 160px;
    opacity: 1;
    overflow: hidden;
}

.banner2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-top: 0;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.banner img.active {
    opacity: 1;
    z-index: 2;
}

/* 768px及以上：banner跟随容器高度 */
@media (min-width: 768px) {
    .banner-container {
        height: 200px;
    }
    
    .banner {
        height: 200px;
    }
}

@media (min-width: 1024px) {
    .banner-container {
        height: 280px;
    }
    
    .banner {
        height: 280px;
    }
}

@media (min-width: 1440px) {
    .banner-container {
        height: 320px;
    }
    
    .banner {
        height: 320px;
    }
}

/* ========== 公告栏 ========== */
.notice {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.notice-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* 768px及以上：公告更高 */
@media (min-width: 768px) {
    .notice {
        height: 50px;
        padding: 0 20px;
    }
}

.notice-span {
    flex: 1;
    margin: 0 12px;
    overflow: hidden;
}

.notice span {
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    display: inline-block;
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ========== 搜索框 ========== */
.search-box {
    text-align: center;
}

.groupss {
    display: flex;
    line-height: 28px;
    align-items: center;
    position: relative;
    max-width: 100%;
    background: #fff;
    border-radius: 50px;
    padding: 6px 6px 6px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    overflow: hidden;
}

.groupss:focus-within {
    box-shadow: 0 4px 25px rgba(67, 97, 238, 0.2);
}

.searform {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.search_icon {
    fill: #9e9ea7;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.input {
    flex: 1;
    height: 40px;
    line-height: 28px;
    padding: 0 12px;
    border: none;
    border-radius: 25px;
    outline: none;
    color: #0d0c22;
    font-size: 14px;
    background: transparent;
    transition: var(--transition);
    min-width: 0;
}

.input::placeholder {
    color: #9e9ea7;
}

.seabtn {
    height: 40px;
    padding: 0 16px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.seabtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

/* PC端搜索框优化 */
@media (min-width: 768px) {
    .groupss {
        max-width: 600px;
        margin: 0 auto;
        padding: 8px 8px 8px 20px;
    }
    
    .input {
        height: 44px;
        font-size: 15px;
    }
    
    .seabtn {
        height: 44px;
        padding: 0 32px;
    }
}

/* ========== 产品头部 ========== */
.shophead {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: #fff;
}

.heada {
    width: 100%;
    height: 48px;
    background: linear-gradient(210.18deg, rgba(52, 98, 210, 1) 0%, rgba(87, 157, 255, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.heada p {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-align: center;
}

/* ========== 分类导航 - 与卡类型筛选样式一致 ========== */
.navBar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    flex-wrap: nowrap;
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-top: 8px;
}

.navBar ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
}

.navBar li {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    padding: 10px 16px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    cursor: pointer;
    position: relative;
}

.navBar li:hover {
    color: var(--primary-color);
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.2), 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.navBar li.action {
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4), 0 0 0 4px rgba(67, 97, 238, 0.1);
    border-radius: 12px;
    border-color: transparent;
    transform: translateY(-3px);
    animation: pulse 2s infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navBar li.action:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(67, 97, 238, 0.5);
}

/* ========== 产品列表区域 ========== */
.content {
    display: none;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 内容区显示时使用 grid 布局 */
.content.show {
    display: grid !important;
    opacity: 1;
    transform: translateY(0);
}

/* ========== 产品网格布局 - PC端多列 ========== */
.content.product-grid {
    gap: 20px;
    padding: 0;
    grid-template-columns: 1fr;
}

/* 确保 .product-grid 在显示时也是 grid */
.content.product-grid.show {
    display: grid !important;
}

/* 响应式自动填充布局 - 卡片不会超出屏幕 */
@media (min-width: 480px) {
    .content.product-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (min-width: 768px) {
    .content.product-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1200px) {
    .content.product-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 24px;
    }
}

/* ========== 产品卡片 ========== */
.listitem {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 16px;
    border-radius: var(--border-radius);
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.listitem:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* 卡片标题 */
.shopname {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.4;
    word-break: break-word;
    padding-right: 30px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hr {
    border-bottom: 1px solid #e8e8e8;
    margin-top: 8px;
}

/* 运营商图标 */
.corner-image {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 卡片内容区 */
.itemtop {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
}

/* 产品主图 */
.mainimg {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f5f7fa, #e4e8ec);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mainimg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.listitem:hover .mainimg img {
    transform: scale(1.05);
}

/* 产品信息文本 */
.itemtext {
    flex: 1;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.itemtext-line {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin: 4px 0;
    flex-wrap: wrap;
    min-width: 0;
}

.itemtext-item {
    white-space: nowrap;
    font-size: 13px;
}

.top-line {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-color);
}

.top-line .itemtext-item {
    color: var(--primary-color);
}

.bottom-line {
    color: #999;
    font-size: 12px;
}

.sr {
    color: #ddd;
    flex-shrink: 0;
}

/* 标签区域 */
.itembot {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 8px;
    cursor: default;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.itembot::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.itembot span {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 标签颜色 */
.spanc1 { background: linear-gradient(135deg, #e8f4fd, #d4ebfc); color: #2563eb; }
.spanc2 { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.spanc3 { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }
.spanc4 { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; }
.spanc5 { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #db2777; }
.spanc6 { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #4f46e5; }
.spanc7 { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); color: #475569; }
.spanc8 { background: linear-gradient(135deg, #fff7ed, #fed7aa); color: #ea580c; }

/* 卡片底部按钮 */
.itembtn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.fenxiang {
    position: relative;
    display: inline-block;
}

.tooltip-container {
    position: relative;
    display: inline-block;
}

.transparent-button {
    font-size: 12px;
    color: #999;
    cursor: pointer;
    padding: 6px 0;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 10px 12px;
    position: absolute;
    z-index: 100;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-container.active .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.banli {
    display: flex;
    gap: 10px;
}

.share-btn, .buy-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.share-btn {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #64748b;
}

.share-btn:hover {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    transform: translateY(-2px);
}

.buy-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

/* ========== 空状态图 ========== */
.noimg {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 40px auto;
}

/* ========== 返回顶部按钮 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* 移动端返回顶部位置 */
@media (max-width: 767px) {
    .back-to-top {
        right: 16px;
        bottom: 80px;
        width: 44px;
        height: 44px;
    }
}

/* ========== 弹窗 ========== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.filter-popup {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.filter-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-content label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.filter-content input,
.filter-content select {
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    transition: var(--transition);
}

.filter-content input:focus,
.filter-content select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.input-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.apply-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.apply-btn.reset {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #64748b;
}

/* ========== 弹窗提示 ========== */
.overlayxy {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

#popupContenta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 400px;
    width: 90%;
    background-color: #fff;
    padding: 24px;
    text-align: center;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

#phoneContainera div {
    max-height: 400px;
    overflow: auto;
}

.closebtn {
    min-width: 120px;
    height: 44px;
    border-radius: 22px;
    font-size: 15px;
    color: #fff;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    cursor: pointer;
    transition: var(--transition);
}

.closebtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

/* ========== 分享海报弹窗 ========== */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    text-align: center;
    max-width: 90%;
}

.popup p {
    margin: 12px 0;
    font-size: 14px;
    color: #666;
}

.imgsrcimg {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
}

.btn {
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* ========== 顶部提示 ========== */
.top-alert {
    position: fixed;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 30px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transition: top 0.3s ease;
    z-index: 9999;
    white-space: nowrap;
    font-weight: 500;
}

.top-alert.show {
    top: 0;
}

/* ========== PC端额外优化 ========== */
@media (min-width: 768px) {
    .main-content {
        padding: 24px;
    }
    
    .listitem {
        padding: 20px;
    }
    
    .mainimg {
        width: 110px;
        height: 110px;
    }
    
    .shopname {
        font-size: 16px;
    }
    
    .itemtext-item {
        font-size: 14px;
    }
    
    .top-line {
        font-size: 15px;
    }
    
    .share-btn, .buy-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    .main-content {
        padding: 32px;
    }
    
    .notice {
        height: 48px;
        border-radius: var(--border-radius);
    }
    
    .notice span {
        font-size: 15px;
    }
    
    .shophead {
        border-radius: var(--border-radius);
    }
    
    .heada {
        height: 52px;
    }
    
    .heada p {
        font-size: 17px;
    }
    
    .content {
        margin-top: 24px;
    }
    
    .listitem {
        padding: 24px;
    }
    
    .mainimg {
        width: 120px;
        height: 120px;
    }
    
    .shopname {
        font-size: 17px;
    }
    
    .itembtn {
        padding-top: 16px;
    }
}

/* 响应式样式 - 与卡类型筛选一致 */
@media (min-width: 768px) {
    .navBar {
        padding: 12px 16px;
        justify-content: center;
        max-width: 100%;
    }
    .navBar ul {
        justify-content: center;
    }
    .navBar li {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    .navBar {
        padding: 14px 20px;
        max-width: 1000px;
    }
    .navBar li {
        padding: 12px 20px;
        font-size: 15px;
        min-width: 70px;
    }
}

/* 424-495px 宽度 */
@media (min-width: 424px) and (max-width: 495px) {
    .navBar {
        padding: 10px 12px;
    }
    .navBar li {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 55px;
    }
}

/* 400-423px 宽度 */
@media (min-width: 400px) and (max-width: 423px) {
    .navBar {
        padding: 10px 10px;
    }
    .navBar li {
        padding: 8px 10px;
        font-size: 13px;
        min-width: 52px;
    }
}

/* 352-399px 宽度 */
@media (min-width: 352px) and (max-width: 399px) {
    .navBar {
        padding: 8px 8px;
        gap: 6px;
    }
    .navBar li {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 48px;
    }
}

/* 0-351px 宽度 */
@media (max-width: 351px) {
    .navBar {
        padding: 8px 6px;
        gap: 4px;
    }
    .navBar li {
        padding: 6px 6px;
        font-size: 12px;
        min-width: 45px;
    }
}

/* ========== Dialog 对话框样式 ========== */
dialog {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.3);
}

dialog button {
    float: right;
    padding: 6px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* ========== 加载动画 ========== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== 卡类型筛选样式 - 与分类导航一致 ========== */
.card-type-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    flex-wrap: nowrap;
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-top: 8px;
}

.card-type-filter ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
}

.card-type-filter li {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    padding: 10px 16px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    cursor: pointer;
    position: relative;
}

.card-type-filter li:hover {
    color: var(--primary-color);
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.2), 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.card-type-filter li.action {
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4), 0 0 0 4px rgba(67, 97, 238, 0.1);
    border-radius: 12px;
    border-color: transparent;
    transform: translateY(-3px);
    animation: pulse 2s infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-type-filter li.action:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(67, 97, 238, 0.5);
}

/* 卡类型筛选响应式样式 */
@media (min-width: 768px) {
    .card-type-filter {
        padding: 12px 16px;
        justify-content: center;
        max-width: 100%;
    }
    .card-type-filter ul {
        justify-content: center;
    }
    .card-type-filter li {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    .card-type-filter {
        padding: 14px 20px;
        max-width: 1000px;
    }
    .card-type-filter li {
        padding: 12px 20px;
        font-size: 15px;
        min-width: 70px;
    }
}

@media (min-width: 424px) and (max-width: 495px) {
    .card-type-filter {
        padding: 10px 12px;
    }
    .card-type-filter li {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 55px;
    }
}

@media (min-width: 400px) and (max-width: 423px) {
    .card-type-filter {
        padding: 10px 10px;
    }
    .card-type-filter li {
        padding: 8px 10px;
        font-size: 13px;
        min-width: 52px;
    }
}

@media (min-width: 352px) and (max-width: 399px) {
    .card-type-filter {
        padding: 8px 8px;
        gap: 6px;
    }
    .card-type-filter li {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 48px;
    }
}

@media (max-width: 351px) {
    .card-type-filter {
        padding: 8px 6px;
        gap: 4px;
    }
    .card-type-filter li {
        padding: 6px 6px;
        font-size: 12px;
        min-width: 45px;
    }
}
