/* Tailwind CSS CDN */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* 自定义变量 */
:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --primary-lighter: #60A5FA;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gray: #6B7280;
    --text-dark: #1E293B;
    --text-gray: #475569;
    --text-light: #64748B;
    --bg-gray: #F8FAFC;
    --bg-light: #F1F5F9;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo svg {
    width: 32px;
    height: 32px;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-menu a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-gray);
    padding: 8px 0;
    position: relative;
}

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

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input {
    padding: 10px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nav-search button {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1920') center/cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
}

.hero-search {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: flex;
    gap: 16px;
}

.hero-search select,
.hero-search input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 15px;
    background: white;
}

.hero-search button {
    padding: 14px 36px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.hero-search button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* 区域筛选 */
.districts-section {
    padding: 60px 24px;
    background: var(--bg-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.section-title p {
    font-size: 16px;
    color: var(--text-light);
}

.districts-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.district-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
    cursor: pointer;
}

.district-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.district-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.district-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.district-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

/* 楼盘卡片 */
.buildings-section {
    padding: 60px 24px;
}

.buildings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
}

.building-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.building-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.building-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.building-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.building-card:hover .building-image img {
    transform: scale(1.05);
}

.building-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: var(--success);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.building-badge.coming {
    background: var(--warning);
}

.building-badge.soldout {
    background: var(--gray);
}

.building-info {
    padding: 20px;
}

.building-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.building-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.building-district {
    padding: 4px 10px;
    background: var(--bg-gray);
    color: var(--text-gray);
    font-size: 12px;
    border-radius: 4px;
}

.building-address {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.building-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.building-price .price {
    font-size: 24px;
    font-weight: 700;
    color: var(--danger);
}

.building-price .unit {
    font-size: 13px;
    color: var(--text-light);
}

/* 土拍信息 */
.lands-section {
    padding: 60px 24px;
    background: var(--bg-gray);
}

.lands-table {
    max-width: 1280px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

.lands-table th,
.lands-table td {
    padding: 16px 24px;
    text-align: left;
}

.lands-table th {
    background: var(--bg-light);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
}

.lands-table td {
    font-size: 14px;
    color: var(--text-dark);
    border-bottom: 1px solid #F1F5F9;
}

.lands-table tr:last-child td {
    border-bottom: none;
}

.lands-table .price {
    color: var(--danger);
    font-weight: 600;
}

/* 页脚 */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 24px 30px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.8;
}

.footer h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a {
    background: white;
    color: var(--text-gray);
    border: 1px solid #E5E7EB;
}

.pagination a:hover {
    background: var(--bg-gray);
    color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    color: white;
}

.pagination .disabled {
    color: var(--text-light);
    cursor: not-allowed;
}

/* 筛选栏 */
.filter-bar {
    background: white;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.filter-form {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-form select,
.filter-form input {
    padding: 10px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.filter-form button {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* 地图页面 */
.map-container {
    height: calc(100vh - 70px);
    display: flex;
}

.map-sidebar {
    width: 380px;
    background: white;
    border-right: 1px solid #E5E7EB;
    overflow-y: auto;
}

.map-main {
    flex: 1;
}

.map-building-item {
    padding: 16px 20px;
    border-bottom: 1px solid #F1F5F9;
    cursor: pointer;
    transition: background 0.3s;
}

.map-building-item:hover,
.map-building-item.active {
    background: var(--bg-gray);
}

.map-building-item h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.map-building-item .price {
    color: var(--danger);
    font-weight: 600;
    font-size: 14px;
}

/* 楼盘详情页 */
.detail-header {
    background: white;
    border-bottom: 1px solid #E5E7EB;
    padding: 30px 24px;
}

.detail-header-content {
    max-width: 1280px;
    margin: 0 auto;
}

.detail-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-tags {
    display: flex;
    gap: 8px;
}

.detail-tag {
    padding: 6px 14px;
    background: var(--bg-gray);
    border-radius: 20px;
    font-size: 13px;
}

.detail-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 24px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
}

.detail-gallery {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.gallery-main {
    height: 400px;
    background: #f5f5f5;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
}

.gallery-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.gallery-thumbs img:hover,
.gallery-thumbs img.active {
    opacity: 1;
}

.detail-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.detail-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-gray);
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-info-item {
    display: flex;
    gap: 8px;
}

.detail-info-item .label {
    color: var(--text-light);
    font-size: 14px;
    min-width: 80px;
}

.detail-info-item .value {
    font-size: 14px;
    font-weight: 500;
}

.detail-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.price-card {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.price-card .label {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.price-card .price {
    font-size: 36px;
    font-weight: 700;
    color: var(--danger);
}

/* 户型卡片 */
.units-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.unit-card {
    background: var(--bg-gray);
    border-radius: 12px;
    overflow: hidden;
}

.unit-image {
    height: 150px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unit-image img {
    max-height: 100%;
    max-width: 100%;
}

.unit-info {
    padding: 16px;
}

.unit-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.unit-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
}

.unit-price {
    color: var(--danger);
    font-weight: 600;
}

/* 联系表单 */
.contact-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
}

.contact-form {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.form-submit:hover {
    background: var(--primary-dark);
}

.alert {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
}

/* 响应式 */
@media (max-width: 1024px) {
    .buildings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-main {
        grid-template-columns: 1fr;
    }
    
    .detail-sidebar {
        position: static;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-container {
        height: 60px;
    }
    
    .nav-menu,
    .nav-search {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding: 60px 16px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .hero-search {
        flex-direction: column;
        padding: 16px;
    }
    
    .districts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .buildings-grid {
        grid-template-columns: 1fr;
    }
    
    .units-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .map-container {
        flex-direction: column;
    }
    
    .map-sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .detail-info-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-form {
        flex-direction: column;
    }
}
