/* 全局样式 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.navbar {
    margin-bottom: 0;
}

/* 主内容区域样式 */
.container {
    flex: 1;
}

/* 页脚样式 */
.footer {
    margin-top: 2rem;
}

/* 队伍卡片样式 */
.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.team-card .card-body {
    padding: 1.5rem;
}

.team-card .card-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.team-score {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.team-details {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* 红队样式 */
.team-red {
    border: 2px solid #dc3545;
}

.team-red .card-header {
    background-color: #dc3545;
    color: white;
    font-weight: bold;
}

.team-red .card-body {
    background-color: rgba(220, 53, 69, 0.05);
}

.team-red .team-score {
    color: #dc3545;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* 黄队样式 */
.team-yellow {
    border: 2px solid #ffc107;
}

.team-yellow .card-header {
    background-color: #ffc107;
    color: #212529;
    font-weight: bold;
}

.team-yellow .card-body {
    background-color: rgba(255, 193, 7, 0.05);
}

.team-yellow .team-score {
    color: #ffc107;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* 蓝队样式 */
.team-blue {
    border: 2px solid #007bff;
}

.team-blue .card-header {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.team-blue .card-body {
    background-color: rgba(0, 123, 255, 0.05);
}

.team-blue .team-score {
    color: #007bff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* 绿队样式 */
.team-green {
    border: 2px solid #28a745;
}

.team-green .card-header {
    background-color: #28a745;
    color: white;
    font-weight: bold;
}

.team-green .card-body {
    background-color: rgba(40, 167, 69, 0.05);
}

.team-green .team-score {
    color: #28a745;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* 成绩录入表单样式 */
select option.bg-danger {
    background-color: #dc3545;
    color: white;
}

select option.bg-warning {
    background-color: #ffc107;
}

select option.bg-primary {
    background-color: #007bff;
    color: white;
}

select option.bg-success {
    background-color: #28a745;
    color: white;
}

/* 队伍标签样式 */
.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-primary {
    background-color: #007bff !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

/* 表格行颜色增强 */
.table-danger {
    background-color: rgba(220, 53, 69, 0.15) !important;
    font-weight: 500;
}

.table-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    font-weight: 500;
}

.table-primary {
    background-color: rgba(0, 123, 255, 0.15) !important;
    font-weight: 500;
}

.table-success {
    background-color: rgba(40, 167, 69, 0.15) !important;
    font-weight: 500;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn {
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

/* 标签页样式 */
.nav-tabs .nav-link {
    color: var(--secondary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .team-card {
        margin-bottom: 1.5rem;
    }
    
    .team-score {
        font-size: 2rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}