* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 全局变量 */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --maintenance-color: #6366f1;
    --bg-color: #f8fafc;
    --card-bg: #8dd7e9;
    --header-bg: #8077f7;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #7fa8dd;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 背景颜色 */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: linear-gradient(135deg, #a3a4f0 0%, #8f47ca 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: var(--header-bg);
    border-radius: 16px;
    padding: 30px 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

/* 主内容区域布局 */
main {
    display: flex;
    gap: 24px;
    min-height: calc(100vh - 160px);
}

.main-content {
    flex: 1;
    min-width: 0;
}

.chart-sidebar {
    width: 400px;
    min-width: 350px;
}

/* 图表卡片样式 */
.chart-card {
    background: rgba(0, 20, 40, 0.95);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), 0 0 40px rgba(0, 255, 255, 0.1);
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    animation: borderGlow 4s infinite alternate;
}
/* 图表标题样式 */
.chart-title {
    font-size: 24px;
    font-weight: 700;
    color: #00ffff;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8), 0 0 20px rgba(0, 255, 255, 0.6), 0 0 30px rgba(0, 255, 255, 0.4);
    letter-spacing: 1px;
    animation: neonFlicker 3s infinite alternate;
}
/* 图表容器样式 */
.chart-container {
    flex: 1;
    min-height: 200px;
    margin-bottom: 20px;
    position: relative;
    background: rgba(0, 10, 20, 0.8);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.1);
}
/* 图表信息样式 */
.chart-info {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: rgba(0, 50, 100, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}
/* 图表信息项样式 */
.info-item {
    text-align: center;
}
/* 图表信息项标签样式 */
.info-label {
    display: block;
    font-size: 14px;
    color: #00ffff;
    margin-bottom: 4px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.6);
}
/* 图表信息项值样式 */
.info-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    animation: numberChange 2s ease-in-out;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    main {
        flex-direction: column;
    }
    /* 图表侧边栏样式 */
    .chart-sidebar {
        width: 100%;
        min-width: auto;
    }
    /* 图表容器样式 */
    .chart-container {
        min-height: 400px;
    }
}
/* 标题内容样式 */
.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

header .icon {
    font-size: 36px;
}

button {
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    border: 2px solid #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.6);
}

.btn-primary:hover {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(100, 116, 139, 0.2);
    color: #64748b;
    border: 2px solid #64748b;
    box-shadow: 0 0 10px rgba(100, 116, 139, 0.2);
    font-family: 'Courier New', monospace;
}

.btn-secondary:hover {
    background: rgba(100, 116, 139, 0.3);
    box-shadow: 0 0 20px rgba(100, 116, 139, 0.4);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 2px solid #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(239, 68, 68, 0.6);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
    transform: translateY(-2px);
}

.btn-icon-only {
    background: transparent;
    padding: 8px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-only:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.btn-icon-only.btn-danger:hover {
    background: #fee2e2;
    color: var(--danger-color);
}

/* 分组列表样式 */
.groups-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.group-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.group-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.group-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.group-card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: background 0.3s ease;
    gap: 12px;
}

.group-card-info:hover {
    background: var(--bg-color);
}

.group-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.group-icon {
    font-size: 24px;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 移除.group-icon-wrapper的position: relative，让警告图标相对于外层容器定位 */
/* .group-icon-wrapper {
    position: relative;
} */

/* 警告图标 */
.warning-icon {
    position: absolute;
    top: -28px;
    right: -40px;
    font-size: 24px;
    color: #ef4444;
    animation: pulse 1.5s infinite;
    z-index: 100;
}
/* 警告图标动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* 霓虹灯闪烁效果 */
@keyframes neonFlicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(0, 255, 255, 0.8), 0 0 20px rgba(0, 255, 255, 0.6), 0 0 30px rgba(0, 255, 255, 0.4);
    }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
        opacity: 0.8;
        text-shadow: 0 0 5px rgba(0, 255, 255, 0.5), 0 0 10px rgba(0, 255, 255, 0.3);
    }
}

/* 边框流光效果 */
@keyframes borderGlow {
    0% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), 0 0 40px rgba(0, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.6), 0 0 60px rgba(0, 255, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), 0 0 40px rgba(0, 255, 255, 0.1);
    }
}

/* 数据加载动画 */
@keyframes dataLoad {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 数字变化动画 */
@keyframes numberChange {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 渐变背景动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
/* 图标和警告图标容器 */
.icon-with-warning {
    position: relative;
    display: inline-block;
    /* 确保容器不会被group-card-info的flex布局限制 */
    z-index: 1;
}

/* 移除group-icon-wrapper的overflow: hidden，让警告图标可以显示在外面 */
.group-icon-wrapper {
    overflow: visible !important;
}

/* 分组详情样式 */
.group-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
/* 分组名称样式 */
.group-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.4;
}
/* 分组元数据样式 */
.group-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.device-count {
    background: var(--bg-color);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.group-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

.group-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.group-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
}

.toggle-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.group-card.expanded .toggle-icon {
    transform: rotate(180deg);
}

.group-card-content {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: none;
    animation: slideDown 0.3s ease;
}

.group-card.expanded .group-card-content {
    display: block;
}

/* 全屏模态框样式 */
.fullscreen-modal {
    z-index: 2000;
}
/* 全屏内容样式 */
.fullscreen-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

.fullscreen-title .system-title {
    margin: 0 auto;
    text-align: center;
}

/* 系统标题样式 */
.fullscreen-title .system-title h3 {
    margin: 0;
    font-size: 25px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 系统图标样式 */
.fullscreen-title .system-title .icon {
    font-size: 18px;
}

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

.fullscreen-header {
    padding: 24px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 10;
}

.fullscreen-title {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.group-icon-large {
    font-size: 36px;
}

.fullscreen-title h2 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.fullscreen-device-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

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

.close-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.fullscreen-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: var(--bg-color);
}

.fullscreen-body .devices-grid {
    max-width: 1400px;
    margin: 0 auto;
}

/* 响应式：中等屏幕 */
@media (max-width: 1400px) {
    .groups-list {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .groups-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .groups-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 手机端布局 */
@media (max-width: 768px) {
    /* 调整页面边距 */
    body {
        padding: 10px;
    }
    
    /* 调整头部样式 */
    header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    header h1 {
        font-size: 20px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    /* 调整分组列表 */
    .groups-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* 调整设备网格 */
    .devices-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* 调整分组卡片 */
    .group-card {
        margin-bottom: 16px;
    }
    
    .group-card-body {
        padding: 16px;
    }
    
    /* 调整设备卡片 */
    .device-card {
        padding: 16px;
    }
    
    /* 调整全屏模式下的布局 */
    .fullscreen-body {
        padding: 16px;
    }
    
    .fullscreen-header {
        padding: 16px;
    }
    
    .fullscreen-title h2 {
        font-size: 20px;
    }
    
    .group-icon-large {
        font-size: 28px;
    }
}

/* 小屏手机布局 */
@media (max-width: 480px) {
    /* 调整分组列表为单列 */
    .groups-list {
        grid-template-columns: 1fr;
    }
    
    /* 调整头部标题 */
    header h1 {
        font-size: 16px;
    }
    
    /* 调整按钮大小 */
    button {
        padding: 10px 16px;
        font-size: 13px;
    }
}

.empty-devices {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.device-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.device-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.device-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.device-title {
    flex: 1;
}

.device-title h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.device-id-badge {
    display: inline-block;
    background: var(--bg-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.status-normal {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-fault {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.status-maintenance {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}

.status-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.device-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.device-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
}

.device-description {
    background: var(--bg-color);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.device-photos-count {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.photo-icon {
    font-size: 16px;
}

.device-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.empty-state p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 14px;
    color: var(--text-secondary);
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #fee2e2;
    color: var(--danger-color);
    border-radius: 12px;
    font-weight: 500;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

/* 所有普通模态框需要更高层级 */
#deviceDetailModal,
#qrcodeModal,
#editDeviceModal,
#addDeviceModal,
#addGroupModal {
    z-index: 3000;
}

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

.modal-content {
    background-color: rgba(0, 20, 40, 0.95);
    border: 2px solid rgba(0, 255, 255, 0.5);
    margin: 5% auto;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3), 0 0 60px rgba(0, 255, 255, 0.1);
    animation: slideDown 0.3s ease, borderGlow 4s infinite alternate;
    backdrop-filter: blur(10px);
}

.modal-content.modal-large {
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 20, 40, 0.95);
    border: 2px solid rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3), 0 0 60px rgba(0, 255, 255, 0.1);
    animation: borderGlow 4s infinite alternate;
}

#statisticsContent {
    flex: 1;
    overflow-y: auto;
    margin: 16px 0;
    padding-right: 8px;
}

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

.close {
    color: #00ffff;
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    z-index: 10;
}

.close:hover {
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 1);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 24px;
    font-size: 28px;
    font-weight: 700;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.6), 0 0 45px rgba(0, 255, 255, 0.4);
    letter-spacing: 1px;
    animation: neonFlicker 3s infinite alternate;
}

.form-group {
    margin-bottom: 20px;
}

.current-icon {
    margin-top: 10px;
    padding: 10px;
    background-color: var(--bg-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-icon img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: contain;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #00ffff;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.6);
}

.required {
    color: var(--danger-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(0, 10, 20, 0.8);
    color: #00ffff;
    font-family: 'Courier New', monospace;
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3), inset 0 0 10px rgba(0, 255, 255, 0.2);
    transform: translateY(-1px);
}

.form-group select {
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* 二维码显示 */
.qrcode-container {
    text-align: center;
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 12px;
}

.qrcode-container img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.device-info-display {
    text-align: center;
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
}

.device-info-display p {
    margin: 8px 0;
    font-size: 14px;
}

.device-info-display strong {
    color: var(--text-secondary);
    margin-right: 8px;
}

.statistics-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.5);
    background: rgba(0, 10, 20, 0.8);
    padding: 20px;
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.statistics-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 255, 255, 0.5);
    background: rgba(0, 10, 20, 0.8);
    padding: 20px;
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.1);
}

/* 设备详情 */
.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
}

.detail-label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
}

.detail-value {
    color: var(--text-primary);
    flex: 1;
}

.detail-description {
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
    line-height: 1.6;
    color: var(--text-primary);
}

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

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
}

.photo-item:hover {
    transform: scale(1.05);
}

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

/* 报告页面样式 */
.report-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.report-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 24px;
}

.device-info-box {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.device-info-box p {
    margin: 8px 0;
    font-size: 16px;
}

.status-options {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.status-options h3 {
    margin-bottom: 0;
    color: var(--text-primary);
    font-size: 18px;
    text-align: center;
}

.status-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-options {
    display: block;
}

/* 统计表格容器样式 */
.statistics-table-container {
    background: rgba(0, 10, 20, 0.9);
    border: 2px solid rgba(0, 255, 255, 0.5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 30px rgba(0, 255, 255, 0.1);
    margin: 20px 0;
}

/* 统计表格样式 */
.statistics-table {
    width: 100%;
    border-collapse: collapse;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    text-align: left;
}

/* 表格头部样式 */
.statistics-table thead {
    background: rgba(0, 50, 100, 0.9);
    border-bottom: 2px solid #00ffff;
}

/* 表格头部单元格样式 */
.statistics-table th {
    padding: 16px 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    border-right: 1px solid rgba(0, 255, 255, 0.3);
}

.statistics-table th:last-child {
    border-right: none;
}

/* 表格行样式 */
.statistics-table tbody tr {
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: dataLoad 0.5s ease-out;
}

/* 为表格行添加交错动画延迟 */
.statistics-table tbody tr:nth-child(odd) {
    animation-delay: 0.1s;
}

.statistics-table tbody tr:nth-child(even) {
    animation-delay: 0.2s;
}

/* 表格行悬停效果 */
.statistics-table tbody tr:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
}

/* 表格单元格样式 */
.statistics-table td {
    padding: 14px 20px;
    border-right: 1px solid rgba(0, 255, 255, 0.1);
}

.statistics-table td:last-child {
    border-right: none;
}

/* 合计行样式 */
.statistics-table .totals-row {
    background: rgba(0, 255, 255, 0.2);
    font-weight: 700;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    border-top: 2px solid #00ffff;
}

/* 合计行单元格样式 */
.statistics-table .totals-row td {
    padding: 20px;
}

/* 表格响应式设计 */
@media (max-width: 768px) {
    .statistics-table-container {
        overflow-x: auto;
    }
    
    .statistics-table {
        min-width: 600px;
    }
}


.status-options-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.status-options-buttons .status-btn {
    margin: 0;
    min-width: auto;
    flex: none;
}

.status-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 14px;
    font-size: 13px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    white-space: nowrap;
    text-align: center;
    margin-bottom: 0 !important;
}

.status-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.status-btn.normal {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.status-btn.fault {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.status-btn.maintenance {
    background: linear-gradient(135deg, var(--maintenance-color), #4f46e5);
    color: white;
}

.status-btn.warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
}
/* 选中状态按钮样式 */
.status-btn.selected {
    border-color: white;
    box-shadow: 0 0 0 8px rgba(63, 8, 109, 0.6);
}
/* 表单段落样式 */
.form-section {
    margin: 30px 0;
}

.form-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s;
}

.form-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.photo-upload {
    margin-top: 20px;
}

.photo-upload label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-primary);
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    cursor: pointer;
    transition: all 0.3s;
}

.file-input-wrapper input[type="file"]:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.photo-preview-item .remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.submit-btn {
    flex: 1;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.engineer-mode-btn {
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.result-message {
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    animation: slideDown 0.3s ease;
}

.result-message.success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.result-message.error {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.error {
    color: var(--danger-color);
    font-weight: 600;
    margin-top: 8px;
    display: block;
}

/* 悬浮设置按钮 */
.floating-settings {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 4000;
}

.floating-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.floating-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.settings-icon {
    display: block;
    transition: transform 0.3s ease;
}

.floating-btn:hover .settings-icon {
    transform: rotate(-90deg);
}

.settings-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    padding: 8px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.settings-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.settings-menu-item {
    width: 100%;
    padding: 14px 18px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    text-align: left;
}

.settings-menu-item:hover {
    background: var(--bg-color);
    transform: translateX(-4px);
}

.settings-menu-item .menu-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 24px;
    }

    .devices-grid {
        grid-template-columns: 1fr;
    }

    .groups-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .group-card-body {
        padding: 16px;
    }

    .group-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .group-icon {
        font-size: 24px;
    }

    .group-name {
        font-size: 14px;
    }

    .modal-content {
        padding: 24px;
        margin: 10% auto;
    }

    .report-form {
        padding: 20px;
        margin: 10px;
    }

    .device-info-box {
        padding: 15px;
    }

    .status-btn {
        padding: 16px;
        font-size: 15px;
    }

    .form-section textarea {
        min-height: 80px;
    }

    .floating-settings {
        bottom: 20px;
        right: 20px;
    }

    .floating-btn {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .settings-menu {
        bottom: 70px;
        min-width: 160px;
    }
}