/* 基础样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    margin: 0;
    padding: 0;
    height: 100%;
    /* 忽略安全区域 */
    padding-top: 0 !important;
    padding-top: constant(safe-area-inset-top, 0) !important;
    padding-top: env(safe-area-inset-top, 0) !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background-color: #f8f8f8;
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    overflow-x: hidden;
    /* 强制忽略安全区域 */
    padding-top: 0 !important;
}

/* 头部导航栏 */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    height: 56px;
    background-color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.header-bar h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #222;
    letter-spacing: 0.5px;
}

.header-actions {
    position: absolute;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-actions .header-btn {
    color: #333;
    font-size: 14px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.header-actions .header-btn:hover {
    background: #eaeaea;
}

.header-actions .header-btn:active {
    transform: scale(0.95);
}

/* 城市和搜索栏 */
.city-search-wrapper {
    display: flex;
    padding: 8px 15px 12px 15px;
    background-color: #fff;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-top: 0;
    top: 0;
}

.search-input {
    flex: 1;
    background-color: #f5f5f5;
    border-radius: 20px;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-right: 10px;
}

.search-input:active {
    background-color: #efefef;
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.1);
}

.search-input .search-label {
    color: #666;
    font-size: 16px;
    margin-right: 10px;
    font-weight: 500;
    position: relative;
}

.search-input .search-label:after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    height: 16px;
    width: 1px;
    background-color: #ddd;
    transform: translateY(-50%);
}

.search-input input {
    background-color: transparent;
    border: none;
    outline: none;
    height: 100%;
    width: 100%;
    font-size: 14px;
    color: #333;
}

.search-input input::placeholder {
    color: #999;
}

.map-button .map-label {
    color: #3f51b5;
    font-weight: 600;
    font-size: 14px;
    margin-right: 4px;
    display: none; /* 隐藏多余的标签 */
}

.map-button {
    display: flex;
    align-items: center;
    margin-left: 5px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    background-color: rgba(63, 81, 181, 0.08);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.map-button:active {
    transform: scale(0.95);
    background-color: rgba(63, 81, 181, 0.12);
}

.map-button span:first-child {
    font-size: 16px;
    margin-right: 6px;
}

/* 内容区域 */
#home-page {
    padding-top: 0;
    margin-top: 0;
    position: relative;
}

/* 广告banner */
.banner-ad {
    margin: 15px 15px;
    border-radius: 12px;
    overflow: hidden;
    height: 140px;
    background-color: #4caf50;
    position: relative;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.banner-ad .swiper-container {
    width: 100%;
    height: 100%;
}

.banner-ad .swiper-wrapper {
    width: 100%;
    height: 100%;
}

.banner-ad .swiper-slide {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* 隐藏HTML文字内容，只显示SVG中的文字 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-shadow: 0 1px 5px rgba(0,0,0,0.4);
}

.banner-content h2 {
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    margin-bottom: 8px;
}

.banner-content p {
    font-size: 14px;
    margin: 0;
    padding: 4px 15px;
    border: 1px solid white;
    border-radius: 20px;
    background-color: rgba(0,0,0,0.2);
    position: absolute;
    top: 15px;
    right: 15px;
    left: auto;
}

.swiper-pagination {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    display: none; /* 隐藏分页指示器，因为只有一个banner */
    justify-content: center;
    gap: 6px;
}

.swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.6);
    display: inline-block;
}

.swiper-pagination-bullet.active {
    background-color: #fff;
    width: 10px;
    border-radius: 3px;
}

/* 实时动态部分已移除 */

/* 新筛选设计 */
.new-filter-container {
    background: #fff;
    padding: 8px 0 4px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin-bottom: 10px;
    position: relative;
}

/* 筛选类别 */
.filter-categories {
    display: flex;
    justify-content: space-between;
    padding: 4px 15px 8px;
    background-color: #ffffff;
}

.filter-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 8px 0;
    transition: all 0.3s ease;
    width: 19%;
    border: none;
    background: transparent;
    cursor: pointer;
}

.category-icon {
    margin-bottom: 6px;
    border-radius: 50%;
    background-color: #f6f6f6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    position: relative;
    overflow: hidden;
}

.category-icon svg {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
}

.category-name {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: -0.2px;
}

.filter-category.active .category-icon {
    background: linear-gradient(135deg, #42b983 0%, #3fcd7f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(63, 205, 127, 0.2);
    color: white;
}

.filter-category.active .category-name {
    color: #42b983;
    font-weight: 600;
}

/* 快速筛选选项 */
.quick-filters {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 15px 12px;
    padding-left: 30px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background-color: #fff;
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.quick-filters::-webkit-scrollbar {
    display: none;
}

.quick-filter {
    margin-right: 28px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    font-size: 15px;
    color: #666;
    padding: 6px 2px;
    border-radius: 0;
    background-color: transparent;
    font-weight: 500;
    box-shadow: none;
    border: none;
    position: relative;
    letter-spacing: 0.3px;
}

.quick-filter:first-child {
    margin-left: 5px;
}

.quick-filter.active {
    background: transparent;
    color: #3fcd7f;
    font-weight: 600;
    box-shadow: none;
}

.quick-filter.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background-color: #3fcd7f;
    border-radius: 1.5px;
}

.quick-filter:active {
    transform: scale(0.95);
    opacity: 0.9;
}

/* 筛选按钮在快速筛选中的特殊样式 */
.quick-filter.quick-filter-advanced {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    font-weight: 500;
    color: #3f51b5;
    background-color: rgba(63, 81, 181, 0.08);
    border: 1px solid rgba(63, 81, 181, 0.2);
}

.quick-filter.quick-filter-advanced .filter-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    background: #ff5722;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border: 1px solid white;
}

.quick-filter.quick-filter-advanced .filter-badge:empty,
.quick-filter.quick-filter-advanced .filter-badge[data-count="0"] {
    display: none;
}

.quick-filter.quick-filter-advanced:hover {
    background-color: rgba(63, 81, 181, 0.12);
    border-color: rgba(63, 81, 181, 0.3);
}

.quick-filter.quick-filter-advanced.active {
    background-color: #3f51b5;
    color: white;
    border-color: #3f51b5;
}

/* 租期选择筛选标签 */
.filter-tags-row {
    display: flex;
    padding: 10px 15px;
    background-color: #fff;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.filter-tags-row::-webkit-scrollbar {
    display: none;
}

.filter-tags-row .filter-tag {
    padding: 8px 15px;
    margin-right: 12px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    background-color: #f6f6f6;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
}

.filter-tags-row .filter-tag:first-child {
    margin-left: 0;
}

.filter-tags-row .filter-tag.active {
    background: linear-gradient(135deg, #42b983 0%, #3fcd7f 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(63, 205, 127, 0.15);
}

.main-filter-options .filter-tag {
    font-size: 15px;
    padding: 8px 14px;
    color: #333;
    position: relative;
}

.main-filter-options .filter-tag.active {
    background-color: rgba(63, 205, 127, 0.08);
    color: #3fcd7f;
    border-color: transparent;
    font-weight: 600;
}

.main-filter-options .filter-tag.active:after {
    width: 24px;
    height: 3px;
    background-color: #3fcd7f;
}

.filter-tag-right {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: #444;
    font-size: 14px;
    position: relative;
    font-weight: 500;
    margin-right: 15px;
    background-color: rgba(63, 205, 127, 0.08);
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.filter-tag-right:active {
    transform: scale(0.95);
    background-color: rgba(63, 205, 127, 0.12);
}

.filter-tag-right span:first-child {
    font-size: 16px;
    margin-right: 6px;
    vertical-align: middle;
}

/* Filter badge styles */
.filter-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background-color: #3fcd7f;
    color: white;
    font-size: 9px;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    display: none;
    padding: 0 3px;
    z-index: 10;
    border: 1px solid white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* 筛选条件下拉 */
.filter-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 300;
    display: none;
    transition: all 0.3s ease;
    opacity: 0;
}

.filter-dropdown.active {
    display: block;
    opacity: 1;
}

.filter-options {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    max-height: 80vh;
    background-color: #fff;
    border-radius: 12px;
    overflow-y: auto;
    padding: 20px 0 0;
    margin: 0 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

.filter-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    border: none;
}

.filter-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 10px;
}

.filter-group {
    padding: 0 20px 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-group-title {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin-bottom: 12px;
}

.filter-option-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 区域筛选特定样式 - 自适应换行布局 */
#district-filters.filter-option-items {
    gap: 8px;
    justify-content: flex-start;
}

#district-filters .filter-option-item {
    flex: 0 0 auto; /* 不拉伸，不压缩，自动大小 */
    min-width: 60px; /* 最小宽度确保可读性 */
    max-width: none; /* 移除最大宽度限制 */
    padding: 8px 12px; /* 增加左右内边距 */
    font-size: 13px;
    text-align: center;
    white-space: nowrap; /* 防止文字换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 如果文字过长显示省略号 */
}

.filter-option-item {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    min-width: 70px;
    text-align: center;
    border: 1px solid #eee;
}

.filter-option-item.active {
    background-color: #e6f7e6;
    color: #44b549;
    font-weight: 500;
    border-color: #c8e6c9;
}

.filter-actions {
    display: flex;
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    border-radius: 0 0 12px 12px;
}

.filter-action-btn {
    flex: 1;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border-radius: 22px;
    font-weight: 500;
}

.filter-reset-btn {
    background-color: #f5f5f5;
    color: #666;
    margin-right: 15px;
}

.filter-confirm-btn {
    background-color: #44b549;
    color: #fff;
}

/* 房源列表容器 */
.house-list {
    padding: 0 0 68px 0 !important;
    background-color: #fff !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

/* 房源卡片 - 全新设计 */
.house-item-grid {
    background: #fff !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: row !important;
    position: relative !important;
    border: none !important;
    margin-bottom: 0 !important;
    padding: 15px 0 15px 12px !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}

/* 左侧图片和房东信息列 */
.house-left-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0px;
    flex-shrink: 0;
}

/* 图片下方的房东信息 */
.landlord-info-bottom {
    display: flex;
    align-items: center;
    margin-top: 8px;
    width: 150px; /* 与图片宽度一致 */
}

.landlord-info-bottom .landlord-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 6px;
    border: 1px solid rgba(0,0,0,0.05);
    background-color: #f0f0f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    font-size: 12px;
    flex-shrink: 0;
}

.landlord-info-bottom .landlord-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landlord-info-bottom .landlord-name {
    font-size: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* 图片下方的区域信息 */
.district-info-bottom {
    display: flex;
    align-items: center;
    margin-top: 8px;
    width: 150px; /* 与图片宽度一致 */
}

.district-info-bottom .district-name {
    font-size: 11px;
    color: #555;
    font-weight: 500;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.house-item-grid:hover {
    background-color: #f9f9f9 !important;
}

.house-item-grid:active {
    background-color: #f5f5f5 !important;
}

/* 房源图片容器 */
.house-image {
    position: relative;
    width: 150px;
    min-width: 150px;
    height: 135px;
    overflow: hidden;
    border-radius: 6px;
    background-color: #f5f5f5;
    margin-left: 0px;
    flex-shrink: 0; /* 防止图片被压缩 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 图片上的覆盖层标签（密码看房或更新时间） */
.house-image .update-time-overlay {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(255, 102, 0, 0.75);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
}

.house-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
    filter: brightness(1.02) contrast(1.05) saturate(1.1);
}

.house-item-grid:hover .house-image img {
    transform: scale(1.08);
}

.house-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
}
/* 房源信息区域 */
.house-info-compact {
    padding: 0 16px 0 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 改为顶部对齐 */
    min-width: 0; /* 允许flex子元素收缩 */
    overflow: visible; /* 允许内容正常显示 */
}

/* 房源标题 */
.house-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin: 0 0 6px 0;
    line-height: 1.3;
    letter-spacing: -0.2px;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.8em; /* 增加高度，确保2行完整显示 */
}

/* 房源详情 */
.house-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* 房源信息行 */
.house-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

/* 单行展示房源属性 */
.house-attrs-inline {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    letter-spacing: 0.3px;
    word-spacing: 1px;
    min-width: 0; /* 允许收缩 */
}

/* 距离信息 */
.house-distance {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
    display: none;
}

.house-attrs {
    font-size: 13px;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attr-item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.attr-item:not(:last-child):after {
    content: '';
    width: 3px;
    height: 3px;
    background-color: #ccc;
    border-radius: 50%;
    margin-left: 8px;
}

/* 价格信息 */
.price-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.house-price-compact {
    color: #3fcd7f;
    font-size: 14px;
    display: flex;
    align-items: baseline;
    font-weight: 500;
}

.house-price-compact strong {
    font-size: 20px;
    font-weight: 700;
    margin-right: 2px;
    letter-spacing: -0.3px;
}

/* 特色标签 */
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    margin-bottom: 8px;
    overflow: visible; /* 允许标签完全显示 */
    line-height: 1.5;
}

.feature-tag {
    font-size: 11px;
    color: #555;
    background-color: #f5f7fa;
    padding: 3px 6px;
    border-radius: 3px;
    white-space: nowrap;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    line-height: 1.3; /* 确保标签内文字有足够行高 */
    height: auto; /* 让标签高度自适应 */
}

.feature-tag:hover {
    background-color: #eef2f7;
    border-color: rgba(0,0,0,0.08);
}

/* 原房东信息样式 - 保留但隐藏，防止影响其他页面 */
.landlord-status {
    display: none; /* 隐藏原来的房东信息区域 */
}

.landlord-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0; /* 允许收缩 */
    overflow: hidden;
}

.landlord-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landlord-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 6px;
    border: 1px solid rgba(0,0,0,0.05);
    background-color: #f0f0f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    font-size: 12px;
}

.landlord-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 更新时间样式 - 隐藏原位置的更新时间 */
.update-time:not(.update-time-overlay) {
    display: none;
}

/* Online status indicators removed */

/* 特色房源标记 */
.house-item-grid.featured::before {
    content: '精选';
    position: absolute;
    top: 10px;
    left: 10px;
    right: auto;
    background-color: #ff6600;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.4);
    z-index: 5;
    transform: none;
    letter-spacing: 0.5px;
}

/* 更新时间标签（原密码看房位置） */
.password-view-tag {
    position: static;
    display: inline-block;
    font-size: 11px;
    color: #666;
    padding: 2px 6px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-weight: 400;
    margin-left: auto;
    border: 1px solid #e0e0e0;
}

/* 房源标签和房东信息行 */
.house-tags-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

/* Offline status indicators removed */

/* 月租标签 */
.month-tag {
    position: absolute;
    right: 10px;
    bottom: 10px;
    font-size: 11px;
    color: #ffffff;
    padding: 3px 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    letter-spacing: 0.2px;
}

/* 底部导航栏 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background-color: #fff;
    display: flex;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6px 0;
    transition: all 0.3s ease;
    color: #999;
    font-weight: 500;
}

.tab-indicator {
    position: relative;
    font-size: 26px;
    margin-bottom: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 32px;
}

.tab-indicator svg {
    width: 28px;
    height: 28px;
    stroke-width: 2px;
    stroke: currentColor;
}

.tab-item.active .tab-indicator {
    transform: scale(1.15);
}

.tab-item.active .tab-indicator svg {
    stroke-width: 2.2px;
}

.tab-item span:last-child {
    font-size: 12px;
    font-weight: 500;
    margin-top: 3px;
    letter-spacing: 0.2px;
}

.tab-item.active {
    color: #3fcd7f;
    font-weight: 600;
    transform: translateY(-3px);
}

.tab-item.active span:last-child {
    font-weight: 600;
}

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

/* 项目选房样式 */
#project-selection-view {
    display: none;
    padding: 15px;
    padding-bottom: 80px; /* 直接在主容器添加底部内边距 */
    background-color: #fff;
    border-radius: 12px;
    margin: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow-y: auto; /* 允许垂直滚动 */
    z-index: 2;
    /* 保证项目视图占满主要内容区域 */
    position: relative;
    min-height: calc(100vh - 180px); /* 改为最小高度，内容少时不强制显示滚动条 */
    max-height: calc(100vh - 180px); /* 设置最大高度，内容多时才显示滚动条 */
}

/* 项目分页指示器样式 */
.project-load-more {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.project-load-more .loading-dots {
    display: flex;
    gap: 3px;
}

.project-load-more .loading-dots span {
    width: 5px;
    height: 5px;
    background-color: #666;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
}

.project-load-more .loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.project-load-more .loading-dots span:nth-child(2) { animation-delay: -0.16s; }

.project-no-more {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
    text-align: center;
}

.project-no-more::before,
.project-no-more::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0 50%, transparent);
    margin: 0 12px;
}

.project-no-more .no-more-text {
    white-space: nowrap;
    padding: 0 10px;
}

/* 确保项目视图激活时房源列表不显示 */
body.project-view-active .house-list {
    display: none !important;
}

.project-selection-container {
    width: 100%;
    /* 移除重复的滚动和内边距设置 */
}

/* 新的项目卡片样式 */
.project-card {
    background-color: #fff;
    border-radius: 12px;
    margin-bottom: 15px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: pointer;
}

.project-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-info {
    flex: 1;
}

.project-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.project-location {
    font-size: 13px;
    color: #666;
    margin-bottom: 2px;
}

.project-details {
    font-size: 12px;
    color: #999;
}

.project-contact {
    color: #3f51b5;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    background-color: rgba(63, 81, 181, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.project-contact:hover {
    background-color: rgba(63, 81, 181, 0.15);
}

.project-stats {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 12px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}

.stat-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.stat-value.available {
    color: #4caf50;
}

.stat-value.rented {
    color: #f44336;
}

.stat-value.reserved {
    color: #ff9800;
}

.project-price {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #3f51b5;
}

/* 项目详情弹窗样式 */
.project-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    background-color: #fafafa;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: #666;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.project-info-detail {
    margin-bottom: 20px;
}

.project-info-detail p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.room-item {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.room-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.room-item.vacant {
    background-color: #e8f5e8;
    border-color: #4caf50;
}

.room-item.rented {
    background-color: #ffebee;
    border-color: #f44336;
    opacity: 0.7;
    cursor: not-allowed;
}

.room-item.reserved {
    background-color: #fff3e0;
    border-color: #ff9800;
}

.room-item.pending {
    background-color: #f5f5f5;
    border-color: #999;
}

.room-number {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.room-status {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.room-rent {
    font-size: 13px;
    font-weight: 600;
    color: #3f51b5;
}

/* 老的项目样式保持兼容 */
.project-card.legacy {
    background-color: #f0f8f0;
    border: 1px solid rgba(63, 205, 127, 0.15);
}

.project-rooms {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.room-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.room-btn.rented {
    background-color: #ff9a9e;
}

.room-btn.vacant {
    background-color: #8e8e8e;
}

.room-btn.reserved {
    background-color: #64b5f6;
}

.room-btn:active {
    transform: scale(0.95);
}

/* 状态说明 */
.status-legend {
    display: flex;
    justify-content: space-around;
    padding: 10px 15px;
    margin-bottom: 10px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.status-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-dot.rented {
    background-color: #ff9a9e;
}

.status-dot.vacant {
    background-color: #8e8e8e;
}

.status-dot.reserved {
    background-color: #64b5f6;
}

/* 附近房源位置选择样式 */
.location-selector-container {
    width: 100%;
    padding: 0 15px;
}

.location-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 12px;
}

.location-icon {
    color: #666;
    font-size: 20px;
    margin-right: 6px;
}

.location-text {
    flex: 1;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.location-set-btn {
    color: #44b549;
    font-size: 14px;
    font-weight: 500;
}

.room-filter-options {
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
}

.room-filter-tag {
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px 0;
    color: #333;
    font-size: 14px;
    flex: 1;
    text-align: center;
    margin: 0 5px;
}

.room-filter-tag.active {
    background-color: #e6f7e6;
    color: #44b549;
    border-color: #c8e6c9;
}

/* 弹出提示样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 500;
}

.toast.show {
    opacity: 1;
}

/* 加载指示器 */
.loading-indicator {
    text-align: center;
    padding: 20px 0;
    color: #999;
    font-size: 14px;
    width: 100%;
    display: none;
}

.loading-indicator.active {
    display: block;
}

/* 骨架屏加载效果 */
.house-item-skeleton {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    height: 120px;
    display: flex;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.skeleton-image {
    width: 120px;
    min-width: 120px;
    height: 120px;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px 0 0 12px;
}

.skeleton-content {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-title {
    height: 18px;
    width: 70%;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-details {
    display: flex;
    gap: 8px;
}

.skeleton-detail {
    height: 12px;
    width: 40px;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-price {
    height: 16px;
    width: 80px;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-top: auto;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 空状态样式 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background-color: #fff;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ddd;
    background-color: #f8f8f8;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.empty-subtext {
    font-size: 14px;
    color: #999;
}
