.panel-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.panel-card .panel-header {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.panel-card .panel-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.panel-card .panel-header h5 i {
    font-size: 0.8rem;
}
.panel-card .panel-body {
    padding: 0.75rem;
    flex: 1;
    overflow-y: auto;
}
.deploy-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 0.35rem;
    transition: all 0.2s;
    background: var(--glass-bg);
}
.deploy-item:hover {
    border-color: var(--primary);
    background: var(--glass-bg-hover);
}
.deploy-item .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    flex-shrink: 0;
}
.deploy-item .status-dot.running { background: var(--success); }
.deploy-item .status-dot.stopped { background: var(--danger); }
.deploy-item .status-dot.creating { background: var(--info); }
.deploy-item .status-dot.error { background: var(--warning); }
.deploy-item .deploy-info {
    flex: 1;
    min-width: 0;
}
.deploy-item .deploy-name {
    font-weight: 500;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}
.deploy-item .deploy-meta {
    font-size: 0.65rem;
    color: var(--text-muted);
}
.deploy-item .deploy-actions {
    display: flex;
    gap: 0.2rem;
}
.deploy-item .deploy-actions .btn {
    padding: 0.15rem 0.35rem;
    font-size: 0.65rem;
}
.challenge-item {
    padding: 0.5rem 0.6rem;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--glass-bg);
}
.challenge-item:hover {
    border-color: var(--primary);
    background: var(--glass-bg-hover);
}
.challenge-item.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.1));
}
.challenge-item .challenge-name {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-primary);
}
.challenge-item .challenge-name i {
    font-size: 0.7rem;
}
.challenge-item .challenge-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.deploy-config {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
}
.deploy-config.hidden { display: none; }
.btn-deploy {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    font-weight: 600;
}
.btn-deploy:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: white;
}
.btn-deploy:disabled {
    opacity: 0.5;
}
.empty-panel {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}
.empty-panel i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.stats-mini {
    display: flex;
    gap: 0.5rem;
    font-size: 0.65rem;
}
.stats-mini .stat-item {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
.stats-mini .stat-item i { font-size: 0.5rem; }
.stats-mini .stat-item.running { color: var(--success); }
.stats-mini .stat-item.stopped { color: var(--danger); }
.stats-mini .stat-item.total { color: var(--text-muted); }
/* 部署配置栏 */
.config-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}
.config-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}
.config-placeholder p {
    font-size: 0.85rem;
    margin: 0;
}
.deploy-config-form {
    display: none;
}
.deploy-config-form.active {
    display: block;
}
.selected-challenge-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.05));
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 0.6rem;
    margin-bottom: 0.75rem;
}
.selected-challenge-info .name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.selected-challenge-info .meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.deployment-progress {
    display: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-top: 1rem;
}
.deployment-progress.active { display: block; }
.deployment-logs {
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    min-height: 150px;
    max-height: 250px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}
/* 防止部署过程中布局变化 */
.panel-card {
    min-width: 0;
}
/* 三栏布局：部署列表 + 题目列表 + 部署配置 */
.deploy-grid {
    display: grid;
    grid-template-columns: 280px 1fr 380px;
    gap: 0.75rem;
    align-items: stretch;
    min-height: calc(100vh - 200px);
}
@media (max-width: 1200px) {
    .deploy-grid {
        grid-template-columns: 250px 1fr 340px;
    }
}
@media (max-width: 992px) {
    .deploy-grid {
        grid-template-columns: 1fr 1fr;
    }
    .deploy-config-col {
        grid-column: 1 / -1;
    }
}
@media (max-width: 768px) {
    .deploy-grid {
        grid-template-columns: 1fr;
    }
}
/* 搜索框样式 */
.search-box {
    margin-bottom: 0.75rem;
}
.search-box input {
    width: 100%;
}
/* 模态框样式 */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    background-color: rgba(0, 0, 0, 0.5);
}
    display: block;
}
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
}
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--glass-border);
    gap: 0.5rem;
}
.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
}
.btn-close:hover {
    color: var(--text-primary);
}
