/* 重置样式 */
* {
    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 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    margin-bottom: 30px;
}

header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.announcement {
    background-color: #f8f9fa;
    border-left: 4px solid #0066cc;
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 0 4px 4px 0;
}

/* 主内容区域 */
main {
    margin-bottom: 40px;
}

section {
    margin-bottom: 30px;
}

section h2 {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 搜索栏 */
.search-bar {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.search-bar form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-bar input, 
.search-bar select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    min-width: 100px;
}

.search-bar button {
    padding: 8px 20px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #0055aa;
}

/* 房源卡片 */
.houses {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.house-card {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.house-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.house-image {
    height: 180px;
    overflow: hidden;
}

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

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

.house-info {
    padding: 15px;
}

.house-info h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.price {
    font-size: 18px;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 5px;
}

.location, .type {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.highlights {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    background-color: #f0f0f0;
    color: #666;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.no-house {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #666;
}

/* 房源详情页 */
.house-detail {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.house-gallery {
    position: relative;
    height: 400px;
    background-color: #f5f5f5;
}

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

.thumbnails {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px;
    background-color: #f0f0f0;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumbnail.active {
    border-color: #0066cc;
}

.house-content {
    padding: 20px;
}

.house-header {
    margin-bottom: 20px;
}

.house-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.price-large {
    font-size: 22px;
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 5px;
}

.deposit {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.house-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.house-description {
    margin-bottom: 20px;
}

.description-title {
    font-size: 18px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.highlights-section {
    margin-bottom: 20px;
}

.highlights-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.highlights-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 页脚 */
footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
}

.contact-info {
    margin-bottom: 20px;
}

.contact-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.qrcode {
    max-width: 150px;
    margin-top: 10px;
}

.qrcode img {
    width: 100%;
    height: auto;
}

.copyright {
    font-size: 14px;
    color: #aaa;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* 管理后台样式 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #fff;
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px;
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 20px;
    border-bottom: none;
    padding-bottom: 5px;
}

.user-info {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #3d5368;
}

.user-info p {
    margin-left: 10px;
    font-size: 14px;
}

.nav-menu {
    margin-top: 20px;
}

.nav-item {
    display: block;
    padding: 10px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: #34495e;
    text-decoration: none;
}

.nav-item.active {
    background-color: #2980b9;
}

.main-content {
    flex: 1;
    padding: 20px;
    background-color: #ecf0f1;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-title {
    font-size: 24px;
    color: #2c3e50;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    border: none;
}

.btn-primary {
    background-color: #2980b9;
    color: white;
}

.btn-primary:hover {
    background-color: #2471a3;
    text-decoration: none;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
    text-decoration: none;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #219955;
    text-decoration: none;
}

.content-card {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.card-body {
    padding: 20px;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.data-table .actions {
    display: flex;
    gap: 5px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: inherit;
}

.form-control:focus {
    border-color: #2980b9;
    outline: none;
}

textarea.form-control {
    min-height: 100px;
}

.form-help {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

/* 标签样式 */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-active {
    background-color: #27ae60;
    color: white;
}

.status-inactive {
    background-color: #95a5a6;
    color: white;
}

/* 图片上传 */
.image-uploads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.image-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    height: 150px;
}

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

.image-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}

.image-action {
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.image-action:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.upload-box {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-box:hover {
    border-color: #2980b9;
}

/* 登录页 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    padding: 20px;
    background-color: #2c3e50;
    color: white;
    text-align: center;
}

.login-body {
    padding: 30px;
}

.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .houses {
        grid-template-columns: 1fr;
    }
    
    .house-gallery {
        height: 300px;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 10px 0;
    }
    
    .search-bar form {
        flex-direction: column;
    }
    
    .house-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* 导航菜单样式 */
.site-nav {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.nav-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
    background-color: #3498db;
    color: #fff;
}

@media (min-width: 768px) {
    .site-nav {
        margin-top: 0;
        align-items: center;
    }
    
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    
    .site-branding {
        flex: 1;
    }
    
    .announcement {
        width: 100%;
        margin-top: 15px;
    }
} 