/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 导航栏样式 */
nav {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    display: block;
    padding: 1rem 0;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: #667eea;
}

/* 主要内容区域 */
main {
    padding: 2rem 0;
}

/* 搜索区域 */
.search-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.search-section h2 {
    margin-bottom: 1rem;
    color: #333;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

#search-input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

#search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.3s;
}

#search-btn:hover {
    opacity: 0.9;
}

/* 房源展示区域 */
.properties-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* 房源卡片 */
.property-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.property-image {
    height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
    overflow: hidden;
}

.property-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.property-info {
    padding: 1.5rem;
}

.property-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.property-price {
    color: #e74c3c;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.property-details {
    display: flex;
    justify-content: space-between;
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.property-location {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.property-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.view-details-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: opacity 0.3s;
}

.view-details-btn:hover {
    opacity: 0.9;
}

.property-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.property-image {
    height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
    overflow: hidden;
}

.property-info {
    padding: 1.5rem;
}

.property-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.property-price {
    color: #e74c3c;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.property-details {
    display: flex;
    justify-content: space-between;
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.property-location {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.property-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.view-details-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: opacity 0.3s;
}

.view-details-btn:hover {
    opacity: 0.9;
}

/* 特色标签 */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-tag {
    background-color: #eef2ff;
    color: #4f46e5;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.status-available {
    background-color: #dcfce7;
    color: #166534;
}

.status-rented {
    background-color: #fee2e2;
    color: #991b1b;
}

/* 房源详情页面 */
.back-link {
    margin-bottom: 1.5rem;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.property-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.property-gallery {
    padding: 1.5rem;
}

.main-image {
    margin-bottom: 1rem;
    height: 300px;
    overflow: hidden;
}

.main-image .property-image {
    height: 100%;
    width: 100%;
}

.thumbnail {
    height: 80px;
    overflow: hidden;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.thumbnails .property-image {
    height: 80px;
    width: 100%;
}

.property-info-detail {
    padding: 1.5rem;
}

.property-info-detail h2 {
    margin-bottom: 0.5rem;
    color: #333;
}

.property-info-detail h3 {
    margin: 1.5rem 0 0.5rem 0;
    color: #333;
}

.property-description-full p {
    color: #666;
    line-height: 1.6;
}

.landlord-contact {
    background-color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: #666;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-btn {
    flex: 1;
    padding: 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.3s;
}

.contact-btn:hover {
    opacity: 0.9;
}

/* 免责声明 */
.disclaimer-section {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 0 8px 8px 0;
}

.disclaimer-section h3 {
    color: #92400e;
    margin-bottom: 1rem;
}

.disclaimer-content p {
    color: #92400e;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.disclaimer-content p:last-child {
    margin-bottom: 0;
}

/* 关于我们页面 */
.about-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
}

.about-text h3 {
    margin: 1.5rem 0 1rem 0;
    color: #333;
}

.about-text p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-text ul {
    color: #666;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.about-text ul li {
    margin-bottom: 0.5rem;
}

.disclaimer {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin-top: 1.5rem;
}

.disclaimer h3 {
    color: #92400e;
    margin-bottom: 1rem;
}

.disclaimer p {
    color: #92400e;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.disclaimer p:last-child {
    margin-bottom: 0;
}

/* 联系我们页面 */
.contact-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.contact-info-full {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #666;
    margin: 0;
    font-size: 1.1rem;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* 图片放大查看器样式 */
.image-viewer-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.image-viewer-modal.hidden {
    display: none;
}

.image-viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-viewer-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.image-viewer-close {
    position: absolute;
    top: -40px;
    right: -10px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.image-viewer-close:hover {
    color: #bbb;
}

.image-viewer-caption {
    margin-top: 15px;
    color: #fff;
    text-align: center;
    font-size: 16px;
    max-width: 80%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    #search-input {
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    
    #search-btn {
        border-radius: 4px;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .property-detail-content {
        grid-template-columns: 1fr;
    }
    
    .main-image {
        height: 250px;
    }
    
    .thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .thumbnails .property-image,
    .thumbnail {
        height: 100px;
    }
}