1250 lines
21 KiB
CSS
1250 lines
21 KiB
CSS
/* 管理员系统样式 */
|
||
|
||
/* 全局样式 */
|
||
:root {
|
||
--admin-primary: #731d1d;
|
||
--admin-secondary: #444;
|
||
--admin-background: #f5f5f5;
|
||
--admin-sidebar: #1f1f1f;
|
||
--admin-danger: #d32f2f;
|
||
--admin-success: #388e3c;
|
||
--admin-warning: #f57c00;
|
||
--admin-text: #333;
|
||
--admin-light-text: #fff;
|
||
--admin-border: #ddd;
|
||
--admin-card-bg: #fff;
|
||
--admin-card-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||
--admin-header-bg: #731d1d;
|
||
--admin-header-text: #fff;
|
||
}
|
||
|
||
/* 管理员登录页样式 */
|
||
.admin-auth-page {
|
||
background: linear-gradient(135deg, #1f1f1f, #3d3d3d);
|
||
}
|
||
|
||
.admin-title {
|
||
color: var(--admin-danger);
|
||
font-weight: 700;
|
||
text-align: center;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.admin-note {
|
||
margin-top: 20px;
|
||
padding: 10px;
|
||
text-align: center;
|
||
border-top: 1px solid var(--admin-border);
|
||
}
|
||
|
||
.back-link {
|
||
display: inline-block;
|
||
margin-top: 10px;
|
||
color: var(--admin-primary);
|
||
text-decoration: none;
|
||
}
|
||
|
||
.back-link:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
/* 管理员页面布局 */
|
||
.admin-page {
|
||
display: flex;
|
||
background-color: var(--admin-background);
|
||
min-height: 100vh;
|
||
}
|
||
|
||
.admin-sidebar {
|
||
width: 250px;
|
||
background-color: var(--admin-sidebar);
|
||
color: var(--admin-light-text);
|
||
display: flex;
|
||
flex-direction: column;
|
||
position: fixed;
|
||
height: 100vh;
|
||
z-index: 10;
|
||
}
|
||
|
||
.admin-logo {
|
||
padding: 20px;
|
||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||
}
|
||
|
||
.admin-logo h2 {
|
||
margin: 0;
|
||
font-size: 1.5rem;
|
||
}
|
||
|
||
.admin-logo p {
|
||
margin: 5px 0 0;
|
||
font-size: 0.8rem;
|
||
opacity: 0.8;
|
||
}
|
||
|
||
.admin-nav {
|
||
display: flex;
|
||
flex-direction: column;
|
||
padding: 20px 0;
|
||
flex-grow: 1;
|
||
}
|
||
|
||
.admin-nav a {
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 12px 20px;
|
||
color: var(--admin-light-text);
|
||
text-decoration: none;
|
||
transition: background-color 0.3s;
|
||
}
|
||
|
||
.admin-nav a:hover {
|
||
background-color: rgba(255, 255, 255, 0.1);
|
||
}
|
||
|
||
.admin-nav a.active {
|
||
background-color: rgba(255, 255, 255, 0.2);
|
||
border-left: 4px solid var(--admin-primary);
|
||
}
|
||
|
||
.admin-nav a .icon {
|
||
margin-right: 10px;
|
||
font-size: 1.2rem;
|
||
}
|
||
|
||
.admin-nav a.logout {
|
||
margin-top: auto;
|
||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||
}
|
||
|
||
.admin-content {
|
||
flex-grow: 1;
|
||
padding: 20px;
|
||
margin-left: 250px;
|
||
width: calc(100% - 250px);
|
||
}
|
||
|
||
.admin-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
margin-bottom: 20px;
|
||
padding-bottom: 10px;
|
||
border-bottom: 1px solid var(--admin-border);
|
||
}
|
||
|
||
.admin-header h1 {
|
||
margin: 0;
|
||
color: var(--admin-primary);
|
||
}
|
||
|
||
.header-actions {
|
||
display: flex;
|
||
gap: 10px;
|
||
}
|
||
|
||
/* 按钮样式 */
|
||
.btn {
|
||
padding: 8px 16px;
|
||
border: none;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
font-weight: 500;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: background-color 0.3s, transform 0.1s;
|
||
}
|
||
|
||
.btn:hover {
|
||
transform: translateY(-2px);
|
||
}
|
||
|
||
.btn:active {
|
||
transform: translateY(0);
|
||
}
|
||
|
||
.btn .icon {
|
||
margin-right: 5px;
|
||
}
|
||
|
||
.btn-primary {
|
||
background-color: var(--admin-primary);
|
||
color: var(--admin-light-text);
|
||
}
|
||
|
||
.btn-primary:hover {
|
||
background-color: #5a1717;
|
||
}
|
||
|
||
.btn-secondary {
|
||
background-color: var(--admin-secondary);
|
||
color: var(--admin-light-text);
|
||
}
|
||
|
||
.btn-secondary:hover {
|
||
background-color: #333;
|
||
}
|
||
|
||
.btn-danger {
|
||
background-color: var(--admin-danger);
|
||
color: var(--admin-light-text);
|
||
}
|
||
|
||
.btn-danger:hover {
|
||
background-color: #b71c1c;
|
||
}
|
||
|
||
/* 主页面卡片 */
|
||
.dashboard-card-container {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||
gap: 20px;
|
||
margin-bottom: 30px;
|
||
}
|
||
|
||
.dashboard-card {
|
||
background-color: var(--admin-card-bg);
|
||
border-radius: 8px;
|
||
box-shadow: var(--admin-card-shadow);
|
||
padding: 20px;
|
||
transition: transform 0.3s, box-shadow 0.3s;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.dashboard-card:hover {
|
||
transform: translateY(-5px);
|
||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
||
}
|
||
|
||
.card-icon {
|
||
font-size: 2.5rem;
|
||
margin-bottom: 15px;
|
||
color: var(--admin-primary);
|
||
}
|
||
|
||
.dashboard-card h2 {
|
||
margin: 0 0 10px;
|
||
font-size: 1.2rem;
|
||
}
|
||
|
||
.dashboard-card p {
|
||
margin: 0 0 15px;
|
||
color: #666;
|
||
}
|
||
|
||
.card-action {
|
||
text-align: right;
|
||
color: var(--admin-primary);
|
||
font-weight: 500;
|
||
}
|
||
|
||
.dashboard-info {
|
||
display: grid;
|
||
grid-template-columns: 2fr 1fr;
|
||
gap: 20px;
|
||
}
|
||
|
||
.info-section, .server-info {
|
||
background-color: var(--admin-card-bg);
|
||
border-radius: 8px;
|
||
box-shadow: var(--admin-card-shadow);
|
||
padding: 20px;
|
||
}
|
||
|
||
.info-section h3, .server-info h3 {
|
||
margin-top: 0;
|
||
margin-bottom: 15px;
|
||
color: var(--admin-primary);
|
||
border-bottom: 1px solid var(--admin-border);
|
||
padding-bottom: 10px;
|
||
}
|
||
|
||
.server-info table {
|
||
width: 100%;
|
||
}
|
||
|
||
.server-info td {
|
||
padding: 8px 0;
|
||
}
|
||
|
||
.server-info td:first-child {
|
||
font-weight: 500;
|
||
width: 40%;
|
||
}
|
||
|
||
/* 工具栏 */
|
||
.admin-toolbar {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
margin-bottom: 20px;
|
||
background-color: var(--admin-card-bg);
|
||
padding: 15px;
|
||
border-radius: 8px;
|
||
box-shadow: var(--admin-card-shadow);
|
||
}
|
||
|
||
.search-box {
|
||
flex-grow: 1;
|
||
margin-right: 20px;
|
||
}
|
||
|
||
.search-box input {
|
||
width: 100%;
|
||
padding: 8px 12px;
|
||
border: 1px solid var(--admin-border);
|
||
border-radius: 4px;
|
||
}
|
||
|
||
.filter-options select {
|
||
padding: 8px 12px;
|
||
border: 1px solid var(--admin-border);
|
||
border-radius: 4px;
|
||
background-color: white;
|
||
}
|
||
|
||
/* 角色网格 */
|
||
.characters-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||
gap: 20px;
|
||
}
|
||
|
||
.character-card {
|
||
background-color: var(--admin-card-bg);
|
||
border-radius: 8px;
|
||
box-shadow: var(--admin-card-shadow);
|
||
padding: 15px;
|
||
transition: transform 0.3s, box-shadow 0.3s;
|
||
cursor: pointer;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
}
|
||
|
||
.character-card:hover {
|
||
transform: translateY(-5px);
|
||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
||
}
|
||
|
||
.card-avatar {
|
||
width: 80px;
|
||
height: 80px;
|
||
background-color: #f0f0f0;
|
||
border-radius: 50%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 2rem;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.character-card h3 {
|
||
margin: 5px 0;
|
||
text-align: center;
|
||
font-size: 1.1rem;
|
||
}
|
||
|
||
.character-card p {
|
||
margin: 0;
|
||
text-align: center;
|
||
color: #666;
|
||
font-size: 0.9rem;
|
||
}
|
||
|
||
.character-type {
|
||
margin-top: 10px;
|
||
padding: 3px 8px;
|
||
border-radius: 12px;
|
||
font-size: 0.8rem;
|
||
background-color: #f0f0f0;
|
||
}
|
||
|
||
.type-resident {
|
||
background-color: #e8f5e9;
|
||
color: #2e7d32;
|
||
}
|
||
|
||
.type-special {
|
||
background-color: #fff8e1;
|
||
color: #ff8f00;
|
||
}
|
||
|
||
.type-status {
|
||
background-color: #e3f2fd;
|
||
color: #1565c0;
|
||
}
|
||
|
||
/* 全新的模态框系统 */
|
||
#modal-group {
|
||
/* 将模态框组放在页面最顶层 */
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 0;
|
||
height: 0;
|
||
z-index: 9000;
|
||
}
|
||
|
||
.modal-wrapper {
|
||
display: none;
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
z-index: 9000;
|
||
}
|
||
|
||
.modal-backdrop {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
background-color: rgba(0, 0, 0, 0.7);
|
||
z-index: 9001;
|
||
}
|
||
|
||
.modal-container {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
z-index: 9002;
|
||
padding: 20px;
|
||
box-sizing: border-box;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.modal-content {
|
||
background-color: #fff;
|
||
width: 100%;
|
||
max-width: 800px;
|
||
border-radius: 8px;
|
||
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
|
||
z-index: 9003;
|
||
overflow: hidden;
|
||
position: relative;
|
||
max-height: 90vh;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.event-modal-content {
|
||
max-width: 900px;
|
||
}
|
||
|
||
.character-detail-content {
|
||
max-width: 800px;
|
||
}
|
||
|
||
.confirm-modal-content {
|
||
max-width: 500px;
|
||
}
|
||
|
||
.modal-header {
|
||
padding: 15px 20px;
|
||
background-color: var(--admin-primary);
|
||
color: white;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
border-bottom: 1px solid var(--admin-border);
|
||
}
|
||
|
||
.modal-header h2 {
|
||
margin: 0;
|
||
font-size: 1.3rem;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.close-btn {
|
||
background: none;
|
||
border: none;
|
||
color: white;
|
||
font-size: 1.8rem;
|
||
line-height: 0.8;
|
||
cursor: pointer;
|
||
padding: 5px;
|
||
border-radius: 50%;
|
||
transition: background-color 0.2s;
|
||
}
|
||
|
||
.close-btn:hover {
|
||
background-color: rgba(255, 255, 255, 0.2);
|
||
}
|
||
|
||
.modal-body {
|
||
padding: 20px;
|
||
overflow-y: auto;
|
||
flex-grow: 1;
|
||
}
|
||
|
||
/* 表单样式 */
|
||
.form-row {
|
||
display: flex;
|
||
gap: 15px;
|
||
margin-bottom: 15px;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.form-group {
|
||
flex: 1;
|
||
min-width: 200px;
|
||
margin-bottom: 15px;
|
||
}
|
||
|
||
.form-group label {
|
||
display: block;
|
||
margin-bottom: 5px;
|
||
font-weight: 500;
|
||
color: #444;
|
||
}
|
||
|
||
.form-group input,
|
||
.form-group select,
|
||
.form-group textarea {
|
||
width: 100%;
|
||
padding: 10px;
|
||
border: 1px solid #ddd;
|
||
border-radius: 4px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.form-group input:focus,
|
||
.form-group select:focus,
|
||
.form-group textarea:focus {
|
||
border-color: var(--admin-primary);
|
||
outline: none;
|
||
}
|
||
|
||
.form-actions {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
gap: 10px;
|
||
margin-top: 20px;
|
||
}
|
||
|
||
/* 事件选项样式 */
|
||
.event-options {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 20px;
|
||
margin-top: 20px;
|
||
}
|
||
|
||
@media (max-width: 768px) {
|
||
.event-options {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
|
||
.event-option {
|
||
background-color: #f9f9f9;
|
||
padding: 15px;
|
||
border-radius: 8px;
|
||
}
|
||
|
||
.event-option h3 {
|
||
margin-top: 0;
|
||
margin-bottom: 15px;
|
||
font-size: 1rem;
|
||
border-bottom: 1px solid var(--admin-border);
|
||
padding-bottom: 5px;
|
||
}
|
||
|
||
.effects-grid {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 10px;
|
||
}
|
||
|
||
.effect-item {
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.effect-item label {
|
||
display: block;
|
||
font-size: 0.9rem;
|
||
margin-bottom: 3px;
|
||
}
|
||
|
||
.effect-item input {
|
||
width: 100%;
|
||
padding: 5px 8px;
|
||
}
|
||
|
||
/* 角色详情样式 */
|
||
.character-info-section {
|
||
margin-bottom: 30px;
|
||
}
|
||
|
||
.character-header {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.character-avatar {
|
||
width: 100px;
|
||
height: 100px;
|
||
background-color: #f0f0f0;
|
||
border-radius: 50%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 3rem;
|
||
margin-right: 20px;
|
||
}
|
||
|
||
.character-header-info h3 {
|
||
margin: 0 0 5px;
|
||
font-size: 1.5rem;
|
||
}
|
||
|
||
.character-header-info p {
|
||
margin: 0 0 5px;
|
||
color: #666;
|
||
}
|
||
|
||
.character-actions {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
gap: 10px;
|
||
margin-top: 20px;
|
||
}
|
||
|
||
.character-events-section {
|
||
background-color: #f9f9f9;
|
||
border-radius: 8px;
|
||
padding: 15px;
|
||
}
|
||
|
||
.section-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
margin-bottom: 15px;
|
||
}
|
||
|
||
.section-header h3 {
|
||
margin: 0;
|
||
}
|
||
|
||
.events-list {
|
||
display: grid;
|
||
gap: 15px;
|
||
}
|
||
|
||
.event-item {
|
||
background-color: white;
|
||
border-radius: 5px;
|
||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||
padding: 15px;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
}
|
||
|
||
.event-text {
|
||
flex-grow: 1;
|
||
margin-right: 15px;
|
||
}
|
||
|
||
.event-text h4 {
|
||
margin: 0 0 5px;
|
||
}
|
||
|
||
.event-text p {
|
||
margin: 0;
|
||
color: #666;
|
||
font-size: 0.9rem;
|
||
}
|
||
|
||
.event-actions {
|
||
display: flex;
|
||
gap: 5px;
|
||
}
|
||
|
||
.event-actions button {
|
||
background: none;
|
||
border: none;
|
||
font-size: 1.2rem;
|
||
cursor: pointer;
|
||
padding: 5px;
|
||
border-radius: 50%;
|
||
transition: background-color 0.3s;
|
||
}
|
||
|
||
.event-actions button:hover {
|
||
background-color: #f0f0f0;
|
||
}
|
||
|
||
.edit-event-btn {
|
||
color: #1976d2;
|
||
}
|
||
|
||
.delete-event-btn {
|
||
color: #d32f2f;
|
||
}
|
||
|
||
.empty-events {
|
||
text-align: center;
|
||
padding: 20px;
|
||
color: #666;
|
||
font-style: italic;
|
||
}
|
||
|
||
/* 数据统计面板样式 */
|
||
.stats-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(4, 1fr);
|
||
gap: 20px;
|
||
margin-bottom: 30px;
|
||
}
|
||
|
||
.stats-card {
|
||
background-color: var(--admin-card-bg);
|
||
border-radius: 8px;
|
||
box-shadow: var(--admin-card-shadow);
|
||
padding: 20px;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.stats-icon {
|
||
font-size: 2.5rem;
|
||
margin-right: 15px;
|
||
color: var(--admin-primary);
|
||
}
|
||
|
||
.stats-data h3 {
|
||
margin: 0 0 5px;
|
||
font-size: 1rem;
|
||
color: #666;
|
||
}
|
||
|
||
.stats-value {
|
||
font-size: 1.8rem;
|
||
font-weight: 700;
|
||
color: var(--admin-text);
|
||
}
|
||
|
||
.data-panels {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 20px;
|
||
}
|
||
|
||
.data-panel {
|
||
background-color: var(--admin-card-bg);
|
||
border-radius: 8px;
|
||
box-shadow: var(--admin-card-shadow);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.panel-header {
|
||
background-color: #f5f5f5;
|
||
padding: 15px 20px;
|
||
border-bottom: 1px solid var(--admin-border);
|
||
}
|
||
|
||
.panel-header h2 {
|
||
margin: 0;
|
||
font-size: 1.2rem;
|
||
color: var(--admin-primary);
|
||
}
|
||
|
||
.panel-body {
|
||
padding: 0;
|
||
}
|
||
|
||
.data-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
}
|
||
|
||
.data-table th, .data-table td {
|
||
padding: 12px 15px;
|
||
text-align: left;
|
||
border-bottom: 1px solid var(--admin-border);
|
||
}
|
||
|
||
.data-table th {
|
||
background-color: #f9f9f9;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.data-table tbody tr:hover {
|
||
background-color: #f5f5f5;
|
||
}
|
||
|
||
.data-table .loading-row td {
|
||
text-align: center;
|
||
padding: 20px;
|
||
color: #888;
|
||
}
|
||
|
||
.loading-indicator {
|
||
text-align: center;
|
||
padding: 30px;
|
||
color: #888;
|
||
grid-column: 1 / -1;
|
||
}
|
||
|
||
/* 状态样式 */
|
||
.status-badge {
|
||
display: inline-block;
|
||
padding: 3px 8px;
|
||
border-radius: 12px;
|
||
font-size: 0.9rem;
|
||
text-align: center;
|
||
}
|
||
|
||
.status-playing {
|
||
background-color: #e8f5e9;
|
||
color: #2e7d32;
|
||
}
|
||
|
||
.status-idle {
|
||
background-color: #fff8e1;
|
||
color: #ff8f00;
|
||
}
|
||
|
||
.empty-data {
|
||
text-align: center;
|
||
padding: 20px;
|
||
color: #666;
|
||
font-style: italic;
|
||
}
|
||
|
||
.error-data {
|
||
text-align: center;
|
||
padding: a20px;
|
||
color: #d32f2f;
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* 响应式设计 */
|
||
@media (max-width: 768px) {
|
||
.admin-sidebar {
|
||
width: 60px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.admin-sidebar .admin-logo h2,
|
||
.admin-sidebar .admin-logo p,
|
||
.admin-sidebar .admin-nav a .text {
|
||
display: none;
|
||
}
|
||
|
||
.admin-content {
|
||
margin-left: 60px;
|
||
width: calc(100% - 60px);
|
||
}
|
||
|
||
.stats-grid, .data-panels {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.dashboard-info {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.form-row {
|
||
flex-direction: column;
|
||
gap: 0;
|
||
}
|
||
}
|
||
/*
|
||
* 模态框相关CSS样式
|
||
* 添加到admin.css文件中,替换原有的模态框样式
|
||
*/
|
||
|
||
/* 模态框基础样式 */
|
||
.modal {
|
||
display: none;
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
background-color: rgba(0, 0, 0, 0.5);
|
||
overflow-y: auto;
|
||
padding: 20px;
|
||
box-sizing: border-box;
|
||
z-index: 99999; /* 极高的z-index */
|
||
}
|
||
|
||
/* 不同类型模态框的z-index */
|
||
#confirm-modal { z-index: 999999; }
|
||
#event-modal { z-index: 999998; }
|
||
#character-modal { z-index: 999997; }
|
||
#character-detail-modal { z-index: 999996; }
|
||
|
||
/* 模态框内容容器 */
|
||
.modal-content {
|
||
position: relative;
|
||
background-color: #fff;
|
||
margin: 30px auto;
|
||
padding: 0;
|
||
border-radius: 8px;
|
||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
|
||
max-width: 800px;
|
||
width: 95%;
|
||
max-height: 90vh;
|
||
display: flex;
|
||
flex-direction: column;
|
||
animation: modalSlideIn 0.3s ease-out;
|
||
}
|
||
|
||
/* 模态框动画 */
|
||
@keyframes modalSlideIn {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(-30px);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
/* 确认对话框大小 */
|
||
#confirm-modal .modal-content {
|
||
max-width: 500px;
|
||
}
|
||
|
||
/* 事件模态框更宽一些 */
|
||
#event-modal .modal-content {
|
||
max-width: 1000px;
|
||
}
|
||
|
||
/* 模态框头部 */
|
||
.modal-header {
|
||
background-color: var(--admin-primary);
|
||
color: #fff;
|
||
padding: 15px 20px;
|
||
border-top-left-radius: 8px;
|
||
border-top-right-radius: 8px;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.modal-header h2 {
|
||
margin: 0;
|
||
font-size: 1.5rem;
|
||
}
|
||
|
||
/* 关闭按钮 */
|
||
.close-modal {
|
||
font-size: 1.8rem;
|
||
font-weight: bold;
|
||
color: #fff;
|
||
cursor: pointer;
|
||
line-height: 1;
|
||
padding: 0 5px;
|
||
border-radius: 50%;
|
||
transition: background-color 0.3s;
|
||
}
|
||
|
||
.close-modal:hover {
|
||
background-color: rgba(255, 255, 255, 0.2);
|
||
}
|
||
|
||
/* 模态框内容区域 */
|
||
.modal-body {
|
||
padding: 20px;
|
||
overflow-y: auto;
|
||
flex-grow: 1;
|
||
}
|
||
|
||
/* 表单样式 */
|
||
.form-row {
|
||
display: flex;
|
||
gap: 20px;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
.form-group {
|
||
flex: 1;
|
||
min-width: 0; /* 防止溢出 */
|
||
}
|
||
|
||
.form-group label {
|
||
display: block;
|
||
margin-bottom: 8px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.form-group input,
|
||
.form-group select,
|
||
.form-group textarea {
|
||
width: 100%;
|
||
padding: 10px;
|
||
border: 1px solid #ddd;
|
||
border-radius: 4px;
|
||
box-sizing: border-box;
|
||
font-size: 1rem;
|
||
}
|
||
|
||
.form-group textarea {
|
||
resize: vertical;
|
||
min-height: 80px;
|
||
}
|
||
|
||
.form-actions {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
gap: 10px;
|
||
margin-top: 20px;
|
||
}
|
||
|
||
/* 事件选项布局 */
|
||
.event-options {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||
gap: 20px;
|
||
margin-top: 20px;
|
||
}
|
||
|
||
.event-option {
|
||
background-color: #f8f8f8;
|
||
border-radius: 8px;
|
||
padding: 15px;
|
||
}
|
||
|
||
.event-option h3 {
|
||
margin-top: 0;
|
||
margin-bottom: 15px;
|
||
color: var(--admin-primary);
|
||
border-bottom: 1px solid #ddd;
|
||
padding-bottom: 8px;
|
||
}
|
||
|
||
.effects-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
||
gap: 10px;
|
||
}
|
||
|
||
.effect-item {
|
||
margin-bottom: 15px;
|
||
}
|
||
|
||
/* 角色信息样式 */
|
||
.character-info-section {
|
||
margin-bottom: 30px;
|
||
}
|
||
|
||
.character-header {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 20px;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
.character-avatar {
|
||
width: 80px;
|
||
height: 80px;
|
||
background-color: #f0f0f0;
|
||
border-radius: 50%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 2.5rem;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.character-header-info {
|
||
flex-grow: 1;
|
||
}
|
||
|
||
.character-header-info h3 {
|
||
margin: 0 0 5px;
|
||
font-size: 1.5rem;
|
||
}
|
||
|
||
.character-header-info p {
|
||
margin: 0 0 5px;
|
||
color: #666;
|
||
}
|
||
|
||
.character-actions {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 10px;
|
||
margin-top: 15px;
|
||
}
|
||
|
||
/* 事件列表样式 */
|
||
.character-events-section {
|
||
background-color: #f8f8f8;
|
||
border-radius: 8px;
|
||
padding: 15px;
|
||
}
|
||
|
||
.section-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
margin-bottom: 15px;
|
||
}
|
||
|
||
.section-header h3 {
|
||
margin: 0;
|
||
}
|
||
|
||
.events-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 10px;
|
||
}
|
||
|
||
.event-item {
|
||
background-color: #fff;
|
||
border-radius: 4px;
|
||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||
padding: 12px;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
}
|
||
|
||
.event-text {
|
||
flex-grow: 1;
|
||
margin-right: 15px;
|
||
}
|
||
|
||
.event-text h4 {
|
||
margin: 0 0 5px;
|
||
font-size: 1rem;
|
||
}
|
||
|
||
.event-text p {
|
||
margin: 0;
|
||
color: #666;
|
||
}
|
||
|
||
.event-actions {
|
||
display: flex;
|
||
gap: 10px;
|
||
}
|
||
|
||
.event-actions button {
|
||
border: none;
|
||
background: none;
|
||
font-size: 1.2rem;
|
||
cursor: pointer;
|
||
padding: 5px;
|
||
border-radius: 50%;
|
||
transition: background-color 0.2s;
|
||
}
|
||
|
||
.event-actions button:hover {
|
||
background-color: #f0f0f0;
|
||
}
|
||
|
||
.edit-event-btn {
|
||
color: #1976d2;
|
||
}
|
||
|
||
.delete-event-btn {
|
||
color: #d32f2f;
|
||
}
|
||
|
||
.empty-events {
|
||
text-align: center;
|
||
padding: 30px;
|
||
color: #888;
|
||
font-style: italic;
|
||
}
|
||
|
||
/* 移动设备适配 */
|
||
@media (max-width: 768px) {
|
||
.form-row {
|
||
flex-direction: column;
|
||
gap: 15px;
|
||
}
|
||
|
||
.character-header {
|
||
flex-direction: column;
|
||
text-align: center;
|
||
}
|
||
|
||
.character-avatar {
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.event-actions button {
|
||
font-size: 1.5rem; /* 更大的按钮便于触控 */
|
||
padding: 8px;
|
||
}
|
||
|
||
.character-actions {
|
||
justify-content: center;
|
||
}
|
||
|
||
.modal-content {
|
||
margin: 10px auto;
|
||
width: calc(100% - 20px);
|
||
}
|
||
|
||
.section-header {
|
||
flex-direction: column;
|
||
gap: 10px;
|
||
align-items: flex-start;
|
||
}
|
||
|
||
#add-event-btn {
|
||
width: 100%;
|
||
}
|
||
}
|
||
|
||
/* 确保表单元素在移动设备上正确显示 */
|
||
@media (max-width: 480px) {
|
||
.effects-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.modal-body {
|
||
padding: 15px;
|
||
}
|
||
|
||
.modal {
|
||
padding: 10px;
|
||
}
|
||
}
|
||
/* 在admin.css文件中添加这些样式 */
|
||
|
||
.character-weight {
|
||
font-size: 0.85em;
|
||
color: #666;
|
||
margin-top: 5px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.character-card .character-weight {
|
||
margin-top: 8px;
|
||
background-color: #f0f0f0;
|
||
padding: 2px 6px;
|
||
border-radius: 4px;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.help-text {
|
||
display: block;
|
||
font-size: 0.8em;
|
||
color: #666;
|
||
margin-top: 4px;
|
||
} |