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

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    padding-bottom: 80px;
    transition: background var(--transition), color var(--transition);
    -webkit-tap-highlight-color: transparent;
}
/* ===== 顶部栏 ===== */
.top-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--color-bg-card);      /* ✅ 改成卡片色（白/深色适配） */
    border-bottom: 1px solid var(--color-border);  /* 可选：底部分隔线 */
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background var(--transition);
}

/* 城市选择器：文字改成主题色 */
.city-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--color-text);              /* ✅ 深色文字 */
    font-size: 16px;
    font-weight: 600;
    padding: 6px 8px 6px 4px;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
}
.city-selector:active {
    opacity: 0.7;
}
.city-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.arrow {
    font-size: 10px;
    color: var(--color-primary);           /* ✅ 箭头用主题色点缀 */
}

/* ✅ 搜索框：主色描边 + 透明底 */
.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;                       /* ✅ 透明底 */
    border: 1.5px solid var(--color-primary);      /* ✅ 主色边框 */
    border-radius: 20px;
    padding: 8px 14px;
    cursor: pointer;
    min-height: 36px;
    transition: background 0.2s, border-color 0.2s;
    flex: 1 1 0%;
    min-width: 0;
    box-sizing: border-box;
}

.search-box:active {
    background: var(--color-primary-light);        /* ✅ 按下时浅主题色底 */
}

/* 搜索图标 */
.search-box span:first-child {
    flex-shrink: 0;
    font-size: 14px;
    color: var(--color-primary);                   /* ✅ 图标主色 */
}

/* placeholder 文字 */
.search-placeholder {
    color: var(--color-text-light);
    font-size: 14px;
    flex: 1 1 0%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ✅ 容器撑满 */
#topBar {
    display: flex;
    width: 100%;
}

#topBar .top-bar {
    flex: 1;
    width: 100%;
}
/* ===== 双瀑布流 ===== */
.waterfall-container {
    padding: 0 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 12px;
    padding-left: 4px;
    color: var(--color-text);
    transition: color var(--transition);
}

.waterfall {
    display: flex;
    gap: 12px;
}

.waterfall-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-card {
    background: var(--color-bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background var(--transition);
}
.review-card:active {
    transform: scale(0.98);
}

.review-image {
    width: 100%;
    aspect-ratio: 182 / 242;
    object-fit: cover;
    background: var(--color-bg);
}

.review-content {
    padding: 10px 12px 12px;
}

.review-rating {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 4px;
    transition: color var(--transition);
}

.review-text {
    font-size: 13px;
    color: var(--color-text);
    margin: 4px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    transition: color var(--transition);
}


.review-user {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--color-text-light);
}

.loading-more,
.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--color-text-light);
}
/* ===== 城市选择器（优化版） ===== */

/* 搜索框 */
.city-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg);
    border-radius: 20px;
    padding: 8px 14px;
    margin: 12px 0 16px;
    border: 1px solid var(--color-border);
    transition: border-color 0.2s, background var(--transition);
}
.city-search-box:focus-within {
    border-color: var(--color-primary);
}
.city-search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--color-text);
}
.city-search-box input::placeholder {
    color: var(--color-text-light);
}
.city-search-clear {
    cursor: pointer;
    color: var(--color-text-light);
    font-size: 12px;
    padding: 0 4px;
}
.city-search-clear:hover {
    color: var(--color-text);
}

/* 热门城市 */
.city-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 16px 0 10px;
    transition: color var(--transition);
}
.hot-city-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hot-city-item {
    padding: 6px 16px;
    background: var(--color-primary-light);
    border-radius: 20px;
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
    border: 1px solid var(--color-primary);
    transition: background 0.2s;
}
.hot-city-item:active {
    background: var(--color-primary);
    color: #fff;
}

/* 省份分组 */
.province-group {
    margin-top: 12px;
}
.province-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: 4px 0;
    cursor: pointer;
    user-select: none;
    transition: color var(--transition);
}
.province-name:active {
    color: var(--color-primary);
}
.province-count {
    font-size: 11px;
    font-weight: 400;
    color: var(--color-text-light);
}
.province-arrow {
    font-size: 10px;
    margin-left: auto;
    color: var(--color-text-light);
    transition: transform 0.2s;
}

/* 城市网格 */
.city-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 4px 0;
}
.city-grid .city-item {
    padding: 6px 14px;
    background: var(--color-bg);
    border-radius: 16px;
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
    border: 1px solid var(--color-border);
    transition: background 0.2s, color var(--transition), border-color var(--transition);
}
.city-grid .city-item:active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* 无结果提示 */
.no-result {
    text-align: center;
    padding: 30px;
    color: var(--color-text-light);
    font-size: 14px;
}

/* ===== 暗黑主题适配 ===== */
[data-theme="dark"] .hot-city-item {
    background: #3D3D3D;
    border-color: #555;
}
[data-theme="dark"] .city-grid .city-item {
    background: #3D3D3D;
    border-color: #555;
}
[data-theme="dark"] .city-search-box {
    background: #3D3D3D;
    border-color: #555;
}

/* ===== 动画 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 加载占位 ===== */
.shimmer {
    background: linear-gradient(90deg, var(--color-bg) 25%, var(--color-border) 50%, var(--color-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


/* ===== 城市选择器弹窗 ===== */
.city-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.city-picker {
    width: 100%;
    max-height: 70vh;
    background: var(--color-bg-card, #FFFFFF);
    border-radius: 16px 16px 0 0;
    padding: 16px 20px 30px;
    overflow-y: auto;
    transition: background 0.3s;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

/* ===== 确保 fadeIn 动画存在 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===== 加载更多样式 ===== */

/* 加载更多触发器 */
.load-more-trigger {
    text-align: center;
    padding: 20px 0 30px;
    color: var(--color-text-light);
    font-size: 14px;
}

.load-more-loading {
    display: inline-block;
    animation: pulse 1.2s ease-in-out infinite;
}

/* 已全部加载 */
.load-more-end {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 0 30px;
}

.load-more-line {
    flex: 1;
    max-width: 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
}

.load-more-end .load-more-text {
    color: var(--color-text-light);
    font-size: 13px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* 脉冲动画（加载中） */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== 底部 Tab Bar ===== */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    padding: 6px 0 8px;
    height: 50px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s, border-color 0.3s;
    box-sizing: border-box;
}

.tab-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s, transform 0.15s;
    color: var(--color-text-light);
}

.tab-item .tab-label {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
}

.tab-item.active {
    color: var(--color-primary-dark);
}

.tab-item.active .tab-label {
    font-weight: 700;
}

.tab-item:active {
    opacity: 0.6;
    transform: scale(0.96);
}


/* ===== 地图按钮：胶囊型 ===== */
/* ===== 地图按钮：胶囊型（只有文字） ===== */
.tab-item-map {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-bubble {
    position: absolute;
    /* ✅ 胶囊：宽度 > 高度 */
    width: 84px;
    height: 38px;
    border-radius: 19px;             /* 圆角 = 高度的一半 */

    bottom: calc(50% - 19px);        /* 高度的一半 */
    left: 50%;
    transform: translateX(-50%);

    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark, #E55A2B) 100%);

    border: none;
    box-shadow:
        0 0 0 4px var(--color-bg-card),
        0 4px 16px rgba(255, 107, 53, 0.4);

    /* ✅ 文字居中 */
    display: flex;
    align-items: center;
    justify-content: center;

    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.3s ease;
    box-sizing: border-box;
    z-index: 2;
}

.map-bubble-text {
    font-size: 15px;                 /* ✅ 字大一点 */
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: 0.5px;
}

/* 点击 */
.tab-item-map:active .map-bubble {
    transform: translateX(-50%) scale(0.92);
    box-shadow:
        0 0 0 4px var(--color-bg-card),
        0 2px 8px rgba(255, 107, 53, 0.5);
}

/* 激活 */
.tab-item-map.active .map-bubble {
    background: linear-gradient(135deg, var(--color-secondary, #FFA94D) 0%, var(--color-primary, #FF6B35) 100%);
    box-shadow:
        0 0 0 4px var(--color-bg-card),
        0 4px 20px rgba(255, 169, 77, 0.6);
}

/* 暗黑主题 */
[data-theme="dark"] .map-bubble {
    box-shadow:
        0 0 0 4px var(--color-bg-card),
        0 4px 16px rgba(255, 107, 53, 0.5);
}

[data-theme="dark"] .tab-item-map.active .map-bubble {
    box-shadow:
        0 0 0 4px var(--color-bg-card),
        0 4px 20px rgba(255, 169, 77, 0.7);
}

/* 小屏适配 */
@media (max-width: 360px) {
    .map-bubble {
        width: 76px;
        height: 34px;
        bottom: calc(50% - 17px);
        border-radius: 17px;
    }
    .map-bubble-text {
        font-size: 14px;
    }
}
/* ===== 我的页面样式 ===== */
.profile-page {
    padding: 20px 16px 80px;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0 20px;
    background: var(--color-bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    transition: background 0.3s;
}

.profile-avatar {
    font-size: 64px;
    margin-bottom: 12px;
}

.profile-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--color-bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: background 0.3s;
}

.profile-menu-item {
    padding: 14px 16px;
    font-size: 15px;
    color: var(--color-text);
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s;
}
.profile-menu-item:last-child {
    border-bottom: none;
}
.profile-menu-item:active {
    background: var(--color-bg);
}

.profile-footer {
    text-align: center;
    padding: 20px 0;
}
/* 暗黑主题适配 */
[data-theme="dark"] .feature-item {
    background: #2D2D2D;
}

/* ===== 隐藏 Leaflet 右下角标志 ===== */
.leaflet-control-attribution {
    display: none !important;
}

/* 或者更精确地隐藏整个右下角控制区 */
.leaflet-control-container .leaflet-bottom {
    display: none !important;
}

/* 如果只想隐藏文字，保留缩放控件 */
.leaflet-control-attribution {
    font-size: 0 !important;
    opacity: 0 !important;
}


/* ===== 功能入口容器 ===== */
.feature-entries {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px 12px 4px;
    margin-bottom: 4px;
}

/* ===== 卡片基础（左右布局） ===== */
.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 14px;
    border-radius: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 68px;
}

/* 光泽扫过效果 */
.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    z-index: 2;
    pointer-events: none;
}

.feature-item:active::before {
    left: 125%;
}

/* 悬浮/点击动效 */
.feature-item:hover {
    transform: translateY(-2px);
}

.feature-item:active {
    transform: translateY(0) scale(0.97);
}

/* ===== 联系客服（青蓝渐变） ===== */
.feature-service {
    background: linear-gradient(135deg, #4FACFE 0%, #00F2FE 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 172, 254, 0.35);
}

.feature-service:active {
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.5);
}

/* ===== 免费玩（橙粉渐变） ===== */
.feature-play {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFB347 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.35);
}

.feature-play:active {
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.5);
}

/* ===== 图标包裹（左侧） ===== */
.feature-icon-wrap {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-item:active .feature-icon-wrap {
    transform: scale(1.1) rotate(-8deg);
}

.feature-icon {
    color: #fff;
    stroke: #fff;
    display: block;
}

/* ===== 文字区（右侧，两行） ===== */
.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.feature-label {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.2;
}

.feature-desc {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    line-height: 1.2;
}

/* ===== 响应式：小屏微调 ===== */
@media (max-width: 360px) {
    .feature-entries {
        gap: 10px;
        padding: 10px 12px 4px;
    }
    .feature-item {
        padding: 12px 10px;
        gap: 8px;
        min-height: 62px;
    }
    .feature-icon-wrap {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .feature-icon {
        width: 20px;
        height: 20px;
    }
    .feature-label {
        font-size: 14px;
    }
    .feature-desc {
        font-size: 10px;
    }
}

/* ===== 分类网格：圆形图标 ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;                    /* ✅ 从 6px 改成 4px */
    padding: 10px 12px;          /* ✅ 从 16px 改成 10px 12px */
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F8F8 100%);
    margin: 6px 12px;            /* ✅ 从 8px 16px 改成 6px 12px */
    border-radius: 14px;
    transition: background var(--transition), box-shadow var(--transition);
}

[data-theme="dark"] .category-grid {
    background: linear-gradient(135deg, #2D2D2D 0%, #262626 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 2px 2px;
    cursor: pointer;
    transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.category-item:active {
    transform: scale(0.92);
}

.category-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35 0%, #FFA94D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.3s ease;
}

.category-item:active .category-icon-wrap {
    transform: scale(1.08);
    background: linear-gradient(135deg, #FF4757 0%, #FF6B35 100%);
    box-shadow: 0 6px 18px rgba(255, 71, 87, 0.45);
}

.category-item:active .category-icon-wrap {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(255, 107, 53, 0.4);
}

.category-icon-wrap img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);   /* 把图标染白 */
    display: block;
}

.category-emoji {
    font-size: 22px;
    line-height: 1;
    color: #fff;
}

.category-name {
    font-size: 12px;
    color: var(--color-text);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--transition);
}

/* ===== 空状态 ===== */
.category-grid .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: var(--color-text-light);
    font-size: 14px;
}

/* ===== 暗黑主题适配 ===== */
[data-theme="dark"] .category-icon-wrap {
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
}

/* ===== 小屏适配 ===== */
@media (max-width: 360px) {
    .category-grid {
        gap: 8px;
        padding: 12px;
        margin: 10px 12px;
    }
    .category-item {
        gap: 6px;
        padding: 4px 2px;
    }
    .category-icon-wrap {
        width: 48px;
        height: 48px;
    }
    .category-icon-wrap img {
        width: 28px;
        height: 28px;
    }
    .category-emoji {
        font-size: 22px;
    }
    .category-name {
        font-size: 12px;
        max-width: 56px;
    }
}