/* 设备耗材页面样式 */ #device-consumables-page { background-color: #f5f5f5; min-height: 100vh; padding-bottom: 20px; } /* 页面头部 */ .page-header { background: #f6f6f6; color: rgb(43, 42, 42); padding: 15px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } .header-content { display: flex; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; } .back-btn { background: none; border: none; color: rgb(0, 0, 0); font-size: 18px; cursor: pointer; padding: 8px; border-radius: 50%; transition: background-color 0.3s ease; margin-right: 15px; } .back-btn:hover { background-color: rgba(255, 255, 255, 0.1); } .page-title { font-size: 18px; font-weight: 600; margin: 0; } /* 家庭选择器 */ .family-selector { padding: 15px 20px; background: #f5f5f5; } .family-dropdown { display: flex; align-items: center; cursor: pointer; } .family-name { font-size: 16px; font-weight: 500; color: #333; margin-right: 8px; } .family-dropdown i { font-size: 12px; color: #666; } /* 耗材部分 */ .consumables-section { margin-bottom: 20px; } .section-header { padding: 15px 20px 10px 20px; } .section-title { font-size: 14px; color: #999; font-weight: 400; } /* 设备项 */ .device-item { background: white; display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background-color 0.3s ease; } .device-item:hover { background-color: #f9f9f9; } .device-item:last-child { border-bottom: none; } .device-icon { width: 50px; height: 50px; margin-right: 15px; display: flex; align-items: center; justify-content: center; } /* 温湿度计图标 */ .temp-humidity-icon { width: 45px; height: 45px; background: #e8e8e8; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; color: #666; position: relative; } .temp-humidity-icon.bathroom { background: #e8e8e8; } .temp-value { font-size: 12px; font-weight: 600; color: #333; line-height: 1; } .humidity-value { font-size: 8px; color: #666; margin-top: 2px; } /* 电池图标 */ .battery-icon { display: flex; align-items: center; justify-content: center; } .battery-body { width: 30px; height: 18px; border: 2px solid #ddd; border-radius: 3px; position: relative; background: white; } .battery-level { height: 100%; background: #ffa500; border-radius: 1px; width: 30%; } .battery-level.low { background: #ff6b6b; } .battery-tip { width: 3px; height: 8px; background: #ddd; border-radius: 0 2px 2px 0; margin-left: 1px; } /* 空气净化器图标 */ .air-purifier-icon { width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; } .purifier-body { width: 35px; height: 35px; background: #f0f0f0; border-radius: 6px; display: flex; align-items: center; justify-content: center; position: relative; } .purifier-grid { width: 20px; height: 20px; background: linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%); background-size: 4px 4px; background-position: 0 0, 0 2px, 2px -2px, -2px 0px; } /* 滤芯图标 */ .filter-icon { width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; position: relative; } .filter-progress { position: relative; width: 40px; height: 40px; } .progress-ring { transform: rotate(-90deg); } .progress-ring-circle { transition: stroke-dashoffset 0.35s; } .progress-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 10px; font-weight: 600; color: #4ECDC4; } /* 设备信息 */ .device-info { flex: 1; } .device-info h3 { margin: 0 0 5px 0; font-size: 16px; font-weight: 500; color: #333; } .device-status { margin: 0; font-size: 14px; color: #999; line-height: 1.4; } .device-status.warning { color: #ff9500; } .device-update { margin: 2px 0 0 0; font-size: 12px; color: #ccc; } /* 设备操作 */ .device-action { margin-left: 10px; display: flex; align-items: center; } .device-action i { font-size: 14px; color: #ccc; } .buy-btn { background: #4ECDC4; color: white; border: none; border-radius: 15px; padding: 6px 16px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; } .buy-btn:hover { background: #44a08d; transform: translateY(-1px); } .buy-btn:active { transform: translateY(0); } /* 响应式设计 */ @media (max-width: 768px) { .header-content { padding: 0 15px; } .family-selector { padding: 15px; } .section-header { padding: 15px 15px 10px 15px; } .device-item { padding: 15px; } .device-icon { width: 45px; height: 45px; } .temp-humidity-icon { width: 40px; height: 40px; } .device-info h3 { font-size: 15px; } .device-status { font-size: 13px; } } /* 动画效果 */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .device-item { animation: fadeInUp 0.6s ease forwards; } .device-item:nth-child(1) { animation-delay: 0.1s; } .device-item:nth-child(2) { animation-delay: 0.2s; } .device-item:nth-child(3) { animation-delay: 0.3s; } .device-item:nth-child(4) { animation-delay: 0.4s; } .device-item:nth-child(5) { animation-delay: 0.5s; } /* 深色模式支持 */ @media (prefers-color-scheme: dark) { #device-consumables-page { background-color: #1a1a1a; } .device-item { background: #2d2d2d; color: white; border-color: #404040; } .device-info h3 { color: white; } .device-status { color: #ccc; } .device-update { color: #999; } .section-title { color: #ccc; } .family-name { color: white; } .temp-humidity-icon { background: #404040; } .temp-value { color: white; } .purifier-body { background: #404040; } }