/* 首页专用样式 */

/* 专辑列表样式 */
.album-section {
    margin-bottom: 2rem;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 100%;
}

/* 限制最大6个 */
@media (min-width: 1400px) {
    .album-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.album-card {
    background: var(--bg-card);
    border-radius: var(--radius-large);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative; /* 为角标定位 */
}

.album-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #ffd700;
}

/* 精品角标样式 */
.album-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ff000073 0%, #ffd64eaf 100%);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 6px 20px 4px 20px;
    transform: rotate(45deg) translate(25%, -45%);
    transform-origin: center center;
    z-index: 10;
    text-shadow: 0 1px 2px rgb(0, 0, 0);
    letter-spacing: 1px;
    white-space: nowrap;
    text-align: center;
    line-height: 1;
}

.album-cover-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.album-cover {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 比例 */
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.album-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-file-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}



.album-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
}

.album-name-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.album-name-link:hover .album-name {
    color: var(--primary-color);
}

.album-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.album-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    justify-content: space-between;
}

.album-preview-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.album-preview-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.album-preview-btn i {
    font-size: 1.1rem;
}

.album-author-link {
    display: block;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.album-author-link:hover {
    transform: scale(1.1);
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.album-author-link:hover .author-avatar {
    border-color: var(--primary-color);
}

.album-size {
    color: var(--text-secondary);
}

.album-size i {
    font-size: 1rem;
}

/* 分页样式 */
.pagination-container {
    margin-top: 2rem;
    text-align: center;
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pagination-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-medium);
    transition: var(--transition);
    font-weight: 500;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.pagination-btn.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    cursor: default;
}

.pagination-btn.prev,
.pagination-btn.next {
    padding: 0.75rem 1.25rem;
}

.pagination-ellipsis {
    padding: 0.75rem 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.page-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* 分享按钮样式 */
.btn-share {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-medium);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.btn-share:active {
    transform: translateY(0);
}

/* 取消按钮样式 */
.btn-cancel {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-medium);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
}

.btn-cancel:active {
    transform: translateY(0);
}

/* 滚动广告样式 */
.announcement-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.announcement-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: scroll-announcement 30s linear infinite;
    font-size: 14px;
    font-weight: 500;
}

.announcement-text {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 100px;
}

.announcement-icon {
    font-size: 16px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes scroll-announcement {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .album-card {
        border-width: 1px;
    }
    
    .album-card:hover {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
        border-color: #ffd700;
    }
    
    .album-info {
        padding: 0.75rem;
    }
    
    .album-name {
        font-size: 0.9rem;
    }
    
    .album-size {
        font-size: 0.8rem;
    }
    
    .author-avatar {
        width: 28px;
        height: 28px;
    }
    
    .album-file-count {
        bottom: -6px;
        left: 6px;
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-width: 36px;
    }
    
    .pagination-btn.prev,
    .pagination-btn.next {
        padding: 0.5rem 1rem;
    }

    .announcement-banner {
        padding: 10px 0;
    }
    
    .announcement-content {
        font-size: 13px;
        animation-duration: 25s;
    }
}

/* 专辑预览模态框样式 */
#albumPreviewModal {
    display: none;
}

#albumPreviewModal.show {
    display: flex !important;
}

.album-preview-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 602px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.album-preview-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.album-preview-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.album-preview-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cover-preview-area {
    width: 100%;
    text-align: center;
    padding: 0;
}

.cover-preview-area img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.generate-progress {
    width: 100%;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 15px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: bold;
    font-size: 0.85rem;
}

.progress-status {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.album-preview-footer {
    padding: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-refresh {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-refresh:active {
    transform: translateY(0);
}

.btn-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-close-modal {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-close-modal:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
}

.btn-close-modal:active {
    transform: translateY(0);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .album-preview-modal {
        width: 95%;
        max-height: 85vh;
    }
    
    .album-preview-header {
        padding: 15px;
    }
    
    .album-preview-header h3 {
        font-size: 1.1rem;
    }
    
    .album-preview-footer {
        padding: 15px;
    }
    
    .btn-refresh {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}