/* 基础样式 */
:root {
    --primary-color: #165DFF;
    --secondary-color: #6B7280;
    --success-color: #3ecf8e;
    --background-color: #fafdff;
    --border-color: #e5e7eb;
    --shadow-color: #bcdcff;
    --text-color: #333;
    --transition: all 0.18s ease;
}

body {
    min-height: 100vh;
    background: var(--background-color);
    position: relative;
    overflow-x: hidden;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* 布局结构 */
.layout-root {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    padding-top: 56px !important;
    padding-left: 220px;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    width: 220px;
    height: calc(100vh - 56px);
    min-height: 0;
    z-index: 100;
    background: transparent !important;
    overflow-y: auto;
    border-right: none !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 0 1.5rem 0;
    transition: width 0.25s cubic-bezier(.4,2,.6,1), box-shadow 0.18s;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: 60px;
    padding-left: 0;
    padding-right: 0;
}

.sidebar-header {
    font-weight: 900;
    font-size: 1.3rem;
    color: var(--primary-color);
    text-align: center;
    letter-spacing: 0.04em;
    margin-bottom: 1.2rem;
    transition: opacity 0.18s;
}

.sidebar.collapsed .sidebar-header {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.sidebar-toggle {
    position: fixed;
    left: 18px;
    bottom: 24px;
    z-index: 2000;
    width: 44px;
    height: 44px;
    margin: 0;
    box-shadow: 0 2px 8px #bcdcff22;
    background: linear-gradient(90deg, #5fd15b 60%, #6493d8 100%);
    display: flex !important;
    align-items: center;
    border-radius: 30%;
    justify-content: center;
    color: #c42a16;
    border: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.sidebar-toggle:hover {
    background: linear-gradient(90deg, #3ecf8e 60%, #165DFF 100%);
    color: #fff;
    transform: scale(1.08);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.5rem;
}

.sidebar-link {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 500;
    font-size: 1.08rem;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    position: relative;
    margin: 1px 0;
}

.sidebar-link.active,
.sidebar-link:hover {
    background: #e0f7ef;
    color: #1fa2ff;
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 0.4rem 0.2rem;
    font-size: 1.1rem;
}

.sidebar-link span {
    transition: opacity 0.18s, width 0.18s;
}

.sidebar.collapsed .sidebar-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-link .tooltip {
    display: none;
    position: absolute;
    left: 110%;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--shadow-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px #bcdcff22;
    padding: 0.4em 1em;
    font-size: 0.98em;
    white-space: pre;
    z-index: 99;
}

.sidebar.collapsed .sidebar-link:hover .tooltip {
    display: block;
}

/* 主内容区域 */
.main-content {
    flex: 1 1 0%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.main-inner {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    background: none !important;
    box-shadow: none !important;
}

/* 欢迎横幅 */
.big-banner {
    background: rgba(255,255,255,0.38);
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 8px #bcdcff22;
    border-radius: 1.2rem;
    margin-bottom: 2.5rem;
    padding: 2.5rem 2rem 2rem 2rem;
    text-align: center;
}

.big-banner h1 {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    letter-spacing: 0.04em;
}

.big-banner p {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* 搜索表单 */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 640px;
    margin: 0 auto 2.2rem auto;
    background: #fafdff;
    border-radius: 2em;
    box-shadow: 0 2px 12px #bcdcff22;
    padding: 0.5em 1.2em;
    position: relative;
}

/* 搜索框容器 */
.search-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

/* 输入框，给右侧按钮留空间 */
.search-input {
    flex: 1;
    width: 80%;
    border: none;
    outline: none;
    background: rgba(22,93,255,0.18);
    font-size: 1.13em;
    padding: 0.7em 0.5em;
    border-radius: 1.5em;
    color: #fff;
    box-sizing: border-box;
    padding-right: 2.5em;
    height: 2.6em;
}

.search-input::placeholder {
    color: #7fa7ff;
    font-size: 1em;
}

/* 清除按钮 */
.clear-btn {
    position: absolute;
    right: -0.6em;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #ffe066;
    border: none;
    border-radius: 50%;
    width: 2.2em;
    height: 2.2em;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    opacity: 0.95;
    padding: 0;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}
.clear-btn:hover {
    background: rgba(255, 224, 102, 0.12);
    color: #fffbe6;
}

.search-button {
    position: relative;
    z-index: 2;
    background: linear-gradient(90deg, var(--primary-color) 60%, var(--success-color) 100%);
    color: #fff;
    border: none;
    border-radius: 2em;
    padding: 0.7em 1.6em;
    font-size: 1.08em;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px #bcdcff22;
    transition: var(--transition);
}

.search-button:hover {
    background: linear-gradient(90deg, var(--success-color) 60%, var(--primary-color) 100%);
    box-shadow: 0 4px 16px #3ecf8e22;
    transform: translateY(-2px) scale(1.04);
}

/* 模块组 */
.module-group {
    background: rgba(255,255,255,0.55) !important;
    backdrop-filter: blur(2px);
    border-radius: 1.1rem;
    box-shadow: 0 2px 8px #bcdcff22;
    margin-bottom: 2.5rem;
    padding: 2.2rem 1.5rem 1.5rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
    /* overflow: visible;  去掉或注释掉overflow:hidden */
}

.module-group .section-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.item-count {
    font-size: 1.08em;
    color: var(--success-color);
    font-weight: 700;
}

/* 项目网格 */
.item-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-items: stretch;
    align-items: stretch;
}

.item-card {
    min-width: 0;
    min-height: 220px;
    margin: 0;
    border-radius: 1.1rem;
    box-shadow: 0 2px 8px #bcdcff22;
    background: linear-gradient(135deg, #eaf1ff 30%, #d0e2ff 100%) !important;
    transition: box-shadow 0.18s, transform 0.18s;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.2rem 1rem 1rem 1rem;
}

.item-card:hover {
    box-shadow: 0 8px 32px #bcdcff33;
    transform: translateY(-4px) scale(1.04);
}

.item-card-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.1rem;
    width: 100%;
    justify-content: center;
}

.item-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--primary-color);
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-type {
    background: #eaf7ff;
    color: var(--primary-color);
    border-radius: 1em;
    padding: 0.2em 1em;
    font-size: 0.98em;
    font-weight: 700;
}

.item-description {
    color: var(--secondary-color);
    margin-bottom: 1.2rem;
    flex-grow: 1;
    width: 100%;
    text-align: center;
    font-size: 1.08em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.98em;
    color: var(--secondary-color);
    width: 100%;
}

.item-date,
.item-downloads {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.7s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .main-inner {
        padding: 1rem;
    }

    .big-banner {
        padding: 1.5rem 1rem;
    }

    .big-banner h1 {
        font-size: 2rem;
    }

    .search-form {
        max-width: 100%;
    }

    .item-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 80vw;
        max-width: 320px;
        min-width: 0;
        left: 0;
        top: 56px;
        height: calc(100vh - 56px);
    }

    .layout-root {
        padding-left: 0;
    }

    .account-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 0.5rem 1rem !important;
        height: auto !important;
    }
    .account-bar > div:first-child {
        width: 100%;
        font-size: 1.1rem;
        margin-bottom: 0.3em;
        text-align: left;
    }
    .account-bar > div:last-child {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5em;
        align-items: center;
        justify-content: flex-start;
        position: relative;
    }
    .account-bar .action-button {
        font-size: 0.98em;
        padding: 0.5em 1em;
        margin: 0 0.2em 0.2em 0;
    }
    .account-bar b, .account-bar span {
        font-size: 1em;
    }
    .account-bar .action-button.bg-danger {
        position: absolute;
        right: 5%;
        top: 0.2em;
    }
    .sidebar-toggle {
        left: 18px;
        bottom: 24px;
        top: auto;
    }
}

/* 工具类 */
.hidden {
    display: none;
}

html {
    scroll-behavior: smooth;
}

/* ====== 界面美化增强样式 ====== */

/* 卡片式内容美化 */
.card {
    background: rgba(255,255,255,0.65);
    border-radius: 14px;
    box-shadow: 0 4px 24px #0001;
    padding: 24px 20px;
    margin-bottom: 24px;
    transition: box-shadow 0.3s;
}
.card:hover {
    box-shadow: 0 8px 32px #0002;
}

/* 按钮渐变与悬浮动画 */
.action-button {
    background: linear-gradient(90deg, #3ecf8e 0%, #1fa2ff 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 500;
    box-shadow: 0 2px 8px #0001;
    transition: background 0.3s, transform 0.2s;
}
.action-button:hover {
    background: linear-gradient(90deg, #1fa2ff 0%, #3ecf8e 100%);
    transform: translateY(-2px) scale(1.04);
}

/* 顶部栏毛玻璃与投影 */
.account-bar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    border-radius: 0;
    box-shadow: 0 2px 12px #0002;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3ecf8e 0%, #1fa2ff 100%);
    border-radius: 6px;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #3ecf8e #f0f4f8;
}

/* ====== END ====== */

/* ====== 消除main区域底部空白 ====== */
.main-content,
.main-inner,
.module-group,
.card,
section {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.main-content > *:last-child,
.main-inner > *:last-child,
.module-group:last-child,
.card:last-child,
section:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
/* ====== END 消除main区域底部空白 ====== */

/* ====== 顶部导航固定并适配手机端 ====== */
@media (max-width: 768px) {
    .layout-root {
        flex-direction: column;
    }
    .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        width: 80vw;
        max-width: 320px;
        min-width: 0;
        height: calc(100vh - 56px);
        min-height: 0;
        z-index: 999;
        box-shadow: 2px 0 12px #0002;
        transform: translateX(-100%);
        transition: transform 0.3s;
        background: rgba(255,255,255,0.95);
    }
    .sidebar.collapsed {
        transform: translateX(0);
    }
    .main-content {
        min-height: 0;
        padding: 0.5rem 0.2rem;
    }
    .main-inner {
        max-width: 100vw;
        padding: 0.5rem 0.2rem;
    }
    .module-group {
        padding: 1rem 0.5rem 0.5rem 0.5rem;
    }
    .item-grid {
        gap: 1rem;
    }
    .account-bar {
        height: 56px !important;
    }
    .layout-root {
        padding-top: 56px !important;
    }
}
/* ====== END 顶部导航固定并适配手机端 ====== */

/* ====== 刘海导航效果：顶部导航全局固定 ====== */
.account-bar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    border-radius: 0;
    box-shadow: 0 2px 12px #0002;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
}
.layout-root {
    padding-top: 56px !important;
}
@media (max-width: 768px) {
    .account-bar {
        height: 56px !important;
    }
    .layout-root {
        padding-top: 56px !important;
    }
}
/* ====== END 刘海导航效果 ====== */

/* ====== 去除全站下划线 ====== */
a, a:visited, a:hover, a:active, .sidebar-link, .action-button, .register-link, .login-link, .footer-main, .footer-meta, .item-title, .section-title, .table-action, .log-action-cell, .log-detail-cell {
    text-decoration: none !important;
}
/* ====== END 去除全站下划线 ====== */

/* ====== 侧边栏无边框 ====== */
.sidebar {
    border-right: none !important;
}
/* ====== END 侧边栏无边框 ====== */

/* ====== 侧边栏无阴影 ====== */
.sidebar {
    box-shadow: none !important;
}
/* ====== END 侧边栏无阴影 ====== */

/* ====== 顶部账户栏按钮右侧留白 ====== */
@media (min-width: 769px) {
    .account-bar > div:last-child {
        margin-right: 3vw;
        justify-content: flex-end;
        display: flex;
        align-items: center;
        gap: 0.8em;
    }
}
/* ====== END 顶部账户栏按钮右侧留白 ====== */

/* ====== 移动端侧边栏切换按钮始终可见 ====== */
@media (max-width: 768px) {
    .sidebar-toggle {
        position: fixed;
        top: 90px;
        left: 12px;
        z-index: 2000;
        display: flex !important;
        background: #fff;
        box-shadow: 0 2px 8px #bcdcff22;
    }
}
/* ====== END 移动端侧边栏切换按钮始终可见 ====== */

/* 返回顶部按钮 */
.top-btn {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 2000;
    width: 48px;
    height: 48px;
    background: linear-gradient(90deg, #6b8edd 60%, #6493d8 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px #bcdcff22;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7em;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, background 0.2s, transform 0.2s;
}
.top-btn.show {
    opacity: 1;
    pointer-events: auto;
}
.top-btn:hover {
    background: linear-gradient(90deg, #6493d8 60%, #6b8edd 100%);
    transform: scale(1.08);
} 