/* 基础样式 */
body {
    font-family: 'Arial', sans-serif;
    background-color: #1e1e2f;
    margin: 0;
    padding: 0;
    color: #fff;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

.stats-link {
    margin: 10px;
    padding: 10px;
    border: none;
    border-radius: 25px;
    color: #1f1e2f;
    background: #76d8f9;
    font-size: 1em;
    outline: none;
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    transition: background 0.3s ease;
}

.stats-link:hover {
    background-color: #d43d8f; /* 鼠标悬停时的颜色 */
}

.stats-container {
    width: 100%;
    margin: 10px;
    max-width: 250px;
    padding: 10px;
    border: none;
    border-radius: 25px;
    color: #1f1e2f;
    background: #76d8f9;
    font-size: 1em;
    outline: none;
    transition: background 0.3s ease;
}
.stats-container p {
    margin: 0;
}

.tag {
    display: inline-block;
    background-color: #e0e0e0;
    color: #333;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
    font-size: 0.9em;
}


/*上传页面的待上传区整体宽度*/
.container {
    max-width: 800px;
    height: 600px;
    margin: auto;
    padding-top: 50px;
}

h1 {
    text-align: center;
    color: #76d8f9;
}

form {
    margin-top: 30px;
}

form div {
    margin-bottom: 5px;
}

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #000;
}

/* 通用按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 20px;
    font-size: 16px;
    transition: background 0.3s, transform 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

/* 禁用按钮样式 */
.disabled-btn {
    background-color: gray;
    cursor: not-allowed;
    pointer-events: none;  /* 禁止点击 */
}

/* 提示文本样式 */
.disabled-btn[title]:hover {
    background-color: gray;
}


/* 具体按钮样式 */
.upload-button {
    background-color: #61dafb;
    color: #1e1e2f;
}

.upload-button:hover {
    background-color: #4c9bd3;
    transform: translateY(-2px);
}

.delete-button {
    background-color: #ff4d4d;
    color: #fff;
}

.delete-button:hover {
    background-color: #e60000;
    transform: translateY(-2px);
}

/* 上传队列样式 */
.queue-container {
    margin-top: 20px;
}

.upload-queue {
    list-style: none;
    padding: 0;
    max-height: 300px; /* 设置最大高度，超出时出现滚动 */
    overflow-y: auto;
}

.upload-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding: 10px;
    background: #82d6f8;
    border-radius: 5px;
    position: relative;
}

.upload-item strong {
    margin-bottom: 10px;
}

.progress-bar-container {
    width: 100%;
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-bar {
    width: 0%;
    height: 10px;
    background: #b361fb;
    transition: width 0.2s;
}

.upload-speed {
    margin-top: 5px;
    font-size: 0.9em;
    color: #ffffff;
}

.upload-status {
    margin-top: 5px;
    font-size: 0.9em;
    color: #555;
}

.status-success {
    color: green;
}

.status-danger {
    color: red;
}

.status-uploading {
    color: blue;
}

/* 消息提示 */
.message p {
    padding: 10px;
    border-radius: 4px;
}

.message p.success {
    background-color: #d4edda;
    color: #155724;
}

.message p.danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* 返回主页链接 */
.back-link {
    display: block;
    margin-top: 20px;
    text-align: center;
    color: #61dafb;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    color: #21a1f1;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100%;
    background-color: #2623375e; 
    color: #fff;
    padding: 0px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
    transform: translateX(-250px); /* 初始隐藏 */
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0); /* 展开侧边栏 */
}

/* 侧边栏切换按钮 */
.sidebar-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: #61dafb;
    color: #1e1e2f;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    z-index: 1100; /* 高于侧边栏 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

.sidebar-toggle.active {
    transform: translate(-50%, -50%) rotate(180deg);
}

/* 侧边栏内容 */
.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 登录/注册/登出按钮 */
.auth-buttons {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.auth-left p {
    margin: 0 0 10px 0;
    color: #fff;
    font-weight: bold;
}

.auth-link, .upload-button, .admin-button {
    display: block;
    margin: 20px;
    padding: 10px;
    background: #61dafb;
    color: #1e1e2f;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.auth-link:hover, .upload-button:hover, .admin-button:hover {
    background: #4c9bd3;
    transform: translateY(-2px);
}

/* 公告模块样式 */
.announcement-module {
    margin-bottom: 20px;
}

.announcement-module h3 {
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.2em;
    border-bottom: 1px solid #fff;
    padding-bottom: 5px;
}

.announcement {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    margin: 5px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.announcement p {
    margin: 5px;
    font-size: 0.85em;
}

/* 网站作者样式 */
.site-author {
    margin-top: auto;
}

.site-author p {
    margin: 0;
    font-size: 0.9em;
}

.site-author a {
    color: #61dafb;
    font-weight: bold;
}

/* 高亮文件名样式 */
.highlighted-file {
    font-weight: bold;
    color: #61dafb;
}

/* 下载按钮样式 */
.download-button {
    padding: 6px 12px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.download-button:hover {
    background: #45a049;
}

/* 主内容区域样式 */
.main-content {
    flex: 1;
    padding: 20px;
    transition: margin-left 0.3s ease;
    overflow-y: auto;
    width: 100%;
}

.main-content.shifted {
    transform: translateX(250px); /* 与侧边栏宽度一致 */
}

.sidebar, .main-content {
    will-change: transform;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    margin: 0;
    font-size: 2em;
}

.search-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.search-input {
    margin: 10px;
    padding: 10px;
    min-width: 300px; /* 最小宽度 */
    border: none;
    border-radius: 25px;
    color: #1f1e2f;
    background: #76d8f9;
    font-size: 1em;
    outline: none;
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    transition: background 0.3s ease;
}

.search-input::placeholder {
    color: #000;
}

/* 表格样式 */
table {
    width: 100%;
    table-layout: fixed; /* 固定表格布局 */
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    background: #2e3345;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #444;
    word-wrap: break-word; /* 自动换行 */
}

th {
    background-color: #61dafb;
    color: #1e1e2f;
    font-weight: bold;
}

td {
    background-color: #2e3345;
    transition: background-color 0.3s ease;
}

tr:hover td {
    background-color: #8107995c;
}

/* 搜索高亮样式 */
.highlight {
    background-color: #ed47a5;
    color: #1e1e2f;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 章节信息样式 */
.chapter-preview {
    cursor: pointer;
    color: #61dafb;
    transition: color 0.3s ease;
}

.chapter-preview:hover {
    color: #4c9bd3;
}

.chapter-full {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.chapter-full ul {
    margin: 0;
    padding-left: 20px;
}

.chapter-full li {
    margin: 5px 0;
}

/* 新增样式：金色发光呼吸渐变文字效果 */
.userurl-link {
    position: relative;
    /*color: #FFD700; /* 金色 */
    text-decoration: none;
    /*font-weight: bold;*/
    animation: glow-blue 1.5s infinite alternate;
    transition: color 0.3s;
}

.userurl-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,215,0,1) 0%, rgba(255,140,0,1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.userurl-link:hover::after {
    opacity: 1;
}


@keyframes glow-blue {
    from {
        text-shadow: 0 0 5px rgba(91, 218, 251, 0.3), 0 0 10px rgba(97, 215, 251, 0.4);
    }
    to {
        text-shadow: 0 0 10px rgba(91, 218, 251, 1), 0 0 20px rgba(91, 218, 251, 0.8);
    }
}

/* 高亮匹配文本 */
.highlight {
    background-color: yellow;
    color: black;
}

.highlighted-file {
    color: #FFD700; /* 可根据需要调整 */
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #61dafb;
    color: #1e1e2f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    background: #ffffff;
    transform: translateY(-3px);
}

/* 链接样式 */
a {
    color: #61dafb;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

/* 页脚样式 */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #aaa;
}

.footer a {
    color: #61dafb;
    font-weight: bold;
}

/* 隐藏的搜索数据 */
.search-data {
    display: none;
}

/* 删除按钮样式 */
.delete-button {
    padding: 6px 12px;
    background: #ff4d4d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.delete-button:hover {
    background: #e60000;
}

/* 修改链接按钮样式 */
.modify-link-button {
    padding: 6px 12px;
    background: #4b93ab;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.modify-link-button:hover {
    background: #274b57;
}

/* 修改标签按钮样式 */
.modify-tags-button {
    padding: 6px 12px;
    background: #7f3e99;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.modify-tags-button:hover {
    background: #492059;
}

/* 模态对话框样式 */
.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); /* 半透明背景 */
}

.modal-content {
    background-color: #2e3345;
    margin: 15% auto; /* 居中 */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* 宽度 */
    max-width: 500px; /* 最大宽度 */
    border-radius: 10px;
    color: #fff;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content button {
    padding: 10px 20px;
    margin: 10px 5px 0 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

#confirmDelete {
    background-color: #ff4d4d;
    color: #fff;
}

#confirmDelete:hover {
    background-color: #e60000;
}

#cancelDelete {
    background-color: #ff4d4d;
    color: #fff;
}

#cancelDelete:hover {
    background-color: #e60000;
}

/* 遮罩层样式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 900; /* 低于侧边栏和切换按钮 */
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        transform: translateX(-200px); /* 初始隐藏 */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle.active {
        transform: translate(200%, -50%) rotate(180deg);
    }

    .main-content.shifted {
        transform: translateX(250px); /* 与侧边栏宽度一致 */
    }

    /* 调整表格列宽 */
    table thead th:nth-child(1),
    table tbody td:nth-child(1) {
        width: 20%;
    }

    table thead th:nth-child(2),
    table tbody td:nth-child(2) {
        width: 20%;
    }

    table thead th:nth-child(3),
    table tbody td:nth-child(3) {
        width: 10%;
    }

    table thead th:nth-child(4),
    table tbody td:nth-child(4) {
        width: 10%;
    }

    table thead th:nth-child(5),
    table tbody td:nth-child(5) {
        width: 10%;
    }

    table thead th:nth-child(6),
    table tbody td:nth-child(6) {
        width: 10%;
    }

    table thead th:nth-child(7),
    table tbody td:nth-child(7) {
        width: 20%;
    }

    table thead th:nth-child(8),
    table tbody td:nth-child(8) {
        width: 5%;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 250px;
        transform: translateX(-250px); /* 初始隐藏 */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle.active {
        transform: translate(250%, -50%) rotate(180deg);
    }

    .main-content.shifted {
        transform: translateX(250px); /* 与侧边栏宽度一致 */
    }

    /* 调整表格列宽 */
    table thead th:nth-child(1),
    table tbody td:nth-child(1) {
        width: 20%;
    }

    table thead th:nth-child(2),
    table tbody td:nth-child(2) {
        width: 20%;
    }

    table thead th:nth-child(3),
    table tbody td:nth-child(3) {
        width: 10%;
    }

    table thead th:nth-child(4),
    table tbody td:nth-child(4) {
        width: 20%;
    }

    table thead th:nth-child(5),
    table tbody td:nth-child(5) {
        width: 10%;
    }

    table thead th:nth-child(6),
    table tbody td:nth-child(6) {
        width: 10%;
    }

    table thead th:nth-child(7),
    table tbody td:nth-child(7) {
        width: 20%;
    }

    table thead th:nth-child(8),
    table tbody td:nth-child(8) {
        width: 5%;
    }
}


/*upload页面样式*/
/* 上传页面专用样式 */
.upload-page .drop-area {
    border: 2px dashed #61dafb;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    margin-bottom: 20px;
    background-color: #2e3345;
}

.upload-page .drop-area.highlight {
    background-color: rgba(97, 218, 251, 0.1);
    border-color: #4c9bd3;
}

.upload-page .drop-label {
    font-size: 1.2em;
    cursor: pointer;
}

.upload-page .file-list {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}



.upload-page .file-item {
    background: #82d6f8;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-around;
}

.upload-page .file-item .file-name {
    flex: 1;
    margin-right: 10px;
    word-break: break-all;
}

.upload-page .upload-queue {
    max-height: 400px; /* 增加上传队列的高度 */
    overflow-y: auto;
}

.upload-page .upload-page-button { /* 修改类名 */
    width: 100%;
    padding: 15px;
    font-size: 1em;
    margin-top: 20px;
}

/* 文件上传项样式调整 */
.upload-page .upload-item {
    background: #2e3345;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.upload-page .upload-item strong {
    color: #61dafb;
}

.upload-page .progress-bar-container {
    width: 100%;
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.upload-page .progress-bar {
    width: 0%;
    height: 15px;
    background: #b361fb;
    transition: width 0.2s;
}

.upload-page .upload-speed,
.upload-page .upload-status {
    margin-top: 10px;
    font-size: 0.95em;
}

.upload-page .status-success {
    color: #28a745;
}

.upload-page .status-danger {
    color: #dc3545;
}

.upload-page .status-uploading {
    color: #ffc107;
}

/* 消息提示样式调整 */
.upload-page .message p {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 1em;
}

.upload-page .message p.success {
    background-color: #d4edda;
    color: #155724;
}

.upload-page .message p.danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* 删除文件按钮样式调整 */
.upload-page .delete-file {
    background-color: #ff4d4d;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.upload-page .delete-file:hover {
    background-color: #e60000;
}


