:root {
    --tencent-blue: #0084ff;
    --tencent-dark-blue: #0066cc;
    --sidebar-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --text-primary: #333;
    --bg-primary: #fff;
}

.dark-mode {
    --sidebar-bg: #2d2d2d;
    --border-color: #404040;
    --text-primary: #e5e5e5;
    --bg-primary: #18191a;
    --tencent-blue: #3a6df7;
}

/* 基础布局 */
.container {
    max-width: 80vw; /* 防止页面溢出 */
    padding: 20px 15px;
    overflow-x: hidden;
    margin: 0 auto;

	
}

.header {
	
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 32px;
    color: var(--tencent-blue);
}

/* 左右布局 */
.layout-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-top: 20px;
}

.sidebar {
    background: var(--sidebar-bg);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.main-content {
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


/* 侧边栏模块 */
.sidebar-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--tencent-blue);
}


.btn-block {
    width: 100%;
    margin-bottom: 10px;
    justify-content: start;
}

.btn-success {
	border: 1px solid #2b9343;
	background: #28a745;
	color: #ffffff;
}

.btn-success:hover {
	background: #2c9043;
	color: #ffffff;
}


.btn {
    padding: 8px 16px;
    border: 1px solid #6c757d;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.9rem;
    justify-content: center;
}


.search-box {
    display: flex;
    gap: 10px;
}


/* 移除默认的焦点样式 */
input:focus-visible {
  outline: none;
}

/* 自定义焦点样式 */
input:focus-visible {
  border: 2px solid #4a90e2; /* 改变边框颜色 */
  box-shadow: 0 0 5px rgba(74, 144, 226, 0.5); /* 添加阴影效果 */
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: transparent;
}



.grid-header {
    display: grid;
    grid-template-columns: 40px 1fr 1.5fr 1fr 1.2fr 1.5fr 120px 80px;
    padding: 12px 15px;
    background: rgba(var(--tencent-blue), 0.08);
    font-weight: 500;
    gap: 15px;
}

.grid-row {
    display: grid;
    grid-template-columns: 40px 1fr 1.5fr 1fr 1.2fr 1.5fr 120px 80px; 
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    gap: 15px;
    align-items: center;
}


.dark-mode .data-section {
    background: #242526;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .layout-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .grid-header,
    .grid-row {
        grid-template-columns: 30px 1fr 2fr;
    }
    
    .grid-header > div:nth-child(n+4),
    .grid-row > div:nth-child(n+4) {
        display: none;
    }
}

/* OSS配置模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
	z-index: 1000;
}

.modal-content {
    background: var(--bg-primary);
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.form-group label {
    display: block;
    margin: 10px 0 5px;
    color: var(--text-primary);
}



/* 修复模态框显示问题 */
.modal.active {
    display: flex !important;
}






/* 基础布局优化 */
/* 表单优化 */
.form-group {
    display: grid;
    gap: 12px;
    margin: 15px 0;
}

.form-group label {
    font-weight: 500;
    color: var(--tencent-blue);
}



.form-control:focus {
    border-color: var(--tencent-blue);
    outline: none;
}






/* 分页优化 */
.pagination {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: transparent;
    min-width: 32px;
}

.page-btn.active {
    background: var(--tencent-blue);
    color: white;
    border-color: transparent;
}

/* 通知消息：增强通知消息样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    background: #e3ffe3;
    color: #28a745;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1em;
    font-weight: 500;
    max-width: 400px;
    border-left: 4px solid #28a745;
}

.notification::before {
    content: "✓";
    font-size: 1.3em;
}

.notification.error {
    background: #ffe3e3;
    color: #dc3545;
    border-left-color: #dc3545;
}

.notification.error::before {
    content: "✗";
}


.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}


/* 添加以下优化代码 */
.stats-bar {
    display: flex;
    align-items: center;
    gap: 20px; /* 增加间距 */
    margin-bottom: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}




/* 紧凑表单元素 */
.form-control {
	width: 100%;
    box-sizing: border-box; /* 防止溢出 */
    padding: 8px 12px;
   /* font-size: 0.95em;*/
}


/* 移动端优化 */
@media (max-width: 768px) {
    .grid-header > div:nth-child(7),
    .grid-row > div:nth-child(7) {
    display: none; /* 移动端隐藏过期时间列 */
    }
}




.form-group {
    grid-template-columns: 1fr; /* 单列布局 */
    gap: 8px;
}



/* 备份信息样式 */
.backup-info {
    margin-left: 20px;
    font-size: 0.9em;
    color: var(--text-primary);
    opacity: 0.8;
}

.backup-info i {
    margin-right: 5px;
}


.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  padding: 5px;
}


.favorite-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 20px;
    color: #ffc107;
    font-weight: 500;
}

.favorite-btn.active {
  color: gold; /* 激活状态（已收藏）为金色 */
}


/* 文件列表样式 */
#fileList {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
}

.file-item {
    padding: 12px;
    margin: 8px 0;
    background: rgba(var(--primary), 0.05);
    border-radius: 6px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.file-item:hover {
    background-color: rgba(var(--primary), 0.1);
}

.file-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-primary);
}

.file-item label::after {
    content: attr(data-time);
    margin-left: auto;
    font-size: 0.9em;
    color: var(--primary);
}

.file-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}


/* 添加批量新增相关样式 
.format-guide {
    background: rgba(var(--tencent-blue), 0.05);
    border-left: 3px solid var(--tencent-blue);
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 0 4px 4px 0;
    font-size: 0.9em;
}*/

.format-guide code {
    background: rgba(0,0,0,0.05);
    padding: 2px 5px;
    border-radius: 3px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.9em;
}

.preview-container {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 15px 0;
}

.preview-header {
    display: grid;
    grid-template-columns: 2fr 3fr 1.5fr 2fr;
    padding: 10px;
    background: rgba(var(--tencent-blue), 0.08);
    font-weight: 500;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.preview-list {
    display: flex;
    flex-direction: column;
}

.preview-item {
    display: grid;
    grid-template-columns: 2fr 3fr 1.5fr 2fr;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
    font-size: 0.9em;
}

.preview-item:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

.url-preview {
    color: var(--tencent-blue);
    font-size: 0.85em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark-mode .preview-item:nth-child(even) {
    background: rgba(255,255,255,0.05);
}


/* 预览列表容器 */
.preview-container {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

/* 预览分页 */
.preview-pagination {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.preview-pagination .page-btn {
    padding: 5px 10px;
    margin: 2px;
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
}

.preview-pagination .page-btn.active {
    background: var(--tencent-blue);
    color: white;
}



/* 收藏书签的颜色设置 */
.grid-row.favorite {
    border-radius: 12px;
    border-left: 3px solid gold;
}

.dark-mode .grid-row.favorite {
	border-radius:12px;
    border-left-color: #ffd700; 
}

/* 在 .favorite-count 后添加 */
.favorite-btn {
    color: #6c757d; /* 默认灰色 */
    transition: color 0.3s;
}

.favorite-btn.active {
    color: gold; /* 激活状态（已收藏）为金色 */
}



/* 新增和编辑书签的颜色设置 */
.grid-row.new-row {
	border-radius: 12px;
    border-left: 3px solid #28a745; /* 绿色边框表示新增 */
}

.grid-row.modified-row {
	border-radius: 12px;
    border-left: 3px solid #6366f1; /* 紫色边框表示编辑 */
}

/* 暗黑模式下的调整 */
.dark-mode .grid-row.new-row {
	border-radius:12px;
    background-color: rgba(40, 167, 69, 0.1);
}

.dark-mode .grid-row.modified-row {
	border-radius:12px;
    background-color: rgba(23, 162, 184, 0.1);
}