body {
  margin: 0;
  padding: 0;
  font: normal normal normal 14px / 1 FontAwesome;
  background-color: #f0f2f5;
}

/* 登录页面样式 */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #001529;
}

.login-box {
  width: 400px;
  padding: 40px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.login-box h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #001529;
  font-size: 28px;
}

/* 主布局样式 */
.layui-layout-admin .layui-header {
  background-color: #001529;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.layui-layout-admin .layui-logo {
  background-color: #001529;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
}

.layui-layout-right .layui-nav {
  background-color: transparent;
}

.layui-layout-right .layui-nav-item a {
  color: #fff;
}

.layui-layout-right .layui-nav-item a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.layui-nav-child {
  background-color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 侧边栏样式 - 按图片样式调整 */
.layui-side {
  background-color: #001529 !important;
  box-shadow: 1px 0 8px rgba(0, 0, 0, 0.1);
}

.layui-side-scroll {
  background-color: #001529;
}

/* 菜单样式 - 按图片样式调整 */
.layui-nav-tree {
  background-color: #001529 !important;
}

/* 卡片头部样式 - 修复按钮被遮住的问题 */
.layui-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.layui-card-header h2 {
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
}

.layui-card-header .layui-btn {
  margin: 0;
}

.layui-nav-tree .layui-nav-item {
  margin: 0;
}

.layui-nav-tree .layui-nav-item a {
  color: #fff;
  padding: 12px 20px;
  border-radius: 0;
  margin: 0;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: 500;
}

.layui-nav-tree .layui-nav-item a:hover {
  color: #fff;
  background-color: #001529 !important;
}

.layui-nav-tree .layui-nav-itemed > a {
  color: #fff;
  background-color: #001529 !important;
}

.layui-nav-tree .layui-nav-bar {
  background-color: #001529 !important;
  width: 4px;
  border-radius: 0 2px 2px 0;
}

.layui-nav-tree .layui-nav-itemed > a .layui-nav-more {
  border-color: #fff transparent transparent;
}

.layui-nav-tree .layui-nav-itemed > a:hover .layui-nav-more {
  border-color: #fff transparent transparent;
}

.layui-nav-tree .layui-nav-child {
  background-color: #002140 !important;
  border-radius: 0;
  margin: 0 !important;
  box-shadow: none;
}

.layui-nav-tree .layui-nav-child a {
  color: #fff;
  padding: 10px 20px 10px 40px !important;
  border-radius: 0;
  margin: 0;
}

.layui-nav-tree .layui-nav-child a:hover {
  color: #fff;
  background-color: rgba(24, 144, 255, 0.2) !important;
}

.layui-nav-tree .layui-nav-child dd.layui-this a,
.layui-nav-tree .layui-nav-child dd.layui-this a:hover {
  color: #fff;
  background-color: #001529 !important;
}

/* 内容区域样式 */
.layui-body {
  background-color: #f0f2f5;
  padding: 20px;
}

.content-wrapper {
  padding: 24px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 表格样式增强 */
.layui-table {
  margin-top: 0;
  border-radius: 6px;
  overflow: hidden;
}

.layui-table th {
  background-color: #fafafa;
  font-weight: 600;
  color: #666;
  border-bottom: 1px solid #f0f0f0;
}

.layui-table tr:hover {
  background-color: #fafafa;
}

/* 按钮组样式 */
.btn-group {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.btn-group .btn-right {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-group .layui-btn {
  margin-right: 0;
  border-radius: 6px;
}

/* 表单样式 */
.form-container {
  padding: 20px;
}

.total-duration {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  font-weight: 500;
}

.form-row {
  display: flex;
  margin-bottom: 15px;
  gap: 15px;
}

.form-row .layui-form-item.full-width {
  flex: 1;
  margin-right: 0;
  margin-bottom: 0;
}

/* 歌曲段表格样式 */
#musicSegmentsTable {
  margin-top: 15px;
  margin-bottom: 15px;
}

#musicSegmentsTable td {
  vertical-align: middle;
}

/* 搜索框样式 */
.search-box {
  padding: 16px;
}

/* 设备配置管理页面专用样式 */
.device-config-page {
  padding: 0;
}

.device-config-page .card {
  margin-bottom: 0;
  border-radius: 8px;
  overflow: hidden;
}

.device-config-page .card-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  padding: 20px 24px 0;
  margin-bottom: 16px;
}

.device-config-page .info-container {
  padding: 0 24px 20px;
}

.device-config-page .info-container h4 {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.device-config-page .info-container table {
  width: 100%;
}

.device-config-page .info-container table tr td {
  padding: 10px 15px;
  border: none;
}

.device-config-page .info-container table tr td strong {
  color: #666;
}

.device-config-page .sequence-container {
  padding: 0 24px 20px;
}

.device-config-page .sequence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.device-config-page .sequence-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin: 0;
}

.device-config-page .sequence-actions {
  display: flex;
  gap: 10px;
}

.device-config-page .sequence-actions .layui-btn {
  border-radius: 4px;
  padding: 0 16px;
  height: 32px;
  line-height: 32px;
  font-size: 12px;
}

.device-config-page .sequence-container table {
  width: 100%;
  margin-top: 0;
}

.device-config-page .sequence-container table tr td {
  padding: 12px 15px;
  vertical-align: middle;
}

.device-config-page .sequence-container table input[type='number'],
.device-config-page .sequence-container table select {
  margin: 0;
}

.device-config-page .btn-group {
  padding: 0 24px 20px;
  margin-top: 0;
}

.device-config-page #backToListBtn {
  border-radius: 4px;
}

/* 确保layui样式正确应用 */
.device-config-page .layui-table {
  border: 1px solid #f0f0f0;
}

.device-config-page .layui-table th {
  padding: 10px 15px;
  text-align: center;
  background-color: #fafafa;
  font-weight: 600;
  color: #666;
}

.device-config-page .layui-table td {
  text-align: center;
  vertical-align: middle;
}

/* 分页样式 */
.pagination {
  margin-top: 24px;
  text-align: right;
}

.layui-laypage {
  margin-top: 0;
}

.layui-laypage a,
.layui-laypage span {
  border-radius: 4px;
}

/* 状态标签样式 */
.status-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-tag.enable {
  background-color: #52c41a;
  color: #fff;
}

.status-tag.disable {
  background-color: #d9d9d9;
  color: #666;
}

/* 加载动画 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

/* 错误提示样式 */
.error-message {
  color: #f56c6c;
  padding: 12px 16px;
  background-color: #fef0f0;
  border: 1px solid #fbc4c4;
  border-radius: 6px;
  margin-bottom: 16px;
}

/* 成功提示样式 */
.success-message {
  color: #67c23a;
  padding: 12px 16px;
  background-color: #f0f9eb;
  border: 1px solid #e1f3d8;
  border-radius: 6px;
  margin-bottom: 16px;
}

/* 权限选择框样式 */
.permission-select {
  max-height: 300px;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  background-color: #fff;
}

.permission-select .layui-form-checkbox {
  margin: 6px 0;
}

/* 卡片样式 */
.card {
  background-color: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

.fa-server:before {
  content: '\f233';
}

/* 响应式优化 */
@media screen and (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .login-box {
    width: 90%;
    padding: 30px 20px;
  }

  .btn-group {
    justify-content: center;
  }
}

/* 用户详情页面样式 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.info-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  background-color: #fafafa;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.info-item:hover {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-item label {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
  font-weight: 500;
}

.info-item span {
  font-size: 14px;
  color: #333;
  font-weight: 600;
}

/* 优化Tab样式 */
.layui-tab {
  margin: 20px 0;
}

.layui-tab-title {
  border-bottom: 2px solid #f0f0f0;
}

.layui-tab-title .layui-this {
  color: #1890ff;
}

.layui-tab-title .layui-this:after {
  border-bottom: 2px solid #1890ff;
}

.layui-tab-content {
  padding: 20px 0;
}

.layui-tab-item {
  animation: layuiTabShow 0.3s ease;
}

/* 卡片式Tab样式优化 */
.layui-tab-card {
  margin: 0;
  background-color: transparent;
}

.layui-tab-card .layui-tab-title {
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 2px solid #f0f0f0;
}

.layui-tab-card .layui-tab-title li {
  float: left;
  margin: 0;
  padding: 0 15px;
  line-height: 40px;
  min-width: auto;
  max-width: none;
  position: relative;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  border: 0;
  background-color: transparent;
}

.layui-tab-card .layui-tab-content {
  padding: 20px 0;
}

.layui-tab-card .layui-tab-item {
  background-color: transparent;
}

@keyframes layuiTabShow {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 按钮组样式优化 */
.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  margin: 10px;
}

.btn-group .layui-btn {
  border-radius: 6px;
  transition: all 0.3s ease;
}

.btn-group .layui-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 批量导入配置页面样式 */
.import-container {
  padding: 32px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  max-width: 600px;
  margin: 0 auto;
}

.import-info {
  text-align: center;
  margin-bottom: 24px;
}

.import-info p:first-child {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.import-info .sub-text {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.upload-area {
  border: 2px dashed #d9d9d9;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  background-color: #fafafa;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 24px;
}

.upload-area:hover {
  border-color: #1890ff;
  background-color: #f0f9ff;
}

.upload-area i {
  font-size: 48px;
  color: #d9d9d9;
  margin-bottom: 16px;
  transition: color 0.3s ease;
}

.upload-area:hover i {
  color: #1890ff;
}

.upload-area p {
  font-size: 16px;
  color: #666;
  margin-bottom: 8px;
}

.upload-area .sub-text {
  font-size: 12px;
  color: #999;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.button-group .layui-btn {
  min-width: 120px;
  padding: 0 20px;
  height: 40px;
  line-height: 40px;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.button-group .layui-btn-primary {
  background-color: #fff;
  border: 1px solid #d9d9d9;
  color: #666;
}

.button-group .layui-btn-primary:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.button-group .layui-btn {
  background-color: #1890ff;
  border-color: #1890ff;
  color: #fff;
}

.button-group .layui-btn:hover {
  background-color: #40a9ff;
  border-color: #40a9ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.m-right {
  margin-right: 5px;
}

/* 设备配置页面样式 */
.device-config-page {
  padding: 20px;
}

.device-config-page .info-container {
  margin-bottom: 20px;
}

.device-config-page .info-container h4 {
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.device-config-page .layui-tab {
  margin-bottom: 20px;
}

.device-config-page .song-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.device-config-page .info-left .total-segments {
  font-weight: bold;
  color: #333;
}

.device-config-page .info-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.device-config-page .info-right .current-duration {
  color: #666;
}

.device-config-page .song-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.device-config-page .song-actions .right-actions {
  display: flex;
  gap: 10px;
}

.device-config-page .library-info {
  margin-bottom: 15px;
  font-weight: bold;
  color: #333;
}

.device-config-page .library-info .total-songs {
  font-size: 14px;
}

.device-config-page .layui-table th {
  text-align: center;
}

.device-config-page .layui-table td {
  text-align: center;
}

.device-config-page .layui-table .sequence-duration {
  width: 120px;
}

.device-config-page .layui-table .sequence-mode {
  width: 200px;
}

.device-config-page .layui-table .operation-btns {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.device-config-page .edit-btn {
  padding: 0 15px;
  height: 32px;
  line-height: 32px;
  font-size: 14px;
}

.device-config-page .btn-group {
  margin-top: 20px;
  text-align: right;
}
