:root {
  --bs-primary: #1266f1;
  --bs-primary-rgb: 18, 102, 241;
  --bs-file-color: #428bca;
  --bs-share-color: #5cb85c;
}

body {
  background-color: #9cd9f2;
  font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-primary {
  background-color: #0275d8 !important;
}

.navbar {
  height: 70px;
  padding: 0;
}

.nav-item .nav-link.text-white:hover,
.nav-item .nav-link.text-white:focus {
  color: #ffcc00 !important;
  background-color: transparent !important;
}

.main-content {
  margin-top: 70px;
  flex: 1 0 auto;
  padding-bottom: 60px; /* 为底部留出空间 */
}

.card {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

/* 移除欢迎标题左侧蓝色条 */
.welcome-title {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 25px;
}

.sidebar {
  width: 245px;
}

.content {
  width: calc(100% - 265px);
}

/* 修改左侧栏目悬停效果 */
.nav-link {
  color: #444;
  padding: 0.75rem 1rem;
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-link:hover {
  background-color: #f2f2f2;
  color: var(--bs-primary);
  border-left: 3px solid transparent;
  width: 100%;
}

.nav-link.active {
  background-color: #f2f2f2;
  color: var(--bs-primary);
  border-left: 3px solid var(--bs-primary);
  width: 100%;
}

.count-box {
  padding: 2rem 1rem;
  text-align: center;
  color: white;
  border-radius: 0.5rem;
}

.count-box.files {
  background-color: var(--bs-file-color);
}

.count-box.shares {
  background-color: var(--bs-share-color);
}

.count-number {
  font-size: 3rem;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.info-item {
  display: flex;
  margin-bottom: 0.25rem;
  align-items: center;
}

.info-label {
  width: 100px;
  min-width: 100px;
  color: #666;
}

.info-value {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 调整注册邮箱背景色 */
.user-info-card {
  background-color: #f0f7ff;
}

/* 表格相关样式 */
.table > tbody > tr > td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 美化底部，添加云朵背景图 */
.footer-wrapper {
  position: relative;
  margin-top: 4rem;
  padding-top: 100px;
}

.cloud-bg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100px;
  background-image: url('https://cdn.jsdelivr.net/gh/dangbx/resource/images/cloud-bg.png');
  background-repeat: repeat-x;
  background-position: bottom center;
  z-index: -1;
  opacity: 0.8;
}

.footer {
  padding: 20px 0;
  color: #666;
  text-align: center;
  background-color: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  width: 100%;
  position: relative;
}

/* 修复侧边栏样式 */
.d-flex {
  display: flex !important;
  flex-wrap: nowrap;
}

/* 顶部导航样式修复 */
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
}

.navbar-nav .nav-link {
  color: white !important;
  border-left: none;
}

.navbar-nav .nav-link:hover {
  color: #ffcc00 !important;
  border-left: none;
  width: auto;
}

/* 下拉菜单修复 */
.dropdown-menu {
  min-width: 10rem;
  padding: 0.5rem 0;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
  padding: 0.5rem 1.5rem;
  color: #212529;
}

.dropdown-item:hover, .dropdown-item:focus {
  color: #16181b;
  background-color: #f8f9fa;
}

/* 按钮样式统一 */
.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-primary:hover {
  background-color: #0d5bdd;
  border-color: #0d5bdd;
}

/* 确保页脚在底部 */
footer {
  margin-top: auto;
}

/* 页面内容区域修复 */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .content {
    width: 100%;
  }
  
  .d-flex {
    flex-direction: column;
  }
}

/* 预览图片样式 */
.preview-img-cell {
    width: 120px;
    text-align: center;
    vertical-align: middle;
}

.preview-img {
    max-width: 100px;
    max-height: 80px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

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

/* 上传状态样式 */
.upload-progress {
  margin-top: 20px;
}

.progress-item {
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.progress-filename {
  font-weight: bold;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-bar {
  height: 8px;
  border-radius: 4px;
}

.file-action {
  margin-top: 5px;
}

/* 链接卡片样式 */
.link-card {
  overflow: hidden;
  border-radius: 10px;
  transition: transform 0.2s;
  height: 100%;
}

.link-card:hover {
  transform: translateY(-5px);
}

.card-icon {
  font-size: 2rem;
  color: #0275d8;
}

.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

/* 从index.html移植的样式 - 结束 */
