/* ============================================
   用户需求修改补丁 CSS
   ============================================ */

/* ============================================
   1. 电脑端工作台按钮自适应填充
   ============================================ */

/* 工作台内容区域按钮自动填充 */
.workbench-content .btn-primary,
.workbench-content .btn-secondary,
#tab-class .btn-primary,
#tab-class .btn-secondary,
#tab-student .btn-primary,
#tab-student .btn-secondary,
#tab-group .btn-primary,
#tab-group .btn-secondary,
#tab-score .btn-primary,
#tab-score .btn-secondary,
#tab-shop .btn-primary,
#tab-shop .btn-secondary,
#tab-level .btn-primary,
#tab-level .btn-secondary,
#tab-shenshou .btn-primary,
#tab-shenshou .btn-secondary,
#tab-collaboration .btn-primary,
#tab-collaboration .btn-secondary,
#tab-system .btn-primary,
#tab-system .btn-secondary {
    min-width: 100px;
    flex: 1;
}

/* 工作台表单操作按钮 */
.edit-form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.edit-form-actions button {
    flex: 1;
    min-width: 120px;
}

/* 工作台网格按钮 */
.workbench-grid-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.workbench-grid-actions button {
    width: 100%;
}

/* ============================================
   2. 移动端菜单下拉列表可滚动
   ============================================ */

@media (max-width: 1024px) {
    .mobile-menu {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 16px 16px 80px 16px;
    }

    /* 班级下拉菜单在移动端也可滚动 */
    .class-dropdown-menu {
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 移动端隐藏班级下拉菜单滚动条 */
    .class-dropdown-menu::-webkit-scrollbar {
        display: none;
    }

    .class-dropdown-menu {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* ============================================
   3. 移动端菜单按钮背景特效不被遮挡
   ============================================ */

@media (max-width: 1024px) {
    .mobile-menu .nav-btn {
        margin-top: 2px; /* 缩小间距 */
        margin-bottom: 2px;
        position: relative;
        z-index: 1;
        padding: 6px 12px; /* 适当缩小内边距 */
        min-height: 38px; /* 适当减小高度 */
    }

    .mobile-menu .nav-btn.active {
        position: relative;
        margin-top: 4px; /* 缩小激活状态的间距 */
        margin-bottom: 4px;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    }
}

/* ============================================
   4. 电脑端菜单栏自适应 - 小屏变汉堡菜单
   ============================================ */

/* 默认PC端显示菜单 */
@media (min-width: 1025px) {
    .nav-menu {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .mobile-menu-btn {
        display: none;
    }
}

/* 中等屏幕 - 导航按钮自适应 */
@media (max-width: 1200px) and (min-width: 1025px) {
    .nav-btn {
        padding: 6px 12px;
        font-size: 13px;
        gap: 4px;
    }

    .nav-btn span:last-child {
        display: none;
    }
}

/* 小屏幕 - 汉堡菜单 */
@media (max-width: 1024px) {
    .nav-menu {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex !important;
    }
}

/* ============================================
   5. 电脑端工具栏自适应换行
   ============================================ */

/* 中等屏幕工具栏自适应 */
@media (max-width: 1100px) and (min-width: 769px) {
    .toolbar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 20px;
    }

    .search-box {
        width: 220px;
        flex-shrink: 0;
    }

    .sort-select {
        min-width: 120px;
        flex-shrink: 0;
    }

    .view-toggle {
        flex-shrink: 0;
    }

    .batch-btn {
        margin-left: auto;
        flex-shrink: 0;
    }
}

/* 小屏幕PC端 - 批量投喂按钮换行 */
@media (max-width: 900px) and (min-width: 769px) {
    .toolbar {
        display: grid;
        grid-template-columns: 1.2fr 1fr auto;
        grid-template-rows: auto auto;
        gap: 12px;
    }

    .search-box {
        grid-column: 1 / 2;
        grid-row: 1;
        width: 100%;
    }

    .sort-select {
        grid-column: 2 / 3;
        grid-row: 1;
        width: 100%;
    }

    .view-toggle {
        grid-column: 3 / 4;
        grid-row: 1;
    }

    .batch-btn {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }
}

/* ============================================
   6. 移动端工作台界面优化
   ============================================ */

@media (max-width: 768px) {
    /* 工作台弹窗宽度优化 */
    #workbenchModal .modal-content {
        width: 95vw;
        max-width: 95vw;
        margin: 10px auto;
        max-height: 90vh;
    }

    #workbenchModal .modal-body {
        padding: 16px;
        max-height: calc(90vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 工作台标签页优化 */
    .workbench-tabs {
        gap: 6px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .workbench-tab {
        padding: 8px 12px;
        font-size: 12px;
        gap: 4px;
        border-radius: 10px;
    }

    /* 工作台按钮优化 */
    #workbenchModal .btn-primary,
    #workbenchModal .btn-secondary,
    #workbenchModal .btn-danger {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 10px;
    }

    /* 工作台表单优化 */
    .edit-form-container {
        padding: 16px;
        border-radius: 16px;
    }

    .edit-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 12px;
    }

    /* 工作台列表优化 */
    .student-management-list {
        max-height: 300px;
    }

    /* 班级管理卡片 */
    #classManagementList > div {
        padding: 14px;
    }

    /* 分组管理网格 */
    #groupManagementArea {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* 小卖部管理网格 - 移动端一行一个商品，更美化的样式 */
    #shopItemsGrid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .shop-item-card,
    #shopModal .shop-item {
        padding: 20px;
        border-radius: 20px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        border: 2px solid #f3e8ff;
        background: linear-gradient(145deg, #ffffff 0%, #faf5ff 100%);
    }

    #shopModal .shop-item-header {
        margin-bottom: 16px;
    }

    #shopModal .shop-item-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
        border-radius: 14px;
    }

    #shopModal .shop-item-title {
        font-size: 18px;
        font-weight: 700;
    }

    #shopModal .shop-item-price {
        font-size: 20px;
        font-weight: 800;
    }

    #shopModal .shop-item-desc {
        font-size: 14px;
        line-height: 1.5;
        margin: 12px 0;
    }

    #shopModal .shop-item-actions {
        margin-top: 16px;
    }

    #shopModal .shop-item-actions .btn {
        padding: 12px 20px;
        font-size: 15px;
        border-radius: 12px;
        width: 100%;
    }

    /* 移动端积分兑换中心下拉框更高 */
    #shopModal .form-select#exchangeStudentSelect {
        min-height: 52px;
        font-size: 16px;
        padding: 14px 40px 14px 16px;
    }

    #shopModal .form-select#exchangeStudentSelect option {
        padding: 16px;
        font-size: 16px;
        min-height: 48px;
    }

    /* 系统设置按钮 */
    #tab-system .btn-primary,
    #tab-system .btn-secondary {
        width: 100%;
        margin-bottom: 8px;
    }

    /* 工作台头部 */
    .workbench-header {
        flex-direction: column;
        gap: 12px;
        padding: 14px;
        margin-bottom: 16px;
    }

    .workbench-class-selector {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .workbench-class-select {
        width: 100%;
        border-radius: 12px;
    }

    /* 上传区域优化 */
    .upload-dropzone {
        padding: 24px 16px;
    }

    .upload-icon {
        font-size: 36px;
    }

    .upload-text {
        font-size: 14px;
    }

    /* 学生列表头部 */
    .student-list-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .student-sort-controls {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .student-sort-controls .sort-select {
        flex: 1;
        min-width: 140px;
    }

    /* 协作管理移动端优化 */
    .collab-class-card {
        padding: 14px;
    }

    .collaboration-user-card {
        padding: 12px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .collaboration-user-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ============================================
   7. iPhone Safari 适配优化
   ============================================ */

/* iPhone 安全区域适配 */
@supports (-webkit-touch-callout: none) {
    /* iOS 设备特有样式 */
    body {
        padding-top: max(80px, env(safe-area-inset-top) + 64px);
    }

    .top-header {
        padding-top: env(safe-area-inset-top);
        height: calc(64px + env(safe-area-inset-top));
    }

    .mobile-menu {
        top: calc(64px + env(safe-area-inset-top));
        max-height: calc(100vh - 64px - env(safe-area-inset-top));
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }

    /* 修复iOS输入框缩放问题 */
    input,
    select,
    textarea {
        font-size: 16px;
    }

    @media (max-width: 768px) {
        input,
        select,
        textarea {
            font-size: 16px;
        }
    }

    /* 工作台弹窗iOS适配 */
    #workbenchModal .modal-body {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* 修复iPhone底部横条遮挡 */
@media (max-width: 768px) {
    .batch-panel {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .modal-body {
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 20px));
    }
}

/* ============================================
   8. 班级下拉列表样式优化
   ============================================ */

/* 隐藏删除按钮的样式调整 */
.class-item {
    padding: 12px 16px;
    justify-content: flex-start;
}

.class-item span {
    flex: 1;
}

/* ============================================
   9. 按钮组自动填充样式
   ============================================ */

/* 按钮组容器 */
.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-group .btn-primary,
.btn-group .btn-secondary,
.btn-group .btn-danger {
    flex: 1;
    min-width: 100px;
}

@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn-primary,
    .btn-group .btn-secondary,
    .btn-group .btn-danger {
        width: 100%;
    }
}

/* 工作台按钮样式统一 */
.random-assign-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
}

.random-assign-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

@media (max-width: 768px) {
    .random-assign-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
}

/* ============================================
   10. 【修复】庆祝页面层级问题 - 确保在所有模态框之上
   ============================================ */

/* 确保所有升级庆祝弹窗的z-index高于模态框 */
.levelup-overlay,
#levelupOverlay,
#callOverlay {
    z-index: 10150 !important;
}

/* 神兽升级弹窗 */
.shenshou-levelup-overlay,
#shenshouLevelupOverlay {
    z-index: 10150 !important;
}

/* 精灵升级弹窗 */
#jinglingLevelupOverlay {
    z-index: 10150 !important;
}

/* 任务签到升级弹窗 */
.levelup-modal-tc {
    z-index: 10150 !important;
}

/* 确保礼花canvas在所有内容之上 */
#confettiCanvas {
    z-index: 10160 !important;
}

/* ============================================
   11. 【修复】移动端模态框和庆祝页面显示问题
   ============================================ */

@media (max-width: 768px) {
    /* 确保移动端模态框内容可滚动 */
    #scoreModal .modal-body {
        max-height: calc(90vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 确保庆祝页面在移动端正常显示 */
    .levelup-overlay.active,
    #levelupOverlay.active {
        display: flex !important;
    }
    
    .levelup-content {
        padding: 20px;
        max-width: 90vw;
    }
    
    .levelup-title {
        font-size: 36px;
    }
    
    .levelup-pet {
        width: 200px;
        height: 200px;
    }
}

/* ============================================
   12. 【修复】scoreModal内容显示问题
   ============================================ */

/* 确保加减分标签正常显示 */
.score-section-title {
    display: flex !important;
    align-items: center;
    gap: 8px;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 确保加减分内容区域正常显示 */
.score-content {
    display: none;
}

.score-content.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 确保标签按钮正常显示 */
.score-tabs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    visibility: visible !important;
}

.score-tab-btn {
    flex: 1;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ============================================
   13. 【修复】快捷撤销按钮层级
   ============================================ */

#quickUndoButton,
.quick-undo-button {
    z-index: 10200 !important;
}

/* ============================================
   14. 【修复】礼花特效z-index统一设置
   ============================================ */

/* 所有礼花特效的z-index应该高于模态框但低于庆祝页面 */
[class*="confetti"],
canvas[style*="confetti"] {
    z-index: 10160 !important;
}

/* ============================================
   15. 【修复】宠物管理子模态框层级 - 确保不被scoreModal遮挡
   ============================================ */

/* 进化图鉴、证书、领养新宠物等子模态框的层级必须高于scoreModal(10000) */
#illustratedBookModal,
#certificateModal,
#certificateDisplayModal,
#adoptNewPetModal,
#petSelectModal {
    z-index: 10001 !important;
}

#illustratedBookModal .modal-content,
#certificateModal .modal-content,
#certificateDisplayModal .modal-content,
#adoptNewPetModal .modal-content,
#petSelectModal .modal-content {
    z-index: 10001 !important;
}

/* ============================================
   16. 【美化】班级管理按钮样式优化 + 协作管理按钮 + 工作台按钮图标
   ============================================ */

/* 刷新按钮 - 精致带图标 */
.btn-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    white-space: nowrap;
}

.btn-refresh:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #d1d5db;
}

.btn-refresh::before {
    content: "🔄";
    font-size: 13px;
}

/* 标记已读按钮 */
.btn-mark-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    white-space: nowrap;
}

.btn-mark-read:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-mark-read::before {
    content: "✓";
    font-size: 12px;
    font-weight: 800;
}

/* 搜索按钮 */
.btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
    white-space: nowrap;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-search::before {
    content: "🔍";
    font-size: 14px;
}

/* 批量发送邀请按钮 */
.btn-batch-invite {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-batch-invite:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-batch-invite:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-batch-invite::before {
    content: "📨";
    font-size: 15px;
}

/* 导入学生按钮 */
.btn-import-students {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
    width: 100%;
}

.btn-import-students:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.btn-import-students::before {
    content: "📥";
    font-size: 15px;
}

/* 下载模板按钮 */
.btn-download-template {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    width: 100%;
}

.btn-download-template:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    border-color: #d1d5db;
}

.btn-download-template::before {
    content: "📋";
    font-size: 15px;
}

/* 加载示例按钮 */
.btn-load-example {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    white-space: nowrap;
}

.btn-load-example:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #d1d5db;
}

.btn-load-example::before {
    content: "📖";
    font-size: 13px;
}

/* 清空所有按钮 */
.btn-clear-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 2px solid #fecaca;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
    white-space: nowrap;
}

.btn-clear-all:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.2);
    border-color: #fca5a5;
}

.btn-clear-all::before {
    content: "🗑️";
    font-size: 13px;
}

/* 一键随机分组按钮 */
.btn-auto-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
    white-space: nowrap;
}

.btn-auto-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-auto-group::before {
    content: "🎲";
    font-size: 15px;
}

/* 积分均衡分组按钮 */
.btn-balance-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    white-space: nowrap;
}

.btn-balance-group:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    border-color: #d1d5db;
}

.btn-balance-group::before {
    content: "⚖️";
    font-size: 15px;
}

/* 添加加分项目按钮 */
.btn-add-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    white-space: nowrap;
}

.btn-add-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-add-item::before {
    content: "➕";
    font-size: 14px;
}

/* 添加扣分项目按钮 */
.btn-add-item-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
    white-space: nowrap;
}

.btn-add-item-sub:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-add-item-sub::before {
    content: "➕";
    font-size: 14px;
}

/* 添加商品按钮 */
.btn-add-shop-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
    white-space: nowrap;
}

.btn-add-shop-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.btn-add-shop-item::before {
    content: "🎁";
    font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .btn-refresh,
    .btn-mark-read,
    .btn-search,
    .btn-load-example,
    .btn-clear-all {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .btn-auto-group,
    .btn-balance-group {
        padding: 8px 12px;
        font-size: 13px;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
    }
    
    .btn-add-item,
    .btn-add-item-sub,
    .btn-add-shop-item {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
    }
    
    /* 学生管理按钮移动端精致化 */
    .btn-import-students,
    .btn-download-template {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 36px;
        border-radius: 10px;
    }
    
    .btn-import-students::before,
    .btn-download-template::before {
        font-size: 13px;
    }
    
    /* 分组管理按钮容器 - 移动端垂直排列 */
    #tab-group .btn-auto-group,
    #tab-group .btn-balance-group {
        padding: 10px 16px;
        font-size: 13px;
        gap: 6px;
        width: 100%;
    }
    
    #tab-group .btn-auto-group::before,
    #tab-group .btn-balance-group::before {
        font-size: 13px;
    }
    
    /* 分组管理黄色提示框内的按钮容器 - 移动端垂直排列 */
    #tab-group > div[style*="background: linear-gradient(135deg, #fef3c7"] > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100%;
        margin-top: 16px !important;
    }
    
    /* 分组管理-小组数量移动端样式 */
    #tab-group > div[style*="background: linear-gradient(135deg, #fef3c7"] > div > div:first-child {
        width: 100% !important;
        text-align: left !important;
    }
    
    #tab-group #groupCountInput {
        width: 100% !important;
        max-width: none !important;
    }
    
    #tab-group > div[style*="background: linear-gradient(135deg, #fef3c7"] > div > div:first-child label {
        text-align: left !important;
        display: block !important;
    }
    
    /* 分组管理-减小输入框和按钮之间的间距 */
    #tab-group > div[style*="background: linear-gradient(135deg, #fef3c7"] > div[style*="display: flex"] {
        gap: 12px !important;
    }
    
    #tab-group > div[style*="background: linear-gradient(135deg, #fef3c7"] > div > div[style*="display: flex"] {
        margin-top: 0 !important;
        width: 100%;
    }
    
    /* 神兽管理按钮同行排列 */
    #tab-shenshou .action-buttons-container {
        display: flex;
        flex-direction: row;
        gap: 12px;
        justify-content: center;
    }
    
    #tab-shenshou .btn-save-settings,
    #tab-shenshou .btn-reset-settings,
    #tab-shenshou .btn-save-level,
    #tab-shenshou .btn-reset-level {
        flex: 1;
        min-width: 0;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* 创建班级按钮 - 精致带图标 */
.btn-create-class {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-create-class:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
}

.btn-create-class:active {
    transform: translateY(0);
}

.btn-create-class .btn-icon {
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* 班级操作按钮美化 */
.class-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.class-actions .btn-rename,
.class-actions .btn-set-current,
.class-actions .btn-delete-class {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

/* 重命名按钮 */
.class-actions .btn-rename {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.class-actions .btn-rename:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.class-actions .btn-rename::before {
    content: "✏️";
    font-size: 12px;
}

/* 设为当前按钮 */
.class-actions .btn-set-current {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.class-actions .btn-set-current:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.class-actions .btn-set-current::before {
    content: "✓";
    font-size: 12px;
    font-weight: 800;
    margin-right: 2px;
}

/* 删除按钮 */
.class-actions .btn-delete-class {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.class-actions .btn-delete-class:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.class-actions .btn-delete-class::before {
    content: "🗑️";
    font-size: 11px;
}

/* ============================================
   17. 【美化】保存/恢复按钮样式统一
   ============================================ */

/* 通用保存/恢复按钮容器 */
.action-buttons-container {
    margin-top: 24px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 保存设置按钮 */
.btn-save-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
    white-space: nowrap;
}

.btn-save-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-save-settings::before {
    content: "💾";
    font-size: 14px;
}

/* 恢复默认按钮 */
.btn-reset-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    white-space: nowrap;
}

.btn-reset-settings:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    border-color: #d1d5db;
}

.btn-reset-settings::before {
    content: "🔄";
    font-size: 14px;
}

/* 保存等级设置按钮 */
.btn-save-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
    white-space: nowrap;
}

.btn-save-level:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-save-level::before {
    content: "💾";
    font-size: 14px;
}

/* 恢复默认等级按钮 */
.btn-reset-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 2px solid #fcd34d;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
    white-space: nowrap;
}

.btn-reset-level:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.3);
    border-color: #fbbf24;
}

.btn-reset-level::before {
    content: "🔄";
    font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .btn-create-class {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .class-actions .btn-rename,
    .class-actions .btn-set-current,
    .class-actions .btn-delete-class {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .action-buttons-container {
        gap: 12px;
    }
    
    .btn-save-settings,
    .btn-reset-settings,
    .btn-save-level,
    .btn-reset-level {
        padding: 10px 20px;
        font-size: 14px;
        flex: 1;
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .class-actions {
        gap: 6px;
    }
    
    .class-actions .btn-rename,
    .class-actions .btn-set-current,
    .class-actions .btn-delete-class {
        padding: 6px 8px;
        font-size: 11px;
    }
}
