 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     -webkit-touch-callout: none;
     -webkit-user-select: none;
     -moz-user-select: none;
     -ms-user-select: none;
     user-select: none;
 }

 body {
     font-family: 'Microsoft YaHei', Arial, sans-serif;
     background: white;
     height: 100vh;
     display: flex;
     flex-direction: column;
     overflow: hidden;
 }

 .header {
     background: linear-gradient(135deg, #2c80ff 0%, #1565c0 100%);
     color: white;
     padding: 15px 20px;
     text-align: center;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
     position: relative;
     z-index: 10;
 }

 .header h1 {
     font-size: 20px;
     margin-bottom: 5px;
     font-weight: 600;
 }

 .header .subtitle {
     font-size: 12px;
     opacity: 0.9;
 }

 .main-container {
     flex: 1;
     display: flex;
     flex-direction: column;
     overflow: hidden;
 }

 .content-section {
     flex: 1;
     overflow-y: auto;
     -webkit-overflow-scrolling: touch;
     padding: 15px;
     background: #f8f9fa;
 }

 .compass-overlay {
     position: absolute;
     top: 15px;
     left: 15px;
     width: 50px;
     height: 50px;
     background: rgba(255, 255, 255, 0.95);
     border: 2px solid #2c80ff;
     border-radius: 50%;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     z-index: 1000;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
     pointer-events: none;
     font-family: 'Microsoft YaHei', Arial, sans-serif;
     transition: transform 0.1s ease;
 }

 .compass-direction {
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     position: relative;
     width: 100%;
     height: 100%;
 }

 .compass-arrow {
     width: 0;
     height: 0;
     border-left: 10px solid transparent;
     border-right: 10px solid transparent;
     border-bottom: 18px solid #2c80ff;
     margin-bottom: 5px;
 }

 .compass-text {
     color: #333;
     font-size: 14px;
     font-weight: bold;
     line-height: 1;
 }

 .gray-top-section {
     height: 50vh;
     min-height: 200px;
     background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 100%);
     position: relative;
     z-index: 5;
     margin-bottom: 20px;
     border-radius: 12px;
     overflow: hidden;
 }

 .gray-placeholder {
     width: 100%;
     height: 100%;
     display: flex;
     align-items: center;
     justify-content: center;
     color: #666;
     font-size: 16px;
     font-weight: bold;
 }

 .building-selection {
     margin-bottom: 20px;
     background: white;
     border-radius: 12px;
     padding: 15px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
 }

 .building-selection h2 {
     font-size: 16px;
     color: #333;
     margin-bottom: 15px;
     padding-bottom: 10px;
     border-bottom: 2px solid #2c80ff;
 }

 .buildings-grid {
     display: flex;
     flex-direction: column;
     gap: 10px;
 }

 .buildings-row {
     display: flex;
     gap: 10px;
     overflow-x: auto;
     padding-bottom: 5px;
     -webkit-overflow-scrolling: touch;
     white-space: nowrap;
     flex-wrap: nowrap;
 }

 .building-badge {
     flex-shrink: 0;
     background: #e3f2fd;
     padding: 12px 20px;
     border-radius: 25px;
     font-size: 14px;
     color: #1565c0;
     cursor: pointer;
     transition: all 0.3s ease;
     min-width: 80px;
     text-align: center;
     white-space: nowrap;
 }

 .building-badge:hover {
     background: #bbdefb;
 }

 .building-badge.selected {
     background: #2c80ff;
     color: white;
     box-shadow: 0 4px 12px rgba(44, 128, 255, 0.3);
 }

 .building-info {
     background: white;
     border-radius: 12px;
     margin-bottom: 20px;
     padding: 20px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
 }

 .building-info h2 {
     font-size: 18px;
     color: #333;
     margin-bottom: 15px;
     display: flex;
     align-items: center;
     justify-content: space-between;
 }

 .building-stats {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     gap: 15px;
     margin-bottom: 20px;
 }

 .stat-item {
     text-align: center;
 }

 .stat-value {
     font-size: 20px;
     font-weight: bold;
     color: #2c80ff;
     margin-bottom: 5px;
 }

 .stat-label {
     font-size: 12px;
     color: #666;
 }

 .floor-list {}

 .floor-item {
     background: white;
     border: 2px solid #e0e0e0;
     border-radius: 10px;
     margin-bottom: 15px;
     overflow: hidden;
     cursor: pointer;
     transition: all 0.3s ease;
 }

 .floor-item:hover {
     border-color: #2c80ff;
     box-shadow: 0 4px 12px rgba(44, 128, 255, 0.15);
 }

 .floor-item.selected {
     border-color: #2c80ff;
     background: #f0f7ff;
 }

 .floor-header {
     padding: 15px;
     display: flex;
     justify-content: space-between;
     align-items: center;
     background: #f8f9fa;
     border-bottom: 1px solid #e0e0e0;
 }

 .floor-title {
     font-weight: bold;
     color: #333;
     font-size: 15px;
 }

 .floor-type {
     font-size: 12px;
     color: #666;
     background: #f0f0f0;
     padding: 3px 8px;
     border-radius: 12px;
     margin-left: 10px;
 }

 .floor-toggle {
     font-size: 12px;
     color: #666;
     transition: transform 0.3s ease;
 }

 .floor-content {
     display: none;
     padding: 20px;
     background: #fafafa;
 }

 .floor-desc {
     font-size: 13px;
     color: #666;
     margin-bottom: 15px;
     padding-bottom: 15px;
     border-bottom: 1px dashed #e0e0e0;
     line-height: 1.6;
 }

 .rooms-list {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
     gap: 12px;
 }

 .room-card {
     background: white;
     border: 1px solid #e0e0e0;
     border-radius: 8px;
     padding: 12px;
     cursor: pointer;
     transition: all 0.3s ease;
 }

 .room-card:hover {
     border-color: #2c80ff;
     box-shadow: 0 3px 8px rgba(44, 128, 255, 0.2);
     transform: translateY(-2px);
 }

 .room-card.selected {
     border-color: #ff4081;
     background: #fff0f5;
 }

 .room-name {
     font-weight: bold;
     color: #333;
     margin-bottom: 5px;
     font-size: 14px;
 }

 .room-details {
     font-size: 11px;
     color: #666;
     line-height: 1.5;
     margin-bottom: 3px;
 }

 .room-price {
     color: #d32f2f;
     font-weight: bold;
     font-size: 12px;
     margin-top: 5px;
 }

 .legend {
     background: white;
     border-radius: 12px;
     padding: 20px;
     margin-bottom: 20px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
 }

 .legend h4 {
     font-size: 16px;
     color: #333;
     margin-bottom: 15px;
     padding-bottom: 10px;
     border-bottom: 2px solid #2c80ff;
 }

 .legend-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
     gap: 12px;
 }

 .legend-item {
     display: flex;
     align-items: center;
     font-size: 12px;
     color: #666;
     padding: 6px 0;
 }

 .legend-color {
     width: 14px;
     height: 14px;
     border-radius: 3px;
     margin-right: 10px;
     flex-shrink: 0;
 }

 .legend-color.sold {
     background-color: #4caf50;
 }

 .legend-color.for-sale {
     background-color: #ff9800;
 }

 .legend-color.selected {
     background-color: #2c80ff;
 }

 .legend-color.room-selected {
     background-color: #ff4081;
 }

 .legend-color.shop {
     background-color: #ff9800;
 }

 .legend-color.entertainment {
     background-color: #9c27b0;
 }

 .legend-color.gym {
     background-color: #4caf50;
 }

 .legend-color.restaurant {
     background-color: #f44336;
 }

 .legend-color.hotel {
     background-color: #2196f3;
 }

 .legend-color.loft {
     background-color: #00bcd4;
 }

 .legend-color.residence {
     background-color: #8bc34a;
 }

 .legend-color.other {
     background-color: #cccccc;
 }

 .legend-color.underground {
     background-color: #795548;
 }

 .legend-color.floor-selected {
     background-color: #FF9800;
 }

 .bottom-menu {
     position: fixed;
     bottom: 0;
     left: 0;
     right: 0;
     height: 60px;
     background: white;
     display: flex;
     justify-content: space-around;
     align-items: center;
     border-top: 1px solid #e0e0e0;
     z-index: 100;
     box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
 }

 .menu-button {
     flex: 1;
     height: 100%;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 14px;
     color: #333;
     cursor: pointer;
     transition: all 0.3s ease;
     border-right: 1px solid #f0f0f0;
 }

 .menu-button:last-child {
     border-right: none;
 }

 .menu-button:hover {
     background-color: #f5f5f5;
 }

 .menu-button.active {
     background-color: #2c80ff;
     color: white;
 }

 .back-to-top {
     position: fixed;
     bottom: 70px;
     right: 15px;
     width: 45px;
     height: 45px;
     background: #2c80ff;
     color: white;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     box-shadow: 0 4px 12px rgba(44, 128, 255, 0.3);
     z-index: 99;
     transition: all 0.3s ease;
 }

 .back-to-top:hover {
     transform: translateY(-3px);
     box-shadow: 0 6px 15px rgba(44, 128, 255, 0.4);
 }

 .content-spacer {
     height: 70px;
 }

 .floor-selected-indicator {
     display: inline-block;
     width: 12px;
     height: 12px;
     background-color: #FF9800;
     border-radius: 50%;
     margin-right: 8px;
     animation: pulse 1.5s infinite;
 }

 @keyframes pulse {
     0% {
         transform: scale(0.8);
         opacity: 0.7;
     }

     50% {
         transform: scale(1.1);
         opacity: 1;
     }

     100% {
         transform: scale(0.8);
         opacity: 0.7;
     }
 }

 /* 楼层平面图模态框 */
 .floor-plan-modal {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: rgba(0, 0, 0, 0.8);
     z-index: 10000;
     justify-content: center;
     align-items: center;
 }

 .floor-plan-modal.active {
     display: flex;
 }

 .floor-plan-container {
     background: white;
     border-radius: 12px;
     width: 90%;
     height: 85%;
     max-width: 1200px;
     max-height: 800px;
     display: flex;
     flex-direction: column;
     overflow: hidden;
     position: relative;
 }

 .floor-plan-header {
     background: linear-gradient(135deg, #2c80ff 0%, #1565c0 100%);
     color: white;
     padding: 15px 20px;
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .floor-plan-header h3 {
     font-size: 18px;
     margin: 0;
 }

 .floor-plan-close {
     background: rgba(255, 255, 255, 0.2);
     border: none;
     color: white;
     font-size: 24px;
     width: 36px;
     height: 36px;
     border-radius: 50%;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.3s ease;
 }

 .floor-plan-close:hover {
     background: rgba(255, 255, 255, 0.3);
 }

 .floor-plan-content {
     flex: 1;
     position: relative;
     overflow: hidden;
     background: #f5f5f5;
 }

 .floor-plan-canvas {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     cursor: grab;
     touch-action: none; /* 完全禁用浏览器默认触摸行为 */
 }

 .floor-plan-canvas:active {
     cursor: grabbing;
 }

 .floor-plan-controls {
     position: absolute;
     bottom: 20px;
     right: 20px;
     display: flex;
     flex-direction: column;
     gap: 10px;
 }

 .floor-plan-button {
     width: 40px;
     height: 40px;
     background: white;
     border: 2px solid #2c80ff;
     border-radius: 50%;
     color: #2c80ff;
     font-size: 20px;
     font-weight: bold;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.3s ease;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
 }

 .floor-plan-button:hover {
     background: #2c80ff;
     color: white;
 }

 .shop-info-popup {
     position: absolute;
     background: white;
     border-radius: 8px;
     padding: 15px;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
     min-width: 200px;
     max-width: 250px;
     z-index: 10001;
     display: none;
     pointer-events: none; /* 防止遮挡点击 */
 }

 .shop-info-popup.active {
     display: block;
 }

 .shop-info-popup h4 {
     margin: 0 0 10px 0;
     color: #2c80ff;
     font-size: 16px;
 }

 .shop-info-popup p {
     margin: 5px 0;
     font-size: 13px;
     color: #666;
 }

 /* 平面图确认弹窗样式 */
 .floor-plan-confirm-modal {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: rgba(0, 0, 0, 0.5);
     z-index: 10001;
     justify-content: center;
     align-items: center;
     animation: fadeIn 0.3s ease;
 }

 .floor-plan-confirm-modal.active {
     display: flex;
 }

 @keyframes fadeIn {
     from {
         opacity: 0;
     }

     to {
         opacity: 1;
     }
 }

 .floor-plan-confirm-container {
     background: white;
     border-radius: 16px;
     width: 90%;
     max-width: 400px;
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
     overflow: hidden;
     animation: slideUp 0.4s ease;
 }

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

     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 .floor-plan-confirm-header {
     background: linear-gradient(135deg, #2c80ff 0%, #1565c0 100%);
     color: white;
     padding: 20px;
     text-align: center;
 }

 .floor-plan-confirm-header h3 {
     font-size: 18px;
     margin: 0;
     font-weight: 600;
 }

 .floor-plan-confirm-content {
     padding: 25px 20px;
     text-align: center;
 }

 .floor-plan-confirm-icon {
     font-size: 48px;
     color: #2c80ff;
     margin-bottom: 15px;
     animation: pulse 2s infinite;
 }

 .floor-plan-confirm-text {
     font-size: 16px;
     color: #333;
     line-height: 1.5;
     margin-bottom: 5px;
 }

 .floor-plan-confirm-subtext {
     font-size: 14px;
     color: #666;
     margin-bottom: 25px;
 }

 .floor-plan-confirm-buttons {
     display: flex;
     gap: 12px;
     justify-content: center;
 }

 .floor-plan-confirm-btn {
     padding: 12px 28px;
     border-radius: 25px;
     font-size: 15px;
     font-weight: 500;
     cursor: pointer;
     border: none;
     transition: all 0.3s ease;
     min-width: 100px;
 }

 .floor-plan-confirm-btn.primary {
     background: #2c80ff;
     color: white;
     box-shadow: 0 4px 12px rgba(44, 128, 255, 0.3);
 }

 .floor-plan-confirm-btn.primary:hover {
     background: #1565c0;
     transform: translateY(-2px);
     box-shadow: 0 6px 16px rgba(44, 128, 255, 0.4);
 }

 .floor-plan-confirm-btn.secondary {
     background: #f5f5f5;
     color: #666;
     border: 1px solid #e0e0e0;
 }

 .floor-plan-confirm-btn.secondary:hover {
     background: #e0e0e0;
     transform: translateY(-2px);
 }

 /* 楼层平面图模态框改进 */
 .floor-plan-modal .floor-plan-container {
     width: 95%;
     height: 90%;
     max-width: 1400px;
     max-height: 900px;
 }

 .floor-plan-modal .floor-plan-content {
     display: flex;
     justify-content: center;
     align-items: center;
     overflow: hidden;
     position: relative;
 }

 .floor-plan-modal .floor-plan-canvas {
     cursor: grab;
     touch-action: none;
 }

 .floor-plan-modal .floor-plan-canvas:active {
     cursor: grabbing;
 }

 .floor-plan-modal .floor-plan-controls {
     position: absolute;
     bottom: 20px;
     right: 20px;
     display: flex;
     flex-direction: column;
     gap: 10px;
     background: rgba(255, 255, 255, 0.9);
     padding: 10px;
     border-radius: 20px;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
 }

 .floor-plan-zoom-info {
     position: absolute;
     top: 20px;
     right: 20px;
     background: rgba(255, 255, 255, 0.9);
     padding: 8px 15px;
     border-radius: 15px;
     font-size: 13px;
     color: #666;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
 }

 /* 鼠标滚轮提示 */
 .wheel-hint {
     position: absolute;
     bottom: 10px;
     left: 50%;
     transform: translateX(-50%);
     background: rgba(0, 0, 0, 0.7);
     color: white;
     padding: 8px 15px;
     border-radius: 15px;
     font-size: 12px;
     animation: fadeInOut 3s ease-in-out;
     white-space: nowrap;
 }

 @keyframes fadeInOut {

     0%,
     100% {
         opacity: 0;
     }

     10%,
     90% {
         opacity: 1;
     }
 }

 /* 移动端优化 */
 @media (max-width: 768px) {
     .building-stats {
         grid-template-columns: repeat(2, 1fr);
     }

     .rooms-list {
         grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
     }

     .legend-grid {
         grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
     }

     .header {
         padding: 12px 15px;
     }

     .header h1 {
         font-size: 18px;
     }

     .content-section {
         padding: 12px;
     }

     .gray-top-section {
         height: 40vh;
         min-height: 180px;
     }

     .floor-plan-modal .floor-plan-container {
         width: 95%;
         height: 90%;
     }

     .floor-plan-confirm-container {
         width: 85%;
     }

     .floor-plan-confirm-buttons {
         flex-direction: column;
     }

     .floor-plan-confirm-btn {
         width: 100%;
     }

     .floor-plan-modal .floor-plan-container {
         width: 98%;
         height: 95%;
     }

     .floor-plan-modal .floor-plan-controls {
         bottom: 15px;
         right: 15px;
         padding: 8px;
     }

     .floor-plan-zoom-info {
         top: 15px;
         right: 15px;
         font-size: 12px;
     }
 }

 @media (max-width: 480px) {
     .rooms-list {
         grid-template-columns: 1fr;
     }

     .building-stats {
         grid-template-columns: 1fr;
     }

     .buildings-row {
         flex-wrap: wrap;
     }

     .building-badge {
         flex: 0 0 auto;
         min-width: 65px;
         padding: 10px 12px;
         font-size: 13px;
     }

     .gray-top-section {
         height: 45vh;
         min-height: 150px;
     }
 }

 ::-webkit-scrollbar {
     width: 6px;
     height: 6px;
 }

 ::-webkit-scrollbar-track {
     background: #f1f1f1;
     border-radius: 3px;
 }

 ::-webkit-scrollbar-thumb {
     background: #c1c1c1;
     border-radius: 3px;
 }

 ::-webkit-scrollbar-thumb:hover {
     background: #a8a8a8;
 }

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

 .no-data {
     text-align: center;
     padding: 40px;
     color: #999;
     font-size: 14px;
 }

 .status-tag {
     display: inline-block;
     padding: 2px 8px;
     border-radius: 10px;
     font-size: 10px;
     margin-left: 5px;
 }

 .status-available {
     background: #e8f5e9;
     color: #2e7d32;
 }

 .status-sold {
     background: #ffebee;
     color: #c62828;
 }

 .status-reserved {
     background: #fff3e0;
     color: #ef6c00;
 }

 .floor-highlight {
     position: relative;
     animation: highlightPulse 2s ease-in-out;
 }

 @keyframes highlightPulse {
     0% {
         background: #f0f7ff;
     }

     50% {
         background: #e3f2fd;
     }

     100% {
         background: #f0f7ff;
     }
 }

 /* 分享遮罩层样式 */
 .share-overlay {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: rgba(0, 0, 0, 0.85);
     z-index: 20000;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     animation: fadeIn 0.3s ease;
 }

 .share-overlay.active {
     display: flex;
 }

 .share-content {
     background: white;
     border-radius: 20px;
     padding: 30px;
     max-width: 80%;
     text-align: center;
     position: relative;
     animation: slideUp 0.4s ease;
     margin-top: 80px;
     /* 给箭头留出空间 */
 }

 .share-title {
     font-size: 20px;
     color: #2c80ff;
     margin-bottom: 15px;
     font-weight: bold;
 }

 .share-tip {
     font-size: 16px;
     color: #666;
     margin-bottom: 20px;
 }

 .share-arrow {
     position: fixed;
     top: 15px;
     right: 15px;
     font-size: 50px;
     color: #2c80ff;
     animation: arrowPoint 1.5s infinite;
     z-index: 20001;
     text-shadow: 0 2px 10px rgba(44, 128, 255, 0.5);
 }

 @keyframes arrowPoint {

     0%,
     100% {
         transform: translate(0, 0);
     }

     50% {
         transform: translate(5px, -5px);
     }
 }

 .share-close {
     margin-top: 20px;
     padding: 10px 25px;
     background: #2c80ff;
     color: white;
     border: none;
     border-radius: 25px;
     font-size: 16px;
     cursor: pointer;
     transition: all 0.3s ease;
 }

 .share-close:hover {
     background: #1565c0;
     transform: scale(1.05);
 }

 /* 为道路添加轻微的阴影效果，使其看起来是在草坪上方的 */
 .road-shadow {
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
 }

 /* 为草坪添加渐变效果，使其与道路衔接更自然 */
 .lawn-gradient {
     background: linear-gradient(to top, #4CAF50, #66BB6A);
 }