* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 主容器 */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    height: calc(100vh - 60px);
    margin-top: 60px;
    padding: 20px;
}

/* 卡片通用样式 */
.card {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    background: rgba(255, 255, 255, 0.25);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* A卡片样式 */
.card-a {
    flex: 5;
    height: 80%;
    position: relative;
    overflow: hidden;
    transition: flex 0.3s ease;
}

.card-a img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    border-radius: 15px;
}

.card-a img.active {
    opacity: 1;
}

/* B卡片样式 */
.card-b {
    flex: 3;
    height: 80%;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* 选项卡样式 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: bold;
    /* 字体加粗 */
}

.tab.active {
    background: rgba(255, 255, 255, 0.4);
    font-weight: bold;
}

/* 文件列表 */
.file-list {
    flex: 1;
    position: relative;
    overflow-y: hidden;
    overflow-x: hidden;
    max-height: 100%;
}

/* 动态滚动条样式 */
.file-list.scrollable {
    overflow-y: auto;
}

/* 美化滚动条 */
.file-list::-webkit-scrollbar {
    width: 8px;
}

.file-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.file-content {
    position: absolute;
    width: 100%;
    height: auto;
    max-height: 100%;
    padding: 10px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    top: 0;
    left: 0;
}

.file-content.active {
    transform: translateX(0);
}

.file-item {
    list-style: none;
}

.file-item li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.file-item li span {
    flex: 1;
}

.file-item li .download-btn {
    margin-left: 10px;
}

.download-btn {
    padding: 6px 15px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .card-a {
        display: none;
    }

    .card-b {
        flex: 1;
        width: 100%;
        
    }


    .container {
        flex-direction: column;
        height: 80vh;
        margin-top: 100px;
        /* 增加距离顶端 110px */
    }

    /* 文件列表优化 */
    .file-list {
        width: 100%;
        position: relative;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 300px;
        /* 确保有足够高度 */
    }
    .file-list.scrollable {
        overflow-y: auto;
    }
    .file-content {
        position: absolute;
        width: 100%;
        height: auto;
        padding: 10px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        transform: none !important;
    }

    .file-list::-webkit-scrollbar {
        width: 4px;
    }

    .file-list::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    .file-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 4px;
    }

    .file-list::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }

    .file-content.active {
        position: relative;
        opacity: 1;
        visibility: visible;
        height: auto;
    }

    .file-item {
        list-style: none;
        width: 100%;
    }

    .file-item li {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .file-item li span {
        flex: none;
        margin-bottom: 10px;
        width: 100%;
        word-break: break-word;
    }

    .file-item li .download-btn {
        margin-left: 0;
        width: 100%;
        max-width: 200px;
        align-self: flex-start;
    }

    /* 选项卡优化 */
    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        scrollbar-width: none;
        /* Firefox */
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab {
        min-width: 90px;
        display: inline-block;
        flex: none;
    }
}