﻿/* 羁绊面板：外层禁止滚动，列表容器内部滚动（符合项目滚动规范） */
.bonds-panel {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 160;
    background: linear-gradient(90deg, rgb(223 153 153), rgb(207 132 132));
    overflow: hidden;
}

.bonds-header {
    height: 7%;
    min-height: 48px;
    /* padding: 6px 10px; */
    box-sizing: border-box;
    color: #ffd800;
    background-color: #0000003d;
    font-size: 20px;
}

.bonds-title {
    color: #ffb308;
    letter-spacing: 6px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.55);
}

.bonds-close-btn {
    width: 32px;
    height: 32px;
    object-fit: contain;
    cursor: pointer;
    position: fixed;
    left: 10px;
    bottom: 10px;
    z-index: 1;
}

.bonds-content {
    height: 92%;
    overflow: hidden; /* 外层隐藏，滚动交给 bonds-loop */
    box-sizing: border-box;
    padding: 8px 10px 12px 10px;
}

.bonds-loop {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* loop.js 默认用 aspect-ratio 控高度，这里强制每个羁绊卡片固定 200px 高 */
#bonds-loop .loop-item-inner {
    aspect-ratio: unset !important;
    display: block;
}

/* 卡片 */
.bonds-item {
    width: 100%;
    height: 250px;
    box-sizing: border-box;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.10);
    padding: 5px;
    color: #fff;
}

.bonds-item-top {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    padding-bottom: 6px;
    box-sizing: border-box;
}

.bonds-item-name {
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bonds-item-lv {
    font-size: 13px;
    color: #ffd54f;
    white-space: nowrap;
}

.bonds-item-body {
    height: calc(200px - 38px - 10px);
    padding-top: 8px;
    display: flex;
    gap: 10px;
    box-sizing: border-box;
}

.bonds-heroes {
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.bonds-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .bonds-hero-icon img {
        width: 100%;
        height: 100%;
        object-fit: fill;
        display: block;
    }

.bonds-right {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

.bonds-stats {
    font-size: 12px;
    line-height: 1.35;
}

.bonds-stat-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    white-space: nowrap;
}

.bonds-stat-label {
    color: rgba(255,255,255,0.85);
}

.bonds-stat-val {
    color: #fff;
    text-align: right;
}

.bonds-stat-next {
    color: #5ff765; /* 下一级增量绿色 */
    margin-left: 4px;
}

.bonds-next-cond {
    font-size: 12px;
    font-weight: 700;
    color: #f4eb4e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bonds-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.bonds-up-btn {
    position: relative;
    border: 0;
    border-radius: 10px;
    padding: 6px 12px;
    background: rgb(223 228 79 / 94%);
    color: #4a470f;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #888129;
}

    .bonds-up-btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }
#bonds-loop .loop-item-inner {
    aspect-ratio: 2 / 1 !important;
    display: block;
}

.bonds-item {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    overflow: hidden;
    color: #fff;
    padding: 5px;
}

.bonds-item-bg {
    background-image: url('/resource/image/test1/bonds_bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

.bonds-item-top-plain {
    height: auto;
    border: 0;
    padding: 0;
}

.bonds-item-title-bg {
    width: 100%;
    height: 34px;
    box-sizing: border-box;
    background-image: url('/resource/image/test1/bonds_title_bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.bonds-item-name-center {
    margin: 0;
    padding: 0;
    text-align: center;
    color: #e8c767;
}

.bonds-entry-body {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 0;
    height: calc(100% - 42px);
}

.bonds-entry-left,
.bonds-entry-right {
    width: 50%;
    flex: 0 0 50%;
    min-width: 0;
}

.bonds-entry-left {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 100%;
    padding: 10px;
}

.bonds-entry-icon-wrap {
    width: 100%;
    max-width: 120px;
}

.bonds-entry-icon {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
}

.bonds-entry-right {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2px;
    padding-top: 5px;
    color: #fff0c6;
}

.bonds-entry-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    line-height: 1.3;
}

.bonds-entry-stat-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.bonds-entry-stat-label {
    opacity: .9;
}

.bonds-entry-stat-value {
    color: #fff;
}

.bonds-entry-bottom {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 2px;
}

.bonds-entry-cond {
    margin-right: 10px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bonds-entry-hero-list {
    width: 100%;
    height: 90%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    overflow: hidden;
}

.bonds-entry-hero-back {
    width: 25%;
    height: 100%;
    object-fit: cover;
    display: block;
    flex: 0 0 25%;
    border-radius: 4px;
}

.bonds-entry-hero-back-empty {
    width: 25%;
    height: 100%;
    flex: 0 0 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    color: #fff0c6;
    font-size: 12px;
    overflow: hidden;
    text-align: center;
    line-height: 1.2;
}