XNSim/XNSimHtml/style.css
2025-04-28 12:25:20 +08:00

776 lines
13 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.container {
width: 90%;
max-width: 1200px;
min-height: 600px;
background: white;
border-radius: 20px;
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
display: flex;
overflow: hidden;
}
.content {
flex: 1;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 60px;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.welcome-section {
text-align: center;
}
.welcome-section h1 {
font-size: 3.5rem;
margin-bottom: 2rem;
font-weight: 700;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}
.welcome-text {
font-size: 1.2rem;
line-height: 1.8;
opacity: 0.9;
}
.auth-container {
width: 500px;
background: white;
padding: 40px;
display: flex;
flex-direction: column;
}
.form-toggle {
display: flex;
margin-bottom: 30px;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.toggle-btn {
flex: 1;
padding: 15px;
border: none;
background: #f0f0f0;
cursor: pointer;
font-size: 1rem;
font-weight: 500;
transition: all 0.3s ease;
}
.toggle-btn.active {
background: #667eea;
color: white;
}
.form-panel {
display: none;
animation: fadeIn 0.3s ease;
margin-top: 10px;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.form-panel.active {
display: block;
}
.form-panel h2 {
font-size: 1.8rem;
color: #333;
margin-bottom: 25px;
text-align: center;
}
.form-row {
display: flex;
gap: 20px;
margin-bottom: 20px;
}
.form-row .form-group {
flex: 1;
margin-bottom: 0;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
color: #555;
font-weight: 500;
}
.form-group input {
width: 100%;
padding: 12px 15px;
border: 2px solid #eee;
border-radius: 8px;
font-size: 1rem;
transition: all 0.3s ease;
}
.form-group input:focus {
border-color: #667eea;
outline: none;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.remember-me {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 20px;
}
.remember-me input {
width: auto;
}
.submit-btn {
width: 100%;
padding: 15px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 8px;
color: white;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
}
.submit-btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
@media (max-width: 1024px) {
.container {
flex-direction: column;
min-height: auto;
margin: 20px;
}
.content {
padding: 40px;
}
.auth-container {
width: 100%;
}
}
@media (max-width: 480px) {
.container {
margin: 0;
border-radius: 0;
}
.auth-container {
padding: 20px;
}
.welcome-section h1 {
font-size: 2.5rem;
}
}
.main-container {
width: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.main-nav {
display: none;
}
.logo {
display: none;
}
.user-info {
display: none;
}
main {
flex: 1;
padding: 2rem;
background-color: #f5f5f5;
}
.content-section {
background-color: white;
border-radius: 8px;
padding: 2rem;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.content-section h2 {
color: #333;
margin-bottom: 1.5rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid #f0f0f0;
}
.admin-features,
.user-features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin-top: 1rem;
}
.feature-btn {
padding: 1rem;
background: linear-gradient(135deg, #6e8efb, #a777e3);
border: none;
border-radius: 8px;
color: white;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
text-align: center;
}
.feature-btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
@media (max-width: 768px) {
.main-nav {
padding: 1rem;
flex-direction: column;
gap: 1rem;
text-align: center;
}
.admin-features,
.user-features {
grid-template-columns: 1fr;
}
main {
padding: 1rem;
}
}
/* 内容包装器 */
.content-wrapper {
display: flex;
height: 100vh; /* 修改为全屏高度 */
}
/* 主工具栏样式 */
.main-toolbar {
width: 80px;
background-color: #2c3e50;
display: flex;
flex-direction: column;
align-items: center;
padding: 20px 0;
transition: width 0.3s ease;
}
.main-toolbar.collapsed {
width: 50px;
}
.main-toolbar.collapsed .tool-item span {
display: none;
}
.main-toolbar.collapsed .logo-image {
width: 30px;
height: 30px;
}
.tools-container {
flex: 1;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.toolbar-toggle {
position: absolute;
right: -12px;
top: 50%;
transform: translateY(-50%);
width: 24px;
height: 24px;
background-color: #34495e;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
color: #fff;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
z-index: 100;
}
.toolbar-toggle i {
transition: transform 0.3s ease;
}
.sub-toolbar.collapsed .toolbar-toggle i {
transform: rotate(180deg);
}
.toolbar-toggle:hover {
background-color: #2c3e50;
}
/* 调整子工具栏的过渡效果 */
.sub-toolbar {
width: 200px;
background-color: #34495e;
position: relative;
transition: all 0.3s ease;
display: flex;
}
.sub-toolbar.collapsed {
width: 0;
}
.sub-toolbar-content {
min-width: 200px;
padding: 20px 0;
opacity: 1;
transition: opacity 0.2s ease;
}
.sub-toolbar.collapsed .sub-toolbar-content {
opacity: 0;
}
.tool-item {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 15px 0;
color: #ecf0f1;
cursor: pointer;
transition: all 0.3s ease;
}
.tool-item i {
font-size: 24px;
margin-bottom: 5px;
}
.tool-item span {
font-size: 12px;
text-align: center;
}
.tool-item:hover {
background-color: #34495e;
}
.tool-item.active {
background-color: #3498db;
}
/* 子工具栏样式 */
.sub-menu {
display: none;
white-space: nowrap;
}
.sub-menu.active {
display: block;
}
.sub-item {
padding: 12px 20px;
color: #ecf0f1;
cursor: pointer;
transition: all 0.3s ease;
}
.sub-item:hover {
background-color: #2c3e50;
}
.sub-item.active {
background-color: #3498db;
}
/* 主要内容区域 */
.main-content {
flex: 1;
padding: 20px;
background-color: #f5f5f5;
overflow-y: auto;
}
#contentArea {
background-color: white;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
/* 响应式设计 */
@media (max-width: 768px) {
.content-wrapper {
flex-direction: column;
}
.main-toolbar {
width: 100%;
height: 60px;
flex-direction: row;
justify-content: space-around;
padding: 0;
}
.tool-item {
padding: 10px;
}
.sub-toolbar {
width: 100%;
height: auto;
max-height: 200px;
}
.form-row {
flex-direction: column;
gap: 15px;
}
.form-row .form-group {
margin-bottom: 0;
}
.auth-container {
padding: 20px;
}
}
.logo-container {
width: 100%;
padding: 8px;
margin-bottom: 10px;
display: flex;
justify-content: center;
align-items: center;
}
.logo-image {
width: 50px;
height: 50px;
object-fit: contain;
}
.content-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 20px;
background-color: white;
border-bottom: 1px solid #e0e0e0;
}
.breadcrumb {
display: flex;
align-items: center;
gap: 8px;
color: #666;
}
.breadcrumb i {
font-size: 14px;
color: #999;
}
/* 用户下拉菜单 */
.user-dropdown {
position: relative;
}
.user-dropdown-toggle {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
padding: 6px 12px;
border-radius: 4px;
transition: background-color 0.2s ease;
}
.user-dropdown-toggle:hover {
background-color: #f5f5f5;
}
.user-dropdown-toggle i {
font-size: 12px;
color: #666;
transition: transform 0.2s ease;
}
.user-dropdown.active .user-dropdown-toggle i {
transform: rotate(180deg);
}
.user-dropdown-menu {
position: absolute;
top: 100%;
right: 0;
margin-top: 8px;
background-color: white;
border-radius: 4px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
min-width: 160px;
display: none;
z-index: 1000;
}
.user-dropdown.active .user-dropdown-menu {
display: block;
}
.dropdown-item {
padding: 10px 16px;
display: flex;
align-items: center;
gap: 8px;
color: #333;
cursor: pointer;
transition: background-color 0.2s ease;
}
.dropdown-item i {
font-size: 14px;
color: #666;
width: 16px;
text-align: center;
}
.dropdown-item:hover {
background-color: #f5f5f5;
}
.dropdown-divider {
height: 1px;
background-color: #e0e0e0;
margin: 4px 0;
}
.admin-only {
display: none;
}
/* 主内容区域调整 */
#contentArea {
padding: 20px;
}
/* 标签页容器 */
.tabs-container {
background-color: white;
border-bottom: 1px solid #e0e0e0;
}
.tabs-header {
display: flex;
padding: 0 20px;
overflow-x: auto;
scrollbar-width: thin;
scrollbar-color: #ccc transparent;
height: 40px;
}
.tabs-header::-webkit-scrollbar {
height: 4px;
}
.tabs-header::-webkit-scrollbar-track {
background: transparent;
}
.tabs-header::-webkit-scrollbar-thumb {
background-color: #ccc;
border-radius: 2px;
}
.tab {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background-color: #f5f5f5;
border: 1px solid #e0e0e0;
border-bottom: none;
border-radius: 4px 4px 0 0;
margin-right: 4px;
margin-top: 4px;
cursor: pointer;
position: relative;
user-select: none;
color: #666;
min-width: 120px;
max-width: 200px;
height: 36px;
transition: all 0.2s ease;
}
.tab i {
font-size: 14px;
}
.tab span {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tab .close-tab {
visibility: hidden;
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
font-size: 12px;
color: #999;
margin-left: 4px;
}
.tab:not([data-tab="overview"]):hover .close-tab {
visibility: visible;
}
.tab .close-tab:hover {
background-color: rgba(0, 0, 0, 0.1);
color: #666;
}
.tab.active {
background-color: white;
border: 1px solid #e0e0e0;
border-bottom: 1px solid white;
margin-bottom: -1px;
color: #2c3e50;
font-weight: 500;
box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}
.tab.active::before {
content: '';
position: absolute;
top: -1px;
left: -1px;
right: -1px;
height: 2px;
background: #3498db;
border-radius: 2px 2px 0 0;
}
.tab.active i {
color: #3498db;
}
.tab:hover:not(.active) {
background-color: #f0f0f0;
}
/* 标签页内容区域 */
.tabs-content {
flex: 1;
overflow: auto;
background-color: white;
position: relative;
}
.tab-pane {
display: none;
padding: 20px;
}
.tab-pane.active {
display: block;
}
/* 调整主内容区域的布局 */
.main-content {
display: flex;
flex-direction: column;
height: 100%;
}
.password-input {
position: relative;
display: flex;
align-items: center;
}
.password-input input {
padding-right: 40px;
}
.toggle-password {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
padding: 5px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.3s ease;
}
.toggle-password:hover {
opacity: 0.7;
}
.toggle-password:focus {
outline: none;
}
.visibility-icon {
width: 20px;
height: 20px;
object-fit: contain;
}