/* 全局样式重置 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Microsoft YaHei', Arial, sans-serif; background-color: #f5f7fa; color: #333; display: flex; height: 100vh; overflow: hidden; } /* 侧边导航栏 */ nav { width: 180px; background-color: #2c3e50; color: white; display: flex; flex-direction: column; position: relative; } nav ul { list-style: none; padding: 20px 0; } nav ul li { padding: 15px 20px; cursor: pointer; transition: all 0.3s ease; } nav ul li:hover { background-color: #34495e; transform: translateX(5px); } nav ul li a { color: white; text-decoration: none; display: block; font-size: 14px; } /* 主内容区 */ .main-content { flex: 1; display: flex; flex-direction: column; width: calc(100% - 180px); } /* 头部 */ header { display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; background-color: white; box-shadow: 0 2px 4px rgba(0,0,0,0.1); position: relative; z-index: 10; } header h1 { font-size: 24px; font-weight: bold; } header h1 .pro { color: #3498db; } header .status { color: #666; } header .top-btn { padding: 8px 20px; background-color: #e74c3c; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: background-color 0.3s ease; } header .top-btn:hover { background-color: #c0392b; } /* 主内容区域 */ main { flex: 1; padding: 30px; overflow-y: auto; background-color: #f5f7fa; } /* 卡片容器 */ .cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; } /* 卡片样式 */ .card { background-color: white; border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 150px; transition: transform 0.3s ease, box-shadow 0.3s ease; } .card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.15); } .card-icon { font-size: 48px; color: #3498db; margin-bottom: 10px; } .card-title { color: #666; font-size: 14px; margin-bottom: 5px; } .card-value { font-size: 28px; font-weight: bold; color: #333; } .card-btn { margin-top: 10px; padding: 8px 20px; background-color: #3498db; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: background-color 0.3s ease; } .card-btn:hover { background-color: #2980b9; } /* 特殊卡片样式 - 新增账号卡片有不同的按钮 */ .card:nth-child(4) .card-btn { background-color: #2ecc71; } .card:nth-child(4) .card-btn:hover { background-color: #27ae60; } /* 底部 */ footer { display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; background-color: white; border-top: 1px solid #e0e0e0; position: relative; } .status-indicator { display: flex; align-items: center; } .online { color: #2ecc71; font-size: 16px; margin-right: 5px; } .version { color: #666; } .company { color: #999; } /* 适配Wails窗口 */ html, body { width: 100%; height: 100%; } /* 调整容器布局 */ header, main, footer { width: 100%; } /* 滚动条样式 */ main::-webkit-scrollbar { width: 8px; } main::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; } main::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; } main::-webkit-scrollbar-thumb:hover { background: #555; } /* 响应式设计 */ @media (max-width: 768px) { .cards { grid-template-columns: 1fr; } header { padding: 15px 20px; } main { padding: 20px; } footer { padding: 15px 20px; } }