/* ===== 结算界面样式 (391×850) ===== */
#result-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 50; display: none;
    background: rgba(0, 0, 0, 0.65);
}

.settlement-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center;
    padding: 20px 0; box-sizing: border-box;
    overflow-y: auto;
}

/* ===== 横幅标题（图片） ===== */
.settlement-banner {
    width: 280px; height: 60px;
    position: relative;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 6px;
    animation: settleBannerDrop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes settleBannerDrop {
    from { transform: translateY(-40px) scale(0.7); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
.settlement-banner-scroll {
    position: absolute; width: 100%; height: 100%; object-fit: fill;
}
.settlement-banner-title {
    position: relative; z-index: 1;
    font-size: 30px; font-weight: bold; letter-spacing: 8px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.settlement-banner.victory .settlement-banner-title { color: #ffffff; }
.settlement-banner.defeat  .settlement-banner-title { color: #212121; }

/* ===== 副标题 ===== */
.settlement-subtitle {
    color: rgba(255,255,255,0.8); font-size: 13px; text-align: center;
    margin-bottom: 6px;
    animation: settleFadeIn 0.4s ease-out 0.2s both;
}

/* ===== 统计行 ===== */
.settlement-stats {
    display: flex; gap: 16px; justify-content: center;
    margin-bottom: 8px;
    animation: settleFadeIn 0.4s ease-out 0.25s both;
}
.settlement-stat-item {
    color: rgba(255,255,255,0.75); font-size: 12px;
    background: rgba(255,255,255,0.08);
    padding: 3px 10px; border-radius: 8px;
}
@keyframes settleFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== 主面板（图片自然比例撑开） ===== */
.settlement-panel {
    width: 355px;
    position: relative;
    animation: settlePanelIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
}
@keyframes settlePanelIn {
    from { transform: translateY(30px) scale(0.92); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
.settlement-panel-bg {
    width: 100%; height: auto; display: block;
    pointer-events: none;
}
.settlement-panel-content {
    position: absolute;
    top: 18%; left: 9%; right: 9%; bottom: 8%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: space-between;
}

/* ===== 奖励标题（图片） ===== */
.settlement-reward-header {
    position: relative; text-align: center;
    height: 60px; margin-bottom: 8px;
    display: flex; justify-content: center; align-items: center;
}
.settlement-reward-title-img {
    position: absolute; width: 140px; height: 60px; object-fit: fill;
}
.settlement-reward-title {
    position: relative; z-index: 1;
    color: #fff; font-size: 12px; font-weight: bold; letter-spacing: 3px;
}

/* ===== 奖励区域（图片自然比例撑开） ===== */
.settlement-rewards-wrap {
    position: relative; width: 100%;
    margin-bottom: 8px;
}
.settlement-reward-area-bg {
    width: 100%; height: auto; display: block;
    pointer-events: none;
}
.settlement-rewards-grid {
    position: absolute;
    inset: 8% 6%;
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center; align-content: center;
    animation: settleFadeIn 0.4s ease-out 0.4s both;
}

/* ===== 奖励格子（图片边框） ===== */
.settlement-reward-item {
    width: 68px; height: 68px; position: relative;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 2px;
    animation: settleItemPop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
.settlement-reward-item:nth-child(1) { animation-delay: 0.45s; }
.settlement-reward-item:nth-child(2) { animation-delay: 0.55s; }
.settlement-reward-item:nth-child(3) { animation-delay: 0.65s; }
.settlement-reward-item:nth-child(4) { animation-delay: 0.75s; }
.settlement-reward-item:nth-child(5) { animation-delay: 0.85s; }
@keyframes settleItemPop {
    from { transform: scale(0) rotate(-15deg); opacity: 0; }
    to   { transform: scale(1) rotate(0deg); opacity: 1; }
}
.settlement-reward-frame {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill;
    pointer-events: none;
}
.settlement-reward-icon {
    width: 36px; height: 36px; object-fit: contain;
    position: relative; z-index: 1; margin-top: -4px;
}
.settlement-reward-count {
    position: relative; z-index: 1;
    color: #fff; font-size: 11px; font-weight: bold;
    text-shadow: 1px 1px 2px #000;
}
.settlement-reward-double {
    position: absolute; top: -4px; right: -4px; z-index: 2;
    background: linear-gradient(135deg, #ff5500, #cc2200);
    color: #fff; font-size: 8px; font-weight: bold;
    padding: 1px 4px; border-radius: 6px;
}

/* ===== 剩余次数 ===== */
.settlement-remain {
    text-align: center; font-size: 11px;
    color: rgba(100,70,40,0.7);
    margin-bottom: 6px;
}

/* ===== 按钮区（图片背景） ===== */
.settlement-buttons {
    display: flex; gap: 10px; justify-content: center; width: 100%;
    animation: settleFadeIn 0.4s ease-out 0.9s both;
}
.settlement-btn {
    flex: 1; height: 42px; border: none; border-radius: 4px;
    font-size: 15px; font-weight: bold; cursor: pointer;
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    transition: transform 0.15s;
    background-color: transparent;
}
.settlement-btn:hover  { transform: scale(1.04); }
.settlement-btn:active { transform: scale(0.96); }
.settlement-btn-double {
    background-image: url('../settlement/assets/icon/btn_green.png?v=20260514');
    background-size: 100% 100%; background-repeat: no-repeat;
    color: #fff;
}
.settlement-btn-confirm {
    background-image: url('../settlement/assets/icon/btn_yellow.png?v=20260514');
    background-size: 100% 100%; background-repeat: no-repeat;
    color: #3e2000;
}
.settlement-btn span { position: relative; z-index: 1; }
.settlement-btn-icon {
    width: 16px; height: 16px; object-fit: contain; position: relative; z-index: 1;
}

/* ===== 失败：变强途径 ===== */
.settlement-ways-section {
    width: 340px; margin-top: 12px;
    animation: settleFadeIn 0.5s ease-out 1s both;
}
.settlement-ways-hint {
    text-align: center; color: rgba(255,255,255,0.6);
    font-size: 12px; margin-bottom: 10px;
}
.settlement-ways-grid {
    display: flex; justify-content: space-around;
}
.settlement-way-item {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    cursor: pointer; transition: transform 0.2s;
}
.settlement-way-item:hover { transform: translateY(-4px) scale(1.08); }
.settlement-way-icon img {
    width: 52px; height: 52px; border-radius: 26px;
    object-fit: cover;
}
.settlement-way-name {
    color: #ffd54f; font-size: 11px; font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}
