/* 合成页面样式 */
.combine-page {
    padding-top: 44px;
    padding-bottom: 80px;
}

/* 合成说明 */
.combine-intro {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 30px 12px;
    text-align: center;
    color: var(--bg-white);
    margin-bottom: 12px;
}

.intro-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.intro-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 8px;
}

.intro-desc {
    font-size: 13px;
    opacity: 0.9;
}

/* 材料选择区 */
.material-section {
    background: var(--bg-white);
    padding: 15px 12px;
    margin-bottom: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 12px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
}

.section-title i {
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-light);
}

.material-slots {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 12px 15px;
    -webkit-overflow-scrolling: touch;
}

.material-slots::-webkit-scrollbar {
    display: none;
}

.material-slot {
    min-width: 100px;
    height: 100px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-page);
}

.material-slot:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.material-slot.empty {
    color: var(--text-light);
}

.material-slot.empty i {
    font-size: 24px;
}

.material-slot.empty span {
    font-size: 12px;
}

.material-slot.filled {
    border-style: solid;
    border-color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.material-slot.filled img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.material-slot .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 12px;
    cursor: pointer;
    z-index: 1;
}

.btn-clear {
    width: 100%;
    padding: 12px;
    background: var(--bg-page);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-clear:hover {
    background: var(--border-color);
}

/* 藏品列表 */
.assets-section {
    background: var(--bg-white);
    margin-bottom: 12px;
}

.assets-section .section-header {
    padding: 15px 12px 12px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-tab {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-page);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tab.active {
    background: var(--primary-color);
    color: var(--bg-white);
}

.assets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 12px 15px;
}

.asset-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.asset-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.asset-card.selected {
    border-color: var(--primary-color);
}

.asset-image {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.asset-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asset-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 30px;
    opacity: 0;
    transition: opacity 0.3s;
}

.asset-card.selected .asset-mask {
    opacity: 1;
}

.asset-info {
    padding: 8px;
}

.asset-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-number {
    font-size: 11px;
    color: var(--text-light);
}

/* 合成预览 */
.preview-section {
    background: var(--bg-white);
    margin-bottom: 12px;
}

.preview-result {
    display: flex;
    gap: 15px;
    padding: 15px 12px;
    align-items: center;
}

.result-image {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.5), transparent);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.result-info {
    flex: 1;
}

.result-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.result-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.result-probability {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prob-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.prob-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--success-color);
}

/* 合成规则 */
.rules-section {
    background: var(--bg-white);
    margin-bottom: 12px;
}

.rules-section .section-header {
    padding: 15px 12px;
}

.rules-list {
    padding: 0 12px 15px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

.rule-item i {
    color: var(--success-color);
    font-size: 16px;
}

/* 合成按钮 */
.combine-action {
    position: fixed;
    bottom: 50px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 15px 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

.combine-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.cost-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--danger-color);
}

.btn-combine {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-white);
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-combine:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-combine:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
