/* ===== 全局样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #e8e8e8;
    overflow-x: hidden;
}

#app {
    width: 100%;
    min-height: 100vh;
}

/* ===== 屏幕切换 ===== */
.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: block;
}

.hidden {
    display: none !important;
}

/* ===== 通用按钮样式 ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #fff;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
}

/* ===== 登录界面 ===== */
.login-container {
    max-width: 500px;
    margin: 100px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.game-title {
    text-align: center;
    font-size: 42px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(102, 126, 234, 0.3);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #aaa;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.login-buttons .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* ===== 主界面 ===== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.info-item {
    font-size: 15px;
}

.info-item span:last-child {
    color: #f093fb;
    font-weight: 700;
}

.main-menu {
    text-align: center;
}

.menu-title {
    font-size: 36px;
    margin-bottom: 50px;
    color: #fff;
}

.menu-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.menu-btn {
    padding: 30px 20px;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-btn:hover {
    transform: translateY(-4px) scale(1.02);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.4) 100%);
    border-color: #667eea;
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.3);
}

.menu-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.menu-btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ===== 通用内容容器 ===== */
.content-container {
    max-width: 1400px;
    margin: 0 auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-header h2 {
    font-size: 28px;
}

.content-actions {
    margin-bottom: 20px;
}

/* ===== 网格卡片 ===== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.card-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 48px;
    overflow: hidden;
}

.card-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.card-sub {
    font-size: 13px;
    color: #aaa;
}

.card-level {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
}

.level-B { background: #434343; }
.level-A { background: #11998e; }
.level-S { background: #667eea; }
.level-SS { background: #f093fb; }
.level-SSS { background: #f5576c; }
.level-SSSplus { background: linear-gradient(135deg, #f093fb, #f5576c); }
.level-Splus { background: linear-gradient(135deg, #ffd700, #ff8c00); }

/* ===== 图鉴 ===== */
.collection-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

/* 技能卡获得展示 */
.skill-card-reveal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.skill-card-reveal.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.scr-card {
    position: relative;
    width: 220px;
    padding: 22px 20px 18px;
    background: linear-gradient(160deg, rgba(40, 25, 80, 0.98), rgba(70, 40, 110, 0.96));
    border: 2px solid #f093fb;
    border-radius: 14px;
    box-shadow: 0 0 40px rgba(240, 147, 251, 0.7), 0 0 80px rgba(102, 126, 234, 0.4);
    text-align: center;
    color: #fff;
    animation: scrGlow 1.2s ease-in-out infinite alternate;
}
.scr-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f093fb, #667eea, #f5576c, #4facfe);
    z-index: -1;
    opacity: 0.7;
    filter: blur(10px);
}
.scr-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 12px;
    background: linear-gradient(90deg, #f093fb, #f5576c);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    letter-spacing: 1px;
    white-space: nowrap;
}
.scr-icon {
    font-size: 42px;
    margin: 10px 0 6px;
    filter: drop-shadow(0 0 10px rgba(240, 147, 251, 0.8));
}
.scr-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(240, 147, 251, 0.7);
}
.scr-desc {
    font-size: 11px;
    color: #d8c8ff;
    line-height: 1.4;
    margin-bottom: 8px;
    max-height: 44px;
    overflow: hidden;
}
.scr-effect {
    font-size: 11px;
    color: #38ef7d;
    font-weight: 600;
    animation: scrPulse 1s ease-in-out infinite;
}
@keyframes scrGlow {
    from { box-shadow: 0 0 30px rgba(240, 147, 251, 0.6), 0 0 60px rgba(102, 126, 234, 0.3); }
    to { box-shadow: 0 0 50px rgba(240, 147, 251, 0.9), 0 0 100px rgba(102, 126, 234, 0.5); }
}
@keyframes scrPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.scr-tip {
    margin-top: 8px;
}

.click-anywhere-tip {
    color: #aaa;
    font-size: 12px;
    text-align: center;
    opacity: 0.8;
    font-weight: 500;
    letter-spacing: 1px;
    animation: scrPulse 1.2s ease-in-out infinite;
}

/* 当需要点击时，技能卡揭示层允许接收点击 */
.skill-card-reveal.clickable {
    pointer-events: auto;
    cursor: pointer;
}

.collection-content {
    min-height: 400px;
}

/* ===== 详情内容 ===== */
.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 18px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #f093fb;
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
}

.stat-label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.skill-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.skill-name {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 6px;
}

.skill-desc {
    font-size: 13px;
    color: #ccc;
    line-height: 1.6;
}

/* ===== Modal弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    padding-bottom: 40px;
    animation: modalIn 0.25s ease;
}

.modal-large {
    max-width: 900px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 20px;
}

.btn-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== 祈愿 ===== */
.pray-container {
    text-align: center;
    padding: 20px;
    position: relative;
}

/* 右上角货币栏 */
.pray-currency-bar {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    gap: 12px;
}

.pray-currency-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid transparent;
    backdrop-filter: blur(6px);
}

.pray-currency-item .ci-icon {
    font-size: 18px;
}

.pray-currency-item .ci-label {
    color: #aaa;
    font-size: 13px;
    font-weight: 400;
}

.pray-currency-item .ci-value {
    color: #fff;
    font-size: 16px;
}

.pray-currency-gold {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.1));
    border-color: rgba(255, 193, 7, 0.4);
}

.pray-currency-paid {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(192, 132, 252, 0.1));
    border-color: rgba(192, 132, 252, 0.4);
}

.pray-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 80px auto 40px;
}

.pray-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ===== Toast提示 ===== */
.toast {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    color: #fff;
    padding: 20px 48px;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(102, 126, 234, 0.3);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ===== 出战角色选择 ===== */
.select-character-screen .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    padding: 20px 0;
}

.character-card.selectable {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(102, 126, 234, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 18px 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.character-card.selectable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #f093fb);
    opacity: 0.7;
}

.character-card.selectable:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: #f093fb;
    box-shadow: 0 12px 32px rgba(240, 147, 251, 0.35), 0 0 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(145deg, rgba(240, 147, 251, 0.12), rgba(102, 126, 234, 0.08));
}

.character-card.selectable:hover::before {
    opacity: 1;
    height: 5px;
}

.character-card.selectable.selected {
    border-color: #f5576c;
    background: linear-gradient(145deg, rgba(245, 87, 108, 0.2), rgba(240, 147, 251, 0.12));
    box-shadow: 0 12px 36px rgba(245, 87, 108, 0.45), 0 0 0 2px rgba(240, 147, 251, 0.6), 0 0 30px rgba(240, 147, 251, 0.35);
    transform: translateY(-8px) scale(1.05);
}

.character-card.selectable.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #38ef7d, #11998e);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(56, 239, 125, 0.6);
    animation: checkPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkPop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.char-select-hint {
    margin-top: 8px;
    font-size: 11px;
    color: #f093fb;
    opacity: 0;
    transition: opacity 0.2s;
}

.character-card.selectable:hover .char-select-hint {
    opacity: 1;
}

.char-avatar {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.char-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-level {
    font-size: 13px;
    color: #f093fb;
    font-weight: 600;
    margin-bottom: 8px;
}

.char-stats-mini {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    color: #bbb;
}

.char-stats-mini span {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
}

/* ===== 难度选择 ===== */
.difficulty-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.difficulty-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 20px 22px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.difficulty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 14px 0 0 14px;
}

.difficulty-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.difficulty-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4), 0 0 20px rgba(102, 126, 234, 0.2);
}

.difficulty-card:hover::after {
    opacity: 1;
}

.difficulty-card:nth-child(3)::before {
    background: linear-gradient(180deg, #f5a623, #eb3349);
}

.difficulty-card:nth-child(4)::before,
.difficulty-card:nth-child(5)::before,
.difficulty-card:nth-child(6)::before,
.difficulty-card:nth-child(7)::before,
.difficulty-card:nth-child(8)::before {
    background: linear-gradient(180deg, #eb3349, #f45c43);
}

.difficulty-card:nth-child(3):hover {
    box-shadow: 0 12px 40px rgba(245, 166, 35, 0.4), 0 0 20px rgba(245, 166, 35, 0.2);
}

.difficulty-card:nth-child(n+4):hover {
    box-shadow: 0 12px 40px rgba(235, 51, 73, 0.4), 0 0 20px rgba(235, 51, 73, 0.2);
}

.diff-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
    padding-left: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.diff-desc {
    font-size: 13px;
    color: #ccc;
    line-height: 1.8;
    padding-left: 12px;
}

.diff-desc div {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.diff-desc div::before {
    content: '▸';
    color: #667eea;
    font-weight: 700;
}

/* ===== 勇者祝福选择 ===== */
.blessing-choices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.blessing-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.blessing-card:hover {
    transform: translateY(-6px);
    border-color: #f093fb;
    background: rgba(240, 147, 251, 0.1);
    box-shadow: 0 12px 32px rgba(240, 147, 251, 0.2);
}

/* ===== 游戏头部状态栏 ===== */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
}

.player-status-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.status-group {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 5px;
    white-space: nowrap;
}

.status-label {
    color: #aaa;
}

.status-value {
    color: #fff;
    font-weight: 700;
}

.insane-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #f45c43;
    color: #fff;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 700;
    animation: pulse 1s infinite;
}

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

.battle-turn-info {
    display: flex;
    gap: 10px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== 玩家状态图标栏（DOT+增益+临时buff） ===== */
.player-status-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 8px;
    margin-bottom: 6px;
    min-height: 26px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    max-height: 32px;
    overflow-y: auto;
}

/* 手牌区域上方的状态栏样式 */
.hand-cards-wrapper > .player-status-icons {
    width: 100%;
    margin-bottom: 2px;
    margin-top: -4px;
    flex-shrink: 0;
    padding: 2px 6px;
    min-height: 20px;
    max-height: 26px;
    overflow-y: hidden;
}

.player-status-icons:empty::after {
    content: '无状态';
    color: #666;
    font-size: 11px;
    font-style: italic;
}

.psi-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 11px;
    cursor: help;
    transition: all 0.18s;
    border: 1px solid transparent;
    user-select: none;
    min-width: 20px;
}
.psi-icon:hover {
    transform: translateY(-2px) scale(1.1);
    filter: brightness(1.25);
}
.psi-icon .psi-emoji {
    font-size: 12px;
    line-height: 1;
}
.psi-icon .psi-count {
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 7px;
    padding: 0 3px;
    min-width: 12px;
    text-align: center;
}

/* 金色正面效果：勇者祝福、增益、狂暴、暴击强化 */
.psi-icon.psi-blessing,
.psi-icon.psi-buff,
.psi-icon.psi-rage,
.psi-icon.psi-critbuff {
    border-color: #ffd700;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.35), inset 0 0 4px rgba(255, 215, 0, 0.15);
}
.psi-icon.psi-blessing {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 200, 50, 0.2));
}
.psi-icon.psi-buff {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 180, 30, 0.15));
}
.psi-icon.psi-rage {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 170, 30, 0.15));
}
.psi-icon.psi-critbuff {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 235, 100, 0.15));
}

/* ===== 丘丘家族buff状态图标 ===== */
.psi-icon.psi-kuangnu {
    border-color: #ff6b35;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.3), rgba(255, 80, 20, 0.15));
    box-shadow: 0 0 6px rgba(255, 107, 53, 0.4), inset 0 0 4px rgba(255, 107, 53, 0.15);
}
.psi-icon.psi-hanyong {
    border-color: #c93838;
    background: linear-gradient(135deg, rgba(201, 56, 56, 0.35), rgba(180, 30, 30, 0.2));
    box-shadow: 0 0 8px rgba(201, 56, 56, 0.45), inset 0 0 4px rgba(201, 56, 56, 0.2);
}
.psi-icon.psi-wangzhe {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4), rgba(255, 180, 0, 0.2));
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5), inset 0 0 6px rgba(255, 215, 0, 0.25);
    animation: wangzhe-glow 1.5s ease-in-out infinite;
}
@keyframes wangzhe-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.4), inset 0 0 4px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 14px rgba(255, 215, 0, 0.7), inset 0 0 8px rgba(255, 215, 0, 0.35); }
}

/* 红色负面效果：燃烧/触电/中毒/流血/失调/中毒减伤 */
.psi-icon.psi-dot.dot-burn,
.psi-icon.psi-dot.dot-shock,
.psi-icon.psi-dot.dot-poison,
.psi-icon.psi-dot.dot-bleed,
.psi-icon.psi-weaken,
.psi-icon.psi-poison-debuff {
    border-color: #ff3b3b;
    box-shadow: 0 0 6px rgba(255, 59, 59, 0.35), inset 0 0 4px rgba(255, 59, 59, 0.15);
}
.psi-icon.psi-dot.dot-burn   { background: linear-gradient(135deg, rgba(255, 107, 53, 0.4), rgba(200, 50, 30, 0.2)); }
.psi-icon.psi-dot.dot-shock  { background: linear-gradient(135deg, rgba(60, 185, 252, 0.4), rgba(30, 100, 200, 0.2)); }
.psi-icon.psi-dot.dot-poison { background: linear-gradient(135deg, rgba(123, 44, 191, 0.4), rgba(80, 20, 130, 0.2)); }
.psi-icon.psi-dot.dot-bleed  { background: linear-gradient(135deg, rgba(208, 0, 0, 0.4), rgba(140, 0, 0, 0.2)); }
.psi-icon.psi-weaken        { background: linear-gradient(135deg, rgba(200, 50, 50, 0.35), rgba(120, 30, 30, 0.15)); }
.psi-icon.psi-poison-debuff { background: linear-gradient(135deg, rgba(150, 40, 80, 0.4), rgba(90, 20, 50, 0.2)); }
.psi-icon.psi-law-suppress { background: linear-gradient(135deg, rgba(100, 80, 180, 0.4), rgba(60, 40, 120, 0.25)); border-color: #8b5cf6; box-shadow: 0 0 6px rgba(139, 92, 246, 0.4), inset 0 0 4px rgba(139, 92, 246, 0.15); }

/* 状态图标Tooltip */
.psi-tooltip {
    position: fixed;
    min-width: 160px;
    max-width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(20, 15, 40, 0.97), rgba(40, 25, 70, 0.97));
    border: 2px solid rgba(240, 147, 251, 0.6);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), 0 0 14px rgba(240, 147, 251, 0.3);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s, transform 0.18s;
    pointer-events: none;
    z-index: 10000;
    line-height: 1.6;
    word-break: break-word;
    white-space: normal;
}
.psi-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}
.psi-tooltip .psi-tip-title {
    font-size: 13px;
    font-weight: 700;
    color: #f093fb;
    margin-bottom: 4px;
    text-shadow: 0 0 6px rgba(240, 147, 251, 0.5);
}
.psi-tooltip .psi-tip-desc {
    color: #e0d4ff;
    font-size: 11px;
}

/* ===== 怪物技能名横幅 ===== */
.monster-skill-banner {
    position: absolute;
    left: 50%;
    top: -28px;
    transform: translateX(-50%) translateY(6px);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(255, 70, 70, 0.95), rgba(200, 30, 60, 0.95));
    border: 2px solid rgba(255, 200, 200, 0.7);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    box-shadow: 0 4px 14px rgba(255, 70, 70, 0.5), 0 0 18px rgba(255, 70, 70, 0.4);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    z-index: 50;
}
.monster-skill-banner.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.monster-skill-banner.fadeout {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
    transition: opacity 0.3s, transform 0.3s;
}
.monster-skill-banner .msb-icon {
    font-size: 14px;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}
.monster-skill-banner .msb-name {
    letter-spacing: 0.5px;
}

/* ===== 回合切换横幅（屏幕中央） ===== */
.turn-banner {
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    padding: 18px 60px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.92), rgba(118, 75, 162, 0.92));
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 40px rgba(102, 126, 234, 0.5);
    color: #fff;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    z-index: 9000;
    transition: opacity 0.35s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.turn-banner.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.turn-banner.fadeout {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.4s, transform 0.4s;
}
.turn-banner .tb-main {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 4px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.4);
}
.turn-banner .tb-sub {
    margin-top: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 2px;
}

/* ===== 闯关地图 ===== */
.map-container {
    max-width: 1200px;
    margin: 0 auto;
    overflow: visible;
}

.map-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
}

.map-stages {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-bottom: 30px;
    padding: 20px 10px;
    overflow-x: auto;
    overflow-y: visible;
    /* 左/右 边缘柔化，隐藏发光边界 */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40px, black calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 40px, black calc(100% - 40px), transparent 100%);
}

/* 地图包装容器：从上方柔化，隐藏顶部发光边界 */
#map-screen .game-main,
#map-screen .map-stages {
    position: relative;
}
#map-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, rgba(24, 14, 48, 1), transparent);
    pointer-events: none;
    z-index: 5;
}

/* 单行：16个节点横向排列 + 中间连接线 */
.metro-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-width: 100%;
    position: relative;
    margin: 0 auto;
}

/* 节点容器 */
.metro-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    width: 60px;
    position: relative;
    z-index: 2;
}

/* 圆点（核心：站点） */
.metro-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a4a, #1a1a2e);
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 已通过：绿色 */
.metro-node.passed .metro-dot {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    border-color: #38ef7d;
    box-shadow: 0 0 14px rgba(56, 239, 125, 0.5);
}

/* 当前：紫粉高亮 + 闪烁 */
.metro-node.current .metro-dot {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 24px rgba(240, 147, 251, 0.85), 0 0 50px rgba(240, 147, 251, 0.4);
    z-index: 5;
}

/* 闪烁动画 */
.metro-dot.pulse {
    animation: metroPulse 1.2s ease-in-out infinite;
}
@keyframes metroPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(240, 147, 251, 0.7), 0 0 40px rgba(240, 147, 251, 0.3);
        transform: scale(1.15);
    }
    50% {
        box-shadow: 0 0 30px rgba(245, 87, 108, 0.95), 0 0 60px rgba(240, 147, 251, 0.6);
        transform: scale(1.28);
    }
}

/* 连接线（节点之间的轨道） */
.metro-line {
    height: 4px;
    flex: 1;
    min-width: 20px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    margin: 0 -3px;
    align-self: flex-start;
    margin-top: 15px;
}

/* 节点信息（编号+标签） */
.metro-info {
    text-align: center;
    line-height: 1.15;
}
.metro-num {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
}
.metro-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0px;
    white-space: nowrap;
}
.metro-node.current .metro-num {
    color: #f093fb;
    text-shadow: 0 0 8px rgba(240, 147, 251, 0.6);
}
.metro-node.passed .metro-num {
    color: #38ef7d;
}
.metro-node.current .metro-label {
    color: #fff;
    font-weight: 700;
}

/* U型换行桥接（已删除：改为单行显示） */

.map-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ===== 战斗界面：横屏左右分栏 ===== */
#battle-screen .screen {
    padding: 12px;
}

.battle-main-layout {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.battle-left-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.battle-right-panel {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.battle-field {
    min-height: 160px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.monsters-area {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.monster-card {
    background: rgba(235, 51, 73, 0.08);
    border: 1px solid rgba(235, 51, 73, 0.3);
    border-radius: 10px;
    padding: 8px;
    width: 200px;
    transition: all 0.2s ease;
    position: relative;
}

.monster-card.dead {
    opacity: 0.3;
    pointer-events: none;
}

.monster-card.selected {
    border-color: #f093fb;
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.4);
}

.monster-top-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.monster-rank {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    color: #fff;
}

.rank-B { background: #666; }
.rank-A { background: #4a90d9; }
.rank-S { background: #f5a623; }
.rank-SS { background: #9b59b6; }
.rank-SSS { background: linear-gradient(135deg, #ff6b6b, #ee5a6f); }

.boss-tag {
    display: inline-block;
    padding: 1px 6px;
    background: #eb3349;
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10px;
}

.monster-body {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.monster-avatar {
    font-size: 32px;
    line-height: 1;
}

.monster-info {
    flex: 1;
    min-width: 0;
}

.monster-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monster-next-skill {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    flex-wrap: wrap;
}

.next-skill-label {
    color: #999;
}

.next-skill-name {
    color: #ddd;
}

.action-value {
    display: inline-block;
    padding: 1px 6px;
    background: #667eea;
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
}

.monster-hp-bar {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}

.monster-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #eb3349, #f45c43);
    transition: width 0.3s ease;
}

.monster-shield-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.85), rgba(118, 75, 162, 0.85));
    transition: width 0.3s ease;
    pointer-events: none;
}

.monster-hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0,0,0,0.8);
    white-space: nowrap;
}

.monster-hp-text .shield-text {
    color: #a0c4ff;
    margin-left: 6px;
}

/* 玩家HP/护盾生命条 */
.hp-shield-bar {
    min-width: 180px;
}
.psb-bar-container {
    width: 180px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.psb-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #eb3349, #f45c43);
    transition: width 0.3s ease;
}
.psb-shield-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.85), rgba(118, 75, 162, 0.85));
    transition: width 0.3s ease;
    pointer-events: none;
}
.psb-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0,0,0,0.8);
    white-space: nowrap;
}
.shield-inline {
    color: #a0c4ff;
    margin-left: 8px;
}

.monster-status-icons {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.status-icon {
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
}

/* 状态获得动画：由大变小并闪光1秒 */
.status-pop {
    animation: statusPop 1s ease-out forwards;
    z-index: 10;
}
@keyframes statusPop {
    0% {
        transform: scale(1.6);
        box-shadow: 0 0 16px rgba(255, 255, 255, 0.9), 0 0 32px rgba(255, 255, 255, 0.6);
    }
    25% {
        transform: scale(1.4);
        box-shadow: 0 0 14px rgba(255, 255, 255, 0.8), 0 0 28px rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.5);
        box-shadow: 0 0 12px rgba(255, 255, 255, 0.7), 0 0 24px rgba(255, 255, 255, 0.4);
    }
    75% {
        transform: scale(1.2);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: none;
    }
}

/* ===== 回合公告框 ===== */
.round-announce {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 0 0 40px rgba(118, 75, 162, 0.6);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    padding: 30px 80px;
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    z-index: 500;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

.round-announce.round-show {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ===== 伤害跳字浮动层 ===== */
.damage-float-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: visible;
}

.float-dmg {
    position: absolute;
    font-weight: 900;
    font-size: 24px;
    pointer-events: none;
    animation: floatDmgUp 0.9s ease-out forwards;
    white-space: nowrap;
    transform: translateX(-50%);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.float-dmg.normal { color: #ffd700; }
.float-dmg.crit {
    color: #ff3333;
    font-size: 34px;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
}
.float-dmg.heal { color: #38ef7d; }
.float-dmg.shield { color: #3cb9fc; }
.float-dmg.miss { color: #999; font-size: 18px; }
.float-dmg.monster {
    color: #ff6b6b;
    font-size: 22px;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 900;
}
.float-dmg.monster-crit {
    color: #ff4757;
    font-size: 32px;
    text-shadow: 0 0 12px rgba(255, 71, 87, 1), 0 0 24px rgba(255, 71, 87, 0.6), 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 900;
}

@keyframes floatDmgUp {
    0% { transform: translateX(-50%) translateY(0) scale(0.8); opacity: 0; }
    15% { transform: translateX(-50%) translateY(-10px) scale(1.1); opacity: 1; }
    30% { transform: translateX(-50%) translateY(-20px) scale(1); }
    100% { transform: translateX(-50%) translateY(-60px) scale(1); opacity: 0; }
}

.dot-burn { background: #ff6b35; color: #fff; }
.dot-shock { background: #3cb9fc; color: #fff; }
.dot-poison { background: #7b2cbf; color: #fff; }
.dot-bleed { background: #d00000; color: #fff; }

/* 怪物debuff图标（非DOT） */
.debuff-weaken { background: linear-gradient(135deg, #666, #444); color: #fff; }
.debuff-vuln   { background: linear-gradient(135deg, #ff6b6b, #c0392b); color: #fff; }
.buff-atk      { background: linear-gradient(135deg, #f093fb, #f5576c); color: #fff; }
.buff-def      { background: linear-gradient(135deg, #3cb9fc, #667eea); color: #fff; }

/* ===== 战斗底部 ===== */
.battle-bottom {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 10px;
}

.battle-skills-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.skills-section h4 {
    font-size: 12px;
    margin-bottom: 4px;
    color: #aaa;
}

.skill-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}

.skill-btn {
    padding: 8px 6px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    border: 1px solid rgba(102, 126, 234, 0.5);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 54px;
    line-height: 1.3;
}

.skill-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5));
}

.skill-btn.char-skill {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.25), rgba(245, 87, 108, 0.15));
    border-color: rgba(240, 147, 251, 0.5);
    flex: 0 1 calc((100% - 8px) / 3);
    max-width: calc((100% - 8px) / 3);
}

/* 流萤技能区域 - 单行横向排列 */
.battle-skills-area .skills-section {
    overflow: visible;
}

.battle-skills-area .skills-section .skill-buttons {
    gap: 4px;
    overflow: visible;
}

.skill-btn.char-skill:hover {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.5), rgba(245, 87, 108, 0.35));
    transform: translateY(-3px);
    box-shadow: 0 3px 12px rgba(240, 147, 251, 0.5);
    border-color: rgba(240, 147, 251, 0.9);
    filter: brightness(1.25);
}

.skill-btn.passive {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    cursor: default;
    opacity: 0.7;
}

.hand-card-tooltip {
    min-height: 0;
    text-align: center;
    font-size: 10px;
    color: #aaa;
    padding: 0 4px 2px;
    min-height: 16px;
    line-height: 14px;
    transition: opacity 0.15s;
}

.hand-cards-area {
    min-height: 80px;
    max-height: 180px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 8px;
}

.hand-cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.hand-card {
    padding: 4px 2px;
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.25), rgba(56, 239, 125, 0.15));
    border: 1px solid rgba(56, 239, 125, 0.4);
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 10px;
    min-width: 0;
}

.hand-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(56, 239, 125, 0.4);
    border-color: rgba(56, 239, 125, 0.8);
    filter: brightness(1.2);
}

.hand-card.selected,
.hand-card.selected:hover {
    border-color: #f093fb;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.45), rgba(245, 87, 108, 0.35));
    box-shadow: 0 0 14px rgba(240, 147, 251, 0.7), 0 4px 14px rgba(240, 147, 251, 0.45);
    transform: translateY(-5px) scale(1.04);
    filter: brightness(1.3);
    outline: 2px solid #f093fb;
    outline-offset: 2px;
    z-index: 10;
    position: relative;
}

.hand-card-icon {
    font-size: 16px;
    margin-bottom: 1px;
}

.hand-card-name {
    font-weight: 700;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hand-card-desc {
    display: none;
}

/* ===== 技能卡面板 ===== */
.skill-card-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 8px;
}

.skill-card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
}

.skill-card-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.15));
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 11px;
    min-width: 0;
}

.skill-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.8);
    filter: brightness(1.2);
}

.skill-card-item.selected {
    border-color: #f093fb;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.3), rgba(245, 87, 108, 0.2));
    box-shadow: 0 0 8px rgba(240, 147, 251, 0.5);
    filter: brightness(1.3);
}

.skill-card-item-icon {
    font-size: 20px;
}

.skill-card-item-name {
    font-weight: 700;
    white-space: nowrap;
}

.skill-card-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.skill-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.battle-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.battle-action-btn {
    padding: 7px 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    border: 1px solid rgba(102, 126, 234, 0.6);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.battle-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.battle-action-btn.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    border-color: transparent;
}

.battle-action-btn.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: transparent;
}

/* ===== 偶遇关 - 伙伴选择卡片 ===== */
.encounter-choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.encounter-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    text-align: center;
    z-index: 1;
}

.encounter-card:hover {
    z-index: 10;
}

.encounter-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 5px 0 0 5px;
}

.encounter-card.rank-S::before,
.encounter-card.rank-SS::before,
.encounter-card.rank-SSS::before {
    background: linear-gradient(to bottom, #ffd700, #ff8c00);
}

.encounter-card.rank-SSS\+::before {
    background: linear-gradient(to bottom, #ff6b6b, #ee5a6f);
}

.encounter-card.rank-S {
    border-color: rgba(255, 215, 0, 0.4);
}

.encounter-card.rank-SS,
.encounter-card.rank-SSS {
    border-color: rgba(255, 107, 107, 0.4);
}

.encounter-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.35);
    border-color: rgba(102, 126, 234, 0.8);
    filter: brightness(1.15);
}

.encounter-card.rank-S:hover {
    box-shadow: 0 8px 28px rgba(255, 215, 0, 0.35);
    border-color: rgba(255, 215, 0, 0.8);
}

.encounter-card.rank-SS:hover,
.encounter-card.rank-SSS:hover {
    box-shadow: 0 8px 28px rgba(255, 107, 107, 0.35);
    border-color: rgba(255, 107, 107, 0.8);
}

.enc-avatar {
    font-size: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.enc-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.enc-name .rank-tag {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 4px;
    border-radius: 4px;
    font-size: 10px;
    background: rgba(102, 126, 234, 0.5);
    color: #fff;
    font-weight: 700;
}

.encounter-card.rank-S .rank-tag { background: rgba(255, 215, 0, 0.5); }
.encounter-card.rank-SS .rank-tag,
.encounter-card.rank-SSS .rank-tag { background: rgba(255, 107, 107, 0.5); }

.enc-stats {
    font-size: 13px;
    color: #ccc;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.enc-bond {
    font-size: 12px;
    color: #f093fb;
    padding: 4px 8px;
    background: rgba(240, 147, 251, 0.1);
    border-radius: 6px;
}

.encounter-card .btn-small {
    margin-top: 4px;
}

/* ===== 偶遇关 - 伙伴卡片悬停羁绊技能Tooltip ===== */
.enc-bond-tooltip {
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    transform: translateX(-50%) translateY(-6px);
    min-width: 220px;
    max-width: 280px;
    background: linear-gradient(135deg, rgba(30, 20, 60, 0.97), rgba(50, 30, 90, 0.97));
    border: 2px solid rgba(240, 147, 251, 0.6);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: #fff;
    text-align: left;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 18px rgba(240, 147, 251, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1000;
    line-height: 1.5;
}
.enc-bond-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-bottom-color: rgba(240, 147, 251, 0.6);
}
.encounter-card:hover .enc-bond-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.enc-bond-tooltip .ebt-title {
    font-size: 13px;
    font-weight: 700;
    color: #f093fb;
    margin-bottom: 4px;
    text-shadow: 0 0 6px rgba(240, 147, 251, 0.5);
}
.enc-bond-tooltip .ebt-desc {
    color: #e0d4ff;
    font-size: 11px;
}
.enc-bond-tooltip .ebt-cost {
    margin-top: 4px;
    color: #ffd700;
    font-size: 11px;
    font-weight: 700;
}

/* ===== 羁绊技能选择弹窗 ===== */
.bond-current-energy {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 14px;
    padding: 8px 14px;
    background: rgba(255, 215, 0, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}
.bond-current-energy span {
    color: #fff;
    font-size: 18px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.bond-skill-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.bond-skill-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.18), rgba(118, 75, 162, 0.12));
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.bond-skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05));
    pointer-events: none;
}
.bond-skill-card.rank-S,
.bond-skill-card.rank-SS,
.bond-skill-card.rank-SSS {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 140, 0, 0.08));
}
.bond-skill-card.affordable {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
}
.bond-skill-card.affordable:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(240, 147, 251, 0.9);
    box-shadow: 0 8px 24px rgba(240, 147, 251, 0.4), 0 0 24px rgba(240, 147, 251, 0.25);
    filter: brightness(1.15);
}
.bond-skill-card.unaffordable {
    opacity: 0.55;
    filter: grayscale(0.5);
    cursor: not-allowed;
}
.bond-skill-card.disabled {
    cursor: not-allowed;
}

.bond-skill-card .bs-avatar {
    font-size: 36px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.bond-skill-card .bs-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.bond-skill-card .bs-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}
.bond-skill-card .bs-skill-name {
    font-size: 13px;
    font-weight: 700;
    color: #f093fb;
    text-shadow: 0 0 4px rgba(240, 147, 251, 0.4);
}
.bond-skill-card .bs-skill-desc {
    font-size: 11px;
    color: #ccc;
    line-height: 1.4;
}
.bond-skill-card .bs-cost {
    font-size: 12px;
    color: #ffd700;
    font-weight: 700;
    margin-top: 2px;
}

.bond-skill-card .bs-status {
    position: absolute;
    top: 8px;
    right: 10px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
}
.bond-skill-card .bs-status.ok {
    background: linear-gradient(135deg, #38ef7d, #11998e);
    color: #fff;
    box-shadow: 0 0 8px rgba(56, 239, 125, 0.5);
}
.bond-skill-card .bs-status.no {
    background: linear-gradient(135deg, #ff6b6b, #c92a2a);
    color: #fff;
}

/* ===== 商店/升级等 ===== */
.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.shop-item-image {
    height: 80px;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 87, 108, 0.1));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 8px;
}

.shop-item-name {
    font-weight: 700;
    margin-bottom: 6px;
}

.shop-item-price {
    color: #f093fb;
    font-weight: 700;
    margin-bottom: 8px;
}

.shop-info, .upgrade-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.shop-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.rest-options, .event-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rest-option-btn, .event-option-btn {
    padding: 16px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    transition: all 0.2s ease;
}

.rest-option-btn:hover, .event-option-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.event-content {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 16px;
    line-height: 1.8;
}

.encounter-choices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.buff-select-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.buff-select-card {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.buff-select-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 5px 0 0 5px;
}

.buff-select-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.8);
    filter: brightness(1.1);
}

.buff-select-card.selected {
    border-color: #f093fb;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 87, 108, 0.15));
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.4), 0 6px 20px rgba(240, 147, 251, 0.2);
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.15);
}

.buff-select-card.selected::before {
    background: linear-gradient(to bottom, #f093fb, #f5576c);
}

.buff-select-card.rank-S::before,
.buff-select-card.rank-SS::before,
.buff-select-card.rank-SSS::before {
    background: linear-gradient(to bottom, #ffd700, #ff8c00);
}

.buff-select-card.rank-S {
    border-color: rgba(255, 215, 0, 0.5);
}

.buff-select-card.rank-SS::before,
.buff-select-card.rank-SSS::before {
    background: linear-gradient(to bottom, #ff6b6b, #ee5a6f);
}

.buff-select-card.rank-A::before {
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.buff-select-card.rank-B::before {
    background: linear-gradient(to bottom, #4a90d9, #357abd);
}

.buff-check {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
}

.buff-select-card.selected .buff-check {
    background: #f093fb;
    border-color: #fff;
    box-shadow: 0 0 10px rgba(240, 147, 251, 0.7);
}

.buff-avatar {
    font-size: 36px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.buff-info {
    flex: 1;
    min-width: 0;
}

.buff-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.buff-name .rank-tag {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 4px;
    border-radius: 4px;
    font-size: 10px;
    background: rgba(102, 126, 234, 0.5);
    color: #fff;
    font-weight: 700;
}

.buff-desc {
    font-size: 12px;
    color: #d0d0d8;
    line-height: 1.5;
}

.select-count {
    margin-top: 16px;
    text-align: right;
    font-size: 15px;
    font-weight: 600;
}

/* ===== 骰子比大小 ===== */
.dice-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 20px;
}

.dice-item {
    text-align: center;
}

.dice-label {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 10px;
}

.dice-value {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
}

.dice-vs {
    font-size: 32px;
    font-weight: 700;
    color: #f093fb;
}

/* 骰子闪光效果（大的一方闪烁2秒） */
.dice-value.dice-flash-win {
    animation: diceFlash 0.4s ease-in-out 5;
}

@keyframes diceFlash {
    0%, 100% {
        box-shadow: 0 0 0 rgba(255, 215, 0, 0);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.9), 0 0 60px rgba(255, 215, 0, 0.5);
        transform: scale(1.15);
        background: linear-gradient(135deg, #ffd700, #ff8c00);
    }
}

.dice-result {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.dice-result.win {
    color: #38ef7d;
}

.dice-result.lose {
    color: #f45c43;
}

/* ===== 胜利奖励 ===== */
.victory-rewards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reward-item {
    padding: 12px 16px;
    background: rgba(240, 147, 251, 0.1);
    border: 1px solid rgba(240, 147, 251, 0.3);
    border-radius: 10px;
    font-weight: 600;
}

/* ===== 背包Tab美化 ===== */
.backpack-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.tab-btn {
    padding: 10px 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(102, 126, 234, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #bbb;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #f093fb);
    opacity: 0;
    transition: opacity 0.2s;
}

.tab-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(240, 147, 251, 0.08));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.25);
    border-color: rgba(240, 147, 251, 0.4);
}

.tab-btn:hover::before { opacity: 1; }

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5), 0 0 0 1px rgba(240, 147, 251, 0.3);
    transform: translateY(-2px);
}

.tab-btn.active::before {
    opacity: 1;
    background: linear-gradient(90deg, #f093fb, #f5576c);
}

.backpack-content {
    min-height: 200px;
    background: linear-gradient(135deg, rgba(20, 15, 45, 0.6), rgba(30, 20, 60, 0.4));
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.empty-tip {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 14px;
}

.tip {
    padding: 10px 16px;
    background: rgba(240, 147, 251, 0.1);
    border-left: 3px solid #f093fb;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #ccc;
}

/* ===== 测试增益列表 ===== */
.test-buff-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 8px;
}

.test-buff-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.test-buff-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ===== 伙伴列表 ===== */
.partner-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.partner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* ===== 伤害跳字动画 ===== */
.damage-float {
    position: fixed;
    pointer-events: none;
    font-weight: 900;
    font-size: 22px;
    text-shadow: 0 0 6px rgba(0,0,0,0.9), 0 0 12px currentColor;
    z-index: 9999;
    white-space: nowrap;
    will-change: transform, opacity;
}

/* 角色普通伤害 - 黄色 */
.float-normal { 
    color: #ffd700; 
    animation: floatUp 1.5s ease-out forwards;
}

/* 暴击伤害 - 红色，放大 */
.float-crit { 
    color: #ff3333; 
    font-size: 32px;
    text-shadow: 0 0 10px rgba(255,0,0,0.8), 0 0 20px rgba(255,0,0,0.5);
    animation: floatUpCrit 1.5s ease-out forwards;
}

/* DOT伤害 - 紫色 */
.float-dot { 
    color: #9d4edd; 
    animation: floatUp 1.5s ease-out forwards;
}

/* 回血 - 绿色 */
.float-heal { 
    color: #38ef7d; 
    text-shadow: 0 0 8px rgba(56,239,125,0.6);
    animation: floatUpHeal 1.5s ease-out forwards;
}

/* 护盾 - 蓝色 */
.float-shield { 
    color: #3cb9fc; 
    text-shadow: 0 0 8px rgba(60,185,252,0.6);
    animation: floatUpShield 1.5s ease-out forwards;
}

/* 怪物伤害 - 深灰色，骷髅头 */
.float-monster { 
    color: #666666; 
    font-size: 20px;
    animation: floatUp 1.5s ease-out forwards;
}

/* 怪物暴击 - 深灰色放大 */
.float-monster-crit { 
    color: #444444; 
    font-size: 28px;
    text-shadow: 0 0 8px rgba(100,100,100,0.8);
    animation: floatUpCrit 1.5s ease-out forwards;
}

/* MISS */
.float-miss { 
    color: #888888; 
    font-size: 18px;
    animation: floatUp 1.5s ease-out forwards;
}

@keyframes floatUp {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    15% { transform: translate(-50%, -60%) scale(1.1); opacity: 1; }
    30% { transform: translate(-50%, -80%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -160%) scale(0.9); opacity: 0; }
}

@keyframes floatUpCrit {
    0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
    20% { transform: translate(-50%, -70%) scale(1.5); opacity: 1; }
    40% { transform: translate(-50%, -90%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -180%) scale(1); opacity: 0; }
}

@keyframes floatUpHeal {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    20% { transform: translate(-50%, -65%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -140%) scale(1); opacity: 0; }
}

@keyframes floatUpShield {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    20% { transform: translate(-50%, -65%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -140%) scale(1); opacity: 0; }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .battle-main-layout {
        flex-direction: column;
    }
    .battle-right-panel {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .screen {
        padding: 12px;
    }
    .content-header h2 {
        font-size: 22px;
    }
    .login-container {
        padding: 0 16px;
    }
    .game-title {
        font-size: 32px;
        margin-bottom: 24px;
    }
    .main-header {
        padding: 14px 18px;
        margin-bottom: 24px;
    }
    .menu-buttons {
        grid-template-columns: 1fr;
    }
    .menu-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
    .blessing-choices, .encounter-choices {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .blessing-card {
        padding: 18px;
    }
    .battle-skills-area {
        grid-template-columns: 1fr;
    }
    .user-info {
        gap: 10px;
    }
    .status-group {
        font-size: 10px;
        padding: 2px 6px;
    }
    .monster-card {
        width: 160px;
        padding: 6px;
    }
    .monster-avatar {
        font-size: 26px;
    }
    .monster-name {
        font-size: 13px;
    }
    .pray-showcase {
        margin-top: 40px;
        gap: 14px;
    }
    .pray-currency-bar {
        position: static;
        justify-content: center;
        margin-bottom: 16px;
    }
    .difficulty-list {
        grid-template-columns: 1fr;
    }
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
    .map-title {
        font-size: 20px;
    }
    .map-actions {
        flex-direction: column;
        align-items: center;
    }
    .modal-content {
        width: 96%;
        max-height: 90vh;
    }
    .modal-large {
        max-width: 96%;
    }
    .shop-items {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .rest-option-btn, .event-option-btn {
        padding: 12px;
        font-size: 14px;
    }
    .card-image {
        height: 120px;
    }
    .hand-cards-area {
        gap: 6px;
    }
    .hand-card {
        width: 70px;
        padding: 6px 4px;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 8px;
    }
    .game-title {
        font-size: 26px;
    }
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .content-header h2 {
        font-size: 20px;
    }
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .pray-buttons {
        flex-direction: column;
        align-items: center;
    }
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    .card-image {
        height: 100px;
        font-size: 36px;
    }
    .metro-dot {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .metro-node {
        width: 48px;
    }
    .metro-line {
        min-width: 12px;
    }
    .character-card.selectable {
        padding: 12px 10px;
    }
    .modal-content {
        border-radius: 12px;
    }
    .modal-header {
        padding: 14px 16px;
    }
    .modal-header h3 {
        font-size: 17px;
    }
    .modal-body {
        padding: 14px 16px;
    }
    .modal-footer {
        padding: 14px 16px;
    }
}

/* ===== 角色技能 - 手牌选择美化 ===== */
.char-skill-hand-pick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 8px 4px;
    margin: 8px 0;
    max-height: 180px;
    overflow-y: auto;
}

.mini-hand-card {
    width: 56px;
    padding: 6px 4px;
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.25), rgba(56, 239, 125, 0.15));
    border: 2px solid rgba(56, 239, 125, 0.4);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    user-select: none;
    position: relative;
}

.mini-hand-card:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(56, 239, 125, 0.5);
    border-color: rgba(56, 239, 125, 0.9);
    filter: brightness(1.2);
}

.mini-hand-card.picked {
    border-color: #f093fb;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.4), rgba(245, 87, 108, 0.3));
    box-shadow: 0 0 14px rgba(240, 147, 251, 0.7), 0 0 24px rgba(240, 147, 251, 0.4);
    transform: translateY(-4px) scale(1.08);
    filter: brightness(1.35);
}

.mini-hand-card.picked::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #f093fb;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.mhc-avatar {
    font-size: 20px;
    margin-bottom: 2px;
}

.mhc-name {
    font-weight: 700;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-skill-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.pick-cards-hint {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    margin: 6px 0;
    line-height: 1.5;
}

/* ===== 目标选择卡片美化 ===== */
.target-pick-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(235, 51, 73, 0.1), rgba(131, 96, 195, 0.08));
    border: 2px solid rgba(235, 51, 73, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.target-pick-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #eb3349, #f45c43);
    border-radius: 4px 0 0 4px;
}

.target-pick-card.self {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.1));
    border-color: rgba(102, 126, 234, 0.4);
}

.target-pick-card.self::before {
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.target-pick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(235, 51, 73, 0.35);
    border-color: rgba(235, 51, 73, 0.8);
    filter: brightness(1.15);
}

.target-pick-card.self:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    border-color: rgba(102, 126, 234, 0.8);
}

/* ===== 测试训练选角卡片美化 ===== */
.character-card.test-selectable {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(20, 30, 60, 0.85), rgba(30, 20, 70, 0.75));
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.character-card.test-selectable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #f093fb, #f5576c);
    opacity: 0.8;
}

.character-card.test-selectable:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: #f093fb;
    box-shadow: 0 16px 40px rgba(240, 147, 251, 0.4), 0 0 30px rgba(102, 126, 234, 0.3);
    background: linear-gradient(145deg, rgba(40, 20, 80, 0.9), rgba(50, 30, 100, 0.85));
}

.character-card.test-selectable.selected {
    border-color: #38ef7d;
    box-shadow: 0 16px 40px rgba(56, 239, 125, 0.5), 0 0 0 3px rgba(56, 239, 125, 0.4), 0 0 30px rgba(56, 239, 125, 0.3);
    transform: translateY(-8px) scale(1.05);
    background: linear-gradient(145deg, rgba(20, 60, 40, 0.9), rgba(30, 80, 50, 0.85));
}

.character-card.test-selectable.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #38ef7d, #11998e);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(56, 239, 125, 0.6);
    animation: checkPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.character-card.test-selectable .card-avatar {
    font-size: 56px;
    margin: 16px 0 8px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.character-card.test-selectable .card-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.character-card.test-selectable .card-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 1px;
}

.character-card.test-selectable .card-rank.rank-s {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
}
.character-card.test-selectable .card-rank.rank-a {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: #fff;
}
.character-card.test-selectable .card-rank.rank-b {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
}
.character-card.test-selectable .card-rank.rank-ss {
    background: linear-gradient(135deg, #c084fc, #9333ea);
    color: #fff;
}
.character-card.test-selectable .card-rank.rank-sss {
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: #fff;
}
.character-card.test-selectable .card-rank.rank-sss+ {
    background: linear-gradient(135deg, #fb7185, #f43f5e);
    color: #fff;
}

.character-card.test-selectable .card-desc {
    font-size: 12px;
    color: #bbb;
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 34px;
}

.character-card.test-selectable .card-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #d8c8ff;
    font-weight: 600;
    margin-bottom: 12px;
}

.character-card.test-selectable .card-stats .stat-row {
    display: flex;
    justify-content: center;
}

.character-card.test-selectable .test-select-hint {
    font-size: 12px;
    color: #f093fb;
    opacity: 0;
    transition: opacity 0.25s;
    font-weight: 600;
}

.character-card.test-selectable:hover .test-select-hint,
.character-card.test-selectable.selected .test-select-hint {
    opacity: 1;
}

/* ===== 新手牌闪光动画 ===== */
@keyframes newHandCardFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 239, 125, 0.8);
        transform: scale(1.2);
        filter: brightness(1.8);
    }
    30% {
        box-shadow: 0 0 20px 10px rgba(56, 239, 125, 0.6);
        filter: brightness(1.5);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(56, 239, 125, 0);
        transform: scale(1);
        filter: brightness(1);
    }
}

.hand-card.newly-drawn {
    animation: newHandCardFlash 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 怪物技能行动值=0时的脉冲效果 ===== */
@keyframes monsterReadyPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
    }
    50% {
        box-shadow: 0 0 15px 5px rgba(251, 191, 36, 0.6);
    }
}

.monster-card.skill-ready {
    animation: monsterReadyPulse 0.6s ease-in-out infinite;
    border-color: #fbbf24 !important;
}

.tpc-avatar {
    font-size: 36px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.tpc-info {
    flex: 1;
    min-width: 0;
}

.tpc-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.tpc-hp {
    font-size: 12px;
    color: #eee;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* ===== 怪物卡片技能悬停提示 ===== */
.monster-card {
    position: relative;
}

.monster-skill-tooltip {
    position: fixed;
    background: rgba(15, 12, 41, 0.95);
    border: 1px solid rgba(240, 147, 251, 0.5);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 11px;
    color: #fff;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    min-width: 160px;
    max-width: 280px;
    word-break: break-word;
    white-space: normal;
    line-height: 1.4;
}

.monster-skill-tooltip.show {
    opacity: 1;
}

.monster-skill-tooltip .mst-title {
    font-weight: 700;
    color: #f093fb;
    margin-bottom: 4px;
    font-size: 12px;
}

.monster-skill-tooltip .mst-desc {
    color: #ddd;
    line-height: 1.4;
}

/* ===== 怪物自身增益跳字 ===== */
.float-dmg.self-buff {
    color: #4ade80;
    font-size: 18px;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 900;
}

.float-dmg.self-heal {
    color: #67e8f9;
    font-size: 22px;
    text-shadow: 0 0 10px rgba(103, 232, 249, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 900;
}

.float-dmg.self-buff-crit {
    color: #fbbf24;
    font-size: 18px;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 900;
}

/* ===== 战斗胜利炫丽动画 ===== */
.victory-modal .modal-content.victory-content {
    position: relative;
    overflow: visible;
    border: 2px solid rgba(240, 147, 251, 0.5);
    box-shadow: 0 0 30px rgba(240, 147, 251, 0.4), 0 0 60px rgba(255, 200, 100, 0.2);
    animation: victoryPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes victoryPopIn {
    0% { transform: scale(0.5) rotate(-5deg); opacity: 0; }
    60% { transform: scale(1.05) rotate(2deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.victory-decoration {
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
    overflow: visible;
}

.victory-confetti {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 40px;
    background: linear-gradient(90deg, transparent, #f093fb, #f5576c, #ffd700, #4ade80, transparent);
    filter: blur(2px);
    opacity: 0.6;
    animation: confettiGlow 2s ease-in-out infinite;
}

@keyframes confettiGlow {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.2); }
}

.victory-sparkle {
    position: absolute;
    font-size: 28px;
    animation: sparkleFloat 2s ease-in-out infinite;
}

.sparkle-1 { top: -10px; left: 20%; animation-delay: 0s; }
.sparkle-2 { top: -20px; left: 50%; animation-delay: 0.3s; }
.sparkle-3 { top: -10px; left: 80%; animation-delay: 0.6s; }
.sparkle-4 { top: -25px; left: 35%; animation-delay: 0.9s; }

@keyframes sparkleFloat {
    0%, 100% { transform: translateY(0) rotate(0); opacity: 0.7; }
    50% { transform: translateY(-10px) rotate(15deg); opacity: 1; }
}

.victory-header {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(255, 200, 100, 0.15));
    border-bottom: 1px solid rgba(240, 147, 251, 0.3);
}

.victory-title {
    background: linear-gradient(135deg, #f093fb, #f5576c, #ffd700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: victoryShine 3s linear infinite;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
}

@keyframes victoryShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.victory-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border: none;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 12px 32px;
    animation: victoryBtnPulse 1.5s ease-in-out infinite;
}

@keyframes victoryBtnPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(240, 147, 251, 0.5); }
    50% { box-shadow: 0 0 25px rgba(240, 147, 251, 0.9), 0 0 50px rgba(245, 87, 108, 0.4); }
}

/* ===== 商店技能强化面板 ===== */
.skill-upgrade-content {
    max-width: 700px;
}

.skill-upgrade-price {
    color: #fbbf24;
    font-size: 16px;
    font-weight: 600;
}

.skill-upgrade-body {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.shop-skill-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.shop-skill-card {
    position: relative;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(240, 147, 251, 0.06));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.shop-skill-card:hover {
    border-color: #f093fb;
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.4);
    transform: translateY(-2px);
}

.shop-skill-card.upgrading {
    animation: skillUpgradeFlash 0.6s ease-out;
    pointer-events: none;
}

@keyframes skillUpgradeFlash {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.8); }
    30% { box-shadow: 0 0 30px 15px rgba(74, 222, 128, 0.6); border-color: #4ade80; }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.shop-skill-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ssc-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ssc-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.ssc-level {
    font-size: 13px;
    color: #f093fb;
    font-weight: 600;
}

.ssc-desc-box {
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.ssc-desc-text {
    font-size: 13px;
    color: #ccc;
    line-height: 1.6;
}

.ssc-desc-text .changed {
    color: #4ade80;
    font-weight: 700;
}

.ssc-cost {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.ssc-hover-preview {
    position: absolute;
    top: -8px;
    right: -12px;
    transform: translateX(100%);
    width: 320px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(15, 12, 41, 0.98), rgba(30, 20, 60, 0.98));
    border: 2px solid #4ade80;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(74, 222, 128, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 100;
    pointer-events: none;
}

.ssc-hover-preview.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(110%);
}

.ssc-hover-preview::before {
    content: '→';
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    color: #4ade80;
    font-size: 20px;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
}

.ssc-preview-title {
    color: #4ade80;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ssc-preview-title::before {
    content: '✨';
}

.ssc-preview-content {
    font-size: 13px;
    color: #ddd;
    line-height: 1.6;
}

.ssc-preview-content .changed {
    color: #4ade80;
    font-weight: 700;
}

/* ===== BOSS结算页面 ===== */
.settlement-modal .modal-content.settlement-content {
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #1a0f3e 0%, #2d1b69 50%, #1a0f3e 100%);
    border: 2px solid rgba(240, 147, 251, 0.4);
    box-shadow: 0 0 40px rgba(240, 147, 251, 0.3);
}

.settlement-header {
    text-align: center;
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(240, 147, 251, 0.2);
}

.settlement-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 6px;
}

.settlement-fire {
    font-size: 32px;
    animation: fireFlicker 1s ease-in-out infinite;
}

@keyframes fireFlicker {
    0%, 100% { transform: scale(1) rotate(-5deg); filter: brightness(1); }
    50% { transform: scale(1.2) rotate(5deg); filter: brightness(1.3); }
}

.settlement-title {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, #f093fb, #f5576c, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: 2px;
}

.settlement-subtitle {
    color: #aaa;
    font-size: 14px;
    margin: 0;
}

.settlement-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.settlement-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
}

.settlement-section-title {
    font-size: 14px;
    color: #f093fb;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: 1px;
}

.settlement-character {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sc-avatar {
    font-size: 42px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(102, 126, 234, 0.2));
    border-radius: 12px;
    border: 2px solid rgba(240, 147, 251, 0.4);
}

.sc-info {
    flex: 1;
}

.sc-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.sc-meta {
    font-size: 13px;
    color: #aaa;
}

.settlement-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    font-size: 13px;
    color: #ddd;
}

.sp-avatar {
    font-size: 22px;
}

.settlement-collections {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sc-collection-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(240, 147, 251, 0.1);
    border: 1px solid rgba(240, 147, 251, 0.25);
    border-radius: 8px;
    font-size: 18px;
    cursor: help;
    transition: all 0.2s;
}

.sc-collection-item:hover {
    background: rgba(240, 147, 251, 0.25);
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(240, 147, 251, 0.5);
}

.sc-empty {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.settlement-rewards {
    display: flex;
    gap: 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(240, 147, 251, 0.08));
    border: 1px solid rgba(255, 215, 0, 0.25);
}

.settlement-reward-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px;
}

.reward-icon {
    font-size: 24px;
}

.reward-label {
    font-size: 12px;
    color: #aaa;
}

.reward-value {
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.settlement-footer {
    padding: 16px 20px 24px;
    text-align: center;
    border-top: 1px solid rgba(240, 147, 251, 0.2);
}

.btn-large {
    padding: 14px 40px;
    font-size: 16px;
}

/* ===== 地图居中滚动 ===== */
.map-stages.center-scroll {
    scroll-behavior: smooth;
}

/* ===== HP显示格式 ===== */
.hp-display-text {
    font-weight: 700;
}

.hp-display-text .hp-base {
    color: #fff;
}

.hp-display-text .hp-bonus {
    color: #4ade80;
}

/* ===== 升级奖励卡片闪光动画 ===== */
@keyframes rewardItemAppear {
    0% { opacity: 0; transform: translateY(10px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.reward-item {
    animation: rewardItemAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.reward-item:nth-child(1) { animation-delay: 0.1s; }
.reward-item:nth-child(2) { animation-delay: 0.2s; }
.reward-item:nth-child(3) { animation-delay: 0.3s; }

/* ===== 技能卡揭示动画 ===== */
.skill-card-reveal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 2000;
    /* ===== Bug7修复：移除forwards，改为自己控制最终状态，防止1.5秒后自动透明消失 ===== */
    animation: skillCardReveal 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation-fill-mode: none;
    opacity: 1;
    pointer-events: none;
}
/* 动画结束后保持在最终显现的状态（不自动消失） */
.skill-card-reveal.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

@keyframes skillCardReveal {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-180deg); opacity: 0; }
    30% { transform: translate(-50%, -50%) scale(1.1) rotate(10deg); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    /* ===== Bug7修复：100%保持显示，等玩家点击后再关闭 ===== */
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.skill-card-reveal-content {
    width: 280px;
    padding: 24px;
    background: linear-gradient(135deg, #1a0f3e, #2d1b69);
    border: 2px solid #fbbf24;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.5);
    text-align: center;
}

.skill-card-reveal-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.skill-card-reveal-name {
    font-size: 20px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 4px;
}

.skill-card-reveal-type {
    font-size: 12px;
    color: #aaa;
}

/* ===== 新版战斗界面布局 ===== */
#battle-screen:not(.active) {
    display: none !important;
}

#battle-screen.active {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 12px 16px;
    overflow: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* 顶部栏 */
.battle-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
    flex-shrink: 0;
}

.battle-turn-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.battle-turn-info-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.battle-top-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.battle-gold {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #ffd700;
}

.gold-icon {
    font-size: 16px;
}

.battle-top-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.battle-turn-damage {
    color: #ffd700;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
}

.btd-label {
    margin-right: 4px;
    opacity: 0.8;
    font-size: 12px;
}

.btd-value {
    font-size: 16px;
}

/* 中间怪物区域 */
.battle-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: visible;
    padding: 10px 0;
}

.monsters-area {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

/* 怪物卡片美化 */
.monster-card {
    background: linear-gradient(145deg, rgba(235, 51, 73, 0.1), rgba(60, 20, 30, 0.4));
    border: 1px solid rgba(235, 51, 73, 0.35);
    border-radius: 14px;
    padding: 10px;
    width: 200px;
    transition: all 0.25s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.monster-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(235, 51, 73, 0.25);
    border-color: rgba(235, 51, 73, 0.6);
}

.monster-card.selected {
    border-color: #f093fb;
    box-shadow: 0 0 24px rgba(240, 147, 251, 0.5);
    transform: translateY(-4px);
}

/* ===== Bug3修复：执行之龙狂暴燃烧粒子特效 ===== */
.monster-card.rage-active {
    border-color: rgba(255, 100, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.5), inset 0 0 15px rgba(255, 60, 0, 0.2);
    animation: rage-pulse 1.2s ease-in-out infinite;
}
.monster-card.rage-active::before {
    content: '🔥';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 20px;
    animation: rage-float 1s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}
.monster-card.rage-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 12px;
    background: radial-gradient(ellipse at bottom, rgba(255, 100, 0, 0.6) 0%, rgba(255, 50, 0, 0.2) 50%, transparent 100%);
    animation: rage-glow 0.8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 5;
}
@keyframes rage-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 100, 0, 0.5), inset 0 0 15px rgba(255, 60, 0, 0.2); }
    50% { box-shadow: 0 0 30px rgba(255, 150, 0, 0.7), inset 0 0 25px rgba(255, 100, 0, 0.3); }
}
@keyframes rage-float {
    0%, 100% { transform: translateY(0) rotate(-10deg); }
    50% { transform: translateY(-6px) rotate(10deg); }
}
@keyframes rage-glow {
    0% { opacity: 0.6; height: 10px; }
    100% { opacity: 1; height: 16px; }
}

.monster-avatar {
    font-size: 40px;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(235, 51, 73, 0.4));
}

/* 底部玩家操控面板 */
.battle-bottom-panel {
    display: flex;
    gap: 12px;
    padding: 50px 12px 12px 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    min-height: 220px;
    max-height: 300px;
    overflow: visible;
    margin-top: 80px;
}

.battle-bottom-panel > .player-info-area,
.battle-bottom-panel > .hand-cards-wrapper,
.battle-bottom-panel > .skills-and-actions {
    overflow: visible;
}

/* 左侧：角色信息区 */
.player-info-area {
    width: 120px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    position: relative;
    padding-top: 70px;
}

.player-avatar-wrapper {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 130px;
    cursor: help;
    z-index: 5;
}

.player-avatar {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    overflow: visible;
}

.player-avatar-wrapper:hover .player-avatar {
    transform: translateY(-4px) scale(1.05);
    filter: brightness(1.1);
}

/* ===== 流萤角色专属样式 ===== */

/* 流萤特殊生命值条 */
.special-hp-bar-container {
    width: 100%;
    height: 18px;
    background: rgba(255, 80, 80, 0.15);
    border-radius: 9px;
    overflow: hidden;
    position: relative;
    margin-top: 4px;
    border: 1px solid rgba(255, 100, 100, 0.4);
}

.special-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ff8800, #ffcc00);
    background-size: 200% 100%;
    animation: specialHpGlow 1.5s ease-in-out infinite;
    transition: width 0.4s ease;
    border-radius: 9px;
}

@keyframes specialHpGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 流萤充能条 */
.charge-bar-container {
    width: 100%;
    display: flex;
    gap: 3px;
    margin-top: 4px;
}

.charge-cell {
    flex: 1;
    height: 8px;
    background: rgba(100, 100, 100, 0.3);
    border-radius: 2px;
    border: 1px solid rgba(150, 150, 150, 0.3);
    transition: all 0.3s ease;
}

.charge-cell.active {
    background: linear-gradient(90deg, #f093fb, #f5576c, #ffd700);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
}

.charge-cell.full {
    animation: chargeCellPulse 0.6s ease-in-out infinite;
}

@keyframes chargeCellPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 215, 0, 0.6); }
    50% { box-shadow: 0 0 12px rgba(255, 215, 0, 1), 0 0 20px rgba(240, 147, 251, 0.5); }
}

.charge-text {
    font-size: 10px;
    color: #aaa;
    text-align: center;
    margin-top: 2px;
}

/* 完全燃烧技能充能进度条（按钮内部） */
.sb-charge-cells {
    width: 100%;
    margin-top: 3px;
}

.sb-charge-cells .sb-charge-cell {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.sb-charge-cells .sb-charge-cell.active {
    background: linear-gradient(90deg, #f093fb, #f5576c, #ffd700);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
}

.sb-charge-cells .sb-charge-cell.full {
    animation: chargeCellFullPulse 0.6s ease-in-out infinite;
}

@keyframes chargeCellFullPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 215, 0, 0.6); }
    50% { box-shadow: 0 0 10px rgba(255, 215, 0, 1); }
}

.sb-charge-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 3px;
}

.sb-charge-fill {
    height: 100%;
    background: linear-gradient(90deg, #f093fb, #f5576c);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.sb-charge-text {
    font-size: 10px;
    color: #bbb;
    margin-top: 2px;
    text-align: center;
}

/* 充能满时技能闪烁效果 */
.charge-full-skill {
    animation: skillFullChargePulse 0.8s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 0 20px rgba(240, 147, 251, 0.4);
    border-color: rgba(255, 215, 0, 0.8) !important;
}

@keyframes skillFullChargePulse {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 0 20px rgba(240, 147, 251, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 40px rgba(240, 147, 251, 0.7);
        transform: scale(1.03);
    }
}

/* 流萤形态状态显示 */
.firefly-form-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: linear-gradient(135deg, rgba(255, 100, 0, 0.8), rgba(255, 50, 0, 0.8));
    border: 1px solid rgba(255, 150, 50, 0.6);
    border-radius: 10px;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    margin-left: 4px;
    animation: fireflyFormGlow 1s ease-in-out infinite;
}

@keyframes fireflyFormGlow {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 100, 0, 0.5); }
    50% { box-shadow: 0 0 12px rgba(255, 150, 50, 0.9); }
}

/* 火燎机状态红光边框效果 - 仅应用于底部操作面板 */
.player-info-area.firefly-active {
    border: none;
    box-shadow: none;
    animation: none;
    position: relative;
}

.battle-bottom-panel.firefly-active {
    border: 2px solid rgba(255, 100, 0, 0.8);
    box-shadow: 
        inset 0 0 25px rgba(255, 100, 0, 0.15),
        0 0 30px rgba(255, 100, 0, 0.5),
        0 0 60px rgba(255, 50, 0, 0.3);
    animation: fireflyBorderPulse 3s ease-in-out infinite;
    position: relative;
    border-radius: 12px;
}

.battle-bottom-panel.firefly-active::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    background: linear-gradient(45deg, 
        transparent 0%, rgba(255, 100, 0, 0.35) 25%, 
        transparent 50%, rgba(255, 50, 0, 0.35) 75%, transparent 100%);
    background-size: 400% 400%;
    animation: fireflyBorderMove 3s linear infinite;
    border-radius: 14px;
    pointer-events: none;
    z-index: -1;
}

@keyframes fireflyBorderPulse {
    0%, 100% { box-shadow: inset 0 0 15px rgba(255, 100, 0, 0.15), 0 0 20px rgba(255, 100, 0, 0.4); }
    50% { box-shadow: inset 0 0 25px rgba(255, 100, 0, 0.25), 0 0 35px rgba(255, 150, 50, 0.6); }
}

@keyframes fireflyBorderMove {
    0% { background-position: 400% 0%; opacity: 0; }
    5% { opacity: 1; }
    15% { background-position: 0% 0%; opacity: 1; }
    20% { opacity: 0; }
    100% { opacity: 0; }
}

/* 火燎机粒子效果 */
.firefly-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ffdd00, #ff6600, transparent);
    border-radius: 50%;
    pointer-events: none;
    animation: fireflyParticleFloat 2s ease-in-out infinite;
}

@keyframes fireflyParticleFloat {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-30px) scale(0); opacity: 0; }
}

/* 流萤角色技能按钮样式 - 横向布局 */
.char-skill.firefly-skill {
    min-height: 46px;
    padding: 3px 2px;
    font-size: 10px;
    flex: 0 1 calc((100% - 16px) / 5);
    max-width: calc((100% - 16px) / 5);
}

.char-skill.firefly-skill .sb-name {
    font-size: 10px;
    margin-bottom: 1px;
    font-weight: bold;
}

.char-skill.firefly-skill .sb-level {
    font-size: 8px;
}

.char-skill.firefly-skill .sb-pct {
    font-size: 9px;
    margin: 1px 0;
}

.char-skill.firefly-skill .sb-cost {
    font-size: 8px;
}

/* 流萤头像渲染样式 */
.player-avatar.firefly-avatar {
    overflow: visible;
    border: none;
    background: transparent;
    width: 100%;
    height: 100%;
}

.player-avatar.firefly-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
}

/* 角色列表卡片中流萤图片 */
.card-image.firefly-card-image {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
    overflow: hidden;
}

.card-image.firefly-card-image img {
    width: 100%;
    height: auto;
    max-height: 120%;
    object-fit: cover;
    object-position: center top;
}

/* 图鉴库中流萤卡片图标 */
.gacha-card-icon.firefly-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gacha-card-icon.firefly-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* 角色详情弹窗流萤立绘 */
.character-detail-portrait.firefly-portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.character-detail-portrait.firefly-portrait img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    object-position: center center;
}

/* ===== 角色信息Tooltip ===== */
.player-info-tooltip {
    position: absolute;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    width: 180px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(20, 15, 45, 0.98), rgba(35, 25, 70, 0.98));
    border: 1px solid rgba(240, 147, 251, 0.4);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
}

.player-avatar-wrapper:hover .player-info-tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.player-info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(35, 25, 70, 0.98);
}

.player-info-tooltip .tooltip-title {
    font-size: 13px;
    font-weight: 700;
    color: #f093fb;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: 1px;
}

.player-info-tooltip .tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.player-info-tooltip .tooltip-label {
    color: #aaa;
}

.player-info-tooltip .tooltip-value {
    color: #4ade80;
    font-weight: 700;
}

.player-info-tooltip .tooltip-divider {
    font-size: 11px;
    color: #f093fb;
    text-align: center;
    margin: 8px 0 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(240, 147, 251, 0.25);
    letter-spacing: 1px;
    font-weight: 700;
}

/* 血条/护盾条区域 */
.player-bars {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hp-bar-container {
    width: 100%;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    overflow: hidden;
    position: relative;
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #eb3349, #f45c43);
    transition: width 0.3s ease;
    border-radius: 9px;
}

.shield-bar-container {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}

.shield-fill {
    height: 100%;
    background: linear-gradient(90deg, #3cb9fc, #667eea);
    transition: width 0.3s ease;
    border-radius: 7px;
}

.special-shield-bar-container {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}

.special-shield-fill {
    height: 100%;
    background: linear-gradient(90deg, #f6d365, #fda085);
    transition: width 0.3s ease;
    border-radius: 7px;
    box-shadow: 0 0 8px rgba(246, 211, 101, 0.4);
}

.bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.sanity-energy-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 2px 4px;
}

.se-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.se-label {
    color: #888;
    font-size: 11px;
}

.se-value {
    color: #fff;
    font-weight: 700;
}

/* 中间：手牌区域 */
.hand-cards-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 300px;
    padding: 0 8px;
}

.hand-cards-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-content: flex-start;
    overflow-y: hidden;
    overflow-x: hidden;
    padding: 6px;
    flex: 1;
    min-height: 120px;
    max-height: 200px;
}

/* 被动技能区域（手牌下方） */
.passive-skills-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 8px;
    padding: 6px 10px;
    min-height: 44px;
}

.passive-skills-section .skill-buttons {
    gap: 0;
}

.passive-skills-section .skill-btn.passive {
    width: 100%;
    min-height: 32px;
    padding: 6px 10px;
    text-align: left;
    opacity: 1;
    cursor: default;
    background: linear-gradient(135deg, rgba(60, 60, 80, 0.4), rgba(40, 40, 60, 0.4));
    border: 1px solid rgba(150, 150, 180, 0.3);
}

.passive-skills-section .skill-btn.passive:hover {
    filter: brightness(1.1);
}

.passive-skills-section .sb-name {
    font-size: 12px;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 3px;
}

.passive-skills-section .sb-desc {
    font-size: 11px;
    color: #ddd;
    line-height: 1.4;
}

/* 新版手牌样式 - 一行7张无遮挡，固定大小 */
.hand-cards-area .hand-card,
.hand-cards-grid .hand-card {
    padding: 5px 3px;
    min-width: 80px;
    width: 80px;
    font-size: 11px;
    border-radius: 6px;
    flex: 0 0 80px;
    max-width: 80px;
    box-sizing: border-box;
}

.hand-cards-area .hand-card-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.hand-cards-area .hand-card-name {
    font-size: 11px;
}

.hand-cards-area .hand-card-desc {
    display: none;
}

/* 手牌选中态 */
.hand-cards-area .hand-card.selected {
    border-color: #f093fb;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.45), rgba(245, 87, 108, 0.35));
    box-shadow: 0 0 14px rgba(240, 147, 251, 0.7), 0 4px 14px rgba(240, 147, 251, 0.45);
    transform: translateY(-5px) scale(1.04);
    filter: brightness(1.3);
    outline: 2px solid #f093fb;
    outline-offset: 2px;
    z-index: 10;
    position: relative;
}

/* 右侧：技能 + 操作按钮 */
.skills-and-actions {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.battle-skills-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: visible;
}

.battle-skills-area .skills-section h4 {
    font-size: 12px;
    margin-bottom: 6px;
    color: #aaa;
    font-weight: 700;
}

.battle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.battle-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7), rgba(118, 75, 162, 0.7));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.battle-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.battle-action-btn.btn-danger {
    background: linear-gradient(135deg, rgba(235, 51, 73, 0.8), rgba(244, 92, 67, 0.8));
}

.battle-action-btn.btn-warning {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.8), rgba(240, 147, 251, 0.6));
}

.battle-action-btn.btn-secondary {
    background: linear-gradient(135deg, rgba(100, 100, 120, 0.7), rgba(80, 80, 100, 0.7));
}

/* 玩家状态图标 */
.player-status-icons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    max-height: 40px;
    overflow-y: auto;
}

/* 手牌tooltip */
.hand-card-tooltip {
    position: fixed;
    background: linear-gradient(135deg, rgba(20, 15, 45, 0.98), rgba(35, 25, 70, 0.98));
    border: 1px solid rgba(240, 147, 251, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
    color: #ddd;
    max-width: 220px;
    z-index: 200;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: none;
}

.hand-card-tooltip.show {
    display: block;
}

/* 技能卡弹窗（模态覆盖层） */
.skill-card-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    pointer-events: auto;
}

.skill-card-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    border-radius: 14px;
}

.skill-card-modal-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 70%;
    background: linear-gradient(145deg, rgba(30, 25, 60, 0.98), rgba(50, 30, 80, 0.98));
    border: 2px solid rgba(240, 147, 251, 0.4);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7), 0 0 24px rgba(240, 147, 251, 0.25);
    display: flex;
    flex-direction: column;
    animation: skillCardModalIn 0.25s ease-out;
    overflow: hidden;
}

@keyframes skillCardModalIn {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.skill-card-modal-header {
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.3), rgba(102, 126, 234, 0.3));
    border-bottom: 1px solid rgba(240, 147, 251, 0.3);
    text-align: center;
}

.skill-card-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #f093fb;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(240, 147, 251, 0.5);
}

.skill-card-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    position: relative;
}

.skill-card-modal-footer {
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

/* 技能卡列表美化 */
.skill-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.skill-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.2));
    border: 2px solid rgba(102, 126, 234, 0.5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.skill-card-item:hover {
    transform: translateY(-4px);
    border-color: rgba(240, 147, 251, 0.8);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.3);
    filter: brightness(1.15);
}

.skill-card-item.selected {
    border-color: #f093fb;
    background: linear-gradient(145deg, rgba(240, 147, 251, 0.4), rgba(245, 87, 108, 0.3));
    box-shadow: 0 0 18px rgba(240, 147, 251, 0.6), 0 6px 18px rgba(240, 147, 251, 0.3);
    transform: translateY(-4px) scale(1.03);
}

.skill-card-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.6);
}

.skill-card-item.disabled:hover {
    transform: none;
    filter: grayscale(0.6);
    box-shadow: none;
    border-color: rgba(102, 126, 234, 0.5);
}

.skill-card-item-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.skill-card-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-align: center;
}

.skill-card-item-count {
    font-size: 11px;
    color: #aaa;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 8px;
}

/* 技能卡专用tooltip（跟随鼠标定位，JS动态设置left/top） */
.skill-card-tooltip {
    /* ===== Bug8修复：使用fixed定位，彻底避免被skill-card-modal-body的overflow裁剪 ===== */
    position: fixed !important;
    z-index: 200000 !important;
    pointer-events: none !important;
    opacity: 0;
    transition: opacity 0.15s !important;
    background: linear-gradient(135deg, rgba(20, 15, 45, 0.98), rgba(35, 25, 70, 0.98)) !important;
    border: 1px solid rgba(240, 147, 251, 0.4) !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    font-size: 12px !important;
    color: #ddd !important;
    max-width: 280px !important;
    min-width: 180px !important;
    width: auto !important;
    height: auto !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    /* ===== Bug8修复：覆盖hand-card-tooltip的display:none ===== */
    display: block !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

.skill-card-tooltip .sct-title {
    font-size: 14px;
    font-weight: 700;
    color: #f093fb;
    margin-bottom: 6px;
    text-align: center;
}

.skill-card-tooltip .sct-desc {
    margin-bottom: 6px;
    line-height: 1.5;
}

.skill-card-tooltip .sct-count {
    color: #4ade80;
    font-size: 11px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 覆盖旧版skill-card-panel样式 */
.skill-card-panel {
    display: none !important;
}

/* 覆盖旧版战斗布局样式 */
.battle-main-layout,
.battle-left-panel,
.battle-right-panel,
.battle-field,
.battle-bottom {
    display: contents;
}

/* 隐藏game-header中的旧元素（战斗中） */
#battle-screen .game-header {
    display: none;
}

/* 回合公告框调整 */
.round-announce {
    top: 45%;
    font-size: 42px;
    padding: 24px 60px;
}
}
