body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 50px;
    border-radius: 8px;
    height: fit-content;
    margin-bottom: 100px; /* 增加底部间距，避免被固定按钮遮挡 */
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.tab-btn {
    flex: 1;
    background: none;
    color: #666;
    border: none;
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.tab-btn:hover {
    background-color: #f8f9fa;
    color: #333;
}

.tab-btn.active {
    background-color: #e7f1ff;
    color: #007bff;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.actions-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

input:focus {
    border-color: #007bff;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

.secondary-btn {
    background-color: #6c757d;
}

.secondary-btn:hover {
    background-color: #5a6268;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* 瀑布流容器 */
.waterfall-container {
    column-count: auto;
    column-width: 150px;
    column-gap: 15px;
    width: 100%;
}

/* 瀑布流项 */
.waterfall-item {
    display: inline-block;
    width: 150px;
    margin-bottom: 15px;
    break-inside: avoid;
    page-break-inside: avoid;
    background: white;
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.waterfall-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* 选中状态 - 简约风格 */
.waterfall-item.selected {
    border: 2px solid #6f42c1 !important;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.2) !important;
    background: #fff !important;
}

.waterfall-item.selected .waterfall-item-img {
    position: relative;
}

.waterfall-item.selected .waterfall-item-img img {
    opacity: 0.85 !important;
}

.waterfall-item.hidden {
    display: none;
}

/* 图片容器 */
.waterfall-item-img {
    width: 150px;
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
}

.waterfall-item-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 信息区域 */
.waterfall-item-info {
    padding: 10px;
    font-size: 0.85em;
}

.waterfall-item-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.waterfall-item-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.waterfall-item-source {
    padding: 2px 6px;
    background: #e7f1ff;
    color: #007bff;
    border-radius: 4px;
    font-size: 0.75em;
    display: inline-block;
    width: fit-content;
}

.waterfall-item-size {
    color: #999;
    font-size: 0.75em;
}

/* 操作按钮 */
.waterfall-item-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.waterfall-item-actions button {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.8em;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.waterfall-item-actions .download-btn {
    background: #28a745;
    color: white;
}

.waterfall-item-actions .download-btn:hover {
    background: #218838;
}

.waterfall-item-actions .add-task-btn {
    background: #6f42c1;
    color: white;
}

.waterfall-item-actions .add-task-btn:hover {
    background: #5a32a3;
}

.album-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    background: white;
    display: flex;
    flex-direction: column;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.album-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.album-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.album-name {
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artist-name {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-intro {
    color: #999;
    font-size: 0.8em;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.4em;
    line-height: 1.2em;
}

.download-btn {
    width: 100%;
    background-color: #28a745;
    margin-top: auto;
}

.download-btn:hover {
    background-color: #218838;
}

.loading {
    text-align: center;
    grid-column: 1 / -1;
    color: #666;
    padding: 20px;
}

.error {
    text-align: center;
    grid-column: 1 / -1;
    color: #dc3545;
    padding: 20px;
}

/* 选中覆盖层 - 简约风格 */
.selected-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(111, 66, 193, 0.15) !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    z-index: 10 !important;
    padding: 8px !important;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        background: rgba(111, 66, 193, 0.1);
    }
    to {
        opacity: 1;
        background: linear-gradient(135deg, rgba(111, 66, 193, 0.4), rgba(111, 66, 193, 0.5));
    }
}

@keyframes overlayFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 选中标记 - 简约风格 */
.selected-checkmark {
    width: 24px !important;
    height: 24px !important;
    background: #6f42c1 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: bold !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid white !important;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 选中计数器徽章样式 - 简约风格 */
#selectedCount {
    background: #6f42c1;
    color: white !important;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
}
