#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}

/* 响应式按钮组 */
.button-group {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

/* 针对编辑模式按钮的特殊样式 */
.button-row .el-button {
  font-size: 12px;
  padding: 8px 12px;
  margin: 0;
}

/* 在小屏幕上适当调整 */
@media (max-width: 767px) {
  .button-group {
    gap: 8px;
  }
  
  .button-row {
    gap: 6px;
  }
  
  .button-row .el-button {
    font-size: 11px;
    padding: 6px 10px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  /* 手机端隐藏管理登录按钮和锁定状态提示 */
  /* 使用兼容性更好的方法：为登录按钮添加特殊类名 */
  .login-button-mobile-hide {
    display: none !important;
  }
  
  /* 手机端隐藏锁定倒计时提示 */
  .button-row span[style*="color: #ff4757"] {
    display: none !important;
  }
  
  /* 特别优化两个按钮的情况 - 使用更兼容的方法 */
  .button-row {
    flex-wrap: nowrap !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 4px !important;
  }
  
  /* 当按钮较少时，调整大小以适应屏幕 */
  .button-row .el-button {
    max-width: calc(50% - 8px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* 手机端垂直布局：操作按钮区域 */
  .card-header-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    justify-content: flex-start !important;
  }
  
  /* 随机命令文字区域 */
  .command-section {
    width: 100% !important;
    text-align: left !important;
    min-height: auto !important;
    margin-bottom: 0 !important;
  }
  
  /* 按钮组在手机端全宽显示 */
  .button-group-container {
    width: 100% !important;
    justify-content: flex-end !important; /* 改为靠右对齐 */
    flex-wrap: wrap !important;
    align-items: center !important;
  }
  
  /* 确保按钮行在手机端靠右对齐 */
  .button-row {
    justify-content: flex-end !important; /* 改为靠右对齐 */
    width: 100% !important;
    gap: 10px !important; /* 增加按钮间距5px (从4px到9px) */
  }
  
  /* 专门处理两个按钮的情况 */
  .button-row.two-buttons {
    flex-wrap: nowrap !important;
    gap: 10px !important; /* 增加编辑模式和退出登录按钮之间的间距 (从10px到15px) */
  }
  
  /* 默认允许换行，适应多按钮情况 */
  .button-row {
    flex-wrap: wrap !important;
  }
  
  /* 当屏幕很窄时，优先保持按钮在同一行 */
  @media (max-width: 400px) {
    .button-row .el-button {
      font-size: 10px !important;
      padding: 4px 6px !important;
      min-width: auto !important;
    }
  }
  
  /* 手机端内容区域宽度优化 */
  .content-container {
    width: 95% !important;
    max-width: none !important;
  }
  
  .main-card {
    width: 95% !important;
    margin: 0 !important;
  }
  
  /* 手机端整体页面边距调整 */
  #app {
    margin-top: 20px !important;
    padding: 0 5px !important;
  }
  
  /* 手机端el-row调整 */
  .el-row {
    margin: 0 !important;
    padding: 0 !important;
  }
}

#kefu .el-icon {
  width: 40px;
  height: 40px;
  color: #E65A65;
  border: 1px gray dashed;
  border-radius: 50%;
  margin: 0.3rem 0;
  cursor: pointer;
}

#kefu {
  position: fixed;
  right: 10px;
  bottom: 50%;
  z-index: 999;
  width: 60px;
  height: 60px;
}

.el-collapse-item__header {
  font-size: 15px !important;
  font-weight: bold !important;
}

.el-collapse {
  border-top: 0 !important;
}

.el-link__inner {
  margin: 1vh;
}

.el-icon {
  margin-right: 1vh;
}

.admin-mode-indicator {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #f56c6c;
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  z-index: 1000;
  animation: pulse 2s infinite;
}

/* 管理按钮样式 - 蓝色 */
.el-button--info {
  background-color: #409eff !important;
  border-color: #409eff !important;
  color: white !important;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }

  100% {
    opacity: 1;
  }
}

/* 防止页面加载时显示原始模板标记 */
[v-cloak] {
  display: none;
}

/* 搜索下拉框样式 */
.search-dropdown {
  position: absolute;
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  z-index: 1000;
  animation: slideDown 0.2s ease-out;
  width: 100%;
  /* 与搜索框宽度保持一致 */
  left: 0;
  top: 100%;
  margin-top: 5px;
  /* 与搜索框保持一定距离 */
  box-sizing: border-box;
  max-height: 70vh;
  /* 限制最大高度 */
  overflow: hidden;
  /* 防止内容溢出 */
}

/* 响应式设计优化 */
@media (max-width: 768px) {
  .search-dropdown {
    max-height: 50vh;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-header {
  padding: 8px 12px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6c757d;
  font-weight: 500;
}

.dropdown-content {
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-item {
  padding: 10px 12px;
  border-bottom: 1px solid #f8f9fa;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.dropdown-item:hover,
.dropdown-item-active {
  background-color: #f0f9ff;
  border-left: 3px solid #409eff;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.item-content {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 500;
  color: #303133;
  margin-bottom: 2px;
  font-size: 14px;
  line-height: 1.4;
}

.item-url {
  color: #909399;
  font-size: 11px;
  word-break: break-all;
  line-height: 1.3;
}

.item-category {
  color: #67c23a;
  font-size: 10px;
  background: #f0f9ff;
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
  margin-left: 8px;
  align-self: center;
}

.no-results {
  padding: 20px;
  text-align: center;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  margin-top: 5px;
}

/* 搜索关键词高亮 */
mark {
  background-color: #ffeb3b;
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: bold;
}

/* 管理员登录对话框美化 */
.admin-login-dialog .el-dialog__header {
  text-align: center;
  padding: 30px 20px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.admin-login-dialog .el-dialog__body {
  padding: 35px 40px 0 40px;
}

.admin-login-dialog .el-dialog__footer {
  padding: 15px 40px 30px;
}

.login-dialog-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-dialog-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* 响应式优化 */
@media (max-width: 480px) {
  .admin-login-dialog {
    width: 90% !important;
  }
  
  .admin-login-dialog .el-dialog__body {
    padding: 20px 20px;
  }
  
  .admin-login-dialog .el-dialog__footer {
    padding: 15px 20px 25px;
  }
}