/* 藏宝阁捡漏页 */

.cbg-search {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 10px auto 6px;
    padding: 14px;
    background: rgba(38, 30, 58, 0.9);
    border: 1px solid rgba(232, 201, 106, 0.3);
    border-radius: 14px;
}

.cbg-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.cbg-search-row:last-of-type {
    margin-bottom: 0;
}

.cbg-search input {
    flex: 1;
    box-sizing: border-box;
    border: 1px solid #4a3f6b;
    border-radius: 10px;
    background: #120e20;
    color: #f7f7f7;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    min-width: 0;
}

.cbg-search input:focus {
    border-color: #e8c96a;
}

.cbg-search input::placeholder {
    color: #6f6492;
}

.cbg-search input[type=number] {
    width: 92px;
    flex: none;
}

.cbg-tilde {
    color: #8a7fb0;
    font-size: 14px;
}

.cbg-search button {
    background: linear-gradient(135deg, #f0d47c, #e8c96a);
    border: none;
    border-radius: 10px;
    color: #1f1f1f;
    font-size: 14px;
    font-weight: bold;
    padding: 10px 22px;
    cursor: pointer;
    flex: none;
}

.cbg-search button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cbg-search-tip {
    margin-top: 8px;
    font-size: 12px;
    color: #8a7fb0;
    line-height: 1.5;
}

/* 统计条 */
.cbg-stats {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 10px auto;
    padding: 10px 14px;
    background: rgba(38, 30, 58, 0.85);
    border-radius: 12px;
    color: #b9adcf;
    font-size: 13px;
    line-height: 1.7;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}

.cbg-stats b {
    color: #e8c96a;
}

.cbg-stats .stat-pick {
    color: #ffd98a;
    font-weight: bold;
}

/* 排序 */
.cbg-sort {
    display: inline-flex;
    gap: 6px;
    margin-left: auto;
}

.cbg-sort button {
    background: transparent;
    border: 1px solid #4a3f6b;
    border-radius: 8px;
    color: #b9adcf;
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
}

.cbg-sort button.on {
    border-color: #e8c96a;
    color: #e8c96a;
}

/* 卡片列表 */
.cbg-list {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 8px auto 10px;
    padding: 0 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

@media (max-width: 480px) {
    .cbg-list {
        grid-template-columns: 1fr;
    }
}

.cbg-card {
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(165deg, #fffdf4 0%, #fdf3d8 100%);
    color: #4a3a20;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    position: relative;
    transition: transform 0.15s ease;
}

.cbg-card:hover {
    transform: translateY(-2px);
}

.cbg-card.is-pick {
    box-shadow: 0 0 0 2px #e8c96a, 0 6px 18px rgba(232, 201, 106, 0.35);
}

.cbg-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #e8dcc0;
}

.cbg-card-body {
    padding: 10px 12px 12px;
}

.cbg-card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.cbg-tag {
    font-size: 11px;
    border-radius: 10px;
    padding: 2px 8px;
    background: rgba(232, 201, 106, 0.85);
    color: #3a2c12;
    font-weight: bold;
}

.cbg-tag.cbg-tag-fair {
    background: rgba(224, 122, 95, 0.9);
    color: #fff;
}

.cbg-tag.cbg-tag-pick {
    background: #d64550;
    color: #fff;
    font-size: 12px;
    padding: 3px 10px;
}

.cbg-card-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.4;
}

.cbg-card-attrs {
    font-size: 12px;
    color: #7a6a4d;
    line-height: 1.7;
}

.cbg-card-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 8px;
    border-top: 1px dashed #d8c9a6;
    padding-top: 8px;
}

.cbg-card-price {
    color: #d64550;
    font-size: 22px;
    font-weight: bold;
}

.cbg-card-price small {
    font-size: 12px;
    color: #7a6a4d;
    font-weight: normal;
}

.cbg-card-meta {
    text-align: right;
    font-size: 11px;
    color: #8a7a5d;
    line-height: 1.6;
}

.cbg-card-pickline {
    margin-top: 6px;
    font-size: 12px;
    color: #b8860b;
    font-weight: bold;
}

.cbg-modal-value {
    margin: 2px 0 8px;
    font-size: 13px;
    color: #8a6d1f;
    background: rgba(232, 201, 106, 0.16);
    border: 1px dashed #d9b95c;
    border-radius: 8px;
    padding: 6px 8px;
    line-height: 1.6;
}

.cbg-modal-value-sub {
    display: block;
    font-size: 11px;
    color: #a08a55;
    margin-top: 2px;
}

.cbg-more {
    position: relative;
    z-index: 1;
    display: block;
    margin: 6px auto 40px;
    background: rgba(232, 201, 106, 0.15);
    border: 1px solid #e8c96a;
    border-radius: 10px;
    color: #e8c96a;
    font-size: 14px;
    padding: 10px 34px;
    cursor: pointer;
}

.cbg-more:hover {
    background: rgba(232, 201, 106, 0.28);
}

.cbg-more:disabled {
    opacity: 0.5;
}

/* 站内资料卡弹窗 */
.cbg-mask {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(5, 3, 12, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.cbg-modal {
    background: linear-gradient(165deg, #fffdf4 0%, #fdf3d8 100%);
    color: #4a3a20;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cbg-modal-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #e8dcc0;
}

.cbg-modal-body {
    padding: 12px 14px 14px;
}

.cbg-modal-name {
    font-size: 17px;
}

.cbg-modal-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 6px;
}

.cbg-modal-desc {
    font-size: 13px;
    color: #6a5a3d;
    line-height: 1.7;
    margin-bottom: 6px;
}

.cbg-modal-sec {
    margin-top: 10px;
}

.cbg-modal-sec-label {
    font-size: 12px;
    color: #8a7a5d;
    margin-bottom: 6px;
}

.cbg-modal-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cbg-modal-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: #efe5c9;
    object-fit: cover;
}

.cbg-modal-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #8a7a5d;
    line-height: 1.7;
}

.cbg-modal-foot {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.cbg-modal-foot button {
    flex: 1;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    padding: 11px 0;
    cursor: pointer;
}

.cbg-modal-go {
    background: linear-gradient(135deg, #f0d47c, #e8c96a);
    color: #1f1f1f;
    font-weight: bold;
}

.cbg-modal-close {
    background: rgba(74, 63, 107, 0.15);
    color: #4a3a20;
}
