/* 背景选择器样式 */

/* 固定网格布局 */
.bg-grid-fixed {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-auto-rows: 1fr !important;
    gap: 12px !important;
    height: auto !important;
    max-height: 600px !important;
    overflow-y: auto !important;
}

/* 背景选择器容器 */
.bg-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 12px;
    height: auto;
    max-height: 600px;
    overflow: hidden;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-top: 10px;
    position: relative;
}

/* 背景选择器分页容器 */
.bg-pagination-container {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* 分页按钮 */
.bg-page-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.bg-page-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.bg-page-btn.active {
    background: rgba(0, 176, 155, 0.5);
    border-color: rgba(0, 176, 155, 0.8);
    color: white;
}

.bg-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 自定义滚动条样式 */
.bg-grid-container::-webkit-scrollbar {
    width: 6px;
}

.bg-grid-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.bg-grid-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.bg-grid-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 背景项目 */
.bg-item {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 (9/16 = 0.5625) */
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.bg-item-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-item:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.bg-item.active {
    border-color: #00b09b;
    box-shadow: 0 0 15px rgba(0,176,155,0.5);
}

.bg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    display: block;
}

.bg-item:hover img {
    transform: scale(1.1);
}

/* 背景名称标签 */
.bg-item .bg-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(0);
}

.bg-item:hover .bg-name {
    opacity: 1;
    transform: translateY(0);
}
