/* 浅色主题 */
body {
    background-color: #f8f9fa;
    color: #333;
    font-family: Arial, sans-serif;
    background-image: var(--background-image, none); /* 使用变量来设置背景图片 */
    background-size: cover; /* 确保背景图片覆盖整个页面 */
    background-attachment: fixed; /* 固定背景图片 */
    background-position: center; /* 背景图片居中 */
    background-repeat: no-repeat; /* 不重复背景图片 */
    margin: 0; /* 移除默认的 body 边距 */
    padding: 0; /* 移除默认的 body 内边距 */
    min-height: 100vh; /* 确保 body 至少占满整个视口高度 */
}

/* 深色主题 */
body.dark-theme {
    background-color: #1e1e1e;
    color: #f8f9fa;
    background-image: var(--background-image, none); /* 使用变量来设置背景图片 */
    background-size: cover; /* 确保背景图片覆盖整个页面 */
    background-attachment: fixed; /* 固定背景图片 */
    background-position: center; /* 背景图片居中 */
    background-repeat: no-repeat; /* 不重复背景图片 */
}

/* 卡片样式 */
.card {
    background-color: rgba(255, 255, 255, 0.7); /* 提高透明度（降低 alpha 值） */
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.card-header {
    background-color: rgba(233, 236, 239, 0.7); /* 提高透明度（降低 alpha 值） */
    border-bottom: none;
    padding: 0.5rem 1rem;
    border-radius: 8px 8px 0 0;
    margin-bottom: 8px;
}

.card-body {
    padding: 0.5rem 1rem;
}

.btn-link {
    color: #0d6efd;
}

.btn-link:hover {
    color: #0a58ca;
}

/* 深色主题卡片样式 */
.dark-theme .card {
    background-color: rgba(45, 45, 45, 0.7); /* 提高透明度（降低 alpha 值） */
    border: none;
    color: #f8f9fa;
}

.dark-theme .card-header {
    background-color: rgba(51, 51, 51, 0.7); /* 提高透明度（降低 alpha 值） */
    border-bottom: none;
    padding: 0.5rem 1rem;
    border-radius: 8px 8px 0 0;
    margin-bottom: 8px;
}

.dark-theme .card-body {
    color: #f8f9fa;
}

.dark-theme .btn-link {
    color: #4dabf7;
}

.dark-theme .btn-link:hover {
    color: #1c7ed6;
}

.dark-theme hr {
    background-color: #444;
}

/* 时间日期样式 */
#current-time {
    color: inherit !important;
    font-size: 0.9rem !important;
    margin-top: 4px !important;
}

/* 链接样式 */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 减少行间距 */
.card-body p, .card-body a {
    margin: 0;
    line-height: 1.4;
}

/* 分类标题样式 */
.card-header h5 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: inherit;
}

/* 链接图标样式 */
.card-body img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* 编辑和删除按钮样式 */
.card-body .btn-link {
    padding: 0;
    margin-left: 8px;
}

/* 书签卡片样式 */
.card-body .card {
    background-color: transparent;
    box-shadow: none;
    margin-bottom: 0;
}

.card-body .card-body {
    padding: 0;
}

/* 确保拖拽功能正常 */
#categories .card-body .row > div {
    cursor: grab;
    user-select: none;
}

#categories .card-body .row > div.sortable-chosen {
    cursor: grabbing;
    opacity: 0.8;
}

/* 模态框样式（固定为浅色主题） */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
}

.modal-dialog {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    width: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.modal-title {
    color: #333;
}

.modal-body {
    color: #333;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}
