/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --secondary: #34a853;
    --accent: #ea4335;
    --bg-light: #f8f9fa;
    --text-dark: #202124;
    --text-gray: #5f6368;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary);
}

.logo i {
    font-size: 1.6rem;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主视觉 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 30px auto 0;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    padding: 15px 30px;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* 热门楼盘 */
.hot-properties {
    padding: 60px 0;
    background: var(--bg-light);
}

.hot-properties h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
}

.hot-properties h2 i {
    color: var(--accent);
}

.property-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.property-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

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

.card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.property-card:nth-child(1) .card-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.property-card:nth-child(2) .card-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.property-card:nth-child(3) .card-image {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-image .image-placeholder {
    text-align: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card-image .image-placeholder .building-icon {
    font-size: 48px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.card-image .image-placeholder .district-name {
    font-size: 14px;
    opacity: 0.8;
    letter-spacing: 2px;
}
.card-image .tag {
    position: absolute;
.card-image .tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.price {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.price .amount {
    font-size: 1.5rem;
    font-weight: bold;
}

.unit-price {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.info i {
    margin-right: 5px;
}

.btn-detail {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-detail:hover {
    background: var(--primary-dark);
}

/* 搜索区域 */
.search-section {
    padding: 60px 0;
}

.search-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
}

.search-form {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-gray);
}

.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

.btn-search {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-search:hover {
    background: var(--primary-dark);
}

/* 搜索结果 */
.search-results {
    margin-top: 30px;
}

.result-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
}

.result-image {
    width: 200px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info {
    flex: 1;
}

.result-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.result-info .meta {
    display: flex;
    gap: 20px;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.result-info .price {
    font-size: 1.3rem;
}

/* 对比区域 */
.compare-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.compare-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
}

.compare-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.compare-selector select {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.vs {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
}

.btn-compare {
    padding: 10px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

/* 对比结果 */
.compare-result {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.compare-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.compare-table .winner {
    color: var(--secondary);
    font-weight: bold;
}

/* 分析区域 */
.analysis-section {
    padding: 60px 0;
}

.analysis-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.analysis-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.official-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
}

.official-stats h3 {
    margin: 0 0 25px 0;
    font-size: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-item {
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.analysis-card h3 {
    margin-bottom: 20px;
    color: var(--text-dark);
}

/* 新闻区域 */
.news-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.news-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
}

.news-item {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.news-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.news-item .meta {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-item p {
    color: var(--text-gray);
}

/* 页脚 */
.footer {
    background: #2d3748;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 800px;
    border-radius: var(--radius);
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    float: right;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-gray);
}

.close:hover {
    color: var(--text-dark);
}

/* 响应式 */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .property-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .result-card {
        flex-direction: column;
    }
    
    .result-image {
        width: 100%;
    }
    
    .compare-selector {
        flex-direction: column;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}
