body { background-color: #f8f9fa; margin: 0; }
.sidebar {
    width: 180px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.sidebar .nav-link { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar .nav-link:hover { background-color: rgba(255,255,255,0.15); }
.sidebar .nav-link.active { font-weight: bold; }
.main-content { min-height: 100vh; overflow-x: auto; }
.card { transition: transform 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.score-input { width: 70px; text-align: center; padding: 2px 4px; }
.score-input:read-only { background-color: #e9ecef; cursor: not-allowed; }
.score-input.is-valid { background-color: #d4edda; }
.score-input.is-invalid { background-color: #f8d7da; }
#score-table th { text-align: center; vertical-align: middle; }
#score-table td { text-align: center; vertical-align: middle; }
.total-cell { background-color: #fff3cd; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { background-color: rgba(0,0,0,0.1); }
.sort-icon { font-size: 10px; opacity: 0.5; }
.sort-icon.sort-active { opacity: 1; color: #0d6efd; }
.filter-input { width: 70px; font-size: 11px; padding: 1px 3px; }
.filter-row th { padding: 2px !important; }

/* 冻结列样式 */
#score-table thead th {
    position: sticky;
    top: 0;
    background-color: #b6d4fe;
    z-index: 10;
}

.freeze-col {
    position: sticky;
    background-color: #fff;
    z-index: 5;
}

.freeze-col-1 {
    left: 0;
    z-index: 15;
}

.freeze-col-2 {
    left: 50px;
    z-index: 15;
}

#score-table thead .freeze-col {
    z-index: 20;
}

/* 手机端汉堡按钮 */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1100;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 24px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 手机端遮罩层 */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 手机端响应式 */
@media (max-width: 768px) {
    /* 显示汉堡按钮 */
    .sidebar-toggle {
        display: block;
    }
    
    /* 侧边栏默认隐藏在左侧外 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1050;
        transform: translateX(-100%);
        width: 240px;
        box-shadow: 2px 0 8px rgba(0,0,0,0.3);
    }
    
    /* 侧边栏展开状态 */
    .sidebar.show {
        transform: translateX(0);
    }
    
    /* 遮罩层展开状态 */
    .sidebar-backdrop.show {
        display: block;
        opacity: 1;
    }
    
    /* 主内容区占满全屏 */
    .main-content {
        width: 100%;
        padding: 0 !important;
    }
    
    .main-content .container-fluid {
        padding: 60px 8px 8px 8px !important;
    }
    
    /* 表格字体缩小 */
    #score-table {
        font-size: 12px;
    }
    
    #score-table th,
    #score-table td {
        padding: 4px 2px !important;
    }
    
    .score-input {
        width: 50px;
        font-size: 12px;
    }
    
    /* 手机端冻结列位置调整 */
    .freeze-col-1 {
        left: 0;
    }
    
    .freeze-col-2 {
        left: 50px;
    }
    
    /* 卡片间距缩小 */
    .card {
        margin-bottom: 10px;
    }
    
    /* 按钮字体缩小 */
    .btn {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .sidebar {
        width: 200px;
    }
    
    #score-table {
        font-size: 11px;
    }
    
    .score-input {
        width: 45px;
        font-size: 11px;
    }
    
    .main-content .container-fluid {
        padding: 60px 4px 4px 4px !important;
    }
    
    /* 超小屏冻结列宽度调整 */
    .freeze-col-1 {
        width: 40px !important;
    }
    
    .freeze-col-2 {
        left: 40px;
        width: 70px !important;
    }
}
