﻿/* ============================================================
 * WhyKaiX 用户端网盘 - 百度网盘/夸克风格
 * ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --主色: #4F5BFF;
    --主色亮: #7B85FF;
    --背景: #f5f7fa;
    --卡片: #ffffff;
    --文字: #1c2333;
    --次要文字: #8a93a6;
    --边框: #e8ecf3;
    --圆角: 14px;
    --过渡: all 0.2s ease;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
    background: var(--背景);
    color: var(--文字);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============ 顶栏 ============ */
.顶栏 {
    background: var(--卡片);
    border-bottom: 1px solid var(--边框);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    gap: 28px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.品牌 { display: flex; align-items: center; gap: 12px; }
.品牌图标 { font-size: 2rem; }
.品牌名 { font-size: 1.2rem; font-weight: 700; }
.品牌副名 { font-size: 0.7rem; color: var(--次要文字); }

.搜索框 {
    flex: 1;
    max-width: 460px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--背景);
    border: 1px solid var(--边框);
    border-radius: 22px;
    padding: 9px 18px;
    color: var(--次要文字);
    transition: var(--过渡);
}
.搜索框:focus-within { border-color: var(--主色); background: #fff; box-shadow: 0 0 0 3px rgba(47,107,255,0.12); }
.搜索框 input { border: none; background: none; flex: 1; outline: none; color: var(--文字); font-size: 0.92rem; }

.管理入口 {
    margin-left: auto;
    color: var(--次要文字);
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--边框);
    transition: var(--过渡);
    white-space: nowrap;
}
.管理入口:hover { color: var(--主色); border-color: var(--主色); }

/* ============ 主体 ============ */
.主体 { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 32px; }

.工具栏 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}

.面包屑 { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-weight: 600; }
.面包屑项 { padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--次要文字); transition: var(--过渡); font-size: 0.95rem; }
.面包屑项:hover { background: var(--边框); color: var(--文字); }
.面包屑项.当前 { color: var(--主色); }
.面包屑分隔 { color: #c3c8d8; }

.视图切换 { display: flex; gap: 6px; }
.视图按钮 {
    background: var(--卡片);
    border: 1px solid var(--边框);
    width: 38px; height: 38px;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--次要文字);
    transition: var(--过渡);
    cursor: pointer;
}
.视图按钮.当前 { background: var(--主色); border-color: var(--主色); color: #fff; }

/* ============ 文件网格 ============ */
.文件网格 { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.文件网格.列表模式 { grid-template-columns: 1fr; gap: 8px; }

.文件卡 {
    background: var(--卡片);
    border: 1px solid var(--边框);
    border-radius: var(--圆角);
    padding: 20px 14px 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--过渡);
    position: relative;
    overflow: hidden;
}
.文件卡:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(30, 41, 59, 0.1); border-color: rgba(47,107,255,0.4); }

.文件卡图标 { font-size: 2.8rem; margin-bottom: 10px; }

.文件卡名称 {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.文件卡信息 { font-size: 0.75rem; color: var(--次要文字); margin-top: 4px; }

.文件卡下载按钮 {
    position: absolute;
    inset: auto 0 0 0;
    padding: 9px 0;
    background: linear-gradient(135deg, var(--主色), var(--主色亮));
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    transform: translateY(100%);
    transition: var(--过渡);
}
.文件卡:hover .文件卡下载按钮 { transform: translateY(0); }
.文件卡.列表模式 { display: flex; align-items: center; text-align: left; padding: 12px 16px; gap: 14px; }
.文件卡.列表模式 .文件卡图标 { font-size: 1.8rem; margin: 0; }
.文件卡.列表模式 .文件卡名称 { flex: 1; }
.文件卡.列表模式 .文件卡下载按钮 { position: static; transform: none; background: none; color: var(--主色); padding: 6px 14px; border: 1px solid rgba(47,107,255,0.4); border-radius: 20px; }
.文件卡.列表模式:hover .文件卡下载按钮 { background: var(--主色); color: #fff; }

/* 文件夹卡 */
.文件卡.文件夹 { border-style: dashed; }
.文件卡.文件夹:hover { border-color: rgba(47,107,255,0.5); }

.空状态 { text-align: center; padding: 70px 20px; color: var(--次要文字); }
.空状态图标 { font-size: 3rem; margin-bottom: 12px; opacity: 0.55; }
.空状态标题 { font-size: 1.05rem; font-weight: 600; color: var(--文字); }
.空状态提示 { font-size: 0.82rem; margin-top: 6px; }

/* ============ 页脚 ============ */
.页脚 {
    text-align: center;
    padding: 20px;
    color: var(--次要文字);
    font-size: 0.8rem;
    border-top: 1px solid var(--边框);
    background: var(--卡片);
}

/* ============ 弹窗 ============ */
.遮罩 {
    position: fixed;
    inset: 0;
    background: rgba(15, 17, 32, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.遮罩.显示 { display: flex; animation: 淡入 0.2s ease; }
@keyframes 淡入 { from { opacity: 0; } to { opacity: 1; } }

.弹窗 {
    background: var(--卡片);
    border-radius: 18px;
    padding: 26px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 60px rgba(15, 17, 32, 0.3);
    animation: 弹起 0.25s ease;
}
@keyframes 弹起 { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.弹窗头 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.弹窗头 h3 { font-size: 1.05rem; }
.弹窗关闭 { background: none; border: none; font-size: 1rem; color: var(--次要文字); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.弹窗关闭:hover { background: var(--背景); color: #dc2626; }

.下载文件信息 { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; padding: 14px; background: var(--背景); border-radius: 12px; }
.下载文件图标 { font-size: 2.2rem; }
.下载文件名 { font-weight: 600; word-break: break-all; }
.下载文件大小 { font-size: 0.78rem; color: var(--次要文字); margin-top: 2px; }

.密码区 { margin-bottom: 14px; }
.密码区 label { display: block; font-size: 0.85rem; color: var(--次要文字); margin-bottom: 10px; }
.密码区 input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--边框);
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--过渡);
}
.密码区 input:focus { border-color: var(--主色); box-shadow: 0 0 0 3px rgba(47,107,255,0.12); }
.密码错误 { color: #dc2626; font-size: 0.8rem; margin-top: 8px; min-height: 18px; }

.主按钮 {
    background: linear-gradient(135deg, var(--主色), var(--主色亮));
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--过渡);
}
.主按钮:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(47,107,255,0.35); }
.主按钮:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.全宽 { width: 100%; }

/* ============ 提示 ============ */
.提示容器 { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.提示 {
    background: #1c2333;
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    box-shadow: 0 10px 30px rgba(15,17,32,0.3);
    animation: 滑入 0.3s ease;
    max-width: 340px;
}
.提示.成功 { background: #16a34a; }
.提示.错误 { background: #dc2626; }
.提示.信息 { background: var(--主色); }
@keyframes 滑入 { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ============ 响应式 ============ */
@media (max-width: 720px) {
    .顶栏 { padding: 12px 16px; gap: 14px; }
    .主体 { padding: 16px; }
    .管理入口 { display: none; }
    .文件网格 { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ============================================================
 * 美化增强 v2 —— 现代质感升级（追加层，覆盖基础样式）
 * ============================================================ */
:root {
    --阴影-小: 0 1px 2px rgba(15,17,32,0.05), 0 4px 16px rgba(15,17,32,0.05);
    --阴影-中: 0 12px 32px rgba(15,17,32,0.10);
    --阴影-大: 0 26px 66px rgba(15,17,32,0.24);
    --渐变主: linear-gradient(135deg, #4F5BFF 0%, #7B85FF 55%, #7c5cff 100%);
    --过渡: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background:
        radial-gradient(800px 400px at 88% -8%, rgba(77,132,255,0.10), transparent 60%),
        radial-gradient(600px 360px at -8% 25%, rgba(124,92,255,0.08), transparent 60%),
        linear-gradient(180deg, #f7f9fd 0%, #f1f4fa 100%);
    background-attachment: fixed;
}

/* 全局滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #cdd5e6; border-radius: 8px;
    border: 2px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #aeb9d4; background-clip: content-box; }

::selection { background: rgba(47,107,255,0.20); }

/* ============ 顶栏 ============ */
.顶栏 {
    background: rgba(255,255,255,0.80);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 1px 0 rgba(15,17,32,0.03), 0 10px 30px -16px rgba(15,17,32,0.20);
}
.品牌图标 {
    width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(47,107,255,0.12), rgba(124,92,255,0.14));
    border: 1px solid rgba(47,107,255,0.18);
    border-radius: 13px;
    box-shadow: 0 6px 16px rgba(47,107,255,0.14);
}
.品牌名 { font-size: 1.22rem; }
.搜索框 {
    background: #f1f4fa;
    box-shadow: inset 0 1px 2px rgba(15,17,32,0.04);
}
.搜索框:focus-within {
    background: #fff;
    border-color: #a5b4fc;
    box-shadow: 0 0 0 4px rgba(47,107,255,0.13);
}
.管理入口 { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6); }

/* ============ 主体 ============ */
.主体 { padding: 28px 32px 40px; }

/* ============ 文件卡 ============ */
.文件卡 {
    border-radius: 18px;
    border: 1px solid rgba(232,238,248,0.9);
    box-shadow: 0 1px 3px rgba(15,17,32,0.05);
    overflow: hidden;
}
.文件卡::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: var(--渐变主); opacity: 0; transition: opacity 0.25s ease;
}
.文件卡:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(30,41,59,0.12);
    border-color: rgba(47,107,255,0.4);
}
.文件卡:hover::before { opacity: 1; }
.文件卡图标 {
    width: 64px; height: 64px; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #eef3ff, #f2eeff);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8), 0 6px 16px rgba(47,107,255,0.10);
    transition: transform 0.2s ease;
}
.文件卡:hover .文件卡图标 { transform: scale(1.06) translateY(-2px); }
.文件卡.文件夹 .文件卡图标 { background: linear-gradient(135deg, #fff7e6, #ffe9c4); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8), 0 6px 16px rgba(245,158,11,0.12); }
.文件卡下载按钮 { backdrop-filter: blur(4px); }

/* 列表模式 */
.文件卡.列表模式 { border-radius: 14px; }
.文件卡.列表模式 .文件卡图标 { width: 46px; height: 46px; font-size: 1.6rem; border-radius: 14px; margin: 0; }

/* ============ 视图按钮 ============ */
.视图按钮 { border-radius: 12px; box-shadow: 0 1px 3px rgba(15,17,32,0.06); }
.视图按钮.当前 { box-shadow: 0 5px 14px rgba(47,107,255,0.35); }

/* ============ 弹窗 ============ */
.遮罩 { background: rgba(15,17,32,0.55); backdrop-filter: blur(8px); }
.弹窗 {
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 22px;
    box-shadow: var(--阴影-大);
    animation: 弹窗弹出 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes 弹窗弹出 {
    from { opacity: 0; transform: translateY(18px) scale(0.95); }
    to { opacity: 1; transform: none; }
}
.下载文件信息 { background: linear-gradient(135deg, #f4f7ff, #f6f2ff); border: 1px solid var(--边框); }
.下载文件图标 {
    width: 54px; height: 54px; display: flex; align-items: center; justify-content: center;
    background: #fff; border-radius: 16px;
    box-shadow: 0 6px 16px rgba(47,107,255,0.14);
}
.密码区 input { border-radius: 12px; box-shadow: inset 0 1px 2px rgba(15,17,32,0.04); }
.密码区 input:focus { box-shadow: 0 0 0 4px rgba(47,107,255,0.14); }
.主按钮 {
    border-radius: 13px;
    background: var(--渐变主);
    box-shadow: 0 6px 16px rgba(47,107,255,0.32);
    position: relative; overflow: hidden;
}
.主按钮::after {
    content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.30), transparent);
    transform: skewX(-20deg); transition: left 0.45s ease;
}
.主按钮:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(47,107,255,0.42); }
.主按钮:hover::after { left: 120%; }

/* ============ 页脚 ============ */
.页脚 { padding: 22px; font-size: 0.78rem; letter-spacing: 0.3px; }

/* ============ 空状态 ============ */
.空状态图标 {
    width: 84px; height: 84px; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 26px;
    background: linear-gradient(135deg, #eef3ff, #f3eeff);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8), 0 10px 24px rgba(47,107,255,0.12);
}

/* ============ 面包屑 ============ */
.面包屑项 { border-radius: 10px; }

/* ============ 响应式补充 ============ */
@media (max-width: 640px) {
    .主体 { padding: 16px 14px 28px; }
}

/* ============ WhyKaiX 壁纸 广告条（素雅扁平卡片） ============ */
.壁纸广告 {
    display: flex; align-items: center; gap: 12px;
    margin-top: 18px; padding: 14px 16px;
    border-radius: 14px; text-decoration: none; color: inherit;
    background: #f7f8fa;
    border: 1px solid var(--边框, #e8ecf3);
    transition: background 0.18s ease, border-color 0.18s ease;
}
.壁纸广告:hover { background: #eef1f6; border-color: #d6dce8; }
.壁纸广告图标 {
    width: 42px; height: 42px; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--边框, #e8ecf3);
}
.壁纸广告文字 { flex: 1; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.壁纸广告标题 { font-weight: 600; font-size: 0.95rem; color: var(--文字, #1c2333); }
.壁纸广告副题 { font-size: 0.78rem; color: var(--次要文字, #8a93a6); }
.壁纸广告箭头 { font-size: 1.1rem; color: #9aa3b2; flex: none; }

/* ===== WhyKaiX 品牌标识 ===== */
.品牌图标 { font-size: 0; }
.品牌图标 img { width: 36px; height: 36px; border-radius: 10px; display: block; }
