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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    overflow-x: hidden;
}

/* Tab导航 */
.tab-nav {
    display: flex;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0 30px; /* 加高1.5倍：从20px改为30px */
    position: sticky;
    top: 0;
    z-index: 100;
}

.tab-btn {
    padding: 22.5px 30px; /* 加高1.5倍：从15px改为22.5px */
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #1890ff;
    background-color: #f0f8ff;
}

.tab-btn.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    font-weight: bold;
}

/* 页面容器 */
.page {
    display: none;
    min-height: calc(100vh - 60px);
    padding: 20px;
}

.page.active {
    display: block;
}

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

.page-header h1 {
    font-size: 24px;
    color: #333;
}

/* 首页 - 俯视图 */
.map-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 120px); /* 减去导航栏和标题的高度 */
    max-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0;
}

.map-image {
    /* 六期需求：图片达到最佳比例后不再放大，居中显示 */
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: auto; /* 居中 */
    pointer-events: none; /* 背景图不可点击 */
    user-select: none; /* 禁止选择 */
    -webkit-user-drag: none; /* 禁止拖拽 */
}

.map-image:hover {
    cursor: default !important;
    opacity: 1 !important;
}

.map-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: default; /* 默认鼠标样式 */
    pointer-events: none; /* 默认不拦截点击事件 */
    z-index: 10; /* 确保canvas在图片上方 */
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.btn-annotation, .btn-clear, .btn-save {
    padding: 8px 16px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-annotation:hover, .btn-clear:hover, .btn-save:hover {
    background: #40a9ff;
}

.btn-clear {
    background: #ff4d4f;
}

.btn-clear:hover {
    background: #ff7875;
}

.btn-save {
    background: #52c41a;
}

.btn-save:hover {
    background: #73d13d;
}

/* 标注覆盖层 */
.annotation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: all;
    z-index: 100;
}

.annotation-grid-cell {
    position: absolute;
    border: 1px solid rgba(255, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: background 0.2s;
}

.annotation-grid-cell:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.5);
}

.annotation-grid-cell.has-annotation {
    background: rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
}

.annotation-input-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    min-width: 300px;
}

.annotation-input-modal h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.annotation-input-modal input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.annotation-input-modal .btn-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.annotation-input-modal button {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.annotation-input-modal .btn-save {
    background: #1890ff;
    color: white;
}

.annotation-input-modal .btn-cancel {
    background: #f5f5f5;
    color: #333;
}

/* 价格页 - 筛选器 */
/* 数据统计面板 */
.statistics-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid rgba(24, 144, 255, 0.1);
    transition: box-shadow 0.3s ease;
}

.statistics-panel:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.statistics-header {
    padding: 18px 24px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.statistics-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.statistics-header:hover::before {
    left: 100%;
}

.statistics-header:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
}

.statistics-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.statistics-header h2::before {
    content: '📊';
    font-size: 24px;
}

.statistics-toggle-icon {
    font-size: 18px;
    color: #fff;
    transition: transform 0.3s ease;
    font-weight: bold;
}

.statistics-panel.expanded .statistics-toggle-icon {
    transform: rotate(180deg);
}

.statistics-content {
    padding: 24px;
    background: #fff;
    min-height: calc(100vh - 200px);
}

/* 数据统计页面样式 */
#statistics-page {
    padding: 20px;
}

#statistics-page .statistics-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.statistics-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.statistics-loading::after {
    content: '...';
    animation: loading-dots 1.5s steps(4, end) infinite;
}

@keyframes loading-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.statistics-body {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.statistics-section {
    margin-bottom: 32px;
    padding: 20px;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border-radius: 10px;
    border: 1px solid #e8eef5;
    transition: all 0.3s ease;
}

.statistics-section:hover {
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.1);
    border-color: #1890ff;
    transform: translateY(-2px);
}

.statistics-section:last-child {
    margin-bottom: 0;
}

.statistics-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid transparent;
    background: linear-gradient(to right, #1890ff, #40a9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.statistics-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #1890ff, #40a9ff);
    border-radius: 2px;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border-radius: 12px;
    border: 2px solid #e6f4ff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1890ff, #40a9ff, #69c0ff);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(24, 144, 255, 0.15);
    border-color: #1890ff;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* 价格分布图表 */
/* 价格分布折线图容器 */
.price-line-chart-container {
    margin-top: 24px;
    padding: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(24, 144, 255, 0.1);
    width: 100%;
    transition: all 0.3s ease;
}

.price-line-chart-container:hover {
    box-shadow: 0 6px 24px rgba(24, 144, 255, 0.12);
    transform: translateY(-2px);
}

#price-line-chart {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 楼栋柱状图容器 */
.building-bar-chart-container {
    margin-top: 24px;
    padding: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(24, 144, 255, 0.1);
    width: 100%;
    transition: all 0.3s ease;
}

.building-bar-chart-container:hover {
    box-shadow: 0 6px 24px rgba(24, 144, 255, 0.12);
    transform: translateY(-2px);
}

#building-bar-chart {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .price-line-chart-container,
    .building-bar-chart-container {
        padding: 20px 15px;
        margin-top: 16px;
    }
    
    #price-line-chart,
    #building-bar-chart {
        width: 100%;
        height: auto;
    }
}

.price-chart-container {
    margin-top: 20px;
}

.price-bar {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.price-bar-label {
    width: 130px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex-shrink: 0;
    text-align: right;
}

.price-bar-chart {
    flex: 1;
    height: 36px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf0 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.price-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1890ff 0%, #40a9ff 50%, #69c0ff 100%);
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.price-bar-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.price-bar-value {
    width: 70px;
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    flex-shrink: 0;
}

/* 房型分布 */
.room-type-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.room-type-item {
    padding: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 10px;
    border-left: 4px solid #1890ff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.room-type-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.15);
    border-left-width: 6px;
}

.room-type-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.room-type-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
}

.room-type-count {
    color: #1890ff;
    font-weight: 700;
    font-size: 18px;
    background: linear-gradient(135deg, #1890ff, #40a9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.room-type-percent {
    font-size: 13px;
    color: #8c8c8c;
    font-weight: 500;
    padding-top: 4px;
    border-top: 1px solid #e8e8e8;
}

/* 楼层分布 */
.floor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
}

.floor-item {
    padding: 16px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e6f4ff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.floor-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(24, 144, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.floor-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(24, 144, 255, 0.2);
    border-color: #1890ff;
}

.floor-item:hover::after {
    opacity: 1;
}

.floor-item-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.floor-item-value {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #1890ff, #40a9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* 楼栋统计 */
.building-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.building-item {
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e6f4ff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.building-item::before {
    content: '🏢';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 24px;
    opacity: 0.1;
}

.building-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(24, 144, 255, 0.15);
    border-color: #1890ff;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
}

.building-item-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.building-item-count {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #1890ff, #096dd9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* 楼栋对比分析 */
.building-comparison {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.building-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.building-comparison-table th,
.building-comparison-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e8eef5;
}

.building-comparison-table th {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    font-weight: 600;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.building-comparison-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 11;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
}

.building-comparison-table td {
    background: #fff;
    color: #333;
    font-size: 14px;
    transition: all 0.2s ease;
}

.building-comparison-table td:first-child {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
    font-weight: 600;
    color: #1a1a1a;
}

.building-comparison-table tbody tr {
    transition: all 0.2s ease;
}

.building-comparison-table tbody tr:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f4ff 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.1);
}

.building-comparison-table tbody tr:hover td:first-child {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f4ff 100%);
}

.building-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.filters-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

/* 自定义多选下拉框样式 */
.custom-multiselect {
    position: relative;
    min-width: 150px;
    width: 200px;
}

.multiselect-display {
    min-height: 32px;
    padding: 6px 30px 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    max-height: 64px; /* 最多2行 */
    overflow-y: auto;
    box-sizing: border-box;
}

.multiselect-display:after {
    content: '▼';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 10px;
    pointer-events: none;
}

.multiselect-display .placeholder {
    color: #999;
    font-size: 14px;
}

.multiselect-display .selected-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 3px;
    font-size: 12px;
    color: #1890ff;
    white-space: nowrap;
}

.multiselect-display .selected-tag .remove {
    margin-left: 4px;
    cursor: pointer;
    color: #1890ff;
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
}

.multiselect-display .selected-tag .remove:hover {
    color: #0050b3;
}

.multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.multiselect-options {
    padding: 4px 0;
}

.multiselect-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.multiselect-option:hover {
    background: #f5f5f5;
}

.multiselect-option.selected {
    background: #e6f7ff;
    color: #1890ff;
}

.multiselect-option.selected:before {
    content: '✓ ';
    margin-right: 4px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 开关样式 */
.toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #1890ff;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 4px rgba(24, 144, 255, 0.5);
}

.toggle-label {
    font-size: 14px;
    color: #333;
    user-select: none;
    min-width: 60px;
    display: inline-block;
}

/* 分数筛选器置灰样式 */
.filter-group select.disabled,
.filter-group select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.filter-group select.disabled:hover {
    background-color: #f5f5f5;
}

.filter-group input[type="number"] {
    width: 100px;
}

/* 筛选器快捷预设 */
.filter-presets {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e8eef5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.preset-btn {
    padding: 12px 24px;
    border: 2px solid #e8eef5;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-width: 120px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.preset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.preset-btn:hover::before {
    left: 100%;
}

.preset-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f4ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
}

.preset-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.15);
}

.preset-btn.preset-reset {
    border-color: #ffccc7;
    color: #ff4d4f;
    background: linear-gradient(135deg, #fff1f0 0%, #ffffff 100%);
}

.preset-btn.preset-reset::before {
    background: linear-gradient(90deg, transparent, rgba(255, 77, 79, 0.1), transparent);
}

.preset-btn.preset-reset:hover {
    border-color: #ff7875;
    color: #ff4d4f;
    background: linear-gradient(135deg, #ffe7e5 0%, #fff1f0 100%);
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.2);
}

/* 按钮 */
.btn-primary,
.btn-secondary,
.btn-export {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #1890ff;
    color: #fff;
}

.btn-export {
    background-color: #52c41a;
    color: #fff;
}

.btn-primary:hover {
    background-color: #40a9ff;
}

.btn-secondary {
    background-color: #52c41a;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #73d13d;
}

/* 房源列表 */
.houses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(600px, 1fr)); /* 宽度加倍：从300px改为600px */
    gap: 20px;
    margin-bottom: 20px;
}

.house-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden; /* 防止内容溢出 */
    word-wrap: break-word; /* 允许长文本换行 */
    position: relative; /* 三期需求：为参考房型按钮定位 */
}

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

.house-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1890ff;
}

/* 八期需求：收藏功能样式 */
.house-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.house-card-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.btn-favorite {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    transition: transform 0.2s;
    flex-shrink: 0;
    min-width: 36px;
    text-align: center;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-favorite:hover {
    transform: scale(1.2);
}

.btn-favorite.favorite-active {
    animation: favoritePulse 0.3s;
}

@keyframes favoritePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.house-card-favorite {
    border: 2px solid #ff4d4f;
    background: linear-gradient(to right, #fff 0%, #fffef0 100%);
}

.modal-house-card.house-card-favorite {
    border: 2px solid #ff4d4f;
    background: linear-gradient(to right, #fff 0%, #fffef0 100%);
}

/* 三期需求：参考房型按钮 */
.btn-reference {
    padding: 6px 14px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.5;
}

/* 弹窗中的参考房型按钮使用绝对定位 */
.modal-house-card .btn-reference {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* 房源列表中的参考房型按钮不使用绝对定位 */
.house-card-actions .btn-reference {
    position: static;
}

.btn-reference:hover {
    background: #40a9ff;
}

/* 三期需求：房型图片浮窗 */
.room-type-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.room-type-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.room-type-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.room-type-modal-close:hover {
    color: #333;
}

.room-type-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

.house-info {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 改为3列以展示更多信息 */
    gap: 8px;
    font-size: 14px;
    color: #666;
    padding-right: 15px; /* 增加右侧内边距，让整个信息区域离右侧更远 */
    box-sizing: border-box; /* 确保padding包含在宽度内 */
    width: 100%; /* 确保不超出父容器 */
}

.house-info-item {
    display: flex;
    justify-content: space-between;
    gap: 20px; /* 调整间距，避免溢出 */
    padding: 4px 0; /* 增加垂直间距 */
    min-width: 0; /* 允许flex项目缩小 */
    box-sizing: border-box;
}

.house-info-label {
    color: #999;
    flex: 0 0 auto; /* 不放大，不缩小，根据内容自适应 */
    min-width: 70px; /* 减少最小宽度，避免溢出 */
    max-width: 120px; /* 限制最大宽度 */
    word-wrap: break-word; /* 允许换行 */
}

.house-info-value {
    font-weight: 500;
    color: #333;
    text-align: right; /* 右对齐 */
    flex: 1 1 auto; /* 允许放大和缩小 */
    min-width: 0; /* 允许缩小到0 */
    padding-right: 10px; /* 增加右侧内边距，让值离右侧更远 */
    word-wrap: break-word; /* 允许长文本换行 */
    overflow-wrap: break-word; /* 确保长单词也能换行 */
}

.house-score {
    margin-top: 10px;
    padding: 8px;
    background: #f0f8ff;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #1890ff;
}

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

.pagination button,
.pagination .page-btn {
    padding: 8px 12px;
    min-width: 40px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.pagination button:hover:not(:disabled),
.pagination .page-btn:hover:not(:disabled) {
    background-color: #f0f8ff;
    border-color: #1890ff;
    color: #1890ff;
}

.pagination button:disabled,
.pagination .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-btn-active {
    background-color: #1890ff;
    color: #fff;
    border-color: #1890ff;
    font-weight: bold;
}

.pagination .page-btn-active:hover {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.pagination .page-ellipsis {
    padding: 8px 4px;
    color: #999;
    user-select: none;
}

.pagination .page-info {
    padding: 8px 16px;
    color: #666;
    margin-left: 10px;
    font-size: 14px;
}

/* 期望值页面 */
.expectation-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.expectation-item {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.expectation-item label {
    min-width: 150px;
    font-size: 16px;
    color: #333;
}

.weight-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.weight-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6c757d;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: -7px; /* 居中对齐，滑块高度6px，游标高度20px，需要向上偏移(20-6)/2=7px */
}

.weight-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6c757d;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.weight-slider::-webkit-slider-runnable-track {
    background: #e0e0e0;
    height: 6px;
    border-radius: 3px;
}

.weight-slider::-moz-range-track {
    background: #e0e0e0;
    height: 6px;
    border-radius: 3px;
}

.weight-value {
    min-width: 30px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #1890ff;
}

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

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

/* 老带新活动页面样式 */
.referral-page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.referral-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    padding: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(24, 144, 255, 0.1);
}

.referral-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

.referral-main-text {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.referral-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0;
}

.referral-qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.referral-qrcode:hover {
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.2);
    transform: translateY(-2px);
}

.qrcode-image {
    max-width: 350px;
    max-height: 350px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .referral-page-content {
        padding: 20px 15px;
    }
    
    .referral-content {
        padding: 30px 20px;
        gap: 30px;
    }
    
    .referral-main-text {
        font-size: 20px;
    }
    
    .referral-subtitle {
        font-size: 16px;
    }
    
    .qrcode-image {
        max-width: 280px;
        max-height: 280px;
    }
}

.modal-filter-controls {
    margin: 15px 0;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

.filter-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
}

.filter-toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1890ff;
}

.filter-toggle-label span {
    cursor: pointer;
}

.modal-houses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); /* 增加最小宽度，减少每行卡片数量 */
    gap: 15px;
    margin-top: 20px;
    max-height: calc(80vh - 150px); /* 减去标题、开关和padding的高度 */
    overflow-y: auto;
    overflow-x: hidden; /* 防止横向滚动 */
    padding: 4px 5px 0 0; /* 顶部留出空间，防止hover时上边线被遮挡 */
}

.modal-house-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: visible; /* 改为visible，确保hover时边框不被裁剪 */
    word-wrap: break-word;
    position: relative;
    z-index: 1; /* 添加z-index，确保hover时在其他元素之上 */
}

.modal-house-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2; /* hover时提升层级 */
}

.modal-house-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1890ff;
}

.modal-house-card .house-info {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    font-size: 14px;
    color: #666;
    padding-right: 15px;
    box-sizing: border-box;
    width: 100%;
}

.modal-house-card .house-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center; /* 垂直居中对齐 */
    gap: 8px; /* 减小间距 */
    padding: 4px 0;
    min-width: 0;
    box-sizing: border-box;
    white-space: nowrap; /* 防止换行 */
}

.modal-house-card .house-info-label {
    color: #999;
    flex: 0 0 auto;
    min-width: 60px; /* 减小最小宽度 */
    max-width: 80px; /* 减小最大宽度 */
    word-wrap: break-word;
    white-space: nowrap; /* 防止换行 */
}

.modal-house-card .house-info-value {
    font-weight: 500;
    color: #333;
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0; /* 移除右侧padding */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal; /* 允许换行，完整显示内容 */
    overflow: visible; /* 允许内容溢出，完整显示 */
}

/* 景观字段特殊处理：完整显示，不截断 */
.modal-house-card .house-info-item:has(.house-info-label:contains("景观")) .house-info-value {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

/* 横屏适配 */
@media (orientation: landscape) {
    .page {
        padding: 15px;
    }
    
    .filters-container {
        padding: 15px;
    }
    
    .houses-list {
        grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); /* 宽度加倍：从280px改为560px */
    }
}

/* 七期需求：手机端适配 */
@media (max-width: 768px) {
    /* Tab导航 */
    .tab-nav {
        padding: 0 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        padding: 15px 12px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    /* 页面容器 */
    .page {
        padding: 10px;
        min-height: calc(100vh - 50px);
    }
    
    .page-header h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    /* 俯视图 */
    .map-container {
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
        border-radius: 4px;
    }
    
    .map-controls {
        top: 5px;
        right: 5px;
        gap: 5px;
    }
    
    .map-controls button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* 筛选器 */
    .filters-container {
        padding: 15px;
        gap: 12px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 6px;
    }
    
    .filter-group label {
        font-size: 13px;
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .filter-group input[type="number"] {
        width: 100%;
    }
    
    .custom-multiselect {
        width: 100%;
        min-width: auto;
    }
    
    /* 按钮 */
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
    }
    
    /* 房源列表 - 单列 */
    .houses-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .house-card {
        padding: 15px;
    }
    
    .house-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .house-card p {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .btn-reference {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 11px;
    }
    
    /* 分页 */
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 36px;
    }
    
    /* 期望值页面 */
    .expectation-container {
        padding: 20px 15px;
        max-width: 100%;
    }
    
    .expectation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .expectation-item label {
        min-width: auto;
        width: 100%;
        font-size: 14px;
    }
    
    .weight-slider {
        width: 100%;
    }
    
    .weight-value {
        min-width: 40px;
        font-size: 16px;
    }
    
    .expectation-item.full-width {
        flex-direction: column;
    }
    
    .gradient-table {
        gap: 15px;
    }
    
    .gradient-tier {
        padding: 12px;
    }
    
    .tier-header {
        font-size: 14px;
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .tier-content {
        gap: 8px;
    }
    
    .gradient-card {
        padding: 10px;
        font-size: 13px;
    }
    
    .expectation-explanation {
        padding: 15px;
        font-size: 13px;
    }
    
    .expectation-explanation h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    /* 弹窗 */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px 15px;
        max-height: 85vh;
    }
    
    .modal-close {
        right: 15px;
        top: 15px;
        font-size: 24px;
    }
    
    .modal-houses-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modal-house-card {
        padding: 12px;
        font-size: 13px;
    }
    
    .modal-house-card .house-info {
        grid-template-columns: 1fr 1fr; /* 手机端改为2列 */
        gap: 6px;
    }
    
    .modal-house-card .house-info-item {
        gap: 6px;
    }
    
    .modal-house-card .house-info-label {
        min-width: 50px;
        max-width: 60px;
        font-size: 12px;
    }
    
    .modal-house-card .house-info-value {
        font-size: 12px;
    }
    
    /* 新手引导手机端适配 */
    .guide-modal {
        width: 95%;
        max-width: 95%;
    }
    
    .guide-header {
        padding: 15px 20px;
    }
    
    .guide-header h3 {
        font-size: 18px;
    }
    
    .guide-content {
        padding: 20px;
        font-size: 14px;
    }
    
    .guide-color-item {
        margin-bottom: 10px;
    }
    
    .guide-color-dot {
        width: 20px;
        height: 20px;
    }
    
    .guide-color-item span {
        font-size: 14px;
    }
    
    .guide-actions {
        padding: 15px 20px 20px;
    }
    
    .guide-actions .btn-primary {
        width: 100%;
        padding: 12px;
    }
    
    .modal-filter-controls {
        margin: 10px 0;
        padding: 8px 0;
    }
    
    .filter-toggle-label {
        font-size: 13px;
    }
    
    /* 房型图片浮窗 */
    .room-type-modal-content {
        max-width: 95%;
        padding: 15px;
    }
    
    .room-type-image {
        max-width: 100%;
        max-height: 70vh;
    }
    
    /* 免责声明弹窗 */
    .disclaimer-modal {
        width: 95%;
        max-width: 95%;
        height: 90%;
        max-height: 90vh;
    }
    
    .disclaimer-header {
        padding: 15px 20px;
    }
    
    .disclaimer-header h2 {
        font-size: 18px;
    }
    
    .disclaimer-content-wrapper {
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .disclaimer-content h3 {
        font-size: 16px;
        margin-top: 15px;
    }
    
    .disclaimer-actions {
        padding: 12px 20px;
        flex-direction: column;
    }
    
    .disclaimer-actions button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .disclaimer-report input[type="text"],
    .disclaimer-report textarea {
        font-size: 14px;
    }
    
    /* 计算分数Loading */
    .calculating-loading-content {
        padding: 20px;
        min-width: 280px;
        max-width: 90%;
    }
    
    .calculating-text {
        font-size: 14px;
    }
    
    /* 楼层输入范围 */
    .filter-group span {
        display: none; /* 隐藏 "-" 分隔符，因为已经是垂直布局 */
    }
    
    /* 标注输入模态框 */
    .annotation-input-modal {
        min-width: 280px;
        max-width: 90%;
        padding: 15px;
    }
    
    .annotation-input-modal h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .annotation-input-modal input {
        padding: 10px;
        font-size: 14px;
    }
    
    .annotation-input-modal .btn-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .annotation-input-modal button {
        width: 100%;
        padding: 10px;
    }
    
    /* Toast提示 */
    .toast-message {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 10px 15px;
        font-size: 13px;
        transform: translateY(-100%);
    }
    
    .toast-message.show {
        transform: translateY(0);
    }
    
    /* 添加房号输入框 */
    .add-room-input {
        padding: 10px;
    }
    
    .add-room-input input {
        font-size: 14px;
        padding: 8px;
    }
    
    .add-room-input button {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* 防盗水印 */
/* 防盗水印 */
.watermark-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 不阻挡交互元素 */
    z-index: 9999; /* 确保在最上层，但不遮挡交互元素（modal等通常是10000+） */
    overflow: hidden;
    user-select: none; /* 禁止选中 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, 300px);
    grid-template-rows: repeat(auto-fill, 300px);
    gap: 0;
}

.watermark-item {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.15); /* 透明度，不刺眼但清晰可见 */
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    transform: rotate(-25deg); /* 旋转角度 */
    transform-origin: center;
    pointer-events: none; /* 不阻挡交互 */
    user-select: none; /* 禁止选中 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* 禁止右键菜单（通过CSS无法完全禁止，但可以配合JS） */
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    padding: 20px;
    box-sizing: border-box;
}

/* 新手引导：圆点颜色说明 */
.guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    animation: fadeIn 0.3s;
}

.guide-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    padding: 0;
    overflow: hidden;
    animation: slideUp 0.3s;
}

.guide-header {
    padding: 20px 30px;
    background: #f0f8ff;
    border-bottom: 1px solid #e8e8e8;
}

.guide-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1890ff;
}

.guide-content {
    padding: 25px 30px;
    font-size: 15px;
    color: #333;
    line-height: 1.8;
}

.guide-content p {
    margin: 0 0 15px 0;
}

.guide-color-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 0;
}

.guide-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.guide-color-item span {
    font-size: 15px;
    color: #333;
}

.guide-actions {
    padding: 15px 30px 25px;
    text-align: center;
    border-top: 1px solid #e8e8e8;
}

.guide-actions .btn-primary {
    padding: 10px 30px;
    font-size: 15px;
    min-width: 120px;
}

/* 加载状态 */
/* 计算分数Loading遮罩 */
.calculating-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.calculating-loading-content {
    background: white;
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 300px;
}

.calculating-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.calculating-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

.calculating-progress {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.calculating-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1890ff, #40a9ff);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.calculating-percent {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.empty-state::before {
    content: "📋";
    font-size: 48px;
    display: block;
    margin-bottom: 20px;
}

/* 新手引导 */
#new-user-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.guide-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.guide-content h3 {
    margin-bottom: 15px;
    color: #1890ff;
    font-size: 20px;
}

.guide-content p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.guide-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 期望值页面排序选择 */
.sort-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-left: 10px;
    min-width: 150px;
}

.expectation-item {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.expectation-item label {
    min-width: 200px;
    font-size: 16px;
    color: #333;
}

.expectation-item.full-width {
    flex-direction: column;
    align-items: flex-start;
}

.expectation-item.full-width label {
    min-width: auto;
    width: 100%;
    margin-bottom: 10px;
}

.expectation-explanation {
    margin-top: 40px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}

.expectation-explanation h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.expectation-explanation p {
    margin-bottom: 10px;
}

/* 五期需求：免责弹窗 */
.disclaimer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disclaimer-modal {
    background: #fff;
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    padding: 24px 24px 18px;
}

.disclaimer-header h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 12px;
}

.disclaimer-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.disclaimer-content {
    flex: 1;
    padding: 12px 12px 12px 0;
    overflow-y: auto;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.disclaimer-content h3 {
    font-size: 16px;
    margin: 12px 0 6px;
    color: #1890ff;
}

.disclaimer-content p {
    margin-bottom: 8px;
}

.disclaimer-report {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0 0;
}

.disclaimer-report h3 {
    font-size: 16px;
    margin-bottom: 4px;
    color: #1890ff;
}

.disclaimer-report-tip {
    font-size: 13px;
    color: #888;
}

.disclaimer-report-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.disclaimer-report-field label {
    font-size: 13px;
    color: #555;
}

.disclaimer-report-field input,
.disclaimer-report-field textarea {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.disclaimer-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.disclaimer-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.disclaimer-agree-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.disclaimer-wait {
    font-size: 12px;
    color: #999;
}

/* 排序滑块容器 */
.sort-sliders-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-top: 10px;
}

.sort-slider-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: move;
    user-select: none;
    transition: all 0.3s;
    position: relative;
}

.sort-slider-item:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.sort-slider-item.dragging {
    opacity: 0.5;
    border-color: #1890ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

.sort-slider-item .sort-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.sort-slider-item .sort-score {
    font-size: 12px;
    color: #1890ff;
    font-weight: bold;
    min-width: 40px;
    text-align: right;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Toast提示样式 */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 5000;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    font-size: 14px;
    color: #333;
    border-left: 4px solid #52c41a;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(0);
}

/* 梯度表样式 */
.gradient-table {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.gradient-tier {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tier-header {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    text-align: center;
}

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

.gradient-tier:nth-child(3) .tier-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.tier-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 50px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 2px dashed #e0e0e0;
}

.gradient-card {
    background: #f0f0f0;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: grab;
    user-select: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    border: 2px solid transparent;
    position: relative;
}

.gradient-card:hover {
    background: #e0e0e0;
    border-color: #1890ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.gradient-card.dragging {
    opacity: 0.5;
    border-color: #1890ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
    cursor: grabbing;
}

.card-label {
    font-weight: 500;
}

.card-remove {
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}

.card-remove:hover {
    background: #ff7875;
    transform: scale(1.1);
}

.add-room-input {
    width: 100%;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px dashed #d9d9d9;
}

