/* 中枢与网关页面样式 */ #hub-gateway-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; justify-content: space-between; 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; } .back-btn:hover { background-color: rgba(255, 255, 255, 0.1); } .page-title { font-size: 18px; font-weight: 600; margin: 0; flex: 1; text-align: center; } .info-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; } .info-btn:hover { background-color: rgba(255, 255, 255, 0.1); } /* 家庭选择器 */ .family-selector { background: #f5f5f5; padding: 20px; margin-bottom: 10px; } .family-info { display: flex; align-items: center; cursor: pointer; } .family-name { font-size: 16px; font-weight: 500; color: #333; margin-right: 8px; } .family-info i { font-size: 14px; color: #999; } /* 网关部分 */ .gateway-section { background: white; border-radius: 12px; margin: 0 20px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .section-title { font-size: 14px; color: #999; padding: 15px 20px 10px 20px; margin: 0; background: white; } /* 网关设备列表 */ .gateway-list { background: white; } .gateway-item { display: flex; align-items: center; padding: 20px; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background-color 0.3s ease; } .gateway-item:hover { background-color: #f9f9f9; } .gateway-item:last-child { border-bottom: none; } /* 设备图标 */ .device-icon { margin-right: 15px; } .icon-container { width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; position: relative; } .plug-icon { background: #e8e8e8; } .speaker-icon { background: #666; } .icon-container i { font-size: 24px; color: #666; } .speaker-icon i { color: white; } /* 设备信息 */ .device-info { flex: 1; } .device-name { font-size: 16px; font-weight: 400; color: #333; margin: 0 0 5px 0; line-height: 1.4; } .device-status { font-size: 14px; color: #999; margin: 0; line-height: 1.4; } /* 设备操作 */ .device-action { margin-left: 15px; display: flex; align-items: center; } .device-action i { font-size: 14px; color: #ccc; } /* 响应式设计 */ @media (max-width: 768px) { .header-content { padding: 0 15px; } .family-selector { padding: 15px; } .gateway-section { margin: 0 15px; } .gateway-item { padding: 18px 15px; } .device-name { font-size: 15px; } .device-status { font-size: 13px; } .icon-container { width: 44px; height: 44px; } .icon-container i { font-size: 22px; } } /* 动画效果 */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .gateway-item { animation: fadeInUp 0.6s ease forwards; } .gateway-item:nth-child(1) { animation-delay: 0.1s; } .gateway-item:nth-child(2) { animation-delay: 0.2s; } /* 深色模式支持 */ @media (prefers-color-scheme: dark) { #hub-gateway-page { background-color: #1a1a1a; } .family-selector { background: #1a1a1a; } .family-name { color: white; } .gateway-section { background: #2d2d2d; } .section-title { background: #2d2d2d; color: #ccc; } .gateway-list { background: #2d2d2d; } .gateway-item { color: white; border-color: #404040; } .gateway-item:hover { background-color: #404040; } .device-name { color: white; } .device-status { color: #ccc; } .device-action i { color: #999; } .plug-icon { background: #404040; } .icon-container i { color: #ccc; } } /* 点击反馈效果 */ .gateway-item:active { background-color: #f0f0f0; transform: scale(0.98); transition: all 0.1s ease; } @media (prefers-color-scheme: dark) { .gateway-item:active { background-color: #404040; } } /* 家庭选择器点击效果 */ .family-selector:hover { background-color: #f0f0f0; } @media (prefers-color-scheme: dark) { .family-selector:hover { background-color: #2d2d2d; } } /* 按钮点击效果 */ .back-btn:active, .info-btn:active { transform: scale(0.95); transition: all 0.1s ease; }