/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

#app {
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #409eff;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.nav-menu {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: transparent;
    border: 2px solid #e4e7ed;
    color: #606266;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-btn:hover {
    border-color: #409eff;
    color: #409eff;
    transform: translateY(-2px);
}

.nav-btn.active {
    background: #409eff;
    border-color: #409eff;
    color: white;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

/* 主要内容区域 */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.page-header h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
}

/* 卡片样式 */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card, .filter-card, .filter-info-card, .summary-card, .table-card,
.query-section, .analysis-content, .bond-content, .team-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

.info-card .card-body p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* 表单样式 */
.filter-form, .analysis-form, .bond-form, .team-form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-select, .form-input {
    padding: 12px 16px;
    border: 2px solid #e4e7ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-select:focus, .form-input:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    align-items: end;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #409eff 0%, #36a3f7 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #36a3f7 0%, #2d8de8 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #909399 0%, #82848a 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #82848a 0%, #73767a 100%);
}

.btn-icon {
    font-size: 16px;
}

/* 筛选标签 */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    background: #f0f9ff;
    color: #0369a1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #bae6fd;
}

/* 统计摘要 */
.summary-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.summary-item .label {
    font-weight: 600;
    color: #666;
}

.summary-item .value {
    font-size: 20px;
    color: #409eff;
    font-weight: bold;
}

/* 表格样式 */
.table-content {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-table th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
    font-size: 14px;
}

.data-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 14px;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
}

.tag-success {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.tag-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fed7aa;
}

.tag-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.tag-info {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.tag-primary {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #409eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 16px;
}

/* 无数据状态 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-data p {
    font-size: 16px;
    margin: 0;
}

/* 分页 */
.pagination-wrapper {
    margin-top: 20px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    background: white;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pagination-btn:hover {
    border-color: #409eff;
    color: #409eff;
}

.pagination-btn.active {
    background: #409eff;
    border-color: #409eff;
    color: white;
}

.pagination-btn:disabled {
    background: #f5f5f5;
    color: #c0c4cc;
    cursor: not-allowed;
    border-color: #e4e7ed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .nav-menu {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .page-header p {
        font-size: 16px;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .summary-content {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .nav-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .card-header {
        padding: 15px;
        font-size: 16px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* 团队分组增强样式 */
.player-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    background: #f8f9ff;
}

.player-checkbox {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.player-checkbox:hover {
    border-color: #409eff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
}

.player-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #409eff;
}

.player-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.player-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.player-stats {
    font-size: 12px;
    color: #666;
}

.selection-count {
    color: #409eff;
    font-size: 14px;
    font-weight: 500;
}

.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
    padding: 40px;
    font-style: italic;
}

/* 团队结果增强样式 */
.team-results .teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    border-color: #409eff;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(64, 158, 255, 0.2);
}

.team-header h4 {
    color: #409eff;
    margin: 0;
}

.team-score {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.team-members {
    space: 8px 0;
}

.team-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.team-member:last-child {
    border-bottom: none;
}

.member-name {
    font-weight: 500;
    color: #333;
}

.member-score {
    color: #409eff;
    font-size: 14px;
    font-weight: 600;
}

.division-stats {
    margin-top: 20px;
    padding: 15px;
    background: rgba(64, 158, 255, 0.1);
    border-radius: 8px;
}

.division-stats h4 {
    color: #409eff;
    margin-bottom: 10px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.stats-row span {
    color: #666;
    font-size: 14px;
}