/* ========================================
   MUSEUM COLLECTION PAGE STYLES
   复制自Met Museum数据页面样式
   ======================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000;
    /* 保留 topbar 所需的 padding-top */
}

/* 顶部容器样式 */
.top-containers {
    background-color: #000000;
    margin-bottom: 20px;
}

/* Container2和Container3样式 - 从index.css复制 */
#container2,
#container3 {
    position: relative;
    margin-top: 60px;
    padding-top: 40px;
    background-color: #000000;
}

/* 第一个容器特殊处理 */
#container2 {
    margin-top: 30px;
}

/* 收藏夹容器样式 - 与 container2/container3 保持一致 */
#favoritesContainer {
    position: relative;
    margin-top: 60px;
    padding-top: 40px;
    padding-bottom: 70px; /* 为底部控制按钮预留空间 */
    background-color: #000000;
}

/* 收藏夹容器特殊处理 */
#favoritesContainer {
    margin-top: 30px;
}

/* 收藏夹控制栏 - 位于容器底部右侧 */
.favorites-controls {
    position: absolute;
    bottom: 15px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

/* 收藏夹数量显示 */
.favorites-count {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: bold;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 收藏夹标题右侧的数量徽章 - 位于标题旁边 */
.section-title .favorites-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: bold;
    width: 36px;
    height: 36px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    vertical-align: middle;
}

.section-title .favorites-count-badge:empty {
    display: none;
}

/* 收藏夹按钮组 */
.favorites-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 圆形按钮基础样式 */
.circular {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.circular:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.circular:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.circular:disabled:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: none;
}

.circular img {
    width: 20px;
    height: 20px;
    filter: brightness(1.2);
}

.circular:hover img {
    filter: brightness(1.5);
}

/* 收藏夹列表使用圆形卡片 */
#favoritesContainer .video-list {
    padding: 0 20px;
}

/* 收藏项圆形卡片样式 - 与 culture-item 完全一致 */
#favoritesContainer .selected-item {
    width: 210px;
    aspect-ratio: 3/4;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-direction: column;
    padding: 0;
    background: transparent;
}

#favoritesContainer .selected-item img {
    width: 117.65%;
    height: 117.65%;
    border-radius: 8px;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

#favoritesContainer .selected-item:hover img {
    transform: translate(-50%, -50%) scale(1.1);
}

/* 收藏项文字覆盖层 */
#favoritesContainer .selected-item .selected-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 25px 8px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

#favoritesContainer .selected-item .selected-item-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    display: block;
}

#favoritesContainer .selected-item .selected-item-id {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 收藏项删除按钮 */
#favoritesContainer .selected-item .remove-selected {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(84, 84, 84, 0.95);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#favoritesContainer .selected-item.show-delete .remove-selected {
    opacity: 1;
    transform: scale(1);
}

#favoritesContainer .selected-item .remove-selected:hover {
    background-color: rgba(200, 0, 0, 0.9);
    transform: scale(1.1);
}

/* 选中待删除的卡片样式 */
#favoritesContainer .selected-item.selected-for-deletion {
    border: 3px solid rgba(255, 50, 50, 0.8);
    box-shadow: 0 0 15px rgba(255, 50, 50, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: all 0.3s ease;
}

#favoritesContainer .selected-item.selected-for-deletion img {
    filter: brightness(0.6) grayscale(0.3);
}

#favoritesContainer .selected-item.selected-for-deletion:hover {
    transform: scale(0.98);
}

#favoritesContainer .selected-item.selected-for-deletion:hover img {
    transform: translate(-50%, -50%) scale(1.05);
}

/* 选中指示器 */
#favoritesContainer .selected-item .selection-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 50, 50, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Section title */
.section-title {
    position: absolute;
    top: 5px;
    left: 20px;
    right: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #EFEEE0;
    padding: 10px 0;
    z-index: 2;
    background: transparent;
    border-radius: 0;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Container height to fit cards perfectly */
#container2 .video-list,
#container3 .video-list {
    height: 280px;
}

/* 收藏夹容器视频列表高度 - 与 container2/container3 一致 */
#favoritesContainer .video-list {
    height: 280px;
}

/* Video list styles */
.video-list {
    display: flex;
    gap: 8px;
    padding: 0 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    align-items: stretch;
}

.video-list::-webkit-scrollbar {
    height: 0px;
    width: 0px;
    display: none;
}

.video-list {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Culture item styles */
.culture-item {
    width: 210px;
    aspect-ratio: 3/4;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.culture-thumbnail {
    width: 117.65%;
    height: 117.65%;
    border-radius: 8px;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.culture-item:hover .culture-thumbnail {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Text overlay */
.culture-item .item-title,
.culture-item .item-id {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.culture-item .item-title {
    bottom: 25px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.culture-item .item-id {
    bottom: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.no-content {
    color: #EFEEE0;
    text-align: center;
    padding: 50px 20px;
}

/* Responsive styles for containers */
@media (max-width: 768px) {
    .section-title {
        font-size: 16px;
        height: 30px;
        top: 5px;
    }

    #container2,
    #container3 {
        margin-top: 40px;
        padding-top: 45px;
    }

    #container2 {
        margin-top: 30px;
    }

    #container2 .video-list,
    #container3 .video-list {
        height: 260px;
    }

    .culture-item {
        width: 195px;
        border-radius: 10px;
    }

    .culture-thumbnail {
        border-radius: 10px;
    }

    .culture-item .item-title {
        font-size: 12px;
    }

    .culture-item .item-id {
        font-size: 12px;
    }

    /* 收藏夹容器响应式 */
    #favoritesContainer {
        margin-top: 30px;
        padding-top: 45px;
        padding-bottom: 70px;
    }

    #favoritesContainer .video-list {
        height: 260px;
    }

    /* 收藏夹标题旁边的徽章响应式 */
    .section-title .favorites-count-badge {
        width: 32px;
        height: 32px;
        font-size: 12px;
        margin-left: 10px;
    }

    .favorites-controls {
        bottom: 12px;
        right: 15px;
        gap: 12px;
    }

    .favorites-count {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .circular {
        width: 36px;
        height: 36px;
    }

    .circular img {
        width: 18px;
        height: 18px;
    }

    #favoritesContainer .selected-item {
        width: 195px;
        border-radius: 10px;
    }

    #favoritesContainer .selected-item img {
        border-radius: 10px;
    }

    #favoritesContainer .selected-item .selected-item-title {
        font-size: 12px;
    }

    #favoritesContainer .selected-item .selected-item-id {
        font-size: 12px;
    }
}

.header {
    text-align: center;
    margin: 20px 0 30px 0;
    padding: 0 20px;
}

.header h1 {
    color: #EFEEE0; /* 改为浅色调，与黑色背景协调 */
    margin-bottom: 10px;
}

.main-container {
    display: flex;
    flex-direction: column; /* 改为垂直布局 */
    gap: 30px; /* 增加间距 */
    align-items: stretch; /* 让子元素拉伸填充宽度 */
    padding: 0 20px; /* 添加左右padding */
}

.content-area {
    flex: 0 0 auto; /* 不自动伸缩，根据内容高度 */
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.input-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
   
}

.input-section textarea {
    width: 100%;
    max-width: 600px;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.input-section button {
    background-color: #b1b0b0;
    color: rgba(32, 32, 32, 0.9);
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.input-section button:hover {
    background-color: #333;
}

.input-section button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.input-section button.save-btn {
    background-color: #28a745;
}

.input-section button.save-btn:hover {
    background-color: #1e7e34;
}

.input-section button.clear-btn {
    background-color: #9e9e9e;
}

.input-section button.clear-btn:hover {
    background-color: #a0a0a0;
}

.play-all-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.play-all-btn:hover {
    background-color: #1e7e34;
}

.play-all-btn img {
    width: 16px;
    height: 16px;
}

.status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}

.status.loading {
    background-color: #fff3cd;
    color: #eaeaea;
}

.status.success {
    background-color: #d4edda;
    color: #c6c6c6;
}

.status.error {
    background-color: #f8d7da;
    color: #121212;
}

.progress {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.sidebar {
    width: 100%; /* 占满宽度 */
    position: relative; /* 改为相对定位，跟随页面滚动 */
    height: auto; /* 高度自适应 */
    min-height: 300px; /* 设置最小高度 */
    display: flex;
    flex-direction: column;
}

.selected-section {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
    margin-bottom: 5px;
    flex: 1; /* 让selected-section填充sidebar的剩余高度 */
    display: flex;
    flex-direction: column;
}

.selected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.selected-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.selected-header h3 {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 14px;
    font-weight: normal;
}

.selected-count {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.selected-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    margin-top:10px ;
    padding: 0;
    align-items: center;
    height: 50px;
    flex-shrink: 0; /* 防止控制按钮被压缩 */
}

/* Basic controls container - 长方形容器 */
.selected-basic-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 40px;
    width: auto;
    min-width: 100px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Save button container - 圆形容器 */
.selected-save-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.selected-save-container:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Basic controls buttons style */
.selected-basic-controls .back-btn,
.selected-basic-controls .play-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.selected-basic-controls .back-btn:hover,
.selected-basic-controls .play-all-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.selected-basic-controls .back-btn span,
.selected-basic-controls .play-all-btn span {
    display: none;
}

.selected-basic-controls .back-btn img,
.selected-basic-controls .play-all-btn img {
    width: 18px;
    height: 18px;
    filter: brightness(1.2);
}

/* Save button style inside circular container */
.selected-save-container .save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selected-save-container .save-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(1.2);
}

.selected-save-container:hover .save-btn img {
    filter: brightness(1.5);
}

/* Hide old save button styles */
.selected-header .button-group {
    display: none;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.selected-list {
    border-radius: 4px;
    flex: 1; /* 让selected-list占据剩余空间 */
    overflow-y: auto; /* 支持滚动 */
    overflow-x: hidden;
}

.selected-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    position: relative;
}

.selected-item:last-child {
    border-bottom: none;
}

.selected-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.selected-item-info {
    flex: 1;
    font-size: 12px;
}

.selected-item-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.selected-item-id {
    color: #666;
    font-size: 11px;
}

.remove-selected {
    background: #555;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 3px;
    /* 默认隐藏删除按钮 */
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* 显示删除按钮的状态 */
.selected-item.show-delete .remove-selected {
    display: block;
    opacity: 1;
}

/* 也可以使用单独的类来控制显示 */
.selected-item .remove-selected.visible {
    display: block;
    opacity: 1;
}

.remove-selected:hover {
    background-color: #333;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.image-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.image-card.selected {
    box-shadow: 0 0 0 3px #2d2d2d;
    transform: translateY(-2px);
}

.selection-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background-color: #cacaca;
    color: rgb(32, 32, 32);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    z-index: 10;
}

.image-card.selected .selection-indicator {
    opacity: 1;
    transform: scale(1);
}

.image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover .image-container img {
    transform: scale(1.1);
}

.image-info {
    padding: 15px;
}

.image-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
}

.image-artist {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.image-date {
    font-size: 12px;
    color: #888;
}

.no-images {
    text-align: center;
    padding: 50px;
    color: #666;
    font-size: 18px;
}

.empty-selected {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
    font-style: italic;
    /* 确保没有背景色填充 */
    background: transparent;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.form-group label {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-range input {
    flex: 1;
}

.date-range span {
    color: #666;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.checkbox-label input {
    margin: 0;
    width: auto;
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input:checked {
    background-color: white;
    border-color: #333;
}

.checkbox-label input:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: black;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label input:hover {
    border-color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header h1 {
        font-size: 1.5em;
        order: 1;
    }

    .header-controls {
        order: 2;
    }

    .main-container {
        flex-direction: column; /* 保持垂直布局 */
        gap: 20px; /* 减小间距 */
        padding-bottom: 20px; /* 移除为底部固定sidebar预留的空间 */
    }

    .sidebar {
        width: 100%; /* 占满宽度 */
        position: relative; /* 相对定位，跟随页面滚动 */
        height: auto; /* 高度自适应 */
        min-height: 250px; /* 设置最小高度 */
        display: flex;
        flex-direction: column;
    }

    .selected-section {
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        padding: 15px;
        margin-bottom: 5px;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* 移动端布局：控制按钮在左侧，标题在右侧 */
    .selected-header {
        display: flex;
        align-items: center;
        justify-content: flex-start; /* 左对齐 */
        gap: 12px; /* 控制按钮和标题之间的间距 */
        margin-bottom: 8px;
        flex-shrink: 0;
        height: 40px;
    }

    .selected-title-container {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 1;
        order: 2; /* 标题容器排在后面 */
    }

    .selected-header h3 {
        font-size: 13px;
        margin: 0;
        color: rgba(255, 255, 255, 0.9);
    }

    .selected-header h3::after {
        content: "保存至收藏"; /* 将"收藏夹"改为"保存至收藏" */
    }

    .selected-count {
        width: 20px;
        height: 20px;
        font-size: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 控制按钮容器重新排序到左侧 */
    .selected-basic-controls {
        order: 1; /* 基础控制按钮排在最前面 */
        flex-shrink: 0;
        height: 42px; /* 增大基础控制容器高度 */
        min-width: 90px; /* 增大最小宽度 */
        padding: 0 12px; /* 增大内边距 */
        gap: 12px; /* 增大按钮间距 */
        margin-top: 0 !important; /* 移除之前的margin-top */
    }

    .selected-save-container {
        order: 1; /* 保存按钮也排在前面 */
        flex-shrink: 0;
        height: 42px; /* 与基础控制容器高度一致 */
        width: 42px; /* 增大保存容器尺寸 */
    }

    .selected-basic-controls .back-btn,
    .selected-basic-controls .play-all-btn {
        width: 32px; /* 增大按钮尺寸 */
        height: 32px;
    }

    .selected-basic-controls .back-btn img,
    .selected-basic-controls .play-all-btn img {
        width: 18px; /* 增大图标尺寸 */
        height: 18px;
    }

    .selected-save-container .save-btn img {
        width: 20px; /* 增大保存图标尺寸 */
        height: 20px;
    }

    .button-group {
        gap: 6px;
        flex-shrink: 0;
    }

    .button-group button {
        padding: 5px 8px;
        font-size: 10px;
        border-radius: 3px;
    }

    .play-all-btn {
        padding: 5px 8px;
        font-size: 10px;
        border-radius: 3px;
    }

    .play-all-btn img {
        width: 12px;
        height: 12px;
    }

    .selected-list {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        display: flex;
        flex-direction: row; /* 水平滚动 */
        gap: 6px;
        max-height: 144px; /* 优化高度：200px总高度 - 40px头部 - 8px边距 - 8px底部边距 = 144px */
        padding: 4px 0;
    }

    .selected-item {
        flex: 0 0 auto;
        width: 75px; /* 3:4比例的卡片宽度 */
        height: 100px; /* 3:4比例的卡片高度 */
        padding: 0;
        border-bottom: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        background: transparent; /* 移除背景填充 */
        gap: 0;
    }

    .selected-item img {
        width: 75px; /* 填满卡片宽度 */
        height: 75px; /* 1:1比例 */
        object-fit: cover;
        flex-shrink: 0;
        border-radius: 0; /* 移除圆角 */
    }

    .selected-item-info {
        height: 25px; /* 固定高度显示objectID */
        color: rgba(255, 255, 255, 0.9);
        font-size: 9px;
        text-align: center;
        padding: 2px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1.1;
        min-width: 0;
        width: 100%;
    }

    .selected-item-title {
        display: none; /* 仍然隐藏标题以节省空间 */
    }

    .selected-item-id {
        color: rgba(255, 255, 255, 0.9);
        font-size: 9px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        font-weight: bold;
        text-align: center;
    }

    .remove-selected {
        position: absolute;
        top: 2px;
        right: 2px;
        font-size: 8px;
        padding: 1px;
        background: rgba(84, 84, 84, 0.95);
        color: white;
        border-radius: 50%;
        width: 14px;
        height: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 3px rgba(0,0,0,0.3);
        z-index: 10;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .selected-item.show-delete .remove-selected {
        opacity: 1;
    }

    .remove-selected:hover {
        background-color: rgb(0, 0, 0);
        transform: scale(1.1);
    }

    .empty-selected {
        font-size: 11px;
        padding: 15px;
        text-align: center;
        color: #999;
        /* 移除背景色填充 */
        border-radius: 0;
        margin: 0;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .input-section {
        padding: 15px;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        padding: 10px 0;
    }
}