/* 绝地莽荒账号管理系统 - 仪表盘美化样式 */

/* 主题颜色变量定义 */
:root {
    /* 默认主题（蓝紫色） */
    --primary-gradient-start: #3498db;
    --primary-gradient-end: #8e44ad;
    --text-light: white;
    --text-dark: #2c3e50;
    --bg-light: #f5f7fa;
    --bg-card: white;
    --bg-sidebar: linear-gradient(to bottom, var(--primary-gradient-start), var(--primary-gradient-end));
    --bg-header: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    --bg-footer: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-color: #e0e0e0;
    --card-hover-transform: translateY(-7px);
    
    /* 模态框变量 */
    --modal-bg: white;
    --modal-text: #2c3e50;
    --modal-header-bg: linear-gradient(135deg, #3498db, #8e44ad);
    --modal-header-text: white;
    --modal-border: #e0e0e0;
    --modal-footer-bg: #f8f9fa;
    --modal-close-color: white;
    --detail-label-color: #7f8c8d;
    --detail-value-color: #2c3e50;
    --detail-section-border: #eee;
    --details-table-header-bg: #f5f7fa;
    --details-table-border: #e0e0e0;
    --details-table-row-hover: #f9f9f9;
    --no-data-color: #95a5a6;
    --info-item-bg: #ffffff;
    --info-item-border: #e0e0e0;
    --info-icon-color: #3498db;
    
    /* 表单元素变量 */
    --form-input-bg: white;
    --form-input-text: #2c3e50;
    --form-input-border: #ddd;
    --form-select-bg: white;
    --form-select-text: #2c3e50;
    --form-select-border: #ddd;
}

/* 深色主题 */
[data-theme="dark"] {
    --primary-gradient-start: #2c3e50;
    --primary-gradient-end: #1a1a2e;
    --text-light: #ecf0f1;
    --text-dark: #bdc3c7;
    --bg-light: #1a1a2e;
    --bg-card: #2c3e50;
    --bg-sidebar: linear-gradient(to bottom, #2c3e50, #1a1a2e);
    --bg-header: linear-gradient(135deg, #2c3e50, #1a1a2e);
    --bg-footer: linear-gradient(135deg, #2c3e50, #1a1a2e);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --border-color: #4a6278;
    --card-hover-transform: translateY(-5px);
    
    /* 添加设置页面元素的深色模式样式 */
    --form-bg: #2c3e50;
    --section-title-color: #ecf0f1;
    --section-title-border: #4a6278;
    --setting-desc-color: #bdc3c7;
    --form-input-bg: #1a1a2e;
    --form-input-text: #ecf0f1;
    --form-input-border: #4a6278;
    --form-select-bg: #1a1a2e;
    --form-select-text: #ecf0f1;
    --form-select-border: #4a6278;
    
    /* 模态框深色模式变量 */
    --modal-bg: #2c3e50;
    --modal-text: #ecf0f1;
    --modal-header-bg: linear-gradient(135deg, #2c3e50, #1a1a2e);
    --modal-header-text: #ecf0f1;
    --modal-border: #4a6278;
    --modal-footer-bg: #1a1a2e;
    --modal-close-color: white;
    --detail-label-color: #95a5a6;
    --detail-value-color: #ecf0f1;
    --detail-section-border: #4a6278;
    --details-table-header-bg: #1a1a2e;
    --details-table-border: #4a6278;
    --details-table-row-hover: #34495e;
    --no-data-color: #7f8c8d;
    --info-item-bg: #34495e;
    --info-item-border: #4a6278;
    --info-icon-color: #3498db;
}

/* 全局背景 */
body {
    background: var(--bg-header);
    background-size: 100% 100%;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
    padding: 20px 0;
    transition: all 0.3s ease;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.05) 0%, transparent 5%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 5%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 10%);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    box-shadow: 0 10px 30px var(--shadow-color);
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
    transition: all 0.3s ease;
}

/* 顶部栏美化 */
header {
    background: var(--bg-header);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 10px var(--shadow-color);
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
    transition: all 0.3s ease;
}

header h1 {
    color: var(--text-light);
    font-size: 1.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

header h1 i {
    margin-right: 15px;
    font-size: 2rem;
    color: var(--text-light);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.header-actions {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    margin-right: 20px;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    transition: all 0.3s;
}

.user-info:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.user-info i {
    font-size: 1.2rem;
    margin-right: 10px;
    color: var(--text-light);
}

.user-info span {
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.btn-logout {
    background-color: rgba(231, 76, 60, 0.8);
    color: var(--text-light);
    border: none;
    padding: 8px 15px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.btn-logout:hover {
    background-color: rgba(231, 76, 60, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-logout i {
    margin-right: 8px;
}

/* 仪表盘全局样式增强 */
.dashboard-container {
    background-color: var(--bg-light);
    box-shadow: inset 0 2px 5px var(--shadow-color);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    display: flex;
    flex: 1;
    transition: all 0.3s ease;
}

/* 侧边栏美化 */
.sidebar {
    background: var(--bg-sidebar);
    padding-top: 0;
    box-shadow: 2px 0 5px var(--shadow-color);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    width: 250px;
    flex-shrink: 0;
    /* 移除左下角圆角，解决白色间隙问题 */
    border-radius: 0;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.15);
    margin-bottom: 0; /* 移除底部间距 */
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
    width: 42px;
    height: 42px;
    min-width: 42px; /* 防止图片被压缩 */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header:hover img {
    transform: scale(1.05);
}

.sidebar-header .header-text {
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 防止文本溢出 */
    width: 100%;
}

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
    padding: 0;
    color: var(--text-light);
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap; /* 防止标题换行 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 显示省略号 */
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.sidebar-header h3 i {
    font-size: 0.7rem;
    margin-left: 5px;
    color: rgba(255, 255, 255, 0.7);
    vertical-align: top;
    flex-shrink: 0; /* 防止图标被压缩 */
}

.sidebar-header small {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
    margin-top: 3px;
    letter-spacing: 0.3px;
    white-space: nowrap; /* 防止副标题换行 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 显示省略号 */
}

/* 用户欢迎信息 */
.user-welcome {
    margin-top: 0;
    padding: 10px 20px;
    background: transparent; /* 移除背景色 */
    text-align: left;
    border-bottom: none; /* 移除底部边框 */
    margin-bottom: 0; /* 移除底部间距 */
}

.user-welcome p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8); /* 稍微提高对比度 */
    display: flex;
    align-items: center;
    white-space: nowrap; /* 防止欢迎文本换行 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 显示省略号 */
}

.user-welcome i {
    margin-right: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7); /* 稍微提高对比度 */
    flex-shrink: 0; /* 防止图标被压缩 */
}

.user-welcome strong {
    color: var(--text-light);
    font-weight: 600;
    margin-left: 5px;
    max-width: 120px; /* 限制用户名宽度 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

/* 导航菜单 - 移除"功能导航"文字 */
.sidebar-menu {
    list-style: none;
    padding: 0; /* 移除顶部内边距 */
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative; /* 用于添加分隔线 */
}

/* 移除菜单顶部分隔线 */
.sidebar-menu::before {
    display: none; /* 完全移除分隔线 */
}

.sidebar-menu li {
    margin-bottom: 2px; /* 减小项目间距 */
    position: relative;
}

.sidebar-menu li:last-child {
    margin-top: auto;
    margin-bottom: 15px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
    height: 44px;
    line-height: 44px;
}

.sidebar-menu a:hover, 
.sidebar-menu a.active {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    border-left: 4px solid var(--text-light);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    color: var(--text-light);
}

.sidebar-menu a.active {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
}

.sidebar-menu i {
    font-size: 1.1rem;
    width: 24px;
    height: 16px;
    margin-right: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
    flex-shrink: 0;
    vertical-align: middle;
    line-height: 1;
}

.sidebar-menu a:hover i,
.sidebar-menu a.active i {
    color: var(--text-light);
}

/* 菜单项文本 */
.sidebar-menu span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    line-height: 1;
}

/* 主内容区域美化 */
.main-content {
    background-color: var(--bg-light);
    padding: 25px;
    flex: 1;
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* 为主内容区域添加深色模式样式 */
[data-theme="dark"] .main-content {
    background-color: var(--bg-light);
    color: var(--text-light);
}

/* 内容区域 */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* 内容头部样式 */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

/* 为内容头部添加深色模式样式 */
[data-theme="dark"] .content-header {
    border-bottom-color: var(--border-color);
}

.content-header h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    border: none;
}

/* 为标题添加深色模式样式 */
[data-theme="dark"] .content-header h2 {
    color: var(--text-light);
}

.content-header h2 i {
    margin-right: 12px;
    color: var(--primary-gradient-start);
    font-size: 1.8rem;
}

/* 为标题图标添加深色模式样式 */
[data-theme="dark"] .content-header h2 i {
    color: var(--primary-gradient-start);
}

.action-buttons .btn {
    padding: 10px 18px;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: all 0.3s;
}

.action-buttons .btn {
    background-color: var(--primary-gradient-start);
    color: var(--text-light);
}

.action-buttons .btn:hover {
    background-color: var(--primary-gradient-end);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.action-buttons .btn i {
    margin-right: 8px;
}

/* 无数据提示 */
.no-data {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: var(--text-dark, #777);
    font-style: italic;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin: 20px 0;
    border: 1px dashed var(--border-color, #e0e0e0);
    font-size: 1rem;
}

[data-theme="dark"] .no-data {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

/* 统计卡片美化 */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s;
    overflow: hidden;
    border: none;
    background-color: var(--bg-card);
}

.card:hover {
    transform: var(--card-hover-transform);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.card-header {
    padding: 18px 20px;
    background: var(--bg-header);
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    display: flex;
    align-items: center;
}

.card-header h3 i {
    margin-right: 10px;
    font-size: 1.3rem;
}

.card-body {
    padding: 10px 20px;
    text-align: center;
}

.card-body h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 10px 0;
    padding: 0;
    border: none;
}

.card-body p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
}

.card-footer {
    padding: 15px 20px;
    background-color: rgba(245, 247, 250, 0.5);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 设备卡片样式增强 */
.device-card .card-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.account-card .card-header {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.character-card .card-header {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.group-card .card-header {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

/* 分组卡片特殊样式 */
.group-card {
    transition: all 0.3s ease;
}

.group-info p {
    display: flex;
    align-items: center;
    margin: 12px 0;
    font-size: 1rem;
    text-align: left;
}

.group-info i {
    width: 20px;
    height: 20px;
    line-height: 25px;
    text-align: center;
    margin-right: 10px;
    color: #e67e22;
    font-size: 1.1rem;
}

/* 分组卡片tooltip支持 */
.group-info p {
    position: relative;
}

.group-info p:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* 角色卡片特殊样式 */
.character-card {
    transition: all 0.3s ease;
}

.character-info p {
    display: flex;
    align-items: center;
    margin: 12px 0;
    font-size: 1rem;
    text-align: left;
    position: relative;
}

.character-info i {
    width: 20px;
    height: 15px;
    line-height: 25px;
    text-align: center;
    margin-right: 10px;
    color: #2ecc71;
    font-size: 1.1rem;
}

.character-info p:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.device-info p,
.account-info p {
    display: flex;
    align-items: center;
    margin: 12px 0;
    font-size: 1rem;
    text-align: left;
}

.device-info i,
.account-info i {
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    margin-right: 10px;
    color: #3498db;
    font-size: 1.1rem;
}

.account-info i {
    color: #9b59b6;
}

/* 卡片操作按钮 */
.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.card-actions .btn {
    background-color: #3498db;
    color: white;
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.card-actions .btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.card-actions .btn-icon {
    padding: 8px;
    min-width: 36px;
    border-radius: 50%;
}

.btn-edit {
    background-color: #9b59b6 !important;
}

.btn-edit:hover {
    background-color: #8e44ad !important;
    box-shadow: 0 4px 8px rgba(155, 89, 182, 0.3) !important;
}

.btn-danger {
    background-color: #e74c3c !important;
}

.btn-danger:hover {
    background-color: #c0392b !important;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3) !important;
}

/* 表单容器样式 */
.form-container {
    background-color: var(--bg-card, white);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px var(--shadow-color, rgba(0, 0, 0, 0.1));
}

[data-theme="dark"] .form-container {
    background-color: var(--form-bg);
    color: var(--text-light);
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #34495e;
    display: block;
}

/* 表单行样式，用于水平排列表单元素 */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
    gap: 15px;
}

/* 行内表单组样式，用于在一行内显示多个表单元素 */
.form-group-inline {
    flex: 1;
    min-width: 120px;
    padding-right: 10px;
    padding-left: 10px;
    margin-bottom: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--form-input-border);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: var(--form-input-bg);
    color: var(--form-input-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

/* 表单操作按钮 */
.form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.form-actions .btn {
    margin-left: 10px;
}

[data-theme="dark"] .form-actions .btn {
    background-color: #2980b9;
    color: var(--text-light);
}

[data-theme="dark"] .form-actions .btn:hover {
    background-color: #3498db;
}

[data-theme="dark"] .btn-secondary {
    background-color: #7f8c8d;
    color: var(--text-light);
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: #95a5a6;
}

/* 修复表单元素在深色模式下的样式 */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    background-color: var(--form-input-bg);
    color: var(--form-input-text);
    border-color: var(--form-input-border);
}

[data-theme="dark"] .form-group label {
    color: var(--text-light);
}

/* 修复"更多系统设置"文本在深色模式下的颜色 */
[data-theme="dark"] .no-data {
    color: var(--text-light);
}

/* 模态框样式增强 */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: none;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background-color: var(--modal-bg) !important;
    color: var(--modal-text) !important;
}

.modal-header {
    padding: 20px 25px;
    background: var(--modal-header-bg);
    color: var(--modal-header-text);
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--modal-header-text);
}

.modal-close {
    color: var(--modal-close-color);
    opacity: 0.9;
    font-size: 1.8rem;
    transition: all 0.3s;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close:hover {
    opacity: 1;
    color: #f8f9fa;
    transform: scale(1.1);
}

.modal-body {
    padding: 25px;
    background-color: var(--modal-bg) !important;
    color: var(--modal-text) !important;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--modal-border);
    background-color: var(--modal-footer-bg);
    text-align: right;
}

.modal-footer .btn {
    padding: 10px 20px;
    font-weight: 600;
    margin-left: 10px;
}

/* 页脚美化 */
footer {
    background: var(--bg-footer);
    color: rgba(255, 255, 255, 0.7);
    padding: 20px 0;
    text-align: center;
    border-radius: 0 0 10px 10px;
    margin-top: 0;
    transition: all 0.3s ease;
}

footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin: 0 10px;
    transition: all 0.3s;
}

footer a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

/* 响应式调整增强 */
@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        padding: 10px 0;
        min-height: auto;
    }
    
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .sidebar-menu li {
        margin: 5px;
    }
    
    .sidebar-menu li:last-child {
        margin: 5px;
    }
    
    .sidebar-menu a {
        border-radius: 30px;
        margin: 0;
        border-left: none;
        padding: 8px 15px;
    }
    
    .sidebar-menu a:hover,
    .sidebar-menu a.active {
        border-left: none;
        background: rgba(255, 255, 255, 0.2);
    }
    
    .main-content {
        padding: 20px;
    }
    
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        flex: 1 0 100%;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .action-buttons {
        margin-top: 15px;
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .user-info {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-section {
    animation: fadeIn 0.5s ease-out;
}

/* 美化滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #2c3e50;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #4a6278;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #5d7b96;
}

/* 主题切换按钮样式 */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin: 10px 0;
    width: 100%;
    position: relative;
}

[data-theme="dark"] .theme-switch-wrapper {
    color: var(--text-light);
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
    margin: 0 10px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: white;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.theme-switch-wrapper em {
    margin-left: auto;
    font-size: 0.8rem;
    font-style: normal;
    opacity: 0.7;
}

[data-theme="dark"] .theme-switch-wrapper em {
    color: var(--text-light);
    opacity: 0.8;
}

.theme-switch-wrapper span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

[data-theme="dark"] .theme-switch-wrapper span {
    color: var(--text-light);
}

/* 设置描述文本 */
.setting-desc {
    margin-top: 5px;
    font-size: 0.9rem;
    color: var(--dark-gray, #777);
    font-style: italic;
}

[data-theme="dark"] .setting-desc {
    color: var(--setting-desc-color);
}

/* 分区标题 */
.section-title {
    margin: 30px 0 20px;
    padding-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark, #2c3e50);
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--primary-gradient-start);
}

[data-theme="dark"] .section-title {
    color: var(--section-title-color);
    border-bottom-color: var(--section-title-border);
}

[data-theme="dark"] .section-title i {
    color: var(--primary-gradient-start);
}

/* 表单分节标题 */
.form-section-title {
    margin: 25px 0 15px;
    padding-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark, #2c3e50);
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

[data-theme="dark"] .form-section-title {
    color: var(--text-light);
    border-bottom-color: var(--border-color);
}

/* 美化的空状态提示 */
.no-data-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    margin: 30px 0;
    text-align: center;
    background-color: var(--bg-card, white);
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow-color, rgba(0, 0, 0, 0.05));
    border: 1px dashed var(--border-color, #e0e0e0);
}

[data-theme="dark"] .no-data-container {
    background-color: var(--bg-card, #2d3748);
    border-color: var(--border-color, #4a5568);
}

.no-data-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.no-data-icon i {
    font-size: 3rem;
    color: white;
}

.no-data-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark, #2c3e50);
    margin: 0 0 15px 0;
}

[data-theme="dark"] .no-data-title {
    color: var(--text-light, #e2e8f0);
}

.no-data-message {
    font-size: 1.1rem;
    color: var(--text-dark, #7f8c8d);
    margin: 0 0 30px 0;
    max-width: 500px;
}

[data-theme="dark"] .no-data-message {
    color: var(--text-light, #a0aec0);
}

.add-device-btn {
    padding: 12px 25px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.add-device-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.add-device-btn i {
    margin-right: 8px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .no-data-container {
        padding: 40px 20px;
    }
    
    .no-data-icon {
        width: 80px;
        height: 80px;
    }
    
    .no-data-icon i {
        font-size: 2.5rem;
    }
    
    .no-data-title {
        font-size: 1.5rem;
    }
    
    .no-data-message {
        font-size: 1rem;
    }
    
    .add-device-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* 设备详情模态框样式 */
.device-detail-modal {
    max-width: 800px;
}

.device-detail-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.device-detail-header {
    margin-bottom: 10px;
}

.device-detail-header h2 {
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    color: var(--modal-text);
}

.device-id {
    font-size: 0.9rem;
    color: var(--detail-label-color);
}

.detail-section {
    border-bottom: 1px solid var(--detail-section-border);
    padding-bottom: 15px;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h4 {
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    color: var(--modal-text);
}

.detail-section h4 i {
    margin-right: 10px;
    color: var(--primary-gradient-start);
}

.detail-section h5 {
    font-size: 1rem;
    margin: 15px 0 10px;
    color: var(--modal-text);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.9rem;
    color: var(--detail-label-color);
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1rem;
    color: var(--detail-value-color);
    font-weight: 500;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border: 1px solid var(--details-table-border);
}

.details-table th {
    background-color: var(--details-table-header-bg);
    padding: 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--details-table-border);
    color: var(--modal-text);
}

.details-table td {
    padding: 10px;
    border-bottom: 1px solid var(--details-table-border);
    color: var(--modal-text);
}

.details-table tr:last-child td {
    border-bottom: none;
}

.details-table tr:hover td {
    background-color: var(--details-table-row-hover);
}

.memory-details-list,
.disk-details-list {
    max-height: 200px;
    overflow-y: auto;
}

.notes-content {
    background-color: var(--modal-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--modal-border);
    color: var(--modal-text);
}

.notes-content em {
    color: var(--no-data-color);
    font-style: italic;
}

.no-data {
    text-align: center;
    padding: 15px;
    color: var(--no-data-color);
    font-style: italic;
    background-color: var(--modal-bg);
    border-radius: 8px;
    border: 1px dashed var(--modal-border);
}

/* 账号详情模态框样式 */
.account-detail-modal {
    max-width: 700px;
}

.account-detail-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.account-detail-header {
    margin-bottom: 10px;
}

.account-detail-header h2 {
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    color: var(--modal-text);
}

.account-id {
    font-size: 0.9rem;
    color: var(--detail-label-color);
}

/* 账号卡片备注信息单行显示 */
.account-info p:has(i.fa-sticky-note) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.password-display {
    display: inline-block;
    font-family: monospace;
    padding: 2px 5px;
    background-color: var(--modal-bg);
    border-radius: 4px;
    border: 1px solid var(--modal-border);
    color: var(--modal-text);
}

.password-display.masked {
    font-family: sans-serif;
}

.btn-icon.toggle-password {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    margin-left: 10px;
    font-size: 1.2rem;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
    position: relative;
    top: 0;
}

.btn-icon.toggle-password:hover {
    background-color: rgba(52, 152, 219, 0.2);
    color: #2980b9;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
    top: 0;
}

/* 深色模式下的密码切换按钮样式 */
[data-theme="dark"] .btn-icon.toggle-password {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

[data-theme="dark"] .btn-icon.toggle-password:hover {
    background-color: rgba(52, 152, 219, 0.3);
    color: #5dade2;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
    top: 0;
}

/* 账号详情信息列表样式 */
.account-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    background-color: var(--modal-bg);
}

.info-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    background-color: var(--info-item-bg);
    border: 1px solid var(--info-item-border);
    transition: all 0.3s ease;
}

.info-item:hover {
    box-shadow: 0 3px 10px var(--shadow-color);
}

.info-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--modal-header-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.info-icon i {
    color: var(--modal-header-text);
    font-size: 1rem;
}

.info-label {
    width: 80px;
    color: var(--detail-label-color);
    font-size: 0.9rem;
    font-weight: 500;
    flex-shrink: 0;
}

.info-value {
    flex: 1;
    color: var(--detail-value-color);
    font-size: 1rem;
    word-break: break-word;
}

.info-value.note-content {
    line-height: 1.5;
    max-height: 80px;
    overflow-y: auto;
}

.info-value.note-content em {
    color: var(--no-data-color);
    font-style: italic;
}

.info-value .password-display {
    background-color: var(--info-item-bg);
    color: var(--detail-value-color);
    border-color: var(--info-item-border);
}

.password-field {
    display: flex;
    align-items: center;
}

.btn-icon.toggle-password {
    color: var(--info-icon-color);
    margin-left: 10px;
}

.btn-icon.toggle-password:hover {
    color: var(--primary-gradient-end);
}

/* 响应式调整 */
@media (max-width: 576px) {
    .info-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .info-icon {
        margin-bottom: 10px;
    }
    
    .info-label {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* 确保设备选择器在浅色模式下不显示为深色 */
select {
    background-color: var(--form-select-bg);
    color: var(--form-select-text);
    border-color: var(--form-select-border);
    appearance: auto;
}

/* 确保设备选择器选项在浅色模式下不显示为深色 */
option {
    background-color: var(--form-select-bg);
    color: var(--form-select-text);
}

/* 强制刷新CSS */ .force-refresh {}

/* 添加一个全局样式来调整所有FontAwesome图标的垂直对齐 */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-light, .fa-brands {
    vertical-align: -0.125em; /* 添加额外的垂直对齐调整 */
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 15px;
}

.pagination button {
    background-color: var(--primary-gradient-start);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
}

.pagination button:hover:not([disabled]) {
    background-color: var(--primary-gradient-end);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination button[disabled] {
    background-color: var(--medium-gray);
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination button[disabled]:hover {
    transform: none;
    box-shadow: none;
}

.pagination span {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    min-width: 80px;
    text-align: center;
}

.pagination .pagination-prev i {
    margin-right: 5px;
}

.pagination .pagination-next i {
    margin-left: 5px;
}

/* 深色模式分页控件样式 */
[data-theme="dark"] .pagination button {
    background-color: var(--primary-gradient-start);
    color: var(--text-light);
}

[data-theme="dark"] .pagination button:hover:not([disabled]) {
    background-color: var(--primary-gradient-end);
}

[data-theme="dark"] .pagination span {
    color: var(--text-light);
}

[data-theme="dark"] .pagination button[disabled] {
    background-color: var(--dark-gray);
    color: var(--text-muted);
}

/* Tooltip样式 */
.tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent;
}

.device-info p,
.account-info p {
    display: flex;
    align-items: center;
    margin: 12px 0;
    font-size: 1rem;
    text-align: left;
}

/* 只针对角色模态框的样式修改 */
#editCharacterModal .modal-content {
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    max-width: 700px; /* 稍微加宽一点 */
}

#editCharacterModal .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(95vh - 160px);
}

#editCharacterModal .modal-footer {
    position: sticky;
    bottom: 0;
    background-color: var(--modal-footer-bg);
    border-top: 1px solid var(--modal-border);
    z-index: 10;
    padding: 20px 25px;
    margin-top: auto; /* 确保footer在底部 */
}

/* 确保表单内容可以正常滚动 */
#editCharacterModal form {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 修复角色模态框中的表单行布局 */
#editCharacterModal .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

#editCharacterModal .form-group-inline {
    flex: 1;
    min-width: 200px;
}

/* 确保按钮区域不会被截断 */
#editCharacterModal .form-actions {
    position: sticky;
    bottom: 0;
    background-color: var(--modal-bg);
    padding: 15px 0;
    margin-top: 20px;
    border-top: 1px solid var(--modal-border);
    z-index: 10;
}