/* ================== 全局样式 ================== */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

    /* 🌿 护眼背景（浅绿灰） */
    background: linear-gradient(
        180deg,
        #f3f8f4 0%,
        #eaf3ec 100%
    );

    /* 正文颜色改为深灰，避免纯黑 */
    color: #334155;

    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 50px auto;
    padding: 20px;
}

/* ================== 标题与描述 ================== */
h1 {
    margin: 0 0 6px 0;
    font-size: 28px;
    color: #1f2937;
}
.desc {
    color: #94a3b8;
    margin-bottom: 20px;
}

/* ================== 导航按钮 ================== */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

#upBtn,
#refreshBtn {
    background: #f1f5f2;
    border: 1px solid #d1e3d6;
    color: #334155;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#upBtn:disabled,
#refreshBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#upBtn:not(:disabled):hover,
#refreshBtn:not(:disabled):hover {
    background: #e6f4ea;
    border-color: #86efac;
    color: #166534;
}

/* ================== 文件表格（护眼版） ================== */
table {
    width: 100%;
    border-collapse: collapse;

    /* 🌱 护眼白绿卡片背景 */
    background: #f8fcf9;

    border-radius: 12px;
    overflow: hidden;

    /* 柔和阴影，避免厚重感 */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* 表头：浅绿灰，不再用深色 */
thead {
    background: #edf5ef;
}

th,
td {
    padding: 14px 16px;

    /* 边框改为浅灰绿 */
    border-bottom: 1px solid #e2ebe5;

    text-align: left;
    white-space: nowrap;
}

/* 表头文字：深灰绿，清晰但不刺眼 */
th {
    font-weight: 600;
    color: #475569;
    font-size: 15px;
    letter-spacing: 0.3px;
}

/* 表格正文文字 */
td {
    color: #334155;
}

/* Hover 行：极浅蓝绿提示，不抢眼 */
tbody tr:hover {
    background: rgba(34, 197, 94, 0.08);
    transition: background 0.15s ease;
}

/* 第一列：文件名，限制宽度并省略 */
td:nth-child(1) {
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Segoe UI', sans-serif;
}

/* 大小 & 时间列 */
td:nth-child(2),
td:nth-child(3) {
    color: #94a3b8;
    font-family: monospace;
    font-size: 14px;
    text-align: center;
}

/* 操作列右对齐 */
td:last-child {
    text-align: right;
    padding-right: 16px;
}

/* ================== 链接与按钮样式 ================== */

/* 下载链接 */
a.action-btn.download {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    text-decoration: none;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
a.action-btn.download:hover {
    background: rgba(56, 189, 248, 0.35);
    color: #0ea5e9;
    border-color: #0ea5e9;
    transform: translateY(-1px);
}

/* 进入按钮（用于文件夹） */
button.action-btn.enter {
    padding: 6px 12px;
    background: rgba(234, 88, 12, 0.2);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.4);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
button.action-btn.enter:hover:not(:disabled) {
    background: rgba(249, 115, 22, 0.3);
    color: #fb923c;
    border-color: #fb923c;
    transform: translateY(-1px);
}
button.action-btn.enter:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================== 新文件高亮 ================== */
tr.new-file {
    background: rgba(34, 197, 94, 0.12);
    position: relative;
}
tr.new-file td:first-child::after {
    content: " NEW";
    margin-left: 6px;
    font-size: 12px;
    color: #22c55e;
    font-weight: 600;
    vertical-align: top;
}

/* ================== 空状态提示 ================== */
tbody.empty-row td {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 40px 0;
    font-size: 15px;
}

/* ================== 响应式适配 ================== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 20px auto;
    }

    h1 {
        font-size: 24px;
    }

    table {
        font-size: 14px;
        border-radius: 10px;
    }

    th, td {
        padding: 12px 10px;
    }

    td:nth-child(1) {
        max-width: 280px;
    }

    /* 小屏幕下隐藏大小和时间列 */
    th:nth-child(2),
    th:nth-child(3),
    td:nth-child(2),
    td:nth-child(3) {
        display: none;
    }

    /* 操作列改为居中 */
    td:last-child {
        text-align: center;
        padding: 8px 0;
    }

    /* 调整按钮尺寸 */
    #upBtn,
    #refreshBtn {
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .nav {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    #upBtn,
    #refreshBtn {
        width: fit-content;
        margin-left: auto;
        margin-right: 0;
    }

    a.action-btn.download,
    button.action-btn.enter {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ================== 页脚 ================== */
.footer {
    margin-top: 40px;
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
}
.footer a {
    color: #60a5fa;
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
}

tr.separator-row,
tr.separator-row td {
    border: none !important;
    border-bottom: none !important;
}


/* ================== ⚠ 下载页强提示闪烁框 ================== */
.notice-banner {
    width: 100%;
    max-width: 100%;
    overflow: hidden;   /* ⭐ 关键：阻断宽度溢出 */
    margin: 20px 0 28px;
}

/* 横幅图片：与页面宽度一致 */
.notice-banner img {
    display: block;
    width: 100%;
    height: auto;

    border-radius: 10px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18);
}

/* 下方说明文字 */
.notice-text {
    margin-top: 10px;
    font-size: 14px;
    color: #b45309;
    line-height: 1.6;
}

/* 轻闪强调（前 10 秒） */
.notice-flash {
    animation: bannerPulse 1.6s infinite;
}

@keyframes bannerPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.01); }
    100% { transform: scale(1); }
}

