* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #fdf2f8 0%, #dbeafe 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: #2d3748;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a202c;
    text-shadow: 0 2px 4px rgba(255,255,255,0.5);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 300;
    color: #4a5568;
}

/* 控制区域样式 */
.control-section {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: end;
}

.control-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
}

/* 主内容区域 - 三栏布局 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    align-items: start;
    min-height: 600px;
}

.composition-panel, .recommendation-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: fit-content;
}

.composition-panel h3, .recommendation-panel h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    text-align: center;
}

.enemy-panel h3 {
    color: #e53e3e;
    border-bottom-color: #e53e3e;
}

.team-panel h3 {
    color: #48bb78;
    border-bottom-color: #48bb78;
}

/* 角色组样式 */
.role-group {
    margin-bottom: 20px;
}

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

.role-group h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #4a5568;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 8px;
}

/* 游戏模式选择 */
.mode-selector {
    display: flex;
    gap: 10px;
}

.mode-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.mode-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

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

/* 地图选择 */
.map-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.map-select:focus {
    outline: none;
    border-color: #667eea;
}

/* 角色计数 */
.role-count {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 400;
}

/* 英雄槽位 */
.hero-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 80px;
    padding: 15px;
    border: 2px dashed #e2e8f0;
    border-radius: 18px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
    background: rgba(255, 255, 255, 0.3);
}

.hero-slots.can-drop {
    border-color: #48bb78;
    background-color: rgba(72, 187, 120, 0.1);
}

.hero-slot {
    width: 240px;
    height: 60px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    padding: 8px;
    gap: 12px;
}

.hero-slot:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.98);
}

.hero-slot img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.hero-slot .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 0;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 15;
    opacity: 0;
    transform: scale(0.7) translateY(2px);
    backdrop-filter: blur(4px);
    text-indent: -9999px;
    overflow: hidden;
}

.hero-slot:hover .remove-btn {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.hero-slot .remove-btn:hover {
    transform: scale(1.2) translateY(-1px);
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
    border-color: white;
}

.hero-slot .remove-btn:active {
    transform: scale(0.9) translateY(0);
    box-shadow: 0 1px 4px rgba(255, 82, 82, 0.3);
}

.hero-slot .remove-btn::before {
    content: '×';
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
    font-size: 11px;
    font-weight: 800;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
    color: white;
}

.hero-slot .hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.hero-slot .hero-name {
    color: #2d3748;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* 英雄网格 */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f7fafc;
}

.hero-card {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 2px solid transparent;
}

.hero-card:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.hero-card.selected {
    border-color: #48bb78;
    box-shadow: 0 0 0 2px rgba(72, 187, 120, 0.3);
}

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

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card .hero-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 10px;
    padding: 2px 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 推荐结果 */
.recommendations {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-style: italic;
}

.recommendation-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease;
}

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

.recommendation-item.high-score {
    border-left-color: #48bb78;
}

.recommendation-item.medium-score {
    border-left-color: #ed8936;
}

.recommendation-item.low-score {
    border-left-color: #e53e3e;
}

.recommendation-hero {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
}

.recommendation-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommendation-info {
    flex: 1;
}

.recommendation-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 4px;
}

.recommendation-role {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 8px;
}

.recommendation-details {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #4a5568;
}

.recommendation-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-left: 15px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #667eea;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .config-panel, .recommendation-panel {
        padding: 20px;
        border-radius: 15px;
    }

    .hero-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 8px;
    }

    .hero-card {
        width: 50px;
        height: 50px;
    }

    .mode-selector {
        flex-direction: column;
    }
}

/* 滚动条样式 */
.hero-grid::-webkit-scrollbar {
    width: 6px;
}

.hero-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.hero-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.hero-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 角色选择器样式 */
.role-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.role-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.role-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 推荐按钮样式 */
.recommend-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.recommend-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

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

/* 竖列排放的英雄槽位 */
.hero-slots.vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: auto;
    padding: 8px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.hero-slots.vertical .hero-slot {
    width: 180px;
    height: 60px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    padding: 6px;
    gap: 10px;
    margin: 0 auto;
}

.hero-slots.vertical .hero-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.hero-slots.vertical .hero-slot img {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.hero-slots.vertical .hero-slot .hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.hero-slots.vertical .hero-slot .hero-name {
    color: #2d3748;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.hero-slots.vertical .hero-slot .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 0;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 15;
    opacity: 0;
    transform: scale(0.7) translateY(1px);
    backdrop-filter: blur(4px);
    text-indent: -9999px;
    overflow: hidden;
}

.hero-slots.vertical .hero-slot:hover .remove-btn {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.hero-slots.vertical .hero-slot .remove-btn:hover {
    transform: scale(1.15) translateY(-1px);
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    box-shadow: 0 4px 10px rgba(255, 82, 82, 0.4), 0 2px 4px rgba(0, 0, 0, 0.15);
    border-color: white;
}

.hero-slots.vertical .hero-slot .remove-btn:active {
    transform: scale(0.9) translateY(0);
    box-shadow: 0 1px 3px rgba(255, 82, 82, 0.3);
}

.hero-slots.vertical .hero-slot .remove-btn::before {
    content: '×';
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1;
    font-size: 10px;
    font-weight: 800;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-indent: 0;
    color: white;
}

/* 英雄槽位容器 */
.hero-slot-container {
    position: relative;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    width: 100%;
}

/* 添加英雄按钮 */
.add-hero-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    color: #718096;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-hero-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* 推荐位置样式 */
.recommend-slot {
    position: relative;
    margin-top: 8px;
}

.recommend-slot::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 16px;
    z-index: -1;
    opacity: 0.1;
}

.recommend-slot-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

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

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

/* 推荐英雄槽位样式 */
.recommend-hero-slot {
    width: 180px;
    height: 60px;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3), 0 2px 4px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    overflow: hidden;
    margin: 0 auto;
    padding: 8px;
    gap: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.recommend-hero-slot:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4), 0 4px 8px rgba(0,0,0,0.06);
    border-color: rgba(255, 255, 255, 0.4);
}

.recommend-hero-slot img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.recommend-hero-slot .hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.recommend-hero-slot .hero-name {
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    margin-bottom: 2px;
}

.recommend-hero-slot .hero-score {
    color: rgba(255,255,255,0.9);
    font-size: 10px;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.recommend-hero-slot .add-recommend-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(255,255,255,0.9);
    color: #667eea;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.recommend-hero-slot .add-recommend-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* 根据分数等级的颜色 */
.recommend-hero-slot.high-score {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.recommend-hero-slot.high-score:hover {
    box-shadow: 0 4px 16px rgba(72, 187, 120, 0.4);
}

.recommend-hero-slot.medium-score {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
}

.recommend-hero-slot.medium-score:hover {
    box-shadow: 0 4px 16px rgba(237, 137, 54, 0.4);
}

.recommend-hero-slot.low-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 英雄选择弹窗样式 */
.hero-selection-content {
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-header h2 {
    margin: 0;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-body {
    padding: 0;
}

/* 过滤按钮样式 */
.role-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 弹窗中的英雄网格 */
#heroSelectionGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f9fafb;
}

#heroSelectionGrid .hero-card {
    width: 80px;
    height: 91px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

#heroSelectionGrid .hero-card:hover {
    transform: translateY(-3px);
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

#heroSelectionGrid .hero-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#heroSelectionGrid .hero-card.disabled:hover {
    transform: none;
    border-color: #e2e8f0;
    box-shadow: none;
}

#heroSelectionGrid .hero-card img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-bottom: 4px;
}

#heroSelectionGrid .hero-card .hero-name {
    position: static;
    background: none;
    color: #4a5568;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .control-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .composition-panel {
        order: 2;
    }

    .recommendation-panel {
        order: 1;
    }

    .team-panel {
        order: 3;
    }
}

@media (max-width: 768px) {
    .control-grid {
        grid-template-columns: 1fr;
    }

    .role-selector, .role-filter {
        justify-content: center;
    }

    .hero-selection-content {
        width: 98%;
        margin: 2% auto;
        padding: 20px;
    }

    #heroSelectionGrid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 10px;
    }

    #heroSelectionGrid .hero-card {
        width: 70px;
        height: 70px;
    }

    #heroSelectionGrid .hero-card img {
        width: 40px;
        height: 40px;
    }
}
