* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%; /* 防止iOS设备上的字体大小自动调整 */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.2em;
    margin: 15px 0;
}

/* 筛选区域样式 */
.filter-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: block; /* 改为块级元素，使筛选条件从上到下排列 */
}

/* 筛选组样式 */
.filter-group {
    margin-bottom: 15px; /* 增加底部间距 */
    width: 100%; /* 宽度100% */
    position: relative; /* 相对定位，用于重置按钮定位 */
}

/* 筛选标签容器 */
.filter-group label {
    display: inline-block;
    width: 80px; /* 固定标签宽度 */
    text-align: right;
    margin-right: 15px;
    color: #666;
    font-size: 14px;
    vertical-align: middle;
}

/* 标签容器样式 */
.filter-tags,
.tag-container {
    display: inline-flex; /* 内联弹性布局 */
    flex-wrap: wrap; /* 允许换行 */
    gap: 10px; /* 标签之间的间距 */
    vertical-align: middle;
    width: calc(100% - 100px); /* 减去标签宽度和间距 */
}

/* 筛选标签样式 */
.filter-tag {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    display: inline-block;
}

.filter-tag:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.filter-tag.active {
    background: #1890ff !important;
    color: white !important;
    border-color: #1890ff !important;
}

/* 小区名称输入框样式 */
#communitySearch {
    display: inline-block;
    width: calc(100% - 100px); /* 减去标签宽度和间距 */
    vertical-align: middle;
}

/* 图片浏览器样式 */
.property-gallery {
    margin-bottom: 20px;
}

.main-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
}

.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail {
    width: 100px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.3s;
}

.thumbnail:hover {
    transform: scale(1.05);
}

/* 图片查看器模态框 */
.image-viewer-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-nav {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-btn {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.7);
}

/* 重置按钮样式 */
.reset-btn {

    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.reset-btn:hover {
    background: #f5f5f5;
    color: #1890ff;
    border-color: #1890ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-group label {
        width: 70px;
        font-size: 13px;
    }
    
    .filter-tags,
    .tag-container,
    #communitySearch {
        width: calc(100% - 90px);
    }
    
    .filter-tag {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .reset-btn {
        top: 10px;
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* 视图切换按钮样式 */
.view-toggle {
    margin: 15px 0;
    text-align: right;
}

.view-toggle button {
    padding: 8px 16px;
    margin-left: 8px;
    border: none;
    border-radius: 4px;
    background: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.view-toggle button.active {
    background: #2c3e50;
    color: white;
}

/* 房源列表样式 - 卡片视图 */
@media (max-width: 768px) {
    .property-list.card-view {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }
    
    .property-card {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
        padding: 0 10px;
    }
}

@media (min-width: 769px) {
    .property-card {
        display: flex;
    }
    
    .property-card img {
        width: 40%;
        max-width: 300px;
        height: auto;
    }
    
    .property-info {
        width: 50%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .property-card {
        padding: 0 5px;
    }
}

.property-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* 偶数位置房源卡片使用淡蓝色背景 */
.property-card:nth-child(even) {
    background: #e6f7ff;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-card img {
    width: 100%;
    max-width: 300px;
    height: 180px;
    object-fit: cover;
}

.property-info {
    padding: 15px;
}

.property-title {
    font-size: 1.1em;
    margin-bottom: 8px;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-details {
    color: #666;
    font-size: 0.9em;
}

.property-price {
    color: #e74c3c;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 8px;
    background-color: #fff9f9;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}

/* 分享按钮样式 */
.share-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.share-btn:hover {
    background-color: #2980b9;
}

/* 表格视图中的分享按钮 */
.property-table .share-btn {
    margin: 0;
    padding: 4px 8px;
}

/* 出租房源价格样式 */
.property-card[data-type="1"] .property-price::after,
.property-card[data-type="2"] .property-price::after {
    content: "元/月";
    font-size: 0.8em;
    margin-left: 3px;
}

/* 出售房源价格样式 */
.property-card[data-type="3"] .property-price::after,
.property-card[data-type="4"] .property-price::after {
    content: "万元";
    font-size: 0.8em;
    margin-left: 3px;
}

/* 房源列表样式 - 表格视图 */
.property-list.table-view {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto; /* 添加水平滚动 */
}

.property-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* 设置最小宽度确保表格可以滚动 */
}

.property-table th,
.property-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

/* 新增价格单元格红色样式 */
.property-table td:nth-child(3) {
    color: #e74c3c;
    font-weight: bold;
}

/* 新增缩略图单元格样式 */
.property-table td img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    vertical-align: middle;
}

/* 无图片时的占位样式 */
.property-table td.no-image {
    color: #999;
    font-style: italic;
}

.property-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 10;
}

.property-table tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.property-table tr:hover {
    background-color: #f0f7ff;
}

/* 详情页样式 */
.property-detail {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.property-image img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.property-content h2 {
    color: #2c3e50;
    font-size: 1.6em;
    margin-bottom: 12px;
}

.property-meta p {
    margin: 6px 0;
    color: #666;
    font-size: 14px;
}

.property-features ul {
    margin-top: 8px;
    padding-left: 18px;
    font-size: 14px;
}

.error-message {
    text-align: center;
    padding: 30px 0;
    font-size: 15px;
}

.error-message a {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.vr-container {
    margin: 15px auto;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    max-width: 90%;
}

.vr-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4a6baf;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.vr-button:hover {
    background-color: #3a5a9f;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.vr-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

/* 响应式设计 - 平板设备 */
@media (max-width: 992px) {
    .container {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .property-list.card-view {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }
    
    .property-card img {
        height: 160px;
    }
    
    .filter-section {
        padding: 12px;
    }
    
    .filter-group {
        min-width: 180px;
    }
    
    .vr-container {
        max-width: 95%;
    }
}

/* 响应式设计 - 手机端房源卡片和筛选条件优化方案

根据您的要求，我将修改CSS文件，确保房源卡片在手机端满屏显示且不超出屏幕，同时调整筛选条件从上到下排列且不超出手机屏幕。 */
@media (max-width: 768px) {
    .property-list.card-view {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }
    
    .property-card {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .property-card {
        padding: 0 5px;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .property-card:hover {
        transform: none;
    }
    
    .vr-button:hover {
        transform: none;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        background-color: #4a6baf;
    }
    
    /* 增加触摸目标大小 */
    .filter-group select,
    .view-toggle button,
    .vr-button {
        min-height: 44px; /* 苹果推荐的最小触摸目标高度 */
    }
}