/* 坦克对战游戏 - 动漫风格 + 黑线描边 */

/* ========== 基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(180deg, #f0f4f8 0%, #e2e8f0 50%, #cbd5e0 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    color: #1a202c;
    overflow-x: hidden;
}

/* ========== 开场动画 ========== */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #f0f4f8 0%, #e2e8f0 50%, #cbd5e0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.intro-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-content {
    text-align: center;
    animation: introPulse 2s ease-in-out;
}

.intro-title {
    font-size: 80px;
    font-weight: 900;
    color: #1a202c;
    -webkit-text-stroke: 2px #1a202c;
    text-shadow: 6px 6px 0 rgba(0, 0, 0, 0.15);
    margin-bottom: 24px;
    letter-spacing: 20px;
    animation: introTitleIn 1s ease-out;
    line-height: 1.2;
}

.intro-subtitle {
    font-size: 28px;
    font-weight: 700;
    color: #4a5568;
    letter-spacing: 16px;
    -webkit-text-stroke: 1px #4a5568;
    animation: introSubtitleIn 1s ease-out 0.3s both;
    line-height: 1.5;
}

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

@keyframes introSubtitleIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ========== 顶部信息栏 ========== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 1000px;
    padding: 12px 24px;
    background: #fff;
    border: 3px solid #1a202c;
    border-radius: 16px;
    margin-top: 16px;
    box-shadow: 6px 6px 0 #1a202c;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-btn-game {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 8px;
    color: #1a202c;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 16px;
    box-shadow: 3px 3px 0 #1a202c;
}

.back-btn-game:hover {
    background: #1a202c;
    color: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #1a202c;
}

.back-btn-game:active {
    transform: translate(0, 0);
    box-shadow: 1px 1px 0 #1a202c;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 16px;
}

.score-value {
    font-size: 32px;
    font-weight: 800;
    min-width: 48px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    -webkit-text-stroke: 2px #1a202c;
}

.score-value.p1 { color: #4299e1; }
.score-value.p2 { color: #f56565; }

.score-divider {
    font-size: 24px;
    color: #1a202c;
    font-weight: 800;
}

.round-display {
    font-size: 14px;
    color: #4a5568;
    font-weight: 600;
}

.map-display {
    font-size: 12px;
    color: #4a5568;
    padding: 6px 14px;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 8px;
    font-weight: 600;
}

/* ========== 游戏容器 ========== */
.game-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 4px solid #1a202c;
    box-shadow: 8px 8px 0 #1a202c;
    margin-top: 16px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

canvas {
    display: block;
    background: linear-gradient(180deg, #e6f3ff 0%, #f0f9ff 100%);
}

/* ========== 底部控制提示 ========== */
.bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 1000px;
    padding: 10px 24px;
    background: #fff;
    border: 3px solid #1a202c;
    border-radius: 16px;
    margin-top: 12px;
    box-shadow: 6px 6px 0 #1a202c;
    animation: slideUp 0.4s ease-out;
}

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

.control-hint {
    font-size: 13px;
    color: #4a5568;
    font-weight: 600;
}

.control-hint.p1 { color: #2b6cb0; }
.control-hint.p2 { color: #c53030; }

/* ========== 模式标签页 ========== */
.mode-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.mode-tab {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    color: #4a5568;
    background: #fff;
    border: 3px solid #cbd5e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0 #cbd5e0;
}

.mode-tab:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #cbd5e0;
}

.mode-tab.active {
    color: #1a202c;
    background: #f0fff4;
    border-color: #48bb78;
    box-shadow: 3px 3px 0 #48bb78;
}

.mode-tab.active:hover {
    box-shadow: 5px 5px 0 #48bb78;
}

.mode-tab.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f7fafc;
    border-color: #e2e8f0;
    box-shadow: 2px 2px 0 #e2e8f0;
}

.mode-tab.disabled:hover {
    transform: none;
    box-shadow: 2px 2px 0 #e2e8f0;
}

.mode-cards.hidden {
    display: none;
}

/* ========== 屏幕覆盖层 ========== */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 244, 248, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ========== 菜单容器 ========== */
.menu-container {
    width: 100%;
    max-width: 720px;
    padding: 48px;
    animation: containerIn 0.5s ease-out;
    position: relative;
}

@keyframes containerIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Logo区域 ========== */
.logo-section {
    text-align: center;
    margin-bottom: 48px;
}

.game-title {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #1a202c;
    margin-bottom: 8px;
    -webkit-text-stroke: 3px #1a202c;
    text-shadow: 
        4px 4px 0 #fff,
        6px 6px 0 #1a202c;
    animation: titleBounce 2s ease-in-out infinite;
}

@keyframes titleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.game-subtitle {
    font-size: 16px;
    color: #4a5568;
    letter-spacing: 8px;
    font-weight: 700;
}

.game-version {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #718096;
    background: #edf2f7;
    border: 2px solid #cbd5e0;
    border-radius: 20px;
    letter-spacing: 2px;
}

/* 返回网站游戏菜单按钮 */
.back-to-site-btn {
    display: inline-block;
    margin: 16px 0 24px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    color: #4a5568;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0 #1a202c;
}

.back-to-site-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #1a202c;
    background: #f7fafc;
}

.back-to-site-btn:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0 #1a202c;
}

/* ========== 模式选择卡片 ========== */
.mode-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 24px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mode-cards.hidden {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

.mode-cards.animating-out {
    opacity: 0;
    transform: translateY(-10px);
}

.mode-cards.animating-in {
    animation: cardsFadeIn 0.3s ease forwards;
}

@keyframes cardsFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.mode-card {
    background: #fff;
    border: 3px solid #1a202c;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 6px 6px 0 #1a202c;
}

.mode-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 #1a202c;
}

.mode-card:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0 #1a202c;
}

.mode-card.selected {
    background: #f0fff4;
    border-color: #48bb78;
    box-shadow: 6px 6px 0 #48bb78;
}

.mode-card.selected:hover {
    box-shadow: 10px 10px 0 #48bb78;
}

.card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #1a202c;
    transition: transform 0.2s ease;
}

.mode-card:hover .card-icon {
    transform: scale(1.1) rotate(-5deg);
}

.mode-card.selected .card-icon {
    color: #48bb78;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.mode-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #1a202c;
    -webkit-text-stroke: 1px #1a202c;
}

.mode-card p {
    font-size: 14px;
    color: #4a5568;
    font-weight: 600;
}

/* 待开发模式 - 禁用状态 */
.mode-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f7fafc;
    border-color: #a0aec0;
    box-shadow: 4px 4px 0 #a0aec0;
}

.mode-card.disabled:hover {
    transform: none;
    box-shadow: 4px 4px 0 #a0aec0;
}

.mode-card.disabled .card-icon {
    color: #a0aec0;
}

.mode-card.disabled h3 {
    color: #718096;
    -webkit-text-stroke: 1px #718096;
}

.mode-card.disabled p {
    color: #a0aec0;
    font-style: italic;
}

/* ========== 快速设置 ========== */
.quick-settings {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
    padding: 24px;
    background: #fff;
    border: 3px solid #1a202c;
    border-radius: 16px;
    box-shadow: 6px 6px 0 #1a202c;
}

.setting-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.setting-item label {
    font-size: 12px;
    color: #4a5568;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setting-item select {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 8px;
    color: #1a202c;
    cursor: pointer;
    min-width: 120px;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a202c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    box-shadow: 3px 3px 0 #1a202c;
}

.setting-item select:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #1a202c;
}

.setting-item select:focus {
    outline: none;
    border-color: #3182ce;
}

.setting-item select option {
    background: #fff;
    color: #1a202c;
    font-weight: 600;
}

/* ========== 开始按钮 ========== */
.btn-start {
    width: 100%;
    padding: 24px 48px;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    background: #48bb78;
    border: 3px solid #1a202c;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 6px 6px 0 #1a202c;
    letter-spacing: 8px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.btn-start:hover {
    background: #38a169;
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 #1a202c;
}

.btn-start:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0 #1a202c;
}

.btn-start:disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: 2px 2px 0 #a0aec0;
    letter-spacing: 4px;
    font-size: 18px;
}

.btn-secondary {
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
    background: #fff;
    border: 3px solid #1a202c;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0 #1a202c;
}

.btn-secondary:hover {
    background: #f7fafc;
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0 #1a202c;
}

.btn-secondary:active {
    transform: translate(0, 0);
    box-shadow: 1px 1px 0 #1a202c;
}

/* ========== 返回按钮 ========== */
.back-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    background: #fff;
    border: 3px solid #1a202c;
    border-radius: 12px;
    color: #1a202c;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0 #1a202c;
}

.back-btn:hover {
    background: #1a202c;
    color: #fff;
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0 #1a202c;
}

.back-btn:active {
    transform: translate(0, 0);
    box-shadow: 1px 1px 0 #1a202c;
}

/* ========== 章节标题 ========== */
.section-title {
    font-size: 32px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 32px;
    color: #1a202c;
    -webkit-text-stroke: 2px #1a202c;
}

/* ========== AI对战配置界面 ========== */
.battle-modes {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #4a5568;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0 #1a202c;
}

.mode-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #1a202c;
}

.mode-btn:active {
    transform: translate(0, 0);
    box-shadow: 1px 1px 0 #1a202c;
}

.mode-btn.active {
    background: #ebf8ff;
    border-color: #3182ce;
    color: #3182ce;
    box-shadow: 3px 3px 0 #3182ce;
}

.mode-btn.active:hover {
    box-shadow: 5px 5px 0 #3182ce;
}

.mode-desc {
    text-align: center;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 32px;
    font-weight: 600;
}

/* AI选择 */
.ai-selection {
    margin-bottom: 24px;
}

.ai-selection h3 {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.ai-btn {
    padding: 12px 8px;
    font-size: 12px;
    font-weight: 700;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 10px;
    color: #1a202c;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 3px 3px 0 #1a202c;
}

.ai-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #1a202c;
}

.ai-btn:active {
    transform: translate(0, 0);
    box-shadow: 1px 1px 0 #1a202c;
}

.ai-btn.selected {
    background: #ebf8ff;
    border-color: #3182ce;
    color: #3182ce;
    box-shadow: 3px 3px 0 #3182ce;
}

.ai-btn.selected:hover {
    box-shadow: 5px 5px 0 #3182ce;
}

.ai-btn .ai-name {
    font-weight: 800;
    display: block;
    margin-bottom: 2px;
}

.ai-btn .ai-difficulty {
    font-size: 10px;
    opacity: 0.7;
    font-weight: 600;
}

/* 已选AI */
.selected-ais {
    margin-bottom: 32px;
}

.selected-ais h3 {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 12px;
    font-weight: 700;
}

.selected-ais h3 span {
    color: #3182ce;
}

.selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 48px;
    padding: 12px;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 12px;
    box-shadow: 3px 3px 0 #1a202c;
}

.selected-ai-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #ebf8ff;
    border: 2px solid #3182ce;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1a202c;
    animation: tagIn 0.2s ease-out;
    box-shadow: 2px 2px 0 #3182ce;
}

@keyframes tagIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.selected-ai-tag .remove {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    font-weight: 800;
}

.selected-ai-tag .remove:hover {
    opacity: 1;
}

.placeholder {
    color: #a0aec0;
    font-size: 14px;
    font-weight: 600;
}

/* ========== 操作说明界面 ========== */
.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.control-card {
    background: #fff;
    border: 3px solid #1a202c;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 6px 6px 0 #1a202c;
    transition: all 0.2s ease;
}

.control-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 #1a202c;
}

.control-card.p1 {
    border-color: #3182ce;
    box-shadow: 6px 6px 0 #3182ce;
}

.control-card.p1:hover {
    box-shadow: 10px 10px 0 #3182ce;
}

.control-card.p2 {
    border-color: #e53e3e;
    box-shadow: 6px 6px 0 #e53e3e;
}

.control-card.p2:hover {
    box-shadow: 10px 10px 0 #e53e3e;
}

.player-badge {
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 20px;
    margin-bottom: 24px;
    border: 2px solid #1a202c;
    box-shadow: 3px 3px 0 #1a202c;
}

.control-card.p1 .player-badge {
    background: #ebf8ff;
    color: #3182ce;
    border-color: #3182ce;
    box-shadow: 3px 3px 0 #3182ce;
}

.control-card.p2 .player-badge {
    background: #fed7d7;
    color: #e53e3e;
    border-color: #e53e3e;
    box-shadow: 3px 3px 0 #e53e3e;
}

.key-group {
    margin-bottom: 20px;
}

.key-group:last-child {
    margin-bottom: 0;
}

.key-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 800;
    color: #1a202c;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 8px;
    box-shadow: 3px 3px 0 #1a202c;
    transition: all 0.1s ease;
}

.key:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #1a202c;
}

.key-space {
    min-width: 120px;
}

.key-group p {
    font-size: 14px;
    color: #4a5568;
    margin-top: 8px;
    font-weight: 600;
}

/* ========== 获胜界面 ========== */
.winner-screen {
    background: rgba(240, 244, 248, 0.98);
}

.winner-content {
    text-align: center;
    animation: winnerIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.winner-content h2 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 16px;
    color: #1a202c;
    -webkit-text-stroke: 3px #1a202c;
}

.final-score {
    font-size: 32px;
    color: #4a5568;
    font-weight: 700;
    margin-bottom: 40px;
    font-variant-numeric: tabular-nums;
}

.winner-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.winner-buttons .btn-start,
.winner-buttons .btn-secondary {
    width: auto;
    min-width: 160px;
}

/* ========== 混战模式计分板 ========== */
.ffa-score-board {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #1a202c;
    border-radius: 12px;
    padding: 18px 20px 12px 20px;
    z-index: 10;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    display: none;
    max-width: 90%;
    flex-wrap: wrap;
    justify-content: center;
    user-select: none;
}

.ffa-score-board.show {
    display: flex;
    flex-direction: row;
    gap: 20px;
    animation: fadeInUp 0.3s ease-out;
}

.ffa-score-board .drag-handle {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 8px;
    background: linear-gradient(180deg, rgba(100,100,100,0.6) 0%, rgba(60,60,60,0.8) 100%);
    border-radius: 4px;
    cursor: grab;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ffa-score-board .drag-handle::before {
    content: '≡';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1;
}

.ffa-score-board .drag-handle:hover {
    background: linear-gradient(180deg, rgba(120,120,120,0.7) 0%, rgba(80,80,80,0.9) 100%);
}

.ffa-score-board .drag-handle:active {
    cursor: grabbing;
}

.ffa-score-board.dragging {
    opacity: 0.8;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ffa-score-board h4 {
    font-size: 12px;
    color: #4a5568;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.ffa-score-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

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

.ffa-score-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #1a202c;
    flex-shrink: 0;
}

.ffa-score-name {
    color: #4a5568;
    font-weight: 700;
}

.ffa-score-value {
    font-weight: 800;
    color: #1a202c;
    margin-left: 4px;
}

/* ========== 过渡动画 ========== */
#transitionContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
}

/* 回合结算 */
.round-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.round-result-overlay.show {
    opacity: 1;
}

.round-result-title {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 8px;
    margin-bottom: 24px;
    -webkit-text-stroke: 2px #1a202c;
}

.round-result-winner {
    font-size: 64px;
    font-weight: 900;
    margin-bottom: 32px;
    -webkit-text-stroke: 3px #1a202c;
    animation: winnerPulse 1s ease-in-out infinite;
}

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

.round-result-scores {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 32px;
}

.round-result-score-item {
    text-align: center;
}

.round-result-score-label {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.round-result-score-value {
    font-size: 72px;
    font-weight: 900;
    -webkit-text-stroke: 2px #1a202c;
}

.round-result-divider {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    -webkit-text-stroke: 2px #1a202c;
}

.round-result-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 4px;
    font-weight: 600;
}

/* 清场动画 */
.clear-field-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clear-field-container.show {
    opacity: 1;
}

.clear-field-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 0;
    animation: flashEffect 0.5s ease-out;
}

@keyframes flashEffect {
    0% { opacity: 0.8; }
    100% { opacity: 0; }
}

.clear-field-wave {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.5) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: waveExpand 1s ease-out forwards;
}

@keyframes waveExpand {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200vw; height: 200vw; opacity: 0; }
}

.clear-field-scanline {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.3), transparent);
    animation: scanlineMove 1s ease-in-out forwards;
}

@keyframes scanlineMove {
    0% { left: -100%; }
    100% { left: 100%; }
}

.clear-field-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.clear-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: particleFade 1s ease-out forwards;
}

@keyframes particleFade {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

.clear-field-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    font-weight: 900;
    color: #fff;
    -webkit-text-stroke: 4px #1a202c;
    opacity: 0;
    animation: clearTextShow 0.5s ease-out 0.3s forwards;
}

@keyframes clearTextShow {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 中场休息 */
.intermission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.intermission-overlay.show {
    opacity: 1;
}

.intermission-title {
    font-size: 36px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 12px;
    margin-bottom: 16px;
}

.intermission-round {
    font-size: 72px;
    font-weight: 900;
    color: #fff;
    -webkit-text-stroke: 3px #1a202c;
    margin-bottom: 16px;
}

.intermission-map {
    font-size: 32px;
    font-weight: 700;
    color: #58a6ff;
    margin-bottom: 32px;
    -webkit-text-stroke: 1px #1a202c;
}

.intermission-waiting {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 4px;
    margin-bottom: 24px;
}

.intermission-progress {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.intermission-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #58a6ff, #238636);
    animation: progressFill 3s ease-out forwards;
}

@keyframes progressFill {
    0% { width: 0; }
    100% { width: 100%; }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .mode-cards {
        grid-template-columns: 1fr;
    }
    
    .quick-settings {
        flex-direction: column;
        gap: 16px;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .game-title {
        font-size: 36px;
    }
}

/* ========== 回合结算画面 - 与开始界面风格一致 ========== */
.anime-round-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 244, 248, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 200;
}

.anime-round-overlay.show {
    opacity: 1;
}

.round-result-card {
    background: #fff;
    border: 3px solid #1a202c;
    border-radius: 20px;
    padding: 40px 48px;
    min-width: 360px;
    text-align: center;
    box-shadow: 8px 8px 0 #1a202c;
    animation: cardSlideIn 0.5s ease-out;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 回合数头部 */
.round-result-header {
    margin-bottom: 24px;
}

.round-label {
    font-size: 14px;
    font-weight: 700;
    color: #4a5568;
    letter-spacing: 4px;
    margin-right: 8px;
}

.round-num {
    font-size: 36px;
    font-weight: 900;
    color: #1a202c;
    -webkit-text-stroke: 2px #1a202c;
}

/* 获胜信息区域 */
.round-winner-section {
    background: #f7fafc;
    border: 3px solid;
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 28px;
    position: relative;
}

.winner-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    border: 2px solid #1a202c;
}

.winner-text {
    font-size: 24px;
    font-weight: 900;
    -webkit-text-stroke: 1.5px #1a202c;
    margin-top: 8px;
}

/* 进度条区域 */
.round-progress-section {
    margin-bottom: 28px;
    text-align: left;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-label {
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    letter-spacing: 2px;
}

.progress-ratio {
    font-size: 13px;
    font-weight: 800;
    color: #1a202c;
}

.progress-track {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border: 2px solid #1a202c;
    border-radius: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s ease-out;
}

/* 下一张地图 */
.round-next-map {
    background: #f0fff4;
    border: 2px solid #48bb78;
    border-radius: 12px;
    padding: 16px 24px;
}

.next-map-label {
    font-size: 11px;
    font-weight: 700;
    color: #48bb78;
    letter-spacing: 3px;
    margin-bottom: 6px;
}

.next-map-name {
    font-size: 18px;
    font-weight: 800;
    color: #1a202c;
}

/* ========== 按键配置界面 ========== */
.btn-keyconfig {
    margin-top: 20px;
    padding: 12px 24px;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-keyconfig:hover {
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 #1a202c;
}

.key-config-section {
    margin-bottom: 32px;
}

.key-config-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.key-config-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.key-config-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.key-config-item label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
}

.key-binding {
    width: 60px;
    height: 48px;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-binding:hover {
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 #1a202c;
}

.key-binding.active {
    background: #4facfe;
    color: #fff;
    box-shadow: 3px 3px 0 #1a202c;
}

.key-binding.conflict {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.key-config-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.btn-reset {
    padding: 12px 24px;
    background: #fff;
    border: 2px solid #1a202c;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 #1a202c;
}

.btn-save {
    padding: 12px 32px;
    background: #4facfe;
    border: 2px solid #1a202c;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save:hover {
    background: #3d9bfa;
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 #1a202c;
}

.key-config-hint {
    margin-top: 16px;
    font-size: 12px;
    color: #718096;
    text-align: center;
}

/* ========== 自定义弹窗 ========== */
.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 32, 44, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.custom-dialog-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.custom-dialog {
    background: #fff;
    border: 3px solid #1a202c;
    border-radius: 20px;
    padding: 0;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 8px 8px 0 #1a202c;
    animation: dialogPopIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes dialogPopIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.custom-dialog-header {
    background: #f7fafc;
    padding: 16px 20px;
    border-bottom: 2px solid #1a202c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-dialog-icon {
    font-size: 20px;
}

.custom-dialog-title {
    font-size: 16px;
    font-weight: 800;
    color: #1a202c;
    letter-spacing: 2px;
}

.custom-dialog-body {
    padding: 24px 20px;
    text-align: center;
}

.custom-dialog-body p {
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

.custom-dialog-footer {
    padding: 16px 20px 20px;
    display: flex;
    justify-content: center;
}

.custom-dialog-btn {
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: #48bb78;
    border: 2px solid #1a202c;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0 #1a202c;
    letter-spacing: 2px;
}

.custom-dialog-btn:hover {
    background: #38a169;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #1a202c;
}

.custom-dialog-btn:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0 #1a202c;
}

/* 确认弹窗的双按钮样式 */
.custom-dialog-footer.confirm {
    gap: 12px;
}

.custom-dialog-btn.secondary {
    background: #fff;
    color: #1a202c;
}

.custom-dialog-btn.secondary:hover {
    background: #f7fafc;
}

/* ========== 最终结算页面 - AI排名 ========== */
.ai-ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #1a202c;
    border-radius: 12px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.ai-ranking-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
}

.ai-ranking-item.winner {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
    border-color: #d69e2e;
    box-shadow: 3px 3px 0 rgba(214, 158, 46, 0.4);
}

.ai-ranking-item.winner:hover {
    box-shadow: 5px 5px 0 rgba(214, 158, 46, 0.4);
}

.ai-ranking-rank {
    font-size: 24px;
    font-weight: 900;
    color: #1a202c;
    width: 40px;
    text-align: center;
    margin-right: 12px;
}

.ai-ranking-item.winner .ai-ranking-rank {
    color: #744210;
}

.ai-ranking-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #1a202c;
    margin-right: 12px;
    flex-shrink: 0;
}

.ai-ranking-name {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    text-align: left;
}

.ai-ranking-item.winner .ai-ranking-name {
    color: #744210;
}

.ai-ranking-score {
    font-size: 20px;
    font-weight: 800;
    color: #48bb78;
    margin-left: 12px;
}

.ai-ranking-item.winner .ai-ranking-score {
    color: #744210;
}

.ai-ranking-wins {
    font-size: 12px;
    color: #718096;
    margin-left: 8px;
    font-weight: 600;
}

.ai-ranking-item.winner .ai-ranking-wins {
    color: #975a16;
}


/* ========== ����Ծ����ý��� ========== */

/* ���鿨Ƭ������ʽ */
.chaos-team-card {
    border: 3px solid var(--tk-border);
    box-shadow: 4px 4px 0 var(--tk-shadow);
    transition: all 0.2s ease;
}

.chaos-team-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--tk-shadow);
}

/* ������ʽ - ʹ��ͳһ����ɫ */
.chaos-team-blue {
    --tk-border: #3182ce;
    --tk-shadow: rgba(49, 130, 206, 0.3);
}

.chaos-team-blue .chaos-team-title {
    color: #3182ce;
}

.chaos-team-blue .chaos-team-tag {
    background: rgba(49, 130, 206, 0.15);
    color: #3182ce;
    border: 2px solid #3182ce;
}

.chaos-team-blue .chaos-team-list {
    height: 152px;
    min-height: 152px;
    max-height: 152px;
    background: rgba(49, 130, 206, 0.05);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    overflow-y: auto;
    box-sizing: border-box;
}

.chaos-team-blue .chaos-placeholder {
    color: #a0aec0;
    font-size: 13px;
}

.chaos-team-blue .chaos-clear-btn {
    width: 100%;
    font-size: 12px;
    color: #718096;
    border: 2px solid #e2e8f0;
}

.chaos-team-blue .chaos-clear-btn:hover {
    color: #3182ce;
    border-color: #3182ce;
    background: rgba(49, 130, 206, 0.05);
}

/* �����ʽ - ʹ��ͳһ�ĺ�ɫ */
.chaos-team-red {
    --tk-border: #e53e3e;
    --tk-shadow: rgba(229, 62, 62, 0.3);
}

.chaos-team-red .chaos-team-title {
    color: #e53e3e;
}

.chaos-team-red .chaos-team-tag {
    background: rgba(229, 62, 62, 0.15);
    color: #e53e3e;
    border: 2px solid #e53e3e;
}

.chaos-team-red .chaos-team-list {
    height: 152px;
    min-height: 152px;
    max-height: 152px;
    background: rgba(229, 62, 62, 0.05);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    overflow-y: auto;
    box-sizing: border-box;
}

.chaos-team-red .chaos-placeholder {
    color: #a0aec0;
    font-size: 13px;
}

.chaos-team-red .chaos-clear-btn {
    width: 100%;
    font-size: 12px;
    color: #718096;
    border: 2px solid #e2e8f0;
}

.chaos-team-red .chaos-clear-btn:hover {
    color: #e53e3e;
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.05);
}

/* ������� */
.chaos-team-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

/* ͼ����ʽ */
.chaos-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.chaos-team-blue .chaos-icon {
    color: #3182ce;
}

.chaos-team-red .chaos-icon {
    color: #e53e3e;
}

/* ��Ա����ʽ */
.chaos-member-pool {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
}

.chaos-member-pool .tk-setting-label {
    color: #4a5568;
    font-weight: 700;
}

/* ��Ա��ť��ʽ - ����ɫ */
.chaos-member-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chaos-member-btn:hover {
    border-color: #4a5568;
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
}

.chaos-member-btn .chaos-member-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* ��ҳ�Ա */
.chaos-member-btn.player {
    color: #2d3748;
}

.chaos-member-btn.player:hover {
    border-color: #2d3748;
    background: rgba(45, 55, 72, 0.05);
}

/* AI��Ա */
.chaos-member-btn.ai {
    color: #4a5568;
}

.chaos-member-btn.ai:hover {
    border-color: #4a5568;
    background: rgba(74, 85, 104, 0.05);
}

/* �����Ա�� - �̶��߶ȱ��ⶶ�� */
.chaos-team-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.chaos-team-member:last-child {
    margin-bottom: 0;
}

.chaos-team-member-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chaos-team-member-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    color: #4a5568;
}

.chaos-team-member-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.chaos-team-member-remove {
    padding: 4px 8px;
    font-size: 12px;
    color: #a0aec0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.chaos-team-member-remove:hover {
    color: #e53e3e;
}

/* ========== AI加载界面 - 动漫描边简洁风格 ========== */
.ai-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #f0f4f8 0%, #e2e8f0 50%, #cbd5e0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ai-loading-screen.show {
    opacity: 1;
    visibility: visible;
}

.ai-loading-container {
    width: 100%;
    max-width: 560px;
    padding: 48px;
    background: #fff;
    border: 4px solid #1a202c;
    border-radius: 24px;
    box-shadow: 10px 10px 0 #1a202c;
    animation: loadingContainerIn 0.5s ease-out;
}

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

/* 加载界面头部 */
.ai-loading-header {
    text-align: center;
    margin-bottom: 32px;
}

.ai-loading-title {
    font-size: 36px;
    font-weight: 900;
    color: #1a202c;
    margin: 0 0 12px 0;
    -webkit-text-stroke: 2px #1a202c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.loading-icon {
    font-size: 32px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.ai-loading-subtitle {
    font-size: 16px;
    color: #4a5568;
    font-weight: 600;
    letter-spacing: 2px;
}

/* 进度条区域 */
.loading-progress-section {
    margin-bottom: 28px;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-bar-bg {
    flex: 1;
    height: 20px;
    background: #e2e8f0;
    border: 3px solid #1a202c;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 50%, #48bb78 100%);
    background-size: 200% 100%;
    border-radius: 8px;
    transition: width 0.3s ease;
    animation: progressShine 2s linear infinite;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: progressShine 1.5s linear infinite;
}

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

.progress-text {
    font-size: 20px;
    font-weight: 800;
    color: #1a202c;
    min-width: 56px;
    text-align: right;
    -webkit-text-stroke: 1px #1a202c;
}

/* 加载状态列表 */
.loading-status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 8px;
}

.loading-status-list::-webkit-scrollbar {
    width: 6px;
}

.loading-status-list::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 3px;
}

.loading-status-list::-webkit-scrollbar-thumb {
    background: #a0aec0;
    border-radius: 3px;
}

.loading-status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.loading-status-item.loading {
    border-color: #3182ce;
    background: #ebf8ff;
    animation: itemPulse 1.5s ease-in-out infinite;
}

.loading-status-item.success {
    border-color: #48bb78;
    background: #f0fff4;
}

.loading-status-item.error {
    border-color: #f56565;
    background: #fff5f5;
}

@keyframes itemPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(49, 130, 206, 0.2); }
    50% { box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.1); }
}

.status-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.status-icon.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.status-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a202c;
}

.status-detail {
    font-size: 12px;
    color: #718096;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-badge.loading {
    background: #3182ce;
    color: #fff;
}

.status-badge.success {
    background: #48bb78;
    color: #fff;
}

.status-badge.error {
    background: #f56565;
    color: #fff;
}

.status-badge.player {
    background: #ed8936;
    color: #fff;
}

/* 加载提示 */
.loading-tips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    font-size: 14px;
    color: #92400e;
    font-weight: 600;
}

.tip-icon {
    font-size: 18px;
}

.tip-text {
    animation: tipFade 0.5s ease;
}

@keyframes tipFade {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 完成状态 */
.ai-loading-complete {
    text-align: center;
    padding: 20px;
}

.ai-loading-complete .complete-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: completeBounce 0.6s ease;
}

@keyframes completeBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.ai-loading-complete .complete-text {
    font-size: 24px;
    font-weight: 800;
    color: #1a202c;
    -webkit-text-stroke: 1.5px #1a202c;
}

