:root { --primary-color: #1976d2; --primary-light: #63a4ff; --primary-dark: #004ba0; --secondary-color: #f5f5f5; --text-color: #333; --text-light: #666; --border-color: #e0e0e0; --success-color: #4caf50; --warning-color: #ff9800; --danger-color: #f44336; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: var(--text-color); background-color: #f9f9f9; } .container { max-width: 1200px; margin: 0 auto; padding: 0 15px; } /* 导航栏样式 */ .navbar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; background-color: var(--primary-color); color: white; } .nav-brand { display: flex; align-items: center; } .brand-link { color: white; text-decoration: none; font-size: 1.5rem; font-weight: bold; } .nav-menu { display: flex; align-items: center; } .nav-links { display: flex; list-style: none; margin: 0; padding: 0; gap: 2rem; } .nav-link { color: white; text-decoration: none; font-weight: 500; transition: color 0.3s; } .nav-link:hover { color: rgba(255, 255, 255, 0.8); } .nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; } .hamburger { display: block; width: 24px; height: 2px; background-color: white; position: relative; transition: background-color 0.3s; } .hamburger::before, .hamburger::after { content: ''; position: absolute; width: 24px; height: 2px; background-color: white; transition: transform 0.3s; } .hamburger::before { top: -6px; } .hamburger::after { bottom: -6px; } /* 移动端适配 */ @media (max-width: 768px) { .nav-menu { display: none; width: 100%; position: absolute; top: 100%; left: 0; background-color: var(--primary-color); padding: 1rem; } .nav-menu.active { display: block; } .nav-links { flex-direction: column; gap: 1rem; } .nav-toggle { display: block; } .nav-toggle.active .hamburger { background-color: transparent; } .nav-toggle.active .hamburger::before { transform: rotate(45deg) translate(4px, 4px); } .nav-toggle.active .hamburger::after { transform: rotate(-45deg) translate(4px, -4px); } } /* 主内容区域 */ main { min-height: calc(100vh - 120px); padding: 2rem 0; } /* 卡片样式 */ .card { background-color: white; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); padding: 1.5rem; margin-bottom: 1.5rem; } .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); } .card-title { font-size: 1.25rem; font-weight: 500; } /* 表格样式 */ .table-container { overflow-x: auto; } table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; } th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border-color); } th { background-color: var(--secondary-color); font-weight: 500; } tr:hover { background-color: rgba(0, 0, 0, 0.02); } /* 按钮样式 */ .btn { display: inline-block; padding: 0.5rem 1rem; border-radius: 4px; font-weight: 500; text-align: center; cursor: pointer; transition: all 0.3s; border: none; } .btn-primary { background-color: var(--primary-color); color: white; } .btn-primary:hover { background-color: var(--primary-dark); } .btn-secondary { background-color: var(--secondary-color); color: var(--text-color); } .btn-secondary:hover { background-color: #e0e0e0; } .btn-success { background-color: var(--success-color); color: white; } .btn-success:hover { background-color: #3d8b40; } .btn-danger { background-color: var(--danger-color); color: white; } .btn-danger:hover { background-color: #d32f2f; } .btn-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; } /* 表单样式 */ .form-group { margin-bottom: 1rem; } .form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; } .form-control { display: block; width: 100%; padding: 0.5rem; font-size: 1rem; border: 1px solid var(--border-color); border-radius: 4px; transition: border-color 0.3s; } .form-control:focus { border-color: var(--primary-color); outline: none; } /* 搜索框 */ .search-container { margin-bottom: 1.5rem; } .search-box { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; } .search-box select { min-width: 150px; max-width: 200px; } .search-input { flex: 1; min-width: 200px; } /* 标签样式 */ .tag { display: inline-block; padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.875rem; margin-right: 0.5rem; margin-bottom: 0.5rem; background-color: var(--primary-light); color: white; } /* 页脚样式 */ footer { background-color: var(--secondary-color); padding: 1rem 0; text-align: center; color: var(--text-light); } /* 响应式设计 */ @media (max-width: 768px) { nav { flex-direction: column; align-items: flex-start; } .nav-links { margin-top: 1rem; flex-direction: column; } .nav-links li { margin-left: 0; margin-bottom: 0.5rem; } .auth-links { margin-top: 10px; } .card-header { flex-direction: column; align-items: flex-start; } .card-header button { margin-top: 10px; } .search-box { flex-direction: column; } } /* 在现有样式的基础上添加以下内容 */ /* 导航栏右侧认证链接样式 */ .auth-links { display: flex; align-items: center; } .auth-links a, .auth-links button { color: white; text-decoration: none; margin-left: 1rem; font-weight: 500; } .auth-links button { background: transparent; border: 1px solid white; padding: 0.25rem 0.5rem; border-radius: 4px; cursor: pointer; transition: all 0.3s; } .auth-links button:hover { background-color: rgba(255, 255, 255, 0.1); } /* 特权模式标识样式 */ .badge { display: inline-block; padding: 0.25rem 0.5rem; font-size: 0.75rem; font-weight: bold; border-radius: 10px; margin-right: 0.5rem; } .badge-warning { background-color: var(--warning-color); color: white; } /* 消息提示样式 */ .message { position: fixed; top: 20px; right: 20px; padding: 15px; border-radius: 4px; color: white; z-index: 1001; box-shadow: 0 2px 10px rgba(0,0,0,0.2); } .message-info { background-color: var(--primary-color); } .message-success { background-color: var(--success-color); } .message-warning { background-color: var(--warning-color); color: white; } .message-danger { background-color: var(--danger-color); } /* 警告框样式 */ .alert { padding: 12px; margin-bottom: 15px; border-radius: 4px; } .alert-danger { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; } .alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; } /* 模态框样式 */ .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); } .modal-content { background-color: white; margin: 10% auto; padding: 20px; border-radius: 4px; width: 80%; max-width: 500px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); } .modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 15px; } .modal-header h2 { margin: 0; font-size: 1.25rem; } .close { color: var(--text-light); font-size: 28px; font-weight: bold; cursor: pointer; } .close:hover { color: var(--text-color); } /* 响应式设计补充 */ @media (max-width: 768px) { .auth-links { margin-top: 1rem; align-self: flex-start; } .auth-links a, .auth-links button { margin-left: 0; margin-right: 1rem; } }