* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    overflow: hidden;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: #0a0a1a;
}

#canvas-container {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

/* 加载动画 */
#loading {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0a0a1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.6s;
}

#loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 60px; height: 60px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid #4fc3f7;
    border-right: 3px solid #4fc3f7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

#loading p {
    margin-top: 24px;
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 2px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 信息面板 */
#info-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    background: rgba(10,10,30,0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(79,195,247,0.3);
    border-radius: 8px;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-width: 160px;
}

.info-label {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    letter-spacing: 1px;
}

.info-value {
    font-size: 20px;
    font-weight: bold;
    color: #4fc3f7;
    font-variant-numeric: tabular-nums;
}

.info-value.online { color: #69f0ae; }

/* 图例 */
#legend {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    background: rgba(10,10,30,0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-shortcuts {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    color: rgba(255,255,255,0.35);
}

/* 左侧公司信息面板 */
#company-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10;
    background: linear-gradient(135deg, rgba(10,10,36,0.92), rgba(20,20,56,0.88));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,107,53,0.25);
    border-left: 3px solid #ff6b35;
    border-radius: 0 10px 10px 0;
    padding: 20px 22px 18px;
    max-width: 300px;
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.company-logo {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.company-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.project-name {
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff8c42, #ffc107);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 1.5px;
}

.project-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 10px;
}

/* 小区选择器 */
#community-selector {
    position: fixed;
    top: 260px;
    left: 20px;
    z-index: 10;
    background: linear-gradient(135deg, rgba(10,10,36,0.92), rgba(20,20,56,0.88));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 14px 16px 10px;
    width: 260px;
    animation: slideInLeft 1s ease-out;
}

.selector-title {
    font-size: 11px;
    font-weight: 600;
    color: #4fc3f7;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(79,195,247,0.12);
}

.community-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.community-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.03);
}

.community-option:hover {
    background: rgba(79,195,247,0.15);
    border-color: rgba(79,195,247,0.3);
    transform: translateX(4px);
}

.community-option.active {
    background: rgba(255,107,53,0.2);
    border-color: rgba(255,107,53,0.5);
    box-shadow: 0 0 15px rgba(255,107,53,0.15);
}

.community-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.community-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.community-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.community-tag {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
}

.community-option.active .community-name {
    color: #ffb74d;
}

.community-option.active .community-tag {
    color: rgba(255,183,77,0.6);
}

/* 右侧底部联系方式面板 */
#contact-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    background: linear-gradient(135deg, rgba(10,10,36,0.9), rgba(20,20,56,0.85));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(79,195,247,0.2);
    border-radius: 10px;
    padding: 14px 18px 12px;
    min-width: 220px;
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.contact-title {
    font-size: 12px;
    font-weight: 600;
    color: #4fc3f7;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(79,195,247,0.15);
}

.contact-item-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
}

.contact-icon {
    font-size: 13px;
    flex-shrink: 0;
}

.contact-text {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

a.contact-text:hover {
    color: #4fc3f7;
}

/* 右侧面板不遮挡左侧面板 */
@media (max-width: 700px) {
    #company-panel {
        max-width: 230px;
        padding: 12px 14px 10px;
    }
    .project-name { font-size: 15px; }
    .company-name { font-size: 12px; }
    #company-panel .project-desc { font-size: 10px; }
    #community-selector {
        width: 230px;
        top: 240px;
        left: 10px;
        padding: 10px 12px 8px;
    }
    .community-name { font-size: 12px; }
    .community-tag { font-size: 9px; }
    .community-option { padding: 8px 10px; }
    .community-icon { font-size: 18px; }
    #contact-panel {
        min-width: auto;
        padding: 10px 14px;
        bottom: 10px;
        right: 10px;
    }
}

/* dat.GUI 样式覆盖 */
.dg.ac {
    z-index: 20 !important;
}
