/* 基础样式 */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --transition-time: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--neutral-800);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 优化容器宽度，使用响应式断点 */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* 导航栏 */
.navbar {
    background-color: #3D3D3D;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.brand i::before {
    content: "📂"; /* 使用文件图标替代Font Awesome */
    margin-right: 8px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color var(--transition-time), transform var(--transition-time);
    display: inline-flex;
    align-items: center;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn i::before {
    content: "+"; /* 使用+号替代Font Awesome加号图标 */
    margin-right: 8px;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: var(--neutral-500);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
}

/* 搜索栏 */
.search-container {
    /*margin-bottom: 32px;*/
    text-align: center;
    padding: 16px 0;
}

.search-bar {
    display: inline-block;
    position: relative;
    width: 40%;
}

.search-input {
    width: 100%;
    max-width: 600px;
    padding: 12px 40px 12px 16px;
    border: 1px solid var(--neutral-300);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color var(--transition-time);
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-icon::before {
    content: "🔍"; /* 使用搜索图标替代Font Awesome */
    position: absolute;
    right: 16px;
    top: 30%;
    transform: translateY(-50%);
    color: var(--neutral-400);
}

/* 目录内容 */
.directory-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    padding: 10px;
    margin-bottom: 32px;
}

.directory-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
}

.directory-title i::before {
    content: "📂"; /* 使用文件夹图标替代Font Awesome */
    margin-right: 8px;
    color: var(--warning-color);
}

.directory-items {
    list-style-type: none;
    padding-left: 0;
}

.directory-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    transition: background-color var(--transition-time);
}

.directory-item:last-child {
    border-bottom: none;
}

.directory-item:hover {
    /*{#background-color: var(--neutral-50);#}*/
}

.item-icon {
    margin-right: 12px;
    font-size: 18px;
}

.folder-icon::before {
    content: "📁"; /* 使用文件夹图标替代Font Awesome */
    color: var(--warning-color);
}

.file-icon::before {
    content: "📄"; /* 使用文件图标替代Font Awesome */
    color: var(--primary-color);
}

.item-name {
    flex: 1;
    font-size: 16px;
}

.item-details {
    color: var(--neutral-500);
    font-size: 14px;
    margin-left: 24px;
}

/* 新增文件操作按钮样式 */
.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    margin-right: 8px;
    padding: 6px 12px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 表格样式的文件列表 */
.file-header {
    display: grid;
    grid-template-columns: 3fr 2fr 1fr 2fr;
    padding: 12px 0;
    border-bottom: 2px solid var(--neutral-200);
    font-weight: bold;
    margin-bottom: 8px;
}

.file-row {
    display: grid;
    grid-template-columns: 3fr 2fr 1fr 2fr;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--neutral-200);
    transition: background-color var(--transition-time);
}

.file-row:hover {
    /*{#background-color: var(--neutral-50);#}*/
}

.file-actions {
    display: flex;
    justify-content: flex-end;
}

/* 分页控制样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--neutral-200);
}

.pagination-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color var(--transition-time), transform var(--transition-time);
    background-color: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    margin: 0 4px;
}

.pagination-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-info {
    margin: 0 16px;
    font-size: 14px;
    color: var(--neutral-600);
}

/* 响应式设计 - 移动设备上使用堆叠布局 */
@media (max-width: 768px) {
    .file-header {
        display: none; /* 在移动设备上隐藏表头 */
    }

    .file-row {
        display: block;
        padding: 16px;
        margin-bottom: 16px;
        border: 1px solid var(--neutral-200);
        border-radius: 6px;
    }

    .file-row > div {
        margin-bottom: 8px;
    }

    .file-actions {
        justify-content: flex-start;
        margin-top: 12px;
    }

    .btn-outline {
        margin-right: 4px;
        padding: 4px 8px;
        font-size: 12px;
    }

    .pagination-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .pagination-info {
        font-size: 12px;
    }
}

/* 空状态 */
.empty-state {
    padding: 40px 0;
    text-align: center;
    color: var(--neutral-500);
}

.empty-icon::before {
    content: "📦"; /* 使用空箱子图标替代Font Awesome */
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
    display: block;
}

/* 文档内容页样式 */
.document-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    padding: 16px;
    margin-bottom: 32px;
    flex: 1;
}

.document-header {
    /*{#margin-bottom: 24px;#}*/
    padding-bottom: 16px;
    /*{#border-bottom: 1px solid var(--neutral-200);#}*/
}

.document-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}
@media (min-width: 768px) {
    .document-meta {
        font-size: 14px;
        color: var(--neutral-500);
        display: flex;
        align-items: center;
    }
}

.document-meta {
    font-size: 14px;
    color: var(--neutral-500);
    /*display: flex;*/
    align-items: center;
}

.document-meta-item {
    margin-right: 24px;
}

.document-content {
    line-height: 1.8;
    margin-bottom: 32px;
}

.document-content h2 {
    font-size: 20px;
    font-weight: bold;
    margin-top: 24px;
    margin-bottom: 16px;
}

.document-content p {
    margin-bottom: 16px;
}

.document-content ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.document-content li {
    margin-bottom: 8px;
}

.document-content pre {
    background-color: var(--neutral-100);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
}
.document-actions {
    display: flex;
    /*flex-direction: column; !* 在移动端垂直排列 *!*/
    justify-content: space-between;
    align-items: flex-start; /* 在移动端左对齐 */
    padding-top: 12px; /* 减小顶部内边距 */
    border-top: 1px solid var(--neutral-200);
}

.btn-group {
    display: flex;
    gap: 6px; /* 减小按钮间距 */
    margin-bottom: 12px; /* 在移动端添加底部间距 */
}

.btn-secondary {
    background-color: var(--neutral-200);
    color: var(--neutral-700);
    padding: 6px 10px; /* 减小内边距 */
    font-size: 13px; /* 减小字体大小 */
}

.btn-secondary:hover {
    background-color: var(--neutral-300);
}

.btn-icon i::before {
    margin-right: 6px; /* 减小右侧间距 */
}

/*.document-actions {*/
/*    display: flex;*/
/*    justify-content: space-between;*/
/*    align-items: center;*/
/*    padding-top: 16px;*/
/*    border-top: 1px solid var(--neutral-200);*/
/*}*/

/*.btn-group {*/
/*    display: flex;*/
/*    gap: 8px;*/
/*}*/

/*.btn-secondary {*/
/*    background-color: var(--neutral-200);*/
/*    color: var(--neutral-700);*/
/*}*/

/*.btn-secondary:hover {*/
/*    background-color: var(--neutral-300);*/
/*}*/

/*.btn-icon i::before {*/
/*    margin-right: 8px;*/
/*}*/

/* 返回按钮 */
.back-btn {
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.back-btn i::before {
    content: "⬅️"; /* 使用返回箭头图标 */
    margin-right: 8px;
}

.back-btn:hover {
    text-decoration: underline;
}

/* 页脚 */
.footer {
  background-color: #f5f5f5;
  padding: 2rem 0;
  /*margin-top: 3rem;*/
  border-top: 1px solid #e5e5e5;
}

.container1 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.has-text-centered {
  text-align: center;
}

.has-text-centered strong {
  font-size: 1.1rem;
  color: #333;
}

.has-text-centered a {
  color: #3273dc;
  text-decoration: none;
  transition: color 0.3s;
}

.has-text-centered a:hover {
  color: #209cee;
  text-decoration: underline;
}

.ft {
  margin: 0.75rem 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
}

.ft a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s;
}

.ft a:hover {
  color: #3273dc;
  text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .footer {
    padding: 1.5rem 0;
  }

  .ft {
    font-size: 0.85rem;
  }

  .container1 {
    padding: 0 1rem;
  }
}
/*  页解*/
/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-time);
}

.modal.active {
    opacity: 1;
}

.modal-content {
    background-color: white;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform var(--transition-time);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--neutral-200);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--neutral-800);
}

.close {
    color: var(--neutral-400);
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    transition: color var(--transition-time);
}

.close:hover,
.close:focus {
    color: var(--neutral-600);
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

/* 二维码容器 */
.qrcode-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

#qrcode {
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--neutral-200);
    border-radius: 0.5rem;
    /*padding: 1rem;*/
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 下载码输入框 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--neutral-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--neutral-300);
    border-radius: 0.375rem;
    box-sizing: border-box;
    transition: border-color var(--transition-time), box-shadow var(--transition-time);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* 操作按钮 */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--neutral-200);
}

.btn-outline {
    background-color: white;
    border: 1px solid var(--neutral-300);
    color: var(--neutral-700);
}

.btn-outline:hover {
    background-color: var(--neutral-100);
}

/* 响应式设计 */
@media (max-width: 640px) {
    .modal-content {
        max-width: 90%;
    }

    #qrcode {
        width: 160px;
        height: 160px;
    }
}

/* 下载状态提示 */
.download-status {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: opacity var(--transition-time);
}

.download-status.active {
    display: block;
}


/*导航*/
/* 导航链接 */
.nav-links {
  display: none;
  list-style: none;
}

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: #e2e8f0;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: all var(--transition-time);
}

.nav-links a:hover {
  background-color: rgba(22, 93, 255, 0.1);
  color: var(--primary-color);
}

.nav-links a.active {
  background-color: rgb(0 0 0 / 0%);
    color: #e2e8f0;
    font-weight: 500;
}

/* 汉堡菜单按钮 */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
}

.menu-toggle span {
  height: 0.125rem;
  width: 100%;
  background-color: var(--dark-color);
  margin-bottom: 0.375rem;
  border-radius: 0.125rem;
  transition: all var(--transition-time);
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(0.5rem) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-0.5rem) rotate(-45deg);
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  background-color: #3D3D3D;
  /*border-top: 1px solid #e5e7eb;*/
  padding: 1rem 0;
  list-style: none;
  transition: all var(--transition-time);
}

.mobile-menu li {
  padding: 0.5rem 1rem;
}

.mobile-menu a {
  text-decoration: none;
  color: #ffffff;
  display: block;
  padding: 0.5rem 0;
  transition: all var(--transition-time);
}

.mobile-menu a:hover {
  color: var(--primary-color);
}

.mobile-menu a.active {
  color: var(--primary-color);
  font-weight: 500;
}

/* 响应式设计 */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }
}

/* 滚动效果 */
.navbar.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* 图片自适应容器样式 */
.document-content {
    line-height: 1.8;
    margin-bottom: 32px;
}

/* 图片基础样式 */
.document-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem 0;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 图片悬停效果 */
.document-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 图片加载中状态 */
.document-content img[data-loading="true"] {
    opacity: 0.6;
    filter: blur(4px);
}

/* 图片加载动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* 图片加载完成后动画 */
.document-content img.loaded {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 图片标题样式 */
.document-content figcaption {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--neutral-600);
    font-style: italic;
}

/* 图片对齐方式 */
.document-content img.align-left {
    float: left;
    margin-right: 1.5rem;
    margin-top: 0.5rem;
}

.document-content img.align-right {
    float: right;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.document-content img.align-center {
    margin-left: auto;
    margin-right: auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .document-content img {
        margin: 1rem 0;
    }

    .document-content img.align-left,
    .document-content img.align-right {
        float: none;
        margin-left: auto;
        margin-right: auto;
    }
}