/* 全局样式 */
* {
    box-sizing: border-box;
}

/* 全局：页面背景透明，保留最小背景色回退 */
body {
    font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    /* 背景图 + 轻度叠色以提升可读性，图片文件放置：assets/bg.jpg */
    background: 
        linear-gradient(rgba(0,0,0,0.18), rgba(0,0,0,0.18)),
        url("assets/bg.jpg") center / cover no-repeat fixed;
    background-color: rgba(0,0,0,0.18);
    color: #f5f7fa;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 标题栏 */
h1 {
    font-size: 28px;
    margin: 0 0 20px 0;
    color: var(--theme);
    border-bottom: 3px solid var(--theme);
    padding-bottom: 10px;
}

h2 {
    font-size: 18px;
    color: var(--theme-dark);
    margin-top: 20px;
    margin-bottom: 15px;
}

/* 容器：稍提高对比度 */
.container {
    max-width: 1000px;
    margin: 20px auto;
    background: rgba(255,255,255,0.06); /* 保持玻璃效果，但提高可读性 */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.10);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 20px;
    }
}

/* 卡片、登录框、进度容器等统一玻璃样式 */
.card, .login-box, #progressContainer, #progressContainer > div {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.12);
    color: #222;
}

/* 登录框特殊（覆盖原内联样式） */
.login-box {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.10);
}

/* 按钮对比增强（保留原色，同时适配透明背景） */
.btn {
    display: inline-block;
    padding: 10px 18px;
    margin: 5px 5px 5px 0;
    background: var(--theme);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.btn:hover {
    background: var(--theme-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(0);
}

/* 表单组 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

/* 表单输入 */
input[type="text"],
input[type="password"],
input[type="date"],
input[type="file"],
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

input[type="file"] {
    border: 2px dashed rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.95);
    padding: 15px;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    border-radius: 8px;
}

input[type="file"]:hover {
    border-color: var(--theme);
    background: rgba(255,255,255,0.14);
}

input[type="file"]::file-selector-button {
    background: var(--theme);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 12px;
    font-weight: 500;
    transition: background 0.3s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--theme-dark);
}

/* 表单行布局 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 列表 */
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
    background: rgba(255,255,255,0.02);
}

li:hover {
    background: #f9f9f9;
}

li label {
    cursor: pointer;
    display: flex;
    align-items: center;
}

li input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

/* 文件列表：修正对齐与悬停表现 */
ul.file-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}
ul.file-list li {
    margin: 3px 0;               /* 项间距 */
    border-radius: 6px;
    background: rgba(255,255,255,0.02);
    transition: background 140ms ease; /* 不再使用 transform，避免布局位移 */
    overflow: hidden;
    /* 保证内层 a 可撑满宽度 */
    display: block;
}
.item-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;           /* 统一内边距，避免视觉偏移 */
    width: 100%;
    color: inherit;
    text-decoration: none;
}
.item-link:hover {
    background: rgba(255,255,255,0.045); /* 仅高亮，不抬起 */
    text-decoration: none;
}
.item-icon {
    width: 28px;
    flex: 0 0 28px;
    text-align: left;            /* 图标和文字左对齐 */
    font-size: 18px;
    line-height: 1;
}
.item-name {
    flex: 1 1 auto;
    word-break: break-word;
    color: inherit;
    text-align: left;            /* 明确左对齐文本，避免居中偏移 */
}

/* 面包屑导航 */
.breadcrumb {
    margin: 15px 0 20px 0;
    font-size: 14px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--theme);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--theme-dark);
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
    color: #999;
}

/* 信息提示 */
.message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* 日志内容 */
pre {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 13px;
    line-height: 1.5;
    color: #111;
}

/* 上传进度条 */
.progressBar {
    width: 100%;
    height: 24px;
    background: #eee;
    border-radius: 6px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.progressBar div {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #28a745, #218838);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 进度条容器 */
#progressContainer {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

#progressContainer > div {
    margin-bottom: 20px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border-left: 4px solid var(--theme);
}

/* 顶部导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* 背景改为透明，保留毛玻璃效果以提高可读性 */
    background: transparent;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: none;
    padding: 12px 20px;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); /* 轻微阴影区分内容 */
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .nav-left {
    flex: 1;
}

.navbar .site-title {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.navbar .nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.navbar .nav-right a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 4px;
}

.navbar .nav-right a:hover {
    background: rgba(255,255,255,0.2);
    color: #FFD700;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .navbar .nav-right {
        width: 100%;
        justify-content: center;
    }
}

/* 用户信息卡片 */
.user-info {
    background: #e7f3ff;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid var(--theme);
    font-size: 14px;
}

/* 卡片容器 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    border-top: 4px solid var(--theme);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card h2 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #5fd9f0;
}

.card p {
    font-size: 14px;
    color: #a5b8cc;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

/* 操作按钮组 */
.button-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* 分页导航 */
.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    justify-content: center;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #007BFF;
    color: white;
}

/* 分页容器：垂直堆叠并居中子元素 */
.pagination-container {
    display: flex;
    flex-direction: column;    /* 垂直排列：分页按钮 / 统计 / 跳页表单 */
    align-items: center;       /* 水平居中 */
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}

/* 分页按钮行水平居中 */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 页信息居中显示 */
.page-info {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* 跳页表单居中 */
.jump-page {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
.jump-page input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 按钮小样式保持一致性 */
.jump-page button {
    padding: 8px 12px;
    background: var(--theme);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.jump-page button:hover { background: var(--theme-dark); }

/* 自定义右键菜单样式（美化：半透明、圆角、毛玻璃，边框细化） */
.custom-context-menu {
    display: none;
    position: fixed;
    background: rgba(255,255,255,0.10); /* 半透明白 */
    backdrop-filter: blur(8px);          /* 毛玻璃效果 */
    -webkit-backdrop-filter: blur(8px);
    border: 0.45px solid rgba(255,255,255,0.12); /* 更细 */
    border-radius: 12px;                /* 更圆的角 */
    box-shadow: 0 8px 20px rgba(5,15,30,0.32);
    z-index: 99999;
    min-width: 110px;                   /* 更短 */
    max-width: 220px;
    overflow: hidden;
    pointer-events: auto;
    transition: opacity 160ms ease, transform 160ms ease;
    opacity: 0;
    transform: translateY(6px);
    top: 0;
    left: 0;
}

/* 可见时的过渡状态 */
.custom-context-menu[aria-hidden="false"] {
    opacity: 1;
    transform: translateY(0);
}

/* 菜单项居中、内边距适中 */
.custom-context-menu .context-item {
    padding: 10px 12px;           /* 减小内边距 */
    cursor: pointer;
    user-select: none;
    transition: background 140ms ease, color 140ms ease;
    font-size: 14px;
    color: rgba(255,255,255,0.95);
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;      /* 居中 */
    text-align: center;
}

/* 悬停效果保持简洁 */
.custom-context-menu .context-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

/* 按下效果 */
.custom-context-menu .context-item:active {
    background: rgba(255,255,255,0.10);
}

/* Icon 颜色调整（若使用 emoji 可忽略） */
.custom-context-menu .context-item span {
    opacity: 0.95;
}

/* 用户管理表格：固定列宽并对齐 */
.users-page-head {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
}

.users-head-desc {
    margin: 8px 0 0 0;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.users-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.users-summary span {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 999px;
    font-weight: 600;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.2);
}

.users-section {
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
}

.users-section h2 {
    margin-top: 0;
}

.users-create-form {
    margin-bottom: 0;
}

.users-form-item {
    margin-bottom: 0;
}

.users-empty {
    padding: 16px;
    text-align: center;
    border-radius: 10px;
    font-size: 14px;
    color: rgba(255,255,255,0.88);
    border: 1px dashed rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.04);
}

.user-table-wrap {
    overflow-x: auto;
}

.user-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.user-table col.col-username { width: 30%; }
.user-table col.col-role { width: 18%; }
.user-table col.col-actions { width: 52%; }

.user-table th, .user-table td {
    padding: 10px 10px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: #f5f7fa;
    background: rgba(255,255,255,0.05);
}
.user-table thead th {
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-weight: 600;
    text-align: left;
}

/* 单元格类：明确文本对齐 */
.username-cell { 
    text-align: left; 
    overflow: hidden; 
    white-space: nowrap; 
    text-overflow: ellipsis; 
}
.role-cell { 
    text-align: left; 
}
.actions-cell { 
    text-align: left; 
    padding: 8px 10px !important; /* 减少内边距确保内容垂直居中 */
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.2px;
}

.role-admin {
    background: rgba(220,53,69,0.25);
    border: 1px solid rgba(220,53,69,0.55);
}

.role-editor {
    background: rgba(42,183,202,0.25);
    border: 1px solid rgba(42,183,202,0.55);
}

.role-viewer {
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.28);
}

/* 内联表单在单元格内水平排列，并限制控件宽度避免撑破列 */
.user-actions { 
    display: flex; 
    gap: 8px; 
    align-items: center; 
    flex-wrap: nowrap; /* 不换行，保持横向 */
    justify-content: flex-start; /* 左对齐 */
    min-height: 32px; /* 确保有最小高度 */
}
.inline-form { 
    display: inline-flex; 
    gap: 6px; 
    align-items: center; 
    margin: 0; 
}
.small-input {
    height: 32px;
    line-height: 32px; /* 添加行高确保文字垂直居中 */
    padding: 0 8px; /* 调整内边距 */
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.95);
    vertical-align: middle;
    box-sizing: border-box;
}
/* 限制 small-input 最大宽度，防止操作列被推宽 */
.small-input[type="password"] { max-width: 160px; width: 160px; }
.small-input[type="text"] { max-width: 160px; width: 160px; }
select.small-input { 
    max-width: 90px; 
    width: 90px; 
    height: 32px; 
    line-height: 32px;
    padding: 0 8px;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.95);
}

/* Select下拉选项样式 */
select option {
    background: rgba(30,30,30,0.95);
    color: #fff;
    padding: 8px;
}

/* Placeholder样式 */
input::placeholder,
textarea::placeholder {
    color: rgba(255,255,255,0.6);
}

/* 专用宽输入类，供 users.php 底部编辑密码使用：更宽且响应式 */
.wide-input {
	max-width: 360px;
	min-width: 140px;
	width: 40%;
	box-sizing: border-box;
}

/* 小屏适配：宽输入变为块级占满可用宽度 */
@media (max-width: 720px) {
	.wide-input { width: 100%; max-width: 100%; }
}

/* 按钮微调 */
.btn.small { 
    padding: 6px 10px; 
    font-size: 13px; 
    border-radius: 6px; 
    height: 32px; /* 与输入框高度一致 */
    line-height: 1.4; /* 调整行高确保文字垂直居中 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn.small.danger { background: #dc3545; border: none; }
.btn.small.danger:hover { background: #c82333; }

/* 在窄屏时调整列宽 */
@media (max-width: 720px) {
    .user-table col.col-username { width: 35%; }
    .user-table col.col-role { width: 25%; }
    .user-table col.col-actions { width: 40%; }

    .users-section {
        padding: 12px;
    }

    .users-summary span {
        width: calc(50% - 6px);
        text-align: center;
    }
    
    /* 在极小屏下适当缩小输入框和select宽度 */
    .small-input[type="password"] { 
        max-width: 120px; 
        width: 120px; 
        height: 28px;
        line-height: 28px;
        background: rgba(255,255,255,0.15);
        color: rgba(255,255,255,0.95);
    }
    select.small-input { 
        max-width: 80px; 
        width: 80px; 
        height: 28px;
        line-height: 28px;
        background: rgba(255,255,255,0.15);
        color: rgba(255,255,255,0.95);
    }
    
    /* 保持按钮紧凑 */
    .btn.small { 
        padding: 4px 8px; 
        font-size: 12px; 
        height: 28px;
    }
}

/* 上传页头部 */
.upload-page-head {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
}

.upload-head-desc {
    margin: 8px 0 0 0;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.upload-head-info {
    margin-top: 12px;
    font-size: 13px;
    color: rgba(255,255,255,0.88);
}

.upload-head-info span {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
}

/* 上传区块卡片 */
.upload-section {
    margin-top: 14px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
}

.upload-section h2 {
    margin-top: 0;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.upload-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upload-form-group label {
    font-weight: 600;
    font-size: 14px;
    color: rgba(255,255,255,0.95);
}

.upload-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.upload-form-actions .btn {
    margin: 0;
}

/* 拖拽区域 */
.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    border: 2px dashed rgba(255,255,255,0.35);
    border-radius: 12px;
    text-align: center;
    background: rgba(255,255,255,0.04);
    transition: border-color .22s ease, background .22s ease, transform .18s ease;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.08);
}

.drop-zone.active {
    border-color: var(--theme);
    background: rgba(42,183,202,0.12);
    transform: scale(1.01);
}

.drop-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.85;
}

.drop-text {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    margin-bottom: 6px;
}

.drop-hint {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin-top: 6px;
}

/* 上传美化：每个文件的上传项 */
.upload-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	border-radius: 8px;
	background: rgba(255,255,255,0.03);
	border: 1px solid rgba(255,255,255,0.04);
	margin-bottom: 10px;
}

/* 标题行：图标 + 名称 + 操作按钮 */
.upload-item .heading {
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:8px;
}
.upload-item .file-info {
	display:flex;
	align-items:center;
	gap:10px;
	color: inherit;
}
.upload-item .file-icon { font-size:18px; width:28px; text-align:left; }
.upload-item .file-name { font-size:14px; color:inherit; word-break:break-all; }

/* 进度条容器 */
.upload-item .progress-row {
	display:flex;
	align-items:center;
	gap:10px;
}
.progressBar {
	flex:1;
	height:12px;
	background: rgba(0,0,0,0.25);
	border-radius: 8px;
	overflow:hidden;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
	border: 1px solid rgba(255,255,255,0.1);
}
.progressBar .progress {
	height:100%;
	width:0%;
	background: linear-gradient(90deg, var(--theme), var(--theme-dark));
	transition: width 220ms ease;
}

/* 百分比与元信息 */
.progress-percent {
	min-width:48px;
	text-align:right;
	font-size:13px;
	color:#e9eef9;
}
.progress-meta {
	font-size:12px;
	color:#cfe6ff;
}

/* 取消按钮 */
.cancel-btn {
	background: transparent;
	border: 1px solid rgba(255,255,255,0.08);
	color: #fff;
	padding: 4px 8px;
	border-radius: 6px;
	cursor: pointer;
	font-size:13px;
}
.cancel-btn:hover {
	background: rgba(255,255,255,0.03);
	border-color: rgba(255,255,255,0.12);
}

/* 上传完成/失败状态 */
.upload-success .progress-meta { color: #bff0c6; }
.upload-fail .progress-meta { color: #ffd2d2; }

/* 小屏适配 */
@media (max-width:600px) {
	.progress-percent { display:none; }
	.upload-item .heading { flex-direction:column; align-items:flex-start; gap:6px; }
	
	.upload-section {
		padding: 12px;
	}
	
	.upload-form-actions {
		flex-direction: column;
		align-items: stretch;
	}
	
	.upload-form-actions .btn {
		width: 100%;
	}
	
	.drop-zone {
		padding: 24px 16px;
	}
	
	.drop-icon {
		font-size: 36px;
	}
}

/* 画廊样式 */
.gallery { display:grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap:14px; margin-top:16px; }
.gallery a { display:block; border-radius:8px; overflow:hidden; background: rgba(255,255,255,0.06); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.1); color:#f5f7fa; text-decoration:none; }
.gallery img { width:100%; height:140px; object-fit:cover; display:block; }
.gallery div { padding:8px; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* 文件夹项 */
.folder-item { padding:10px; background: rgba(255,255,255,0.03); border-radius:8px; display:flex; align-items:center; gap:8px; }

/* 复制链接吐司提示 - 右上角显示 */
.copy-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    transform: translateX(100%);
    min-width: 140px;
    max-width: 280px;
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(0,0,0,0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
    pointer-events: none;
    z-index: 999999;
    border: 1px solid rgba(255,255,255,0.2);
}
.copy-toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}
.copy-toast.success { 
    background: linear-gradient(135deg, #28a745, #20803d);
    border-color: rgba(40,167,69,0.6);
    box-shadow: 0 4px 16px rgba(40,167,69,0.5);
}
.copy-toast.error { 
    background: linear-gradient(135deg, #dc3545, #bd2130);
    border-color: rgba(220,53,69,0.6);
    box-shadow: 0 4px 16px rgba(220,53,69,0.5);
}

/* ============================= */
/* 2026 UI Refresh (全站统一美化) */
/* ============================= */

:root {
    --theme: #2ab7ca;
    --theme-dark: #2196a8;
    --text-main: #f5f7fa;
    --text-soft: #666;
    --panel-bg: rgba(255,255,255,0.06);
    --panel-border: rgba(255,255,255,0.10);
}

body {
    line-height: 1.6;
}

p {
    color: inherit;
}

a {
    color: inherit;
}

a:hover {
    color: inherit;
}

.container {
    max-width: 1120px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

h1 {
    margin-bottom: 18px;
    color: var(--theme);
    border-bottom-color: var(--theme);
}

h2 {
    color: var(--theme-dark);
    margin-top: 18px;
}

.navbar {
    background: transparent;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.navbar .site-title {
    color: white;
}

.navbar .nav-right a {
    background: transparent;
    border: 1px solid transparent;
}

.navbar .nav-right a:hover {
    background: rgba(255,255,255,0.2);
    border-color: transparent;
    color: #FFD700;
}

.btn {
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.22);
}

.btn.small {
    padding: 6px 12px;
}

.btn.danger {
    background: #dc3545;
}

.btn.danger:hover {
    background: #c82333;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    color: rgba(255,255,255,0.95);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--theme);
    box-shadow: 0 0 0 3px rgba(42,183,202,0.2);
    background: rgba(255,255,255,0.2);
    outline: none;
}

.toolbar-form,
.toolbar-actions,
.panel-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.toolbar-form .btn,
.toolbar-actions .btn {
    margin: 0;
}

.jump-label {
    margin: 0;
    white-space: nowrap;
    color: inherit;
}

pre {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #111;
    border-radius: 10px;
    padding: 16px;
}

.log-tip {
    background: #e7f3ff !important;
    border-left-color: #007BFF !important;
    color: #0c5460 !important;
}

.page-info {
    color: #666;
}

.card-container {
    margin-top: 18px;
}

.card {
    background: transparent;
    border-top-width: 3px;
    border-top-color: rgba(42,183,202,0.95);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.card p {
    color: #a5b8cc;
}

.gallery {
    grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
    gap: 14px;
}

.gallery a {
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.gallery img {
    border-radius: 8px;
}

.gallery-item-meta {
    font-size: 13px;
    padding-top: 8px;
    color: #d0dce8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-item {
    min-height: 60px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.07);
}

.folder-icon {
    font-size: 20px;
    line-height: 1;
}

.manage-page-head {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
}

.manage-path {
    font-size: 14px;
    margin-top: 8px;
    color: rgba(255,255,255,0.92);
    word-break: break-all;
}

.manage-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.manage-head-actions .btn {
    margin: 0;
}

.manage-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.manage-summary span {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.2);
}

.manage-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.manage-toolbar .btn {
    margin: 0;
}

.manage-toolbar .btn[onclick*="Download"] {
    background: linear-gradient(135deg, var(--theme), var(--theme-dark));
    box-shadow: 0 4px 12px rgba(42, 183, 202, 0.3);
}

.manage-toolbar .btn[onclick*="Download"]:hover {
    background: linear-gradient(135deg, var(--theme-dark), var(--theme));
    box-shadow: 0 6px 16px rgba(42, 183, 202, 0.5);
    transform: translateY(-2px);
}

.manage-empty {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.86);
    background: rgba(255,255,255,0.05);
    border: 1px dashed rgba(255,255,255,0.2);
}

.manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
    gap: 14px;
    list-style: none;
    padding: 0;
    margin-top: 0;
}

.manage-item {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    padding: 12px;
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}

.manage-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.22);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.08);
}

/* 防止复选框获焦时 manage-item 背景变白 */
.manage-item:has(input:checked),
.manage-item:has(input:focus) {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.22) !important;
}

.manage-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: transparent;
}

.manage-check {
    margin-top: 5px;
    flex: 0 0 auto;
    accent-color: var(--theme);
    background: transparent !important;
    cursor: pointer;
}

.manage-check:hover,
.manage-check:focus,
.manage-check:checked {
    background: transparent !important;
}

/* 防止 manage-label 获得焦点时变白 */
.manage-label:has(input:checked),
.manage-label:has(input:focus) {
    background: transparent;
}

.manage-main {
    flex: 1 1 auto;
}

.manage-folder-row,
.manage-file-row,
.manage-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.manage-folder-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.manage-folder-link:hover {
    text-decoration: underline;
}

.manage-file-row {
    align-items: flex-start;
    gap: 10px;
}

.manage-actions-row {
    flex-wrap: wrap;
    font-weight: 600;
    color: inherit;
}

.manage-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.manage-thumb {
    width: 120px;
    height: 86px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    border: 1px solid rgba(255,255,255,0.2);
}

.manage-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    margin-top: 6px;
}

.preview {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.preview-main {
    flex: 1 1 640px;
}

.preview img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.2);
}

.info {
    min-width: 240px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 14px;
}

.info .meta {
    margin-bottom: 8px;
    color: #666;
}

/* 登录容器 */
.login-container {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    max-width: 440px;
    width: 100%;
    padding: 40px;
    border-radius: 16px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录头部 */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-icon {
    font-size: 56px;
    margin-bottom: 16px;
    animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.login-box h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: rgba(255,255,255,0.95);
    text-align: center;
}

.login-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

/* 错误提示 */
.login-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: rgba(220,53,69,0.15);
    border: 1px solid rgba(220,53,69,0.3);
    border-radius: 10px;
    color: #ff6b6b;
    font-size: 14px;
    animation: shakeX 0.5s ease;
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.error-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* 表单样式 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.95);
    border-radius: 10px;
    transition: all 0.3s ease;
    outline: none;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: var(--theme);
    background: rgba(255,255,255,0.18);
    box-shadow: 0 0 0 4px rgba(42,183,202,0.15);
}

.login-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--theme), var(--theme-dark));
    border: none;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(42,183,202,0.4);
}

.login-btn:active {
    transform: translateY(0);
}

/* 提示信息 */
.login-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}

.note-icon {
    font-size: 16px;
}

/* 页脚链接 */
.login-footer {
    margin-top: 24px;
    text-align: center;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.footer-link:hover {
    color: var(--theme);
    background: rgba(255,255,255,0.08);
}

/* 移动端适配 */
@media (max-width: 480px) {
    .login-box {
        padding: 28px 24px;
    }
    
    .login-icon {
        font-size: 48px;
    }
    
    .login-box h1 {
        font-size: 24px;
    }
}

/* 页脚导航区 */
.site-footer {
    margin-top: 50px;
    padding: 30px 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--theme);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-nav a:hover {
    color: var(--theme-dark);
    transform: translateY(-2px);
}

.footer-info {
    color: rgba(245,247,250,0.5);
    font-size: 12px;
}

@media (max-width: 768px) {
    .toolbar-form,
    .toolbar-actions,
    .panel-form {
        flex-direction: column;
        align-items: stretch;
    }

    .manage-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .manage-head-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .manage-head-actions .btn,
    .manage-toolbar .btn {
        width: 100%;
    }

    .manage-grid {
        grid-template-columns: 1fr;
    }

    .manage-thumb {
        width: 100px;
        height: 72px;
    }

    .toolbar-form .btn,
    .toolbar-actions .btn,
    .jump-page button {
        width: 100%;
    }

    .jump-page {
        width: 100%;
    }

    /* 移动端 toast 提示调整 */
    .copy-toast {
        top: 70px;
        right: 12px;
        max-width: calc(100% - 80px);
        font-size: 12px;
        padding: 8px 14px;
    }

    /* 页脚移动端调整 */
    .footer-nav {
        gap: 15px;
    }

    .footer-nav a {
        font-size: 13px;
    }
}
