/* 爱微圈云盘 - 白色+浅灰渐变主题 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 50%, #e8e8e8 100%);
    min-height: 100vh;
}

/* 顶部标题栏 */
.header {
    background: linear-gradient(to right, #0f766e, #0d9488, #14b8a6);
    color: #fff;
    padding: 20px 25px;
    font-size: 22px;
    font-weight: bold;
    font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.15);
    text-align: left;
}

.header .subtitle {
    font-size: 22px;
    font-weight: bold;
}

/* 状态栏 */
.status-bar {
    background: linear-gradient(to right, #fff, #f9fafb, #f3f4f6);
    border-bottom: 1px solid #d1d5db;
    padding: 5px 15px;
    text-align: right;
    color: #374151;
    font-size: 12px;
}

/* 主容器 */
.main-wrapper {
    display: flex;
    min-height: calc(100vh - 90px);
    padding: 8px;
}

/* 左侧边栏 */
.sidebar {
    width: 180px;
    margin-right: 8px;
    flex-shrink: 0;
}

.sidebar-section {
    background: #fff;
    border: 1px solid #d1d5db;
    margin-bottom: 8px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sidebar-title {
    background: linear-gradient(to right, #f9fafb, #f3f4f6);
    padding: 8px 10px;
    font-weight: bold;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12px;
}

.sidebar-content {
    padding: 10px;
    font-size: 12px;
    color: #374151;
}

/* 公告样式 */
.notice-content {
    line-height: 1.8;
}

.notice-content p {
    margin-bottom: 5px;
}

.notice-date {
    text-align: right;
    color: #9ca3af;
    font-size: 11px;
    margin-top: 8px;
}

/* 统计样式 */
.stats-content .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.stats-content .stat-row:last-child {
    border-bottom: none;
}

.stats-content .online {
    color: #10b981;
    font-weight: bold;
}

/* 迷你文件列表 */
.file-list-mini {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list-mini li {
    padding: 5px 0;
    border-bottom: 1px dashed #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list-mini li:last-child {
    border-bottom: none;
}

.file-list-mini a {
    color: #333;
    text-decoration: none;
    font-size: 11px;
}

.file-list-mini a:hover {
    color: #ff0000;
    text-decoration: underline;
}

.file-list-mini .count {
    color: #9ca3af;
    font-size: 10px;
}

.empty-tip {
    text-align: center;
    color: #9ca3af;
    padding: 10px 0;
}

/* 内容区 */
.content-area {
    flex: 1;
    background: #fff;
    border: 1px solid #d1d5db;
    display: flex;
    flex-direction: column;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 内容头部 */
.content-header {
    background: linear-gradient(to right, #fff, #f9fafb);
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breadcrumb {
    color: #000;
}

.breadcrumb a {
    color: #000;
    text-decoration: none;
}

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

/* 文件列表区 */
.file-list-container {
    flex: 1;
    padding: 10px;
    overflow: auto;
    background: #fff;
}

/* 文件夹项 */
.folder-item {
    border-bottom: 1px dashed #e5e7eb;
    font-size: 13px !important;
    font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif !important;
}

.folder-item:hover {
    background: #f9fafb;
}

.folder-item a {
    display: block;
    padding: 10px 12px;
    color: #000 !important;
    text-decoration: none;
    font-size: 13px !important;
    font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif !important;
}

.folder-item a:hover {
    color: #ff0000 !important;
    text-decoration: underline;
}

.folder-icon-img {
    width: 18px;
    height: 18px;
    margin-right: 5px;
    vertical-align: middle;
}

.file-icon-img {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

/* 文件项 */
.file-item {
    padding: 10px 12px;
    border-bottom: 1px dashed #e5e7eb;
    display: flex;
    align-items: center;
    font-size: 13px !important;
    font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif !important;
}

.file-item:hover {
    background: #f9fafb;
}

.file-name {
    flex: 1;
}

.file-name a {
    color: #000 !important;
    text-decoration: none;
    font-size: 13px !important;
    font-family: "微软雅黑", "Microsoft YaHei", Arial, sans-serif !important;
}

.file-name a:hover {
    color: #ff0000 !important;
    text-decoration: underline;
}

.file-info {
    color: #888;
    font-size: 11px;
    margin-left: 15px;
}

.download-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #0d9488;
    color: #fff !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 8px;
    border: 1px solid #0d9488;
    transition: all 0.2s;
}

.download-link:hover {
    background: #14b8a6;
    border-color: #14b8a6;
    text-decoration: none !important;
}

.download-link svg {
    width: 12px;
    height: 12px;
    margin-right: 3px;
    fill: currentColor;
}

/* 排序选项 */
.sort-options {
    padding: 8px 12px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #374151;
}

.sort-options label {
    margin-right: 15px;
    cursor: pointer;
}

/* 空目录提示 */
.empty-folder {
    padding: 50px;
    text-align: center;
    color: #9ca3af;
}


/* 后台管理按钮 - 固定在左下角，与侧边栏居中对齐 */
.admin-btn-wrap {
    position: fixed;
    left: 8px;
    bottom: 15px;
    width: 180px;
    text-align: center;
    z-index: 1000;
}

.admin-btn {
    display: inline-block;
    text-align: center;
    padding: 8px 35px;
    background: linear-gradient(to bottom, #0d9488, #0f766e);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #0b5f59;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.admin-btn:hover {
    background: linear-gradient(to bottom, #14b8a6, #0d9488);
    color: #fff;
    text-decoration: none;
}


/* 手机端响应式样式 */
@media screen and (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    .header {
        padding: 12px 15px;
        font-size: 18px;
    }
    .header .subtitle {
        font-size: 18px;
    }
    .status-bar {
        padding: 5px 10px;
        font-size: 11px;
        text-align: center;
    }
    .main-wrapper {
        flex-direction: column;
        padding: 5px;
    }
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }
    .sidebar-section {
        margin-bottom: 0;
    }
    .sidebar-title {
        padding: 6px 8px;
        font-size: 11px;
    }
    .sidebar-content {
        padding: 8px;
        font-size: 11px;
    }
    .content-area {
        min-height: 400px;
    }
    .content-header {
        padding: 8px 10px;
    }
    .breadcrumb {
        font-size: 12px;
    }
    .file-list-container {
        padding: 5px;
    }
    /* 文件夹项 - 手机端 */
    .folder-item a {
        padding: 8px 10px;
        font-size: 13px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .folder-icon-img {
        width: 16px;
        height: 16px;
    }
    /* 文件项 - 手机端横向布局 */
    .file-item {
        padding: 8px 10px;
        flex-wrap: nowrap;
    }
    .file-icon-img {
        width: 20px;
        height: 20px;
        min-width: 20px;
        margin-right: 8px;
    }
    .file-name {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    .file-name a {
        display: block;
        font-size: 12px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .file-info {
        margin-left: 8px;
        white-space: nowrap;
        font-size: 10px;
    }
    .download-link {
        padding: 3px 8px;
        font-size: 10px;
        margin-left: 5px;
    }
    /* 排序选项 */
    .sort-options {
        padding: 6px 10px;
        font-size: 11px;
    }
    .sort-options label {
        margin-right: 10px;
    }
    /* 后台管理按钮 */
    .admin-btn-wrap {
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        bottom: 10px;
        display: none;
    }
    .admin-btn {
        padding: 8px 25px;
        font-size: 12px;
    }
    /* 隐藏部分侧边栏内容 */
    .notice-date {
        display: none;
    }
    .stats-content .stat-row {
        padding: 3px 0;
        font-size: 11px;
    }
    .file-list-mini li {
        padding: 4px 0;
        font-size: 10px;
    }
    .file-list-mini a {
        font-size: 10px;
    }
}

/* 更小屏幕 */
@media screen and (max-width: 480px) {
    .header {
        padding: 10px 12px;
        font-size: 16px;
    }
    .header .subtitle {
        font-size: 16px;
    }
    .sidebar {
        grid-template-columns: 1fr;
    }
    .file-item {
        padding: 6px 8px;
    }
    .file-icon-img {
        width: 18px;
        height: 18px;
        min-width: 18px;
        margin-right: 6px;
    }
    .file-name a {
        font-size: 11px !important;
    }
    .file-info {
        font-size: 9px;
    }
    .download-link {
        padding: 2px 6px;
        font-size: 9px;
    }
}

/* ============================================================
   2026-10-21 加：首页「最新上传」区块 + 手机端内容优先
   ============================================================ */
.latest-block {
    margin: 14px 0 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px 16px 16px;
}
.latest-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid #eef2f3;
    padding-bottom: 10px;
    margin-bottom: 12px;
}
.latest-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f766e;
    position: relative;
    padding-left: 11px;
}
.latest-title::before {
    content: "";
    position: absolute;
    left: 0; top: 3px; bottom: 3px;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, #14b8a6, #0d9488);
}
.latest-sub { font-size: 12px; color: #9ca3af; }
.latest-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.latest-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 11px 12px;
    border: 1px solid #eef2f3;
    border-radius: 6px;
    background: linear-gradient(180deg, #fbfdfd, #f6fafa);
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.latest-card:hover {
    border-color: #5eead4;
    box-shadow: 0 4px 14px rgba(13,148,136,.12);
    transform: translateY(-1px);
}
.latest-ext {
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 3px;
    padding: 1px 5px;
}
.latest-name {
    font-size: 12.5px;
    color: #1f2937;
    line-height: 1.45;
    word-break: break-all;
}
.latest-meta { font-size: 11px; color: #9ca3af; }

@media screen and (max-width: 768px) {
    /* 手机端：内容优先，侧栏（公告/统计/热门）挪到文件列表后面 */
    .main-wrapper { flex-direction: column; }
    .content-area { order: 1; width: 100%; }
    .sidebar { order: 2; }
    .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 有「最新上传」区块时，目录区按内容高度收起来，别把中间撑出一大片空白 */
.file-list-container.compact { flex: 0 1 auto; }
