
/* CSS Document */

        :root {
            --primary: #FF6B8B;
            --secondary: #6A89CC;
            --success: #78E08F;
            --warning: #F8C471;
            --info: #82CCDD;
            --light: #F8F9FA;
            --dark: #2C3A47;
            --border-radius: 16px;
            --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
            --gradient-primary: linear-gradient(135deg, #FF6B8B, #FF8E53);
            --gradient-secondary: linear-gradient(135deg, #FF6B8B, #FF8E53);
            --gradient-success: linear-gradient(135deg, #78E08F, #38ADA9);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Comic Sans MS', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            color: var(--dark);
            line-height: 1.6;
            min-height: 100vh;
            padding: 20px;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
        }
        
        header {
            background: var(--gradient-primary);
            color: white;
            padding: 25px;
            border-radius: var(--border-radius);
            margin-bottom: 25px;
            box-shadow: var(--box-shadow);
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        header::before {
            content: "";
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
            z-index: 0;
        }
        
        h1 {
            margin-bottom: 10px;
            font-size: 2.5rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
            position: relative;
            z-index: 1;
        }
        
        .subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
            position: relative;
            z-index: 1;
        }
        
        .card {
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 25px;
            margin-bottom: 25px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        
        .card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 8px;
            background: var(--gradient-primary);
        }
        
        .card:hover {
            transform: translateY(-8px);
            box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
        }
        
        .card-title {
            font-size: 1.4rem;
            margin-bottom: 20px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .card-title i {
            font-size: 1.6rem;
        }
        
        .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--gradient-primary);
            color: white;
            padding: 12px 20px;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 600;
            text-decoration: none;
            margin-right: 10px;
            margin-bottom: 10px;
            box-shadow: 0 4px 10px rgba(255, 107, 139, 0.3);
        }
        
        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 15px rgba(255, 107, 139, 0.4);
        }
        
        .btn-success {
            background: var(--gradient-success);
            box-shadow: 0 4px 10px rgba(120, 224, 143, 0.3);
        }
        
        .btn-success:hover {
            box-shadow: 0 6px 15px rgba(120, 224, 143, 0.4);
        }
        
        .btn-secondary {
            background: var(--gradient-secondary);
            box-shadow: 0 4px 10px rgba(106, 137, 204, 0.3);
        }
        
        .btn-secondary:hover {
            box-shadow: 0 6px 15px rgba(106, 137, 204, 0.4);
        }
        
        .btn-warning {
            background: linear-gradient(135deg, #F8C471, #F39C12);
            box-shadow: 0 4px 10px rgba(248, 196, 113, 0.3);
        }
        
        .btn-warning:hover {
            box-shadow: 0 6px 15px rgba(248, 196, 113, 0.4);
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--dark);
        }
        
        input, select {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #E0E0E0;
            border-radius: 12px;
            font-size: 1rem;
            transition: border-color 0.3s;
        }
        
        input:focus, select:focus {
            border-color: var(--primary);
            outline: none;
        }
        
        .file-input {
            display: none;
        }
        
        .file-label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--gradient-secondary);
            color: white;
            padding: 12px 20px;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 600;
            box-shadow: 0 4px 10px rgba(106, 137, 204, 0.3);
        }
        
        .file-label:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 15px rgba(106, 137, 204, 0.4);
        }
        
        .tabs {
            display: flex;
            margin-bottom: 25px;
            border-radius: var(--border-radius);
            background: white;
            box-shadow: var(--box-shadow);
            overflow: hidden;
        }
        
        .tab {
            flex: 1;
            padding: 15px 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 600;
            color: var(--dark);
            position: relative;
        }
        
        .tab.active {
            background: var(--gradient-primary);
            color: white;
        }
        
        .tab:not(.active):hover {
            background: rgba(255, 107, 139, 0.1);
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .stats-container {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
        }
        
        .stat-card {
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 20px;
            text-align: center;
            transition: transform 0.3s ease;
        }
        
        .stat-card:hover {
            transform: translateY(-5px);
        }
        
        .stat-icon {
            font-size: 2.5rem;
            margin-bottom: 15px;
            color: var(--primary);
        }
        
        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 5px;
            color: var(--dark);
        }
        
        .stat-label {
            font-size: 1rem;
            color: #666;
        }

        /* 新增小组平均分样式 */
        .group-stats-container {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-top: 25px;
            padding-top: 15px;
            border-top: 1px solid #eee;
        }
        
        .group-stat-card {
            flex: 1 1 200px; /* Flexible width */
            background: var(--light);
            border-left: 5px solid var(--secondary);
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }
        
        .group-stat-label {
            font-weight: 600;
            color: var(--secondary);
            margin-bottom: 5px;
        }
        
        .group-stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--dark);
        }
        /* 结束新增小组平均分样式 */
        
        .chart-container {
            height: 300px;
            position: relative;
            margin-top: 20px;
        }
        
        .action-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            flex-wrap: wrap;
        }
        
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 15px 25px;
            background: var(--gradient-success);
            color: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            transform: translateX(150%);
            transition: transform 0.3s ease;
            z-index: 1000;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .notification.show {
            transform: translateX(0);
        }
        
        .student-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
        }
        
        .student-card {
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 15px;
            transition: all 0.3s;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        .student-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: var(--gradient-primary);
        }
        
        .student-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
        }
        
        .student-avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: var(--gradient-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 10px;
            color: white;
            font-size: 1.5rem;
        }
        
        .student-name {
            font-weight: 700;
            margin-bottom: 5px;
            font-size: 1rem;
        }
        
        .student-id {
            color: #777;
            margin-bottom: 10px;
            font-size: 0.8rem;
        }
        
        .score {
            display: flex;
            justify-content: space-around;
            margin-top: 10px;
        }
        
        .score-item {
            text-align: center;
        }
        
        .score-value {
            font-weight: 700;
            font-size: 1.2rem;
            color: var(--primary);
        }
        
        .score-label {
            font-size: 0.8rem;
            color: #777;
        }
        
        .registration-container {
            display: flex;
            gap: 20px;
            height: 600px;
        }
        
        .item-list {
            flex: 1;
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 15px;
            overflow-y: auto;
        }
        
        .item-card {
            padding: 12px;
            margin-bottom: 10px;
            border-radius: 12px;
            background: #f8f9fa;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 12px;
            position: relative; /* 允许绝对定位删除按钮 */
        }

        /* 操行登记项目卡片中删除按钮的样式 */
        .item-card .delete-item {
            position: absolute;
            top: 50%;
            right: 15px;
            transform: translateY(-50%);
            color: var(--primary);
            cursor: pointer;
            opacity: 0.5;
            transition: opacity 0.3s;
            font-size: 1.2rem;
        }

        .item-card .delete-item:hover {
            opacity: 1;
            color: #c0392b; /* 更深的红色 */
        }
        
        .item-card.active {
            background: var(--gradient-primary);
            color: white;
        }
        
        .item-card:not(.active):hover {
            background: rgba(255, 107, 139, 0.1);
        }
        
        .item-icon {
            font-size: 1.4rem;
            width: 40px;
            text-align: center;
        }
        
        .item-content h3 {
            margin-bottom: 3px;
            font-size: 1rem;
        }
        
        .item-content p {
            font-size: 0.8rem;
            opacity: 0.8;
        }
        
        .add-custom-item {
            margin-top: 15px;
            padding: 10px;
            background: rgba(120, 224, 143, 0.2);
            border-radius: 10px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .add-custom-item:hover {
            background: rgba(120, 224, 143, 0.4);
        }
        
        .registration-area {
            flex: 3;
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 15px;
            overflow-y: auto;
        }
        
        .registration-content {
            display: none;
        }
        
        .registration-content.active {
            display: block;
        }
        
        .batch-controls {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-bottom: 15px;
            flex-wrap: wrap; /* 允许换行 */
        }
        
        .batch-btn {
            padding: 8px 15px;
            border-radius: 20px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .batch-add {
            background: var(--success);
            color: white;
        }
        
        .batch-subtract {
            background: var(--primary);
            color: white;
        }
        
        /* 统一学生卡片为每行 6 个 */
        .student-grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr); 
            gap: 10px;
        }
        
        .student-score-card {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 12px;
            text-align: center;
            transition: all 0.3s;
        }
        
        .student-score-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        
        .student-score-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: var(--gradient-info);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 8px;
            color: white;
            font-size: 1.2rem;
        }
        
        .score-controls {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 8px;
        }
        
        .score-btn {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .score-btn.add {
            background: var(--success);
            color: white;
        }
        
        .score-btn.subtract {
            background: var(--primary);
            color: white;
        }
        
        .score-btn:hover {
            transform: scale(1.1);
        }
        
        .current-score {
            font-size: 1rem;
            font-weight: 700;
            margin: 8px 0;
            color: var(--dark);
        }
        
        .group-container {
            margin-bottom: 20px;
        }
        
        .group-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--gradient-secondary);
            color: white;
            padding: 10px 15px;
            border-radius: 10px;
            margin-bottom: 10px;
        }
        
        .group-title {
            font-weight: 700;
            font-size: 1.1rem;
        }
        
        /* 统一学生卡片为每行 6 个 */
        .group-students {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 10px;
        }
        
        .records-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        
        .records-table th, .records-table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #eee;
            font-size: 0.9rem;
        }
        
        .records-table th {
            background-color: #f8f9fa;
            font-weight: 600;
            color: var(--dark);
        }
        
        .records-table tr:hover {
            background-color: #f5f5f5;
        }
        
        /* 操行数据汇总中减分突出显示的样式 */
        .deduction-badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 50%; /* 圆形背景 */
            background-color: var(--warning); /* 黄色背景 */
            color: var(--dark);
            font-weight: 700;
            min-width: 30px; /* 确保圆形可见 */
            text-align: center;
        }

        .badge {
            display: inline-block;
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
        }
        
        .badge-success {
            background: var(--success);
            color: white;
        }
        
        .badge-warning {
            background: var(--warning);
            color: white;
        }
        
        .badge-info {
            background: var(--info);
            color: white;
        }

        .no-deduction-tip .fas {
            color: var(--success); /* <-- 将此处的 var(--success) 修改为您想要的颜色 */
            font-size: 3rem; 
            margin-bottom: 10px;
        }
        
        /* 响应式调整 */
        @media (max-width: 1200px) {
            .student-grid, .group-students {
                grid-template-columns: repeat(6, 1fr); /* 保持 6 列不变 */
            }
        }
        
        @media (max-width: 768px) {
            .registration-container {
                flex-direction: column;
                height: auto;
            }
            
            .student-grid, .group-students {
                grid-template-columns: repeat(3, 1fr); /* 小屏幕减少到 3 列 */
            }
            
            .tabs {
                flex-direction: column;
            }
            
            .stats-container {
                grid-template-columns: 1fr;
            }
        }
