/* 移动端适配样式 */

/* 当屏幕宽度小于768px时应用以下样式 */
@media (max-width: 768px) {
  /* 首页布局调整 */
  .home-page.is-mobile .sidebar {
    position: absolute;
    z-index: 1001;
    height: 100%;
    background-color: #fff; /* 确保侧边栏有背景色 */
    overflow: hidden; /* 避免内容在折叠过程中溢出 */
  }

  .home-page.is-mobile .sidebar:not(.is-collapsed) {
    /* No transform needed, width is controlled by component */
  }

  .home-page.is-mobile .content {
    padding: 8px;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .home-page.is-mobile .list-view-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .home-page.is-mobile .note-list-wrapper {
    flex: 1;
    overflow-y: auto;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .mobile-menu-toggle {
    margin-right: 10px;
  }

  .header .actions, .preview-header .actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .preview-header .actions .el-button {
    margin-left: 0 !important;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
  }

  .mobile-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
  }
  
  .mobile-search-container {
    padding: 0 10px 10px;
    background-color: #fff;
  }

  .dark-theme .mobile-search-container {
     background-color: var(--bg-color);
  }

  .search-input {
    width: 100%; /* Make search full width on mobile */
  }

  .file-list {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .file-item {
    margin-bottom: 0;
  }

  .el-dialog {
    width: 95% !important;
    max-width: 400px;
  }

  /* 登录和注册页面 */
  .login-card, .register-card {
    width: 90%;
    padding: 2rem 1.5rem;
  }

  .login-card .card-header h2 {
    font-size: 1.5rem;
  }

  .login-card .button-group, .register-card .button-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .register-card .card-header h2 {
    font-size: 1.5rem;
  }

  /* 回收站页面 */
  .el-table {
    display: none; /* 在小屏幕上隐藏表格 */
  }

  .trash-cards {
    display: block; /* 显示卡片布局 */
  }

  .trash-card {
    margin-bottom: 15px;
  }
}

/* 针对回收站的卡片式布局 (默认隐藏) */
.trash-cards {
  display: none;
}

/* 优化移动端悬浮操作按钮 (FAB) */
.fab {
  position: fixed !important;
  right: 25px !important;
  bottom: 90px !important; /* 调整位置以避开主题切换按钮 */
  z-index: 1050 !important;
  width: 56px !important;
  height: 56px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  transition: transform 0.2s ease-in-out !important;
}

.fab:hover {
  transform: scale(1.05); /* 添加轻微的悬停放大效果 */
}

.fab .el-icon {
  font-size: 24px; /* 调整图标大小 */
}
