/* 清道夫保洁考核 - 实时大屏展示样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

.display-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 容器 */
.display-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 15px 30px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部标题 */
.display-header {
    text-align: center;
    padding: 15px 20px 20px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    border-radius: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
    position: relative;
}

.display-header h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 4px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-filter {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.header-filter select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

.header-filter select option {
    background: #1a1a2e;
    color: white;
}

.header-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 16px;
    opacity: 0.8;
}

.current-time {
    font-family: "Consolas", monospace;
    letter-spacing: 2px;
}

.update-info {
    color: #4CAF50;
}

/* 统计区域 */
.stats-section {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.stat-box {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.stat-box.green { border-color: rgba(76, 175, 80, 0.5); }
.stat-box.yellow { border-color: rgba(255, 152, 0, 0.5); }
.stat-box.red { border-color: rgba(244, 67, 54, 0.5); }
.stat-box.blue { border-color: rgba(33, 150, 243, 0.5); }
.stat-box.purple { border-color: rgba(156, 39, 176, 0.5); }
.stat-box.orange { border-color: rgba(255, 87, 34, 0.5); }

.stat-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-num {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.stat-box.green .stat-num { color: #4CAF50; }
.stat-box.yellow .stat-num { color: #FF9800; }
.stat-box.red .stat-num { color: #F44336; }
.stat-box.blue .stat-num { color: #2196F3; }
.stat-box.purple .stat-num { color: #9C27B0; }
.stat-box.orange .stat-num { color: #FF5722; }

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

/* 楼宇剖面图 */
.building-section {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.building-section h2 {
    font-size: 20px;
    opacity: 0.9;
    margin: 0;
}

.pause-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.pause-btn:hover {
    background: rgba(255,255,255,0.2);
}

.pause-btn.paused {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

/* 横向滚动容器 */
.buildings-wrapper {
    flex: 1;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-behavior: auto;
    min-height: 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.buildings-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* 楼栋容器 - 横向排列 */
.buildings-container {
    display: flex;
    flex-direction: row;
    gap: 30px;
    padding-bottom: 10px;
    min-width: max-content;
    will-change: transform;
}

.building-wrapper {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 280px);
}

.building-content {
    display: flex;
    flex-direction: row;
    gap: 15px;
    flex: 1;
    overflow-y: auto;
}

.building-title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.5), rgba(33, 150, 243, 0.2));
    border-radius: 8px;
    color: white;
}

.empty-building {
    text-align: center;
    padding: 30px;
    color: rgba(255,255,255,0.5);
}

.unit-plan {
    min-width: 200px;
    max-width: 260px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.unit-title {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    padding: 6px;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.4), rgba(76, 175, 80, 0.1));
    border-radius: 6px;
    color: white;
    flex-shrink: 0;
}

/* 楼栋结构 */
.building-structure {
    display: flex;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

/* 电梯列 */
.elevator-column {
    width: 60px;
    background: rgba(255,255,255,0.05);
    border-right: 2px solid rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px;
    flex-shrink: 0;
}

.elevator-column-title {
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 6px;
    padding: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    width: 100%;
    text-align: center;
    flex-shrink: 0;
}

.elevator-cell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    min-height: 35px;
}

.elevator-cell:last-child {
    border-bottom: none;
}

.elevator-box {
    width: 50px;
    height: 30px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.2s;
}

.elevator-box:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* 楼层区域 */
.floors-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 单层行 */
.floor-row {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    min-height: 42px;
    flex-shrink: 0;
}

.floor-row:last-child {
    border-bottom: none;
}

/* 楼层号 */
.floor-number {
    width: 40px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border-right: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

/* 该层的卫生区 */
.floor-zones {
    flex: 1;
    display: flex;
    padding: 5px;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

/* 卫生区单元格 */
.zone-cell {
    flex: 1;
    min-width: 60px;
    max-width: 100px;
    height: 32px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    font-size: 10px;
    padding: 2px;
}

.zone-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 状态颜色 */
.zone-cell.status-good {
    background: linear-gradient(135deg, #81C784, #4CAF50);
    border-color: #4CAF50;
    color: #1B5E20;
}

.zone-cell.status-warning {
    background: linear-gradient(135deg, #FFB74D, #FF9800);
    border-color: #FF9800;
    color: #E65100;
}

.zone-cell.status-problem {
    background: linear-gradient(135deg, #E57373, #F44336);
    border-color: #F44336;
    color: #B71C1C;
    animation: pulse-red 2s infinite;
}

.zone-cell.status-unknown {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.5);
}

.elevator-box.status-good {
    background: linear-gradient(135deg, #81C784, #4CAF50);
    border-color: #4CAF50;
    color: #1B5E20;
}

.elevator-box.status-warning {
    background: linear-gradient(135deg, #FFB74D, #FF9800);
    border-color: #FF9800;
    color: #E65100;
}

.elevator-box.status-problem {
    background: linear-gradient(135deg, #E57373, #F44336);
    border-color: #F44336;
    color: #B71C1C;
}

.elevator-box.status-unknown {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.5);
}

.zone-name {
    font-weight: 600;
    font-size: 10px;
    margin-bottom: 1px;
    text-align: center;
    line-height: 1.1;
}

.zone-status-text {
    font-size: 9px;
    opacity: 0.9;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 底部信息栏 */
.display-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-top: 15px;
    flex-shrink: 0;
}

.legend {
    display: flex;
    gap: 30px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.dot.green {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
}

.dot.yellow {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.dot.red {
    background: linear-gradient(135deg, #F44336, #D32F2F);
}

.footer-text {
    font-size: 14px;
    opacity: 0.7;
}

/* 响应式 */
@media (max-width: 1200px) {
    .stats-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .display-header h1 {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-box {
        padding: 20px 15px;
    }
    
    .stat-num {
        font-size: 32px;
    }
    
    .building-grid {
        flex-direction: column;
    }
    
    .display-footer {
        flex-direction: column;
        gap: 15px;
    }
}

/* 动画效果 */
@keyframes glow-green {
    0%, 100% { box-shadow: 0 0 10px rgba(76, 175, 80, 0.5); }
    50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8); }
}

@keyframes glow-yellow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 152, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 152, 0, 0.8); }
}

@keyframes glow-red {
    0%, 100% { box-shadow: 0 0 10px rgba(244, 67, 54, 0.5); }
    50% { box-shadow: 0 0 25px rgba(244, 67, 54, 1); }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* 提示框 */
[title] {
    position: relative;
}

/* 全屏按钮 */
.fullscreen-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    z-index: 100;
}

.fullscreen-btn:hover {
    background: rgba(255,255,255,0.2);
}
