/* 公共样式 - 所有页面共享 */

/* 容器 */
.msr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === 现代化设计系统 === */
:root {
    --primary-gradient: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 50%, #fdbb2d 100%);
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f9e29c 50%, #b8860b 100%);
    --dark-bg: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --luxury-gold: #c5a059;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* 全站通用的 SPA 卡片列表网格 */
.msr-spa-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

@media (max-width: 767px) {

    /* 强制双列布局，提高权重 */
    body .msr-spa-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        /* 减小间距以留给卡片更多空间 */
        padding: 0 10px !important;
        /* 减小容器内边距 */
    }

    /* === 全局容器对齐修复 === */
    .msr-container {
        padding: 0 10px !important;
    }

    /* === 手机端双列卡片深度适配 === */

    /* 1. 调整图片高度，避免过长 */
    .msr-spa-image,
    .msr-spa-card[data-rank="0"] .msr-spa-image,
    .msr-spa-card[data-rank="1"] .msr-spa-image,
    .msr-spa-card[data-rank="2"] .msr-spa-image,
    .msr-spa-card[data-rank="3"] .msr-spa-image {
        height: 150px !important;
        /* 高度减半 */
        margin: 0.8rem 0.8rem 0 0.8rem !important;
        /* 减小边距 */
        width: calc(100% - 1.6rem) !important;
    }

    /* 2. 调整信息区域边距 */
    .msr-spa-info,
    .msr-spa-card[data-rank="0"] .msr-spa-info,
    .msr-spa-card[data-rank="1"] .msr-spa-info,
    .msr-spa-card[data-rank="2"] .msr-spa-info,
    .msr-spa-card[data-rank="3"] .msr-spa-info {
        margin: 0 0.5rem 0.8rem 0.5rem !important;
        width: calc(100% - 1rem) !important;
        padding-bottom: 0 !important;
    }

    /* 3. 缩小标题字号 */
    .msr-spa-name {
        font-size: 1rem !important;
        /* 从1.3rem缩小 */
    }

    /* 4. 调整评分显示 */
    .msr-score-val {
        font-size: 0.9rem !important;
    }

    .msr-score-display .msr-star {
        font-size: 14px !important;
    }

    /* 5. 隐藏或缩小次要信息 */
    .msr-meta-region {
        font-size: 0.75rem !important;
    }

    .msr-tag-link {
        font-size: 0.65rem !important;
        padding: 1px 4px !important;
    }

    /* 6. 调整皇冠/排名标大 */
    .msr-rank-badge {
        width: 24px !important;
        height: 24px !important;
        font-size: 12px !important;
        top: 10px !important;
        left: 10px !important;
    }

    /* 7. 特殊处理第1名的大皇冠 */
    .msr-spa-card[data-rank="0"] .msr-rank-badge {
        font-size: 20px !important;
    }

    /* 8. 手机端评分显示适配 */
    .msr-image-rating {
        top: 8px !important;
        right: 8px !important;
        padding: 2px 5px !important;
        border-radius: 10px !important;
    }

    .msr-image-rating .msr-score-val {
        font-size: 0.8rem !important;
    }

    /* === 手机端 Header 适配修复 === */
    .mobile-menu-toggle {
        display: flex;
    }

    .luxury-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1999;
    }

    .luxury-nav.active .luxury-menu {
        display: flex;
    }

    .luxury-menu a {
        padding: 1rem;
        border-bottom: 1px solid #eee;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .header-inner {
        gap: 15px;
    }

    .search-input {
        width: 100px;
        padding: 8px 32px 8px 12px;
        font-size: 16px; /* 防止 iOS Safari 聚焦时自动缩放页面 */
        -webkit-appearance: none;
        appearance: none;
    }

    .search-input:focus {
        width: 120px;
    }

    /* 覆盖移动端 button 全局 44px 限制，恢复搜索按钮原始尺寸 */
    button.search-btn {
        min-width: 28px;
        min-height: 28px;
        width: 28px;
        height: 28px;
        padding: 0;
    }

    .search-btn svg {
        width: 14px;
        height: 14px;
    }
}



/* 主内容压缩 */
.msr-main-content {
    padding: 0.5rem 0 !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif !important;
    background-color: #f8fafc;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Luxury Header 核心样式 */
.luxury-header {
    position: sticky;
    top: 0;
    z-index: 2000;
    width: 100%;
}

.header-main-bar {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 14px 0;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo 优化 */
.luxury-logo a {
    text-decoration: none !important;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(197, 160, 89, 0.2));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.main-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark-bg);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.main-brand span {
    color: var(--luxury-gold);
}

.sub-brand {
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 🎲 随机勋章样式 */
.msr-spa-card[data-is-random="1"] .msr-rank-badge {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #64748b;
    font-size: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* 导航美化 */
.luxury-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.luxury-menu {
    display: flex;
    list-style: none !important;
    margin: 0;
    padding: 0;
    gap: 32px;
    justify-content: center;
}

.luxury-menu a {
    text-decoration: none !important;
    color: var(--text-main) !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 8px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    letter-spacing: 0.5px;
}

.luxury-menu a:hover {
    color: var(--luxury-gold) !important;
    transform: translateY(-1px);
}

/* 现代搜索区 */
.header-actions {
    display: flex;
    align-items: center;
}

.modern-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 40px 8px 15px;
    border-radius: 50px;
    font-size: 13px;
    width: 140px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
}

.search-input:focus {
    width: 180px;
    background: white;
    outline: none;
    border-color: var(--luxury-gold);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.12);
}

.search-btn {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gold-gradient);
    border: none;
    color: white !important;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.2);
    transition: all 0.3s;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 15px rgba(197, 160, 89, 0.3);
}

.search-btn svg {
    width: 14px;
    height: 14px;
    color: white;
    flex-shrink: 0;
}

/* 全局筛选条 (全页面) - 优化版 */
.msr-global-filter-bar {
    background: transparent;
    padding: 0;
    margin-top: 0;
    /* 修正：移除负边距，显示面包屑 */
    margin-bottom: 20px;
    position: relative;
    z-index: 1000;
}

.msr-spa-list-section {
    padding-top: 1rem;
    /* 从3rem大幅减少到1rem */
}

.msr-filter-wrapper {
    background: #ffffff;
    border-radius: 16px;
    padding: 15px 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

.msr-filter-dropdowns {
    display: flex;
    width: 100%;
    /* 占满容器 */
    justify-content: space-between;
    gap: 20px;
    /* 间距改小一点，让格子更宽 */
    align-items: center;
}

/* 下拉项容器 - 变为视觉主体 */
.filter-dropdown-item {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
    /* 核心：三个框均分狂赌 */
    width: 0;
    /* 配合flex:1使用，防止内容撑破 */
    min-width: auto;
    /* 覆盖旧值 */
    background: #f8fafc;
    /* 轻微背景色 */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.filter-dropdown-item:hover {
    border-color: var(--luxury-gold);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: white;
}

/* 移除旧的 label 样式（如果还残留） */
.filter-label {
    display: none;
}

/* 图标 - 独立区域 */
.filter-icon {
    position: static;
    /* 取消绝对定位 */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    /* 固定宽度 */
    height: 40px;
    /* 撑开高度 */
    background: rgba(197, 160, 89, 0.1);
    /* 金色淡背景 */
    color: var(--luxury-gold);
    font-size: 18px;
    border-right: 1px solid rgba(197, 160, 89, 0.2);
    transform: none;
    /* 移除之前的位移 */
    flex-shrink: 0;
    z-index: 10;
}

.select-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    /* 占满剩余空间 */
}

/* Select - 纯净版 */
.filter-dropdown-item select {
    width: 100%;
    height: 40px !important;
    /* 与图标同高 */
    border: none !important;
    /* 移除自身边框，使用父级边框 */
    background: transparent !important;
    padding: 0 10px !important;
    text-align: center !important;
    text-align-last: center !important;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    font-weight: 500;
}

.filter-dropdown-item select:focus {
    outline: none;
}

/* option 居中 (部分浏览器有效) */
.filter-dropdown-item select option {
    text-align: center;
}


@media (max-width: 767px) {

    /* 腾出底部空间，防止内容被遮挡 */
    body {
        padding-bottom: 80px;
    }

    .msr-global-filter-bar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        /* 改用 left/right 替代 width，在各浏览器 fixed 定位中更稳定 */
        z-index: 9999 !important;
        background: #ffffff !important;
        margin: 0 !important;
        /* 通底核心：水平无内边距，只保留底部安全区 */
        padding: 0 0 calc(0px + env(safe-area-inset-bottom)) 0 !important;
        border-top: 1px solid #f8fafc;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
        /* 固定定位硬件加速修复，避免滚动时渲染断层 */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    /* 必须去除内部容器的 padding 才能实现真正的全宽 */
    .msr-global-filter-bar .msr-container {
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    .msr-filter-dropdowns {
        display: flex;
        width: 100%;
        gap: 0 !important;
        /* 无间隙，紧密相连 */
    }

    /* 列表区域去除顶部留白 */
    .msr-spa-list-section {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .msr-filter-wrapper {
        padding: 0 !important;
        border-radius: 0 !important;
        width: 100% !important;
    }

    /* 清除重复定义的 msr-filter-dropdowns */

    .filter-dropdown-item {
        min-width: 0;
        flex: 1;
        /* 通栏核心：透明、无框 */
        border: none !important;
        background: transparent !important;
        border-radius: 0 !important;
        padding: 12px 0 !important;
        justify-content: center;
        position: relative;
    }

    /* 竖线分割：给前两个元素加右边框 */
    .filter-dropdown-item:not(:last-child) {
        border-right: 1px solid #f8fafc !important;
        /* 极淡分割线 */
        position: relative;
    }

    /* 也可以用伪元素做分割线，更精致（高度不占满） */
    .filter-dropdown-item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 25%;
        height: 50%;
        width: 1px;
        background: #e2e8f0;
    }

    .filter-dropdown-item:not(:last-child) {
        border-right: none !important;
        /* 覆盖上面的 border-right */
    }

    /* 手机端图标：紧挨文字 */
    .filter-icon {
        display: flex !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        border: none !important;
        font-size: 16px !important;
        margin-right: 4px !important;
        /* 仅留极小间距 */
        color: var(--luxury-gold);
        position: static !important;
        flex-shrink: 0;
        /* 防止图标被压缩 */
    }

    .filter-dropdown-item select {
        display: none !important;
    }

    /* 修正：让容器宽度自适应，从而紧挨图标 */
    .filter-dropdown-item .select-wrapper,
    .filter-dropdown-item .custom-select-container {
        width: auto !important;
        flex: none !important;
        min-width: 0 !important;
        position: static !important;
        /* 核心：强制静态定位，让菜单去寻找 .filter-dropdown-item */
    }

    /* 触发器：内容居中对齐 */
    .filter-dropdown-item .custom-select-trigger {
        padding: 0 !important;
        justify-content: center !important;
        width: auto !important;
    }

    /* 标签隐藏 */
    .filter-label {
        display: none;
    }
}


.filter-dropdown-item select {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-bg);
    cursor: pointer;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
    text-align-last: center;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

.filter-dropdown-item select:hover {
    border-color: var(--luxury-gold);
    background-color: #fff;
    box-shadow: var(--shadow-sm);
}

.filter-dropdown-item select:focus {
    outline: none;
    border-color: var(--luxury-gold);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

/* 移动端菜单开关 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--dark-bg);
    border-radius: 2px;
    transition: 0.3s;
}

/* 面包屑导航 - Premium Redesign */
.msr-breadcrumbs {
    padding: 10px 0;
    /* 整体紧凑化：上下均为10px，保持垂直平衡 */
    background: transparent;
    font-size: 14px;
    color: #94a3b8;
    position: relative;
    z-index: 10;
    margin-bottom: -10px;
    /* 视觉补偿：拉近与下方内容的距离 */
}

.msr-breadcrumbs .msr-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    /* 统一间距 */
}

.msr-breadcrumbs a {
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.msr-breadcrumbs a:hover {
    color: var(--luxury-gold);
    transform: translateY(-1px);
}

.msr-breadcrumbs .home-link {
    color: var(--text-main);
    /* 首页图标稍微深一点 */
    padding: 4px;
    margin-left: -4px;
    /* 视觉校正 */
    border-radius: 6px;
}

.msr-breadcrumbs .home-link:hover {
    background: rgba(197, 160, 89, 0.1);
    color: var(--luxury-gold);
}

.msr-breadcrumbs .sep {
    display: flex;
    align-items: center;
    color: #cbd5e1;
    /* 浅灰色分隔符 */
    font-size: 12px;
}

.msr-breadcrumbs svg {
    display: block;
    /* 防止行内间隙 */
}

.msr-breadcrumbs .current {
    color: var(--dark-bg);
    font-weight: 500;
}

/* 主内容区域 */
.msr-main-content {
    min-height: calc(100vh - 200px);
    padding: 1rem 0;
}

/* 页脚 */
.msr-footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 会所卡片基础样式 */
.msr-spa-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 20px;
    position: relative;
    text-decoration: none;
    color: inherit;
    height: 100%;
    z-index: 10;
    border: 1px solid #f1f5f9;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
    overflow: hidden;
    /* 核心：防止内容溢出 */
    cursor: default;
}

.msr-spa-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 奖章数字基础样式 */
.msr-rank-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(15, 23, 42, 0.9);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    z-index: 5;
    /* 位于图片之上，遮挡层之下 */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* === 全卡片流光包边特效 (改为基于 data-rank 匹配) === */

@keyframes globalBorderFlow {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 具有流光特效的专用类 (0, 1, 2, 3) */
.msr-spa-card[data-rank="0"],
.msr-spa-card[data-rank="1"],
.msr-spa-card[data-rank="2"],
.msr-spa-card[data-rank="3"] {
    border: none;
    background: transparent !important;
    overflow: hidden;
}

.msr-spa-card[data-rank="0"]::before,
.msr-spa-card[data-rank="1"]::before,
.msr-spa-card[data-rank="2"]::before,
.msr-spa-card[data-rank="3"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    aspect-ratio: 1/1;
    animation: globalBorderFlow 4s linear infinite;
    z-index: -2;
    pointer-events: none;
}

.msr-spa-card[data-rank="0"]::after,
.msr-spa-card[data-rank="1"]::after,
.msr-spa-card[data-rank="2"]::after,
.msr-spa-card[data-rank="3"]::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    bottom: 2px;
    left: 2px;
    background: #fff;
    border-radius: 18px;
    z-index: -1;
    pointer-events: none;
}

/* 🌈 0 号：七彩幻境流光包边 */
.msr-spa-card[data-rank="0"]::before {
    background: #ff0000;
    background: conic-gradient(from 0deg, #ff0000, #ff00ff, #0000ff, #00ffff, #00ff00, #ffff00, #ff0000);
}

.msr-spa-card[data-rank="0"] .msr-rank-badge {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    font-size: 30px;
    /* 大皇冠 */
    top: 10px;
    left: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* 🥇 1 号：黄金流动包边 */
.msr-spa-card[data-rank="1"]::before {
    background: #ffd700;
    background: conic-gradient(from 0deg, transparent 0%, #ffd700 25%, transparent 50%, #ffd700 75%, transparent 100%);
}

.msr-spa-card[data-rank="1"] .msr-rank-badge {
    background: var(--gold-gradient);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.msr-spa-card[data-rank="1"] {
    box-shadow: 0 10px 40px rgba(197, 160, 89, 0.2);
}

/* 🥈 2 号：璀璨银光包边 */
.msr-spa-card[data-rank="2"]::before {
    background: #cbd5e1;
    background: conic-gradient(from 0deg, transparent 0%, #cbd5e1 25%, transparent 50%, #cbd5e1 75%, transparent 100%);
}

.msr-spa-card[data-rank="2"] .msr-rank-badge {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
}

/* 🍒 0-3 名：皇冠、金、银、铜勋章背景已单独处理 */
.msr-spa-card[data-rank="3"] .msr-rank-badge {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
}

/* 🌘 4名以后 & 随机卡片：统一黑边框方案 */
.msr-spa-card:not([data-rank="0"]):not([data-rank="1"]):not([data-rank="2"]):not([data-rank="3"]),
.msr-spa-card[data-is-random="1"] {
    border: 1px solid #1e293b;
    /* 统一黑边框 */
    background: #fff;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.msr-spa-card:not([data-rank="0"]):not([data-rank="1"]):not([data-rank="2"]):not([data-rank="3"]):hover,
.msr-spa-card[data-is-random="1"]:hover {
    border-color: var(--luxury-gold);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* 确保内容适配 */
.msr-spa-card:not([data-rank="0"]):not([data-rank="1"]):not([data-rank="2"]):not([data-rank="3"]) .msr-spa-image,
.msr-spa-card[data-is-random="1"] .msr-spa-image {
    width: calc(100% - 2.3rem);
    margin: 1.15rem 1.15rem 0 1.15rem;
    height: 280px;
    border-radius: 12px;
}

/* 排行榜流光卡片 (0-3) 的特有布局 */
.msr-spa-card[data-rank="0"] .msr-spa-image,
.msr-spa-card[data-rank="1"] .msr-spa-image,
.msr-spa-card[data-rank="2"] .msr-spa-image,
.msr-spa-card[data-rank="3"] .msr-spa-image {
    position: relative;
    z-index: 1;
    margin: 1.15rem 1.15rem 0 1.15rem;
    width: calc(100% - 2.3rem);
    border-radius: 12px;
    height: 280px;
    display: block;
}

.msr-spa-card[data-rank="0"] .msr-spa-info,
.msr-spa-card[data-rank="1"] .msr-spa-info,
.msr-spa-card[data-rank="2"] .msr-spa-info,
.msr-spa-card[data-rank="3"] .msr-spa-info {
    position: relative;
    z-index: 1;
    margin: 0 1.15rem 0.85rem 1.15rem;
    width: calc(100% - 2.3rem);
    background: transparent;
    padding: 0.15rem 0 0;
    flex: 1;
}

/* 🏅 Top 5-10: 静态精致描边 */
/* .msr-spa-card:nth-of-type(n+5) {  // Replaced by :not([data-rank]) selector above
    border: 1px solid rgba(197, 160, 89, 0.2);
    overflow: hidden;
} */

.msr-spa-card:nth-of-type(n+5):hover {
    border-color: var(--luxury-gold);
}

.msr-spa-image {
    width: calc(100% - 2.3rem);
    margin: 1.15rem 1.15rem 0 1.15rem;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f8fafc;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msr-spa-image:hover {
    opacity: 0.95;
}

.msr-spa-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* 图片右上角评分显示 - 纯数字 */
.msr-image-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 2px 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.msr-image-rating .msr-score-val {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffd700;
    margin: 0;
}


.msr-spa-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    color: #999;
    font-size: 0.875rem;
}

.msr-spa-info {
    padding: 0.15rem 0 0.85rem 0;
    margin: 0 1.15rem;
    width: calc(100% - 2.3rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 整体居中 */
    gap: 0.45rem;
    position: relative;
    z-index: 3;
}

/* 装饰性灰色横杠 */
.msr-card-divider {
    width: 40%;
    height: 1px;
    background: #e2e8f0;
    margin: 0.1rem 0;
    opacity: 0.8;
}

.msr-info-row {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 内容居中 */
    width: 100%;
}

/* 第一排: 名称与评分 */
.msr-row-header {
    justify-content: center;
    gap: 12px;
}

.msr-spa-name-link {
    text-decoration: none;
    max-width: 80%;
    /* 防止店名太长破坏对齐 */
}

.msr-spa-name {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8b6914 0%, #b8860b 50%, #8b6914 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.5px;
    filter: drop-shadow(0 1px 2px rgba(139, 105, 20, 0.15));
}

.msr-spa-name-link:hover .msr-spa-name {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(197, 160, 89, 0.3));
    transform: scale(1.02);
}

.msr-score-display {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.msr-score-display .msr-star {
    font-size: 20px;
    margin-right: -2px;
}

.msr-score-val {
    font-size: 1.1rem;
    font-weight: 800;
    margin-left: 6px;
    color: var(--luxury-gold);
}

/* 全局星级系统 */
.msr-star {
    position: relative;
    display: inline-block;
    color: #e2e8f0;
    /* 空星颜色 */
    line-height: 1;
}

.msr-star-full {
    color: var(--luxury-gold);
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.msr-star-half {
    background: linear-gradient(90deg, #c5a059 50%, #e2e8f0 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 第二排: 地区与超链接标签 */
.msr-row-meta-tags {
    justify-content: center;
    gap: 10px;
}

.msr-meta-region {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    flex-shrink: 0;
}

.msr-clickable-tags {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow: hidden;
    flex-wrap: wrap;
    justify-content: center;
}

.msr-tag-link {
    background: #6d179e;
    color: white;
    padding: 2px 4px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(109, 23, 158, 0.3);
}

.msr-tag-link:hover {
    background: #0f172a;
    color: #6d179e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

/* 第三排: 营业时间与价格 */
.msr-row-bottom {
    justify-content: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    flex-wrap: wrap;
}

.msr-meta-hours,
.msr-meta-price,
.msr-meta-region {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.msr-meta-hours:hover,
.msr-meta-region:hover {
    background: rgba(197, 160, 89, 0.1);
    color: var(--luxury-gold);
}

.msr-meta-price {
    color: #475569;
    font-weight: 700;
}

.msr-meta-divider {
    width: 1px;
    height: 12px;
    background: #e2e8f0;
}

.msr-icon {
    font-size: 1rem;
    filter: grayscale(0.2);
}

/* 网格布局 - 支持智能缩放，在平板端保持 PC 风格但自动降列 */
.msr-spa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    padding: 0 20px;
    margin: 0 auto;
    max-width: 1200px;
}

/* 防止 Safari 中 grid item 被内容撑破 */
.msr-spa-grid > .msr-spa-card {
    min-width: 0;
}

/* 手机端双列布局已在文件顶部 @media (max-width: 767px) 中通过 body .msr-spa-grid !important 定义，此处不再重复 */

/* 分页导航美化 */
.pagination {
    margin-top: 60px;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination .page-numbers:hover:not(.dots) {
    background: #f8fafc;
    border-color: var(--luxury-gold);
    color: var(--luxury-gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.1);
}

.pagination .page-numbers.current {
    background: var(--gold-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 15px rgba(197, 160, 89, 0.3);
}

.pagination .page-numbers.dots {
    background: transparent;
    box-shadow: none;
    border: none;
    cursor: default;
}

/* 错误和空状态 */
.msr-error-message,
.msr-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #7f8c8d;
}

.msr-error-message p,
.msr-empty-state p {
    font-size: 1.125rem;
}

/* 响应式断点 - 仅保留手机端模式（767px以下） */
@media (max-width: 767px) {
    .msr-menu-toggle {
        display: block;
    }

    .msr-nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .msr-nav-menu.active {
        display: flex;
    }

    .msr-nav-menu a {
        padding: 1rem;
        border-bottom: 1px solid #eee;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* 焦点样式 - 可访问性 */
a:focus,
button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* 确保交互元素在移动端足够大 */
@media (max-width: 767px) {
    button {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .msr-nav-menu a {
        min-width: auto;
        min-height: 44px;
    }
}

/* 防止布局跳动 */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* === 文章与页面详情页系统 === */
.msr-post-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.msr-article-card {
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.msr-article-header {
    text-align: center;
    margin-bottom: 40px;
}

.msr-article-meta {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.msr-meta-sep {
    margin: 0 10px;
    opacity: 0.5;
}

.msr-article-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark-bg);
    line-height: 1.3;
    margin: 0;
}

.msr-article-featured-image {
    margin: 0 -60px 40px -60px;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    max-height: 500px;
}

.msr-article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.msr-article-content {
    font-size: 17px;
    line-height: 1.8;
    color: #475569;
}

.msr-article-content p {
    margin-bottom: 1.5em;
}

.msr-article-content h2 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: var(--dark-bg);
}

.msr-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
}

.msr-article-content blockquote {
    border-left: 4px solid var(--luxury-gold);
    padding: 20px 30px;
    background: #f8fafc;
    border-radius: 12px;
    font-style: italic;
    margin: 30px 0;
}

.msr-article-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #f1f5f9;
}

.msr-article-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.msr-tag-pill {
    background: #f8fafc;
    color: #64748b;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
}

.msr-tag-pill:hover {
    background: var(--luxury-gold);
    color: white;
    border-color: var(--luxury-gold);
    transform: translateY(-2px);
}

.msr-post-navigation {
    margin-top: 40px;
}

.msr-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.msr-nav-prev a,
.msr-nav-next a {
    display: flex;
    flex-direction: column;
    padding: 25px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s;
}

.msr-nav-prev a:hover,
.msr-nav-next a:hover {
    border-color: var(--luxury-gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.msr-nav-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.msr-nav-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark-bg);
}

.msr-nav-next {
    text-align: right;
}

@media (max-width: 767px) {
    .msr-article-card {
        padding: 30px;
    }

    .msr-article-featured-image {
        margin: 0 -30px 30px -30px;
    }

    .msr-article-title {
        font-size: 28px;
    }

    .msr-nav-links {
        grid-template-columns: 1fr;
    }
}

/* === 博客归档页系统 === */
.msr-archive-header {
    padding: 60px 0 40px;
    text-align: center;
}

.msr-archive-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark-bg);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.msr-archive-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--luxury-gold);
    border-radius: 2px;
}

.msr-archive-description {
    font-size: 15px;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.msr-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
    margin-bottom: 60px;
}

.msr-blog-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.msr-blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--luxury-gold);
}

.msr-blog-thumb {
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: block;
}

.msr-blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.msr-blog-card:hover .msr-blog-thumb img {
    transform: scale(1.1);
}

.msr-blog-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.msr-blog-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.msr-blog-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.msr-blog-title a {
    color: var(--dark-bg);
    text-decoration: none;
    transition: color 0.3s;
}

.msr-blog-title a:hover {
    color: var(--luxury-gold);
}

.msr-blog-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
    margin-bottom: 20px;
    flex: 1;
}

.msr-blog-more {
    font-size: 13px;
    font-weight: 700;
    color: var(--luxury-gold);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.msr-blog-more:hover {
    gap: 10px;
}

@media (max-width: 767px) {
    .msr-blog-grid {
        grid-template-columns: 1fr;
    }
}


/* ===== 统一占位符样式 ===== */
.spa-placeholder {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f6f7f7;
    color: #94a3b8;
    text-align: center;
    width: 100%;
    height: 100%;
    min-height: inherit;
    box-sizing: border-box;
}

.spa-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spa-placeholder .placeholder-text {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin: 0;
}

/* 手机端列表占位符强制居中 */
@media (max-width: 767px) {
    .msr-spa-image {
        position: relative !important;
        display: block !important;
        overflow: hidden !important;
        min-height: 150px !important;
        aspect-ratio: 1 / 1 !important;
        background: #f1f5f9;
        height: auto !important;
        /* 让 aspect-ratio 生效，旧浏览器用 min-height 兜底 */
    }

    .msr-spa-image .spa-placeholder {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* 详情页占位符特殊类 */
.spa-placeholder-detail {
    border-radius: 24px;
}

.spa-placeholder-detail .placeholder-text {
    font-size: 18px;
}

/* QR码占位符 */
.spa-placeholder-qr {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    padding: 20px;
}

.spa-placeholder-qr .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
}

.spa-placeholder-qr .placeholder-text {
    font-size: 12px;
}

/* 兼容旧样式 */
.msr-spa-placeholder,
.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f6f7f7;
    color: #94a3b8;
}