* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 响应式字体大小基础设置 */
html {
    font-size: 14px;
}

@media (max-width: 1366px) {
    html {
        font-size: 12px;
    }
}

@media (min-width: 1920px) {
    html {
        font-size: 16px;
    }
}

@media (min-width: 2560px) {
    html {
        font-size: 18px;
    }
}

.hidden {
    display: none !important;
}

/* 小清新配色方案 */
:root {
    --primary-color: #6BB8E0;
    --primary-light: #E3F4FC;
    --primary-dark: #4A9DC7;
    --secondary-color: #FFB8D4;
    --secondary-light: #FFF0F5;
    --accent-color: #FFE0A3;
    --accent-light: #FFF8E8;
    --success-color: #7ED9A6;
    --warning-color: #FFD866;
    --danger-color: #FF8A8A;
    --text-primary: #4A5568;
    --text-secondary: #718096;
    --bg-color: #F7FAFC;
    --card-bg: #FFFFFF;
    --border-color: #E8EEF2;
    --shadow-soft: 0 4px 20px rgba(107, 184, 224, 0.12);
    --shadow-hover: 0 8px 30px rgba(107, 184, 224, 0.2);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #EEF4F8 0%, #F5F9FC 50%, #FDF6F0 100%);
    min-height: 100vh;
    font-size: 1rem;
    line-height: 1.5;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    min-width: 1024px;
}

/* 左侧导航栏 - 清新卡片风格 */
.sidebar {
    width: 220px;
    flex: 0 0 220px;
    background: linear-gradient(180deg, #FFF5F7 0%, #FFF0F3 100%);
    border-right: none;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 25px rgba(255, 182, 193, 0.2);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin: 10px;
    margin-left: 0;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 182, 193, 0.3);
}

#fireworkCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.datetime-display {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 10px 10px 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,240,245,0.9) 100%);
    border-bottom: 1px solid rgba(255, 182, 193, 0.3);
    margin: 5px 8px 2px;
    border-radius: 8px;
}

.datetime-date {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.datetime-time {
    font-size: 1.3rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 4px;
    font-family: 'Segoe UI', sans-serif;
}

.datetime-weekday {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.sidebar.collapsed {
    width: 60px;
    flex: 0 0 60px;
    margin: 10px 5px;
}

.sidebar.collapsed .datetime-display {
    position: absolute;
    top: 45px;
    left: 5px;
    width: 50px;
    padding: 6px 4px;
    margin: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,240,245,0.95) 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    border: 1px solid rgba(255, 182, 193, 0.5);
}

.sidebar.collapsed .datetime-date {
    font-size: 0.55rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .datetime-time {
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.sidebar.collapsed .datetime-weekday {
    font-size: 0.55rem;
}

.sidebar.collapsed + .content {
    flex: 1;
    max-width: calc(100% - 40px);
}

/* 侧边栏折叠按钮 */
.sidebar-toggle {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(126, 200, 227, 0.4);
    z-index: 200;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.sidebar-toggle .toggle-icon {
    font-size: 12px;
    color: var(--primary-dark);
    transition: transform 0.3s;
    display: block;
}

.sidebar.collapsed .sidebar-toggle {
    right: 8px;
}

.sidebar.collapsed .sidebar-toggle .toggle-icon {
    transform: rotate(180deg);
}

/* 折叠状态下的样式 */
.sidebar.collapsed .logo h1,
.sidebar.collapsed .logo p {
    display: none;
}

.sidebar.collapsed .logo .icon {
    font-size: 32px;
    margin-bottom: 0;
}

.sidebar.collapsed .logo {
    padding: 10px 5px;
}

.sidebar.collapsed .nav-menu span {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .nav-menu {
    margin-top: 70px;
    padding: 5px 5px 10px;
}

.sidebar.collapsed .nav-item .icon {
    margin-right: 0;
    font-size: 22px;
}

.logo {
    padding: 15px 20px;
    text-align: center;
    border-bottom: none;
    background: transparent;
    border-radius: 0;
    position: relative;
    z-index: 10;
}

.logo::before {
    content: '';
}

.logo::after {
    content: '';
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo .icon {
    font-size: 36px;
    margin-bottom: 0;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.nav-menu {
    flex: 1;
    padding: 5px 15px 10px;
    position: relative;
    z-index: 10;
    margin-top: -5px;
    overflow-y: auto;
    min-height: 0;
}

/* 手机加减分二维码 */
.mobile-qr-box {
    padding: 8px 12px 10px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.15);
    margin-top: 5px;
    flex-shrink: 0;
}
.mobile-qr-title {
    font-size: .95rem;
    color: #000;
    margin-bottom: 8px;
    font-weight: 700;
}
.mobile-qr-img {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.mobile-qr-img img,
.mobile-qr-img canvas {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
}
.mobile-qr-tip {
    font-size: .75rem;
    color: #333;
    margin-top: 6px;
    font-weight: 500;
}
.sidebar.collapsed .mobile-qr-box {
    display: none;
}

.nav-menu ul {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, #F0F8FF 100%);
    transform: translateX(5px);
    border-color: var(--primary-light);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #FFFFFF;
    box-shadow: 0 3px 12px rgba(107, 184, 224, 0.35);
    transform: translateX(5px);
}

.nav-item .icon {
    margin-right: 12px;
    font-size: 20px;
    transition: transform 0.3s;
}

.nav-item:hover .icon {
    transform: scale(1.15);
}

.nav-item span {
    font-size: 0.95rem;
    font-weight: 600;
}

/* 右侧内容区域 */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 15px;
}

.content-header {
    padding: 25px;
    min-height: 80px;
    background: linear-gradient(135deg, #A8D8EA 0%, #B8E0D2 50%, #D4E4D8 100%);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-soft);
    margin-bottom: 15px;
    border: 2px solid #FFFFFF;
    position: relative;
}

.content-header::before {
    content: '';
}

.header-left {
    display: none;
}

.header-right {
    position: relative;
    z-index: 1;
}

.system-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.system-title h1 {
    font-size: 2.5rem;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    white-space: nowrap;
    font-weight: 700;
}

.version-badge {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    margin-bottom: 6px;
}

.header-left h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 6px;
    font-weight: 700;
}

.header-left p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 按钮样式 - 可爱圆润 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #FFFFFF;
    border: none;
    padding: 0.75rem 1.4rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(107, 184, 224, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(107, 184, 224, 0.4);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    padding: 0.65rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 214, 229, 0.4);
}

/* 小按钮样式 */
.btn-small {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(166, 195, 255, 0.3);
    vertical-align: middle;
    white-space: nowrap;
}

.btn-small:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(166, 195, 255, 0.4);
}

/* 自定义分值快捷按钮 */
.quick-score-btn {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-score-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.import-btn {
    background: linear-gradient(135deg, #FF9A56 0%, #FF6B35 100%);
    box-shadow: 0 2px 5px rgba(255, 154, 86, 0.3);
}

.import-btn:hover {
    background: linear-gradient(135deg, #FF6B35 0%, #FF4500 100%);
    box-shadow: 0 3px 8px rgba(255, 154, 86, 0.4);
}

.page-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}

.class-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #E8F4F8 0%, #F0F8FF 100%);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    border: 2px solid var(--primary-light);
}

.class-settings-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
}

.class-settings-header .btn-primary {
    padding: 10px 20px;
    font-size: 14px;
}

/* 班级列表样式 */
.class-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 班级选择下拉框样式 */
.class-select-dropdown {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.class-select-dropdown:hover {
    border-color: var(--primary-light);
}

.class-select-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* 积分管理页面头部右侧布局 */
.points-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 排行榜页面头部 */
.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.class-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.class-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-soft);
}

.class-item.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
}

.class-item .class-info h4 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
    font-size: 16px;
}

.class-item .class-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.class-item .class-actions {
    display: flex;
    gap: 8px;
}

/* 卡片样式 - 柔和阴影 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3::before {
    content: '✨';
    font-size: 1.2rem;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--secondary-light) 100%);
    border-radius: var(--radius-md);
    border: 3px dashed var(--border-color);
}

.empty-state::before {
    content: '🎨';
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 模态框 - 可爱风格 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(126, 200, 227, 0.3);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border-radius: var(--radius-md);
    width: 450px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(107, 184, 224, 0.2);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: modalPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 18px 22px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #F0F8FF 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin: 0;
    font-weight: 700;
}

.close-btn {
    background: var(--card-bg);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.close-btn:hover {
    background: var(--danger-color);
    color: #FFFFFF;
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 1.3rem;
}

.form-group label {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group label::before {
    content: '📝 ';
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--card-bg);
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(126, 200, 227, 0.2);
}

.modal-footer {
    padding: 20px 25px;
    border-top: 2px dashed var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: linear-gradient(135deg, var(--accent-light) 0%, transparent 100%);
}

/* 学生加减分明细弹窗 */
.student-records-content {
    width: 680px;
    max-width: 92%;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
}
.student-records-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
}
.student-records-summary {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}
.records-summary-card {
    flex: 1;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    text-align: center;
}
.records-summary-card .sum-label {
    font-size: .8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.records-summary-card .sum-value {
    font-size: 1.35rem;
    font-weight: 800;
}
.records-summary-card.sum-total .sum-value { color: var(--primary-color); }
.records-summary-card.sum-add .sum-value { color: #16a34a; }
.records-summary-card.sum-deduct .sum-value { color: #dc2626; }

.student-records-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
}
.records-tab-btn {
    padding: 8px 18px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}
.records-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.records-tab-btn:hover {
    color: var(--primary-color);
}

.student-records-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
}
.record-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: background .2s;
}
.record-item:hover {
    background: var(--hover-bg);
}
.record-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.record-icon.add { background: rgba(22, 163, 74, .12); }
.record-icon.deduct { background: rgba(220, 38, 38, .12); }
.record-info {
    flex: 1;
    min-width: 0;
}
.record-item-name {
    font-size: .92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.record-item-date {
    font-size: .78rem;
    color: var(--text-secondary);
}
.record-score {
    font-size: 1.05rem;
    font-weight: 800;
    flex-shrink: 0;
}
.record-score.add { color: #16a34a; }
.record-score.deduct { color: #dc2626; }

.record-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 10px;
    font-size: .9rem;
}

/* 排行榜学生项可点击提示 */
.podium-item, .rank-row {
    cursor: pointer;
    transition: box-shadow .2s, transform .15s;
}
.podium-item:hover {
    box-shadow: 0 6px 20px rgba(107, 184, 224, .35);
}
.rank-row:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,.12);
    transform: translateX(3px);
}

/* 班级概览页面样式 */
.overview-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 180px);
}

.overview-left-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.overview-right-panel {
    flex: 0 0 450px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 400px;
}

/* 全页面布局 - 学生宠物为主 */
.overview-full-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: calc(100vh - 180px);
}

/* 统计信息栏 - 更紧凑 */
.overview-stats-bar {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(166, 195, 255, 0.1);
    flex-wrap: wrap;
}

.overview-stats-bar .stat-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.overview-stats-bar .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.overview-stats-bar .stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
}

/* 宠物展示全页面 */
.pet-display-full {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 宠物自适应布局 - 固定每排6张卡片 */
.pet-display-content {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 10px;
    overflow-y: auto;
    align-items: start;
    grid-auto-rows: min-content;
}

.egg-card .pet-info {
    min-height: 60px;
}

/* 始终显示6列，不受屏幕宽度影响 */
@media (max-width: 1400px) {
    .pet-display-content {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1100px) {
    .pet-display-content {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 800px) {
    .pet-display-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 当前班级显示样式 */
.current-class-display {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.overview-content {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

/* 统计信息一排显示 */
.overview-stats-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.overview-stats-row .stat-item {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    padding: 10px 8px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.overview-stats-row .stat-label {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.overview-stats-row .stat-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
}

.stat-item {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

.overview-students h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.student-ranking {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 12px;
}

.ranking-item .rank {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
}

.ranking-item .name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.ranking-item .points {
    color: var(--success-color);
    font-weight: 700;
}

/* 排行榜前三名特殊样式 */
.ranking-item.rank-1 {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CD 100%);
    border-color: #FFD700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.ranking-item.rank-1 .rank {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.4);
}

.ranking-item.rank-2 {
    background: linear-gradient(135deg, #F5F5F5 0%, #E8E8E8 100%);
    border-color: #C0C0C0;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.ranking-item.rank-2 .rank {
    background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.4);
}

.ranking-item.rank-3 {
    background: linear-gradient(135deg, #FFF5EB 0%, #FFE4D1 100%);
    border-color: #CD7F32;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.ranking-item.rank-3 .rank {
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(205, 127, 50, 0.4);
}

/* 宠物展示头部 */
.pet-display-header {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.pet-display-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
}

.pet-display-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 学生宠物卡片 - 小清新扁平化布局 */
.student-pet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E8F0F5;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 180px;
    position: relative;
}

.student-pet-card:nth-child(2) .pet-avatar-wrapper { animation-delay: 0.1s; }
.student-pet-card:nth-child(3) .pet-avatar-wrapper { animation-delay: 0.2s; }
.student-pet-card:nth-child(4) .pet-avatar-wrapper { animation-delay: 0.3s; }
.student-pet-card:nth-child(5) .pet-avatar-wrapper { animation-delay: 0.4s; }
.student-pet-card:nth-child(6) .pet-avatar-wrapper { animation-delay: 0.5s; }

.student-pet-card:hover {
    border-color: #B8E0FF;
    box-shadow: 0 4px 12px rgba(100, 180, 255, 0.2);
    transform: translateY(-2px);
}

.pet-avatar {
    font-size: 36px;
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E8F4FF 0%, #D4EDFF 100%);
    border-radius: 50%;
    border: 3px solid #B8E0FF;
    animation: bounce 2s ease-in-out infinite;
    flex-shrink: 0;
}

.pet-avatar-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    width: 85px;
    height: 85px;
    animation: avatar-float 3s ease-in-out infinite;
}

.pet-accessory {
    position: absolute;
    top: -12px;
    right: -8px;
    font-size: 20px;
    animation: accessory-glow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}

@keyframes avatar-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes accessory-glow {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(10deg); }
}

/* 前三名宠物卡片 - 走马灯边框和烟花特效 */
.student-pet-card.top-three-card {
    position: relative;
    overflow: visible;
    border: 2px solid transparent;
    background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
                linear-gradient(90deg, #FFD700, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7, #DDA0DD, #FFD700) border-box;
    animation: marquee-border 3s linear infinite;
}

.student-pet-card.top-three-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, #FFD700, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7, #DDA0DD, #FFD700);
    background-size: 200% 100%;
    animation: marquee-border 3s linear infinite;
    border-radius: 8px;
    z-index: -1;
    opacity: 0.6;
}

@keyframes marquee-border {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 第一名特殊样式 */
.student-pet-card.rank-1 {
    background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
                linear-gradient(90deg, #FFD700, #FFA500, #FFD700) border-box;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.student-pet-card.rank-1::before {
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
    opacity: 0.8;
}

/* 第二名特殊样式 */
.student-pet-card.rank-2 {
    background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
                linear-gradient(90deg, #C0C0C0, #E8E8E8, #C0C0C0) border-box;
    box-shadow: 0 0 12px rgba(192, 192, 192, 0.4);
}

.student-pet-card.rank-2::before {
    background: linear-gradient(90deg, #C0C0C0, #E8E8E8, #C0C0C0);
    opacity: 0.7;
}

/* 第三名特殊样式 */
.student-pet-card.rank-3 {
    background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
                linear-gradient(90deg, #CD7F32, #F4A460, #CD7F32) border-box;
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.4);
}

.student-pet-card.rank-3::before {
    background: linear-gradient(90deg, #CD7F32, #F4A460, #CD7F32);
    opacity: 0.7;
}

/* 排名徽章 */
.top-rank-badge {
    position: absolute;
    top: -8px;
    right: 4px;
    font-size: 9px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #FFD700, #FF6B6B);
    padding: 2px 5px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.rank-1 .top-rank-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-2 .top-rank-badge {
    background: linear-gradient(135deg, #C0C0C0, #E8E8E8);
}

.rank-3 .top-rank-badge {
    background: linear-gradient(135deg, #CD7F32, #F4A460);
}

/* 彩带容器 - 飘洒效果 */
.confetti-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 5;
}

.confetti {
    position: absolute;
    width: 2px;
    height: 4px;
    top: 0;
    animation: confetti-fall 1.8s linear infinite;
}

.confetti:nth-child(1) { left: 5%; background: #FF0000; animation-delay: 0s; }
.confetti:nth-child(2) { left: 10%; background: #FF7F00; animation-delay: 0.1s; }
.confetti:nth-child(3) { left: 15%; background: #FFFF00; animation-delay: 0.2s; }
.confetti:nth-child(4) { left: 20%; background: #00FF00; animation-delay: 0.3s; }
.confetti:nth-child(5) { left: 25%; background: #00FFFF; animation-delay: 0.4s; }
.confetti:nth-child(6) { left: 30%; background: #0000FF; animation-delay: 0.5s; }
.confetti:nth-child(7) { left: 35%; background: #8B00FF; animation-delay: 0.6s; }
.confetti:nth-child(8) { left: 40%; background: #FF00FF; animation-delay: 0.7s; }
.confetti:nth-child(9) { left: 45%; background: #FF1493; animation-delay: 0.8s; }
.confetti:nth-child(10) { left: 50%; background: #00FA9A; animation-delay: 0.9s; }
.confetti:nth-child(11) { left: 55%; background: #FFD700; animation-delay: 1.0s; }
.confetti:nth-child(12) { left: 60%; background: #FF6347; animation-delay: 1.1s; }
.confetti:nth-child(13) { left: 65%; background: #00CED1; animation-delay: 1.2s; }
.confetti:nth-child(14) { left: 70%; background: #FF69B4; animation-delay: 1.3s; }
.confetti:nth-child(15) { left: 75%; background: #ADFF2F; animation-delay: 1.4s; }
.confetti:nth-child(16) { left: 80%; background: #FFA500; animation-delay: 1.5s; }
.confetti:nth-child(17) { left: 85%; background: #DA70D6; animation-delay: 1.6s; }
.confetti:nth-child(18) { left: 90%; background: #87CEEB; animation-delay: 1.7s; }
.confetti:nth-child(19) { left: 95%; background: #FFB6C1; animation-delay: 0.15s; }
.confetti:nth-child(20) { left: 8%; background: #98FB98; animation-delay: 0.35s; }
.confetti:nth-child(21) { left: 22%; background: #DDA0DD; animation-delay: 0.55s; }
.confetti:nth-child(22) { left: 38%; background: #F0E68C; animation-delay: 0.75s; }
.confetti:nth-child(23) { left: 52%; background: #E6E6FA; animation-delay: 0.95s; }
.confetti:nth-child(24) { left: 68%; background: #FFDAB9; animation-delay: 1.15s; }
.confetti:nth-child(25) { left: 82%; background: #B0E0E6; animation-delay: 1.35s; }
.confetti:nth-child(26) { left: 12%; background: #FFC0CB; animation-delay: 0.25s; }
.confetti:nth-child(27) { left: 32%; background: #7FFFD4; animation-delay: 0.45s; }
.confetti:nth-child(28) { left: 48%; background: #FFA07A; animation-delay: 0.65s; }
.confetti:nth-child(29) { left: 62%; background: #90EE90; animation-delay: 0.85s; }
.confetti:nth-child(30) { left: 78%; background: #FF7F50; animation-delay: 1.05s; }

@keyframes confetti-fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(50px) rotate(720deg);
        opacity: 0;
    }
}

.pet-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 70px;
}

.pet-info .student-name {
    font-size: 14px;
    font-weight: 700;
    color: #2C3E50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pet-info .pet-name {
    font-size: 13px;
    color: #5D7A96;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pet-level-badge {
    background: linear-gradient(135deg, #74B9FF 0%, #0984E3 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.need-exp {
    font-size: 10px;
    color: #27AE60;
    font-weight: 500;
}

.exp-bar-mini {
    width: 100%;
    height: 4px;
    background: #F0F0F0;
    border-radius: 2px;
    overflow: hidden;
    margin: 3px 0;
}

.exp-progress-mini {
    height: 100%;
    background: linear-gradient(90deg, #74B9FF 0%, #0984E3 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.change-btn {
    display: flex;
    align-items: center;
}

.btn-change-pet {
    background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-change-pet:hover {
    background: linear-gradient(135deg, #8E44AD 0%, #9B59B6 100%);
}

.changed-pet-tag {
    font-size: 10px;
    color: #999;
    background: #F5F5F5;
    padding: 2px 6px;
    border-radius: 4px;
}

.need-points-tag {
    font-size: 10px;
    color: #FF9800;
    background: #FFF3E0;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 宠物健康状态样式 */
.pet-health-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    margin: 4px 0;
    font-weight: 600;
    text-align: center;
}

.pet-health-status.warning {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    color: #E65100;
    border: 1px solid #FFCC80;
    animation: pulse-warning 2s infinite;
}

.pet-health-status.dead {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: #C62828;
    border: 1px solid #EF9A9A;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 宠物死亡状态卡片样式 */
.student-pet-card.pet-dead {
    background: linear-gradient(135deg, #F5F5F5 0%, #E0E0E0 100%);
    opacity: 0.8;
}

.student-pet-card.pet-dead .pet-avatar,
.student-pet-card.pet-dead .dead-avatar {
    filter: grayscale(100%);
    opacity: 0.6;
}

.student-pet-card.pet-warning {
    border: 2px solid #FF9800;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

.dead-avatar {
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ECEFF1 0%, #CFD8DC 100%);
    border-radius: 50%;
    margin: 0 auto 8px;
}

/* 班级列表中的日期和健康检查信息 */
.class-meta {
    font-size: 12px;
    color: #78909C;
    margin-top: 4px;
}

.date-info {
    background: #E3F2FD;
    color: #1976D2;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
}

.health-check-badge {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: #2E7D32;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* 创建班级表单样式 */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #546E7A;
    padding: 10px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E9ECEF;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: #E3F2FD;
    border-color: #90CAF9;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2196F3;
    flex-shrink: 0;
}

.checkbox-label span {
    flex: 1;
    line-height: 1.5;
}

.pet-level {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.level-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.exp-text {
    font-size: 10px;
    color: var(--text-secondary);
}

.exp-bar {
    height: 5px;
    background: #E0E0E0;
    border-radius: 3px;
    overflow: hidden;
    margin: 2px 0;
}

.exp-progress {
    height: 100%;
    background: linear-gradient(135deg, var(--success-color) 0%, #88D8B0 100%);
    border-radius: 3px;
    transition: width 0.3s;
}

.need-exp {
    font-size: 10px;
    color: var(--success-color);
    font-weight: 600;
}

/* 更换宠物区域样式 */
.change-pet-area {
    margin-top: 6px;
    text-align: center;
}

.btn-change-pet {
    background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.btn-change-pet:hover {
    background: linear-gradient(135deg, #8E44AD 0%, #9B59B6 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

.changed-pet-tag {
    font-size: 10px;
    color: #95A5A6;
    font-weight: 600;
    padding: 3px 8px;
    background: #ECF0F1;
    border-radius: 10px;
}

.need-points-tag {
    font-size: 10px;
    color: #E74C3C;
    font-weight: 600;
    padding: 3px 8px;
    background: #FADBD8;
    border-radius: 10px;
}

/* 更换宠物模态框样式 */
#change-pet-modal {
    z-index: 20000 !important;
}

#change-pet-modal .modal-content {
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

/* 更换宠物模态框：header固定在顶部，始终可见 */
#change-pet-modal .modal-header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 更换宠物模态框：body独立滚动 */
#change-pet-modal .modal-body {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 10px;
}

/* 更换宠物模态框：关闭按钮加大加醒目 */
#change-pet-modal .close-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    font-size: 22px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(238, 90, 90, 0.4);
    font-weight: bold;
}

#change-pet-modal .close-btn:hover {
    background: linear-gradient(135deg, #ee5a5a 0%, #d94a4a 100%);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(238, 90, 90, 0.5);
}

/* 更换宠物模态框：底部固定关闭按钮 */
#change-pet-modal .modal-footer-close {
    flex-shrink: 0;
    padding: 12px 25px 20px;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, #fff 30%);
    border-top: 1px solid var(--border-color);
}

#change-pet-modal .modal-footer-close .btn-close-pet {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    border: none;
    padding: 12px 48px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    transition: all 0.2s;
}

#change-pet-modal .modal-footer-close .btn-close-pet:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.change-pet-info {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 10px 0;
    text-align: center;
}

.points-cost {
    color: #E74C3C;
    font-weight: 700;
    font-size: 18px;
}

.change-pet-card {
    cursor: pointer;
    transition: all 0.3s;
}

.change-pet-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(126, 200, 227, 0.3);
    border-color: var(--primary-color);
}

/* 学生管理页面样式 */
.student-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--secondary-light) 100%);
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
    max-width: 500px;
}

.student-search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 180px;
}

.student-search-box .search-icon {
    position: absolute;
    left: 10px;
    font-size: 14px;
    pointer-events: none;
    opacity: 0.6;
}

.student-search-box input {
    width: 100%;
    padding: 7px 32px 7px 32px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    background: #fff;
    transition: all 0.25s;
    box-sizing: border-box;
}

.student-search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 184, 224, 0.15);
}

.student-search-box .search-clear-btn {
    position: absolute;
    right: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #999;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
    transition: all 0.2s;
}

.student-search-box .search-clear-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.group-filter-dropdown {
    padding: 7px 10px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    max-width: 150px;
}

.group-filter-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 184, 224, 0.15);
}

.toolbar-left label {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
}

.toolbar-left label::before {
    content: '🏫 ';
}

.toolbar-left select {
    padding: 6px 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    background: var(--card-bg);
    min-width: 150px;
    cursor: pointer;
    transition: all 0.3s;
}

.toolbar-left select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(126, 200, 227, 0.2);
}

.toolbar-right {
    display: flex;
    gap: 8px;
}

.student-list-container {
    min-height: 200px;
}

/* 表格样式 - 清新风格 */
.student-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    font-size: 0.9rem;
}

.student-table th,
.student-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.student-table th {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.student-table th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.student-table th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.student-table tbody tr {
    background: var(--card-bg);
    transition: all 0.3s;
}

.student-table tbody tr:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--secondary-light) 100%);
    transform: scale(1.01);
}

.student-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 var(--radius-md);
}

.student-table tbody tr:last-child td:last-child {
    border-radius: 0 0 var(--radius-md) 0;
}

.student-table .btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #FF8888 100%);
    color: #FFFFFF;
    border: none;
    padding: 5px 10px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(255, 170, 165, 0.4);
}

.student-table .btn-danger:hover {
    background: linear-gradient(135deg, #FF8888 0%, var(--danger-color) 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 170, 165, 0.5);
}

.student-table.hidden {
    display: none;
}

#student-empty-state {
    display: block;
}

#student-empty-state.hidden {
    display: none;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
}

.pagination-buttons button {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 8px;
}

.pagination-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 学生标签页样式 */
.student-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: var(--card-bg);
    border-radius: 50px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
    border: 2px solid transparent;
}

.tab-btn:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(126, 200, 227, 0.4);
    border-color: var(--primary-light);
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

/* 小组管理样式 */
.group-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--secondary-light) 100%);
    border-radius: var(--radius-md);
    border: 3px solid var(--border-color);
}

.group-toolbar input[type="number"] {
    width: 70px;
    padding: 10px 14px;
    border: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--card-bg);
    text-align: center;
    font-weight: 600;
}

.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.group-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FDFF 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
}

.group-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.group-card h4 {
    font-size: 16px;
    color: var(--primary-dark);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px dashed var(--border-color);
    font-weight: 700;
}

.group-card ul {
    list-style: none;
}

.group-card li {
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-card li::before {
    content: '👤';
}

.group-card li:last-child {
    border-bottom: none;
}

/* 手动分组样式 */
.group-management-container {
    display: flex;
    gap: 25px;
    min-height: 450px;
}

.ungrouped-students {
    width: 320px;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--secondary-light) 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.ungrouped-students .student-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ungrouped-students h4 {
    font-size: 16px;
    color: var(--primary-dark);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px dashed var(--border-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ungrouped-students h4::before {
    content: '📋';
}

.group-management-container .groups-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    align-content: start;
}

.group-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FDFF 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 3px solid var(--border-color);
    min-height: 180px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
}

.group-card .group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px dashed var(--border-color);
}

.group-card .group-header h4 {
    font-size: 15px;
    color: var(--primary-dark);
    margin: 0;
    padding: 0;
    border: none;
    font-weight: 700;
}

.group-card .group-header .delete-group-btn {
    background: var(--secondary-light);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 50%;
    transition: all 0.3s;
}

.group-card .group-header .delete-group-btn:hover {
    background: var(--danger-color);
    color: #FFFFFF;
    transform: rotate(90deg);
}

.group-card .student-list {
    min-height: 80px;
}

/* 小组内学生列表两列布局 */
.group-card .student-list.group-members-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.group-card .student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--accent-light) 0%, #FFFFFF 100%);
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.group-card .student-item:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.group-card .student-item .remove-from-group {
    background: var(--secondary-light);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.group-card .student-item .remove-from-group:hover {
    background: var(--danger-color);
    color: #FFFFFF;
}

/* 拖拽相关样式 */
.student-item.draggable {
    cursor: grab;
    user-select: none;
}

.student-item.draggable:active {
    cursor: grabbing;
}

.student-item.dragging {
    opacity: 0.7;
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 25px rgba(126, 200, 227, 0.4);
    border-color: var(--primary-color);
}

.group-card.droppable {
    transition: all 0.3s;
}

.group-card.droppable.drag-over {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    box-shadow: 0 0 0 4px rgba(126, 200, 227, 0.3);
    transform: scale(1.02);
}

.group-card .student-item.empty-hint {
    color: var(--text-secondary);
    font-style: italic;
    background: transparent;
    border: 2px dashed var(--border-color);
    text-align: center;
    justify-content: center;
}

.group-card .student-item.empty-hint::before {
    content: '👆 ';
}

.group-card.droppable.drag-over .student-item.empty-hint {
    border-color: var(--primary-color);
    color: var(--primary-dark);
    background: rgba(126, 200, 227, 0.1);
}

/* 小组操作按钮 */
.group-card .group-header .group-actions {
    display: flex;
    gap: 8px;
}

.group-card .group-header .rename-group-btn,
.group-card .group-header .delete-group-btn {
    background: var(--secondary-light);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 50%;
    transition: all 0.3s;
}

.group-card .group-header .rename-group-btn:hover {
    background: var(--warning-color);
    color: #FFFFFF;
    transform: scale(1.1);
}

.group-card .group-header .group-name {
    cursor: pointer;
    transition: all 0.3s;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.group-card .group-header .group-name:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* 小组「参与排名」开关按钮 */
.group-card .group-header .ranking-toggle-btn {
    cursor: pointer;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 50%;
    transition: all 0.3s;
    line-height: 1;
    border: 1px solid transparent;
}

/* 🏆 小组排名按钮(金色) */
.group-card .group-header .ranking-toggle-btn.group-ranking-toggle {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    color: #92400e;
}

.group-card .group-header .ranking-toggle-btn.group-ranking-toggle:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* 👤 个人排名按钮(蓝色) */
.group-card .group-header .ranking-toggle-btn.individual-ranking-toggle {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
    color: #1e40af;
}

.group-card .group-header .ranking-toggle-btn.individual-ranking-toggle:hover {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* 被排除出排名的小组卡片样式 */
.group-card.excluded-from-ranking {
    opacity: 0.75;
    border: 2px dashed #9ca3af !important;
    background: repeating-linear-gradient(
        45deg,
        rgba(156, 163, 175, 0.05),
        rgba(156, 163, 175, 0.05) 10px,
        rgba(156, 163, 175, 0.12) 10px,
        rgba(156, 163, 175, 0.12) 20px
    );
}

/* 被排除状态下的按钮变红色 */
.group-card .group-header .ranking-toggle-btn[title*="已排除"] {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
}

.group-card .group-header .ranking-toggle-btn[title*="已排除"]:hover {
    background: linear-gradient(135deg, #fecaca 0%, #f87171 100%) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* 小组名旁的「已排除」标签 */
.group-card .group-name .excluded-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #991b1b;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
    border-radius: 10px;
    vertical-align: middle;
    line-height: 1.4;
}

/* 「个人已排除」标签用蓝色区分 */
.group-card .group-name .excluded-tag.individual-tag {
    color: #1e40af;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
}

.ungrouped-students .student-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 8px;
    margin-bottom: 0;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FDFF 100%);
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    text-align: center;
}

.ungrouped-students .student-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(126, 200, 227, 0.2);
}

/* 未分组学生选中状态 */
.ungrouped-students .student-item.selected,
#ungrouped-students-list .student-item.selected {
    border-color: #3b82f6 !important;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}
.ungrouped-students .student-item.selected::after,
#ungrouped-students-list .student-item.selected::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 4px;
    color: #3b82f6;
    font-size: 14px;
    font-weight: bold;
}
.ungrouped-students .student-item {
    position: relative;
    cursor: pointer;
}

.ungrouped-students .student-item .add-to-group {
    background: var(--primary-light);
    border: none;
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 50%;
    transition: all 0.3s;
}

.ungrouped-students .student-item .add-to-group:hover {
    background: var(--primary-color);
    color: #FFFFFF;
    transform: scale(1.2);
}

/* ============ 排行榜 · 科技星河主题 ============ */
.ranking-card {
    background: linear-gradient(160deg, #0b1026 0%, #141a3a 45%, #1a1140 100%);
    border: 1px solid rgba(94, 234, 255, 0.18);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), inset 0 0 60px rgba(94, 234, 255, 0.04);
    position: relative;
    overflow: hidden;
}

/* 网格光效背景 */
.ranking-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(94, 234, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(94, 234, 255, 0.04) 1px, transparent 1px);
    background-size: 38px 38px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at top, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at top, #000 30%, transparent 80%);
}

.ranking-card > * {
    position: relative;
    z-index: 1;
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 4px;
}

.ranking-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #5eeaff 0%, #a78bfa 55%, #f0abfc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-title-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #7dd3fc, #6366f1 70%);
    box-shadow: 0 0 14px rgba(94, 234, 255, 0.7);
    position: relative;
}

.ranking-title-icon::after {
    content: '';
    position: absolute;
    inset: -5px;
    border: 1.5px dashed rgba(167, 139, 250, 0.55);
    border-radius: 50%;
    animation: rk-spin 8s linear infinite;
}

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

.ranking-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(94, 234, 255, 0.15);
    flex-wrap: wrap;
}

.ranking-tab-btn {
    padding: 8px 20px;
    border: 1px solid rgba(94, 234, 255, 0.2);
    background: rgba(15, 23, 48, 0.6);
    border-radius: 40px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #93a4c4;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
}

.ranking-tab-btn .tab-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4b5b78;
    box-shadow: 0 0 6px rgba(75, 91, 120, 0.6);
    transition: all 0.3s ease;
}

.ranking-tab-btn:hover {
    border-color: rgba(94, 234, 255, 0.45);
    color: #cbd5e1;
    transform: translateY(-1px);
}

.ranking-tab-btn.active {
    background: linear-gradient(135deg, rgba(94, 234, 255, 0.2) 0%, rgba(167, 139, 250, 0.2) 100%);
    border-color: rgba(94, 234, 255, 0.6);
    color: #e0f2fe;
    box-shadow: 0 0 16px rgba(94, 234, 255, 0.35);
}

.ranking-tab-btn.active .tab-icon {
    background: #5eeaff;
    box-shadow: 0 0 10px rgba(94, 234, 255, 0.9);
}

/* 排行面板容器 */
.ranking-board.hidden {
    display: none;
}

/* ---- 领奖台 Top3 ---- */
.ranking-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 14px;
    margin: 10px 0 22px;
    flex-wrap: wrap;
}

.podium-item {
    flex: 1 1 200px;
    min-width: 180px;
    max-width: 260px;
    border-radius: 16px;
    padding: 18px 14px 14px;
    text-align: center;
    position: relative;
    backdrop-filter: blur(6px);
    background: rgba(16, 24, 56, 0.7);
    border: 1px solid rgba(94, 234, 255, 0.18);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.podium-item.podium-1 {
    flex: 1.5 1 230px;
    order: 2;
    transform: translateY(-14px);
    background: linear-gradient(180deg, rgba(58, 42, 12, 0.85) 0%, rgba(22, 20, 42, 0.85) 100%);
    border: 1px solid rgba(255, 215, 102, 0.5);
    box-shadow: 0 0 34px rgba(255, 200, 80, 0.28), inset 0 0 30px rgba(255, 200, 80, 0.06);
    z-index: 2;
}

.podium-item.podium-2 {
    order: 1;
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(40, 44, 58, 0.85) 0%, rgba(20, 22, 38, 0.85) 100%);
    border: 1px solid rgba(203, 213, 225, 0.35);
    box-shadow: 0 0 24px rgba(203, 213, 225, 0.2);
}

.podium-item.podium-3 {
    order: 3;
    background: linear-gradient(180deg, rgba(58, 38, 26, 0.85) 0%, rgba(28, 20, 40, 0.85) 100%);
    border: 1px solid rgba(205, 127, 50, 0.45);
    box-shadow: 0 0 24px rgba(205, 127, 50, 0.22);
}

.podium-item:hover {
    transform: translateY(-18px);
}

.podium-item.podium-2:hover { transform: translateY(-6px); }
.podium-item.podium-3:hover { transform: translateY(-6px); }

.podium-rank {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.podium-1 .podium-rank {
    background: radial-gradient(circle at 30% 30%, #ffe08a, #d4a017);
    box-shadow: 0 0 18px rgba(255, 200, 80, 0.8);
}

.podium-2 .podium-rank {
    background: radial-gradient(circle at 30% 30%, #f1f5f9, #94a3b8);
    box-shadow: 0 0 14px rgba(203, 213, 225, 0.6);
}

.podium-3 .podium-rank {
    background: radial-gradient(circle at 30% 30%, #f0a868, #b06b30);
    box-shadow: 0 0 14px rgba(205, 127, 50, 0.6);
}

.podium-avatar {
    width: 56px;
    height: 56px;
    margin: 6px auto 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5eeaff, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #0b1026;
    position: relative;
}

.podium-1 .podium-avatar {
    width: 66px;
    height: 66px;
    background: linear-gradient(135deg, #ffe08a, #ff9d5c);
    box-shadow: 0 0 22px rgba(255, 200, 80, 0.5);
}

.podium-1 .podium-avatar::before {
    content: '👑';
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    filter: drop-shadow(0 0 6px rgba(255, 200, 80, 0.8));
    animation: rk-float 2.5s ease-in-out infinite;
}

@keyframes rk-float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}

.podium-name {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-1 .podium-name { color: #fef3c7; }

.podium-group {
    font-size: 11px;
    color: #7e89a8;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-points {
    font-size: 20px;
    font-weight: 800;
    font-family: 'Consolas', 'Segoe UI', monospace;
    color: #5eeaff;
    letter-spacing: 1px;
    text-shadow: 0 0 12px rgba(94, 234, 255, 0.6);
}

.podium-1 .podium-points {
    font-size: 24px;
    color: #ffd766;
    text-shadow: 0 0 14px rgba(255, 200, 80, 0.7);
}

.podium-2 .podium-points { color: #cbd5e1; text-shadow: 0 0 10px rgba(203, 213, 225, 0.5); }
.podium-3 .podium-points { color: #f0a868; text-shadow: 0 0 10px rgba(205, 127, 50, 0.5); }

.podium-cert {
    margin-top: 8px;
}

.podium-cert .btn-certificate {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(94, 234, 255, 0.35);
    background: rgba(94, 234, 255, 0.08);
    color: #7dd3fc;
    cursor: pointer;
    transition: all 0.25s ease;
}

.podium-cert .btn-certificate:hover {
    background: rgba(94, 234, 255, 0.2);
    box-shadow: 0 0 12px rgba(94, 234, 255, 0.4);
}

/* ---- 排名列表 4+ ---- */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-row {
    display: grid;
    grid-template-columns: 48px 1.4fr 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(18, 26, 56, 0.55);
    border: 1px solid rgba(94, 234, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rank-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(94, 234, 255, 0.4), rgba(167, 139, 250, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rank-row:hover {
    background: rgba(24, 34, 72, 0.8);
    border-color: rgba(94, 234, 255, 0.3);
    box-shadow: 0 4px 20px rgba(94, 234, 255, 0.12);
    transform: translateX(4px);
}

.rank-row:hover::before {
    opacity: 1;
}

.rank-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    font-family: 'Consolas', 'Segoe UI', monospace;
    color: #8b9bc4;
    background: rgba(94, 234, 255, 0.06);
    border: 1px solid rgba(94, 234, 255, 0.18);
    border-radius: 10px;
    clip-path: polygon(15% 0, 100% 0, 100% 85%, 85% 100%, 0 100%, 0 15%);
}

.rank-info {
    min-width: 0;
}

.rank-name {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    font-size: 11px;
    color: #6b7a9e;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-points-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 0;
}

.rank-points-value {
    font-size: 18px;
    font-weight: 800;
    font-family: 'Consolas', 'Segoe UI', monospace;
    color: #5eeaff;
    text-shadow: 0 0 8px rgba(94, 234, 255, 0.4);
    letter-spacing: 0.5px;
}

.rank-progress {
    width: 110px;
    height: 6px;
    background: rgba(94, 234, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.rank-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #5eeaff, #a78bfa);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(94, 234, 255, 0.6);
    transition: width 0.6s ease;
}

.rank-progress-bar.maxed {
    background: linear-gradient(90deg, #ffd766, #ff9d5c);
    box-shadow: 0 0 10px rgba(255, 200, 80, 0.6);
}

.rank-progress-text {
    font-size: 10px;
    color: #6b7a9e;
    white-space: nowrap;
}

.rank-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-actions .btn-certificate {
    font-size: 11px;
    padding: 5px 11px;
    border-radius: 20px;
    border: 1px solid rgba(167, 139, 250, 0.35);
    background: rgba(167, 139, 250, 0.08);
    color: #c4b5fd;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.rank-actions .btn-certificate:hover {
    background: rgba(167, 139, 250, 0.2);
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.4);
}

/* 小组排名行 */
.rank-row.group-row {
    grid-template-columns: 48px 1.4fr auto auto;
}

.group-stats {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 12px;
    color: #8b9bc4;
    font-family: 'Consolas', 'Segoe UI', monospace;
}

.group-stats .stat-value {
    color: #a78bfa;
    font-weight: 700;
}

/* 空状态 */
#individual-ranking-empty,
#group-ranking-empty {
    display: block;
}

#individual-ranking-empty.hidden,
#group-ranking-empty.hidden {
    display: none;
}

.ranking-pagination.pagination {
    background: rgba(18, 26, 56, 0.6);
    border-color: rgba(94, 234, 255, 0.18);
}

.ranking-pagination .pagination-info {
    color: #cbd5e1;
}

.ranking-pagination .pagination-buttons button {
    background: rgba(94, 234, 255, 0.08);
    border: 1px solid rgba(94, 234, 255, 0.25);
    color: #7dd3fc;
}

.ranking-pagination .pagination-buttons button:hover:not(:disabled) {
    background: rgba(94, 234, 255, 0.2);
    box-shadow: 0 0 10px rgba(94, 234, 255, 0.3);
}

.ranking-pagination .pagination-buttons button:disabled {
    background: rgba(94, 234, 255, 0.03);
    border-color: rgba(94, 234, 255, 0.1);
    color: #4b5b78;
}

/* 响应式：小屏幕下排行榜 */
@media (max-width: 768px) {
    .ranking-podium {
        gap: 10px;
    }
    .podium-item {
        min-width: 130px;
    }
    .podium-item.podium-1 {
        transform: translateY(-6px);
    }
    .rank-row {
        grid-template-columns: 38px 1fr auto;
        gap: 10px;
        padding: 10px 12px;
    }
    .rank-progress {
        display: none;
    }
    .group-stats {
        flex-direction: column;
        gap: 4px;
        align-items: flex-end;
    }
}

/* 添加一些可爱的装饰 */
.card::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.5;
}

.card {
    position: relative;
    overflow: hidden;
}

/* 响应式设计 - 小屏幕 */
@media (max-width: 768px) {
    .sidebar {
        width: 180px;
    }

    .nav-item span {
        font-size: 0.9rem;
    }

    .content-header {
        padding: 15px 20px;
    }

    .page-content {
        padding: 15px;
    }

    .group-management-container {
        flex-direction: column;
    }

    .ungrouped-students {
        width: 100%;
    }

    .student-toolbar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .toolbar-center {
        width: 100%;
        max-width: none;
    }

    .toolbar-right {
        flex-wrap: wrap;
        width: 100%;
    }

    .toolbar-right button {
        flex: 1;
        min-width: 100px;
    }
}

/* 响应式设计 - 大屏幕 */
@media (min-width: 1920px) {
    .sidebar {
        width: 260px;
        flex: 0 0 260px;
    }
    
    .sidebar.collapsed {
        width: 70px;
        flex: 0 0 70px;
    }
    
    .sidebar.collapsed + .content {
        max-width: calc(100% - 50px);
    }
}

@media (min-width: 2560px) {
    .sidebar {
        width: 300px;
        flex: 0 0 300px;
    }
    
    .sidebar.collapsed {
        width: 80px;
        flex: 0 0 80px;
    }
    
    .sidebar.collapsed + .content {
        max-width: calc(100% - 60px);
    }
}

/* 盲盒设置弹窗 */
.mystery-box-settings-content {
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.mystery-box-settings-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CC 100%);
    border-radius: 8px;
    border-left: 4px solid #FFB800;
}

.mystery-box-settings-list {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.mystery-box-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #FFFFFF;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    margin-bottom: 10px;
    transition: all 0.2s;
}

.mystery-box-settings-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mystery-box-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.mystery-box-emoji {
    font-size: 28px;
    width: 40px;
    text-align: center;
}

.mystery-box-name-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.mystery-box-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.mystery-box-desc-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.mystery-box-desc-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.add-mystery-box-item {
    background: linear-gradient(135deg, #FFF0F5 0%, #FFE4EC 100%);
    border-radius: 10px;
    padding: 15px;
    border: 2px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.add-mystery-box-item input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
}

.add-mystery-box-item input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.add-mystery-box-item select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    background: #FFFFFF;
    cursor: pointer;
}

.add-mystery-box-item select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 宠物PK样式 */
.pk-toolbar {
    margin-bottom: 15px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #FFF0F0 0%, #FFE4E1 100%);
    border-radius: 10px;
    border: 2px solid #FFB6C1;
}

.pk-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pk-hint {
    font-size: 13px;
    color: #FF6B6B;
    font-weight: 600;
}

.pk-selection-area {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.pk-available-section {
    flex: 1;
}

.pk-available-section h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.pk-pets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

.pk-pet-card {
    background: #FFFFFF;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.pk-pet-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pk-pet-card.selected {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
}

.pk-pet-avatar {
    font-size: 32px;
    margin-bottom: 5px;
}

.pk-pet-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.pk-pet-owner {
    font-size: 11px;
    color: var(--text-secondary);
}

.pk-pet-level {
    font-size: 11px;
    color: var(--success-color);
    font-weight: 500;
}

.no-pk-pets {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 30px;
    font-size: 13px;
}

.pk-battle-area {
    width: 340px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    border: 3px solid;
    border-image: linear-gradient(135deg, #FFD700 0%, #FF6B6B 50%, #4ECDC4 100%) 1;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), inset 0 0 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.pk-battle-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.pk-battle-title {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.pk-battle-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.pk-fighter {
    flex: 1;
    min-height: 110px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.95) 100%);
    border-radius: 12px;
    border: 2px dashed rgba(100,116,139,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pk-fighter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.pk-fighter.has-pet {
    border-style: solid;
    border-color: #FFD700;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF9E6 100%);
    box-shadow: 0 4px 20px rgba(255,215,0,0.3);
}

.pk-fighter-placeholder {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.pk-fighter-info {
    text-align: center;
}

.pk-fighter-avatar {
    font-size: 42px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.pk-fighter-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.pk-fighter-owner {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.pk-vs {
    font-size: 20px;
    font-weight: 800;
    color: var(--danger-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.pk-battle-result {
    min-height: 40px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.pk-result-win {
    color: #22c55e;
    text-shadow: 0 0 10px rgba(34,197,94,0.5);
    animation: victoryPulse 0.5s ease-in-out;
}

.pk-result-lose {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239,68,68,0.5);
}

@keyframes victoryPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pk-start-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
}

.pk-start-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.5);
}

.pk-start-btn:disabled {
    background: linear-gradient(135deg, #CCCCCC 0%, #999999 100%);
    cursor: not-allowed;
    box-shadow: none;
}

/* PK对战弹窗 */
.pk-battle-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.pk-battle-modal.active {
    display: flex;
}

.pk-battle-modal-content {
    max-width: 500px;
    width: 90%;
    animation: modalSlideIn 0.4s ease-out;
}

.pk-battle-arena-modal {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    transform: scale(1.1);
}

.pk-close-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    margin-top: 10px;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pk-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(100,116,139,0.4);
}

/* PK选择预览区 */
.pk-battle-preview {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 15px;
    text-align: center;
}

.pk-selected-fighters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.pk-selected-slot {
    width: 80px;
    height: 80px;
    background: #FFFFFF;
    border-radius: 10px;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.pk-selected-slot.has-pet {
    border-style: solid;
    border-color: #FFD700;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF9E6 100%);
    box-shadow: 0 2px 10px rgba(255,215,0,0.3);
}

.pk-selected-placeholder {
    font-size: 10px;
    color: #94a3b8;
}

.pk-vs-preview {
    font-size: 16px;
    font-weight: 800;
    color: #FF6B6B;
}

/* PK战斗状态显示 */
.pk-battle-status {
    text-align: center;
    padding: 15px;
}

.pk-battle-round {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700 0%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(255,215,0,0.3);
}

.pk-battle-action {
    font-size: 20px;
    font-weight: 700;
    animation: battleText 0.5s ease-out;
}

/* PK最终结果 */
.pk-final-result {
    text-align: center;
    padding: 20px;
    animation: victoryPulse 0.8s ease-out;
}

.pk-winner-trophy {
    font-size: 64px;
    margin-bottom: 10px;
    animation: trophyBounce 1s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.8));
}

@keyframes trophyBounce {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.pk-winner-name {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(255,215,0,0.3);
}

.pk-winner-text {
    font-size: 24px;
    font-weight: 800;
    color: #22c55e;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(34,197,94,0.5);
}

.pk-battle-detail {
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

.pk-loser-eliminated {
    font-size: 16px;
    font-weight: 700;
    color: #FF6B6B;
    text-shadow: 0 0 10px rgba(255,107,107,0.5);
    animation: pulse 1s ease-in-out infinite;
}

.pk-history {
    background: #FFFFFF;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    padding: 15px;
}

.pk-history h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.pk-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #F8F9FA;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.pk-history-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pk-history-right {
    color: var(--text-secondary);
    font-size: 11px;
}

.pk-history-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.pk-history-info {
    font-size: 12px;
    color: var(--text-secondary);
}

.pk-history-buttons {
    display: flex;
    gap: 5px;
}

.pk-history-buttons .btn-sm {
    padding: 4px 10px;
    font-size: 11px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.pk-history-buttons .btn-sm:hover:not(:disabled) {
    background: var(--primary-dark);
}

.pk-history-buttons .btn-sm:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pk-fighting {
    font-size: 18px;
    font-weight: 700;
    color: var(--danger-color);
    animation: pulse 0.5s ease-in-out infinite;
}

.pk-attacking {
    animation: pkAttack 0.3s ease-in-out;
}

.pk-pet-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pk-pet-card.eliminated {
    opacity: 0.5;
    background: #F5F5F5;
}

.pk-pet-wins {
    font-size: 10px;
    color: #FFB800;
    font-weight: 600;
    margin-top: 2px;
}

.pk-pet-eliminated {
    font-size: 10px;
    color: #FF6B6B;
    font-weight: 600;
    margin-top: 2px;
}

.pk-pets-section-title {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 5px;
}

.pk-pets-section-title.eliminated-title {
    margin-top: 10px;
    color: #FF6B6B;
}

.tournament-active {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tournament-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #FFFFFF;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tournament-info {
    font-size: 13px;
    color: var(--text-primary);
}

.tournament-start {
    text-align: center;
}

.tournament-status {
    flex: 1;
    text-align: right;
}

/* 盲盒样式 */
#mystery-box-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
}

#mystery-box-modal.active {
    display: flex;
}

.mystery-box-fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: fireworkExplode 1s ease-out forwards;
}

.firework-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: particleExplode 1s ease-out forwards;
}

@keyframes fireworkExplode {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

@keyframes particleExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.mystery-box-content {
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    z-index: 9999;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FDFF 100%);
    border-radius: 16px;
    border: 4px solid #FFD700;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.6);
    animation: modalSlideIn 0.5s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.mystery-box-header {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    padding: 20px;
}

.mystery-box-header h3 {
    color: #FFFFFF;
    margin: 0;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.champion-info {
    color: #FFFFFF;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 600;
}

.mystery-box-body {
    padding: 30px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFFFFF 100%);
    min-height: 280px;
    position: relative;
}

.mystery-box-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.mystery-box {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.4);
}

.mystery-box-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

@keyframes boxBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.mystery-box:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(155, 89, 182, 0.5);
}

.mystery-box-shake {
    font-size: 48px;
    animation: boxShake 1s ease-in-out infinite;
}

@keyframes boxShake {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.mystery-box-opening {
    animation: boxOpen 1.5s ease-in-out forwards !important;
}

@keyframes boxOpen {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    30% { transform: scale(1.3) rotate(180deg); opacity: 1; }
    50% { transform: scale(1.5) rotate(360deg); opacity: 0.8; }
    70% { transform: scale(0.8) rotate(540deg); opacity: 0.5; }
    100% { transform: scale(0) rotate(720deg); opacity: 0; }
}

.mystery-box-label {
    color: #FFFFFF;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 600;
}

#mystery-box-reward {
    display: none;
    padding: 20px;
}

#mystery-box-reward.show {
    display: block;
    animation: rewardReveal 0.5s ease-out;
}

@keyframes rewardReveal {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.reward-icon {
    font-size: 72px;
    margin-bottom: 10px;
    animation: rewardPop 0.5s ease-out;
}

.reward-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.reward-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.mystery-box-footer {
    padding: 15px;
    background: #FFFFFF;
}

@keyframes massiveConfettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-30px) scale(1.5);
        opacity: 1;
    }
}

@keyframes fireworkBurst {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(3);
        opacity: 0.8;
    }
    100% {
        transform: scale(5);
        opacity: 0;
    }
}

@keyframes fireworkExplode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: scale(8);
        opacity: 0;
    }
}

@keyframes confettiFall0 {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0.5;
    }
}

@keyframes confettiFall1 {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(50px) rotate(540deg);
        opacity: 0.5;
    }
}

@keyframes confettiFall2 {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(-30px) rotate(900deg);
        opacity: 0.5;
    }
}

@keyframes particlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.8);
        opacity: 1;
    }
}

.mystery-particle {
    pointer-events: none;
}

.celebration-confetti {
    pointer-events: none;
}

/* 彩带特效 */
.confetti-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 20px;
    top: -20px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotateZ(720deg);
        opacity: 0;
    }
}

/* 动画关键帧 */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes pkAttack {
    0% { transform: translateX(0) scale(1) rotate(0deg); filter: brightness(1); }
    10% { transform: translateX(-40px) scale(0.9) rotate(-5deg); filter: brightness(1.3); }
    25% { transform: translateX(60px) scale(1.15) rotate(5deg); filter: brightness(1.5); }
    35% { transform: translateX(40px) scale(1.2) rotate(3deg); filter: brightness(1.4); }
    50% { transform: translateX(-30px) scale(0.95) rotate(-3deg); filter: brightness(1.2); }
    65% { transform: translateX(40px) scale(1.1) rotate(4deg); filter: brightness(1.4); }
    80% { transform: translateX(-15px) scale(0.98) rotate(-2deg); filter: brightness(1.2); }
    90% { transform: translateX(10px) scale(1.05) rotate(1deg); filter: brightness(1.1); }
    100% { transform: translateX(0) scale(1) rotate(0deg); filter: brightness(1); }
}

@keyframes pkImpact {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.8); }
    30% { transform: scale(1.2); box-shadow: 0 0 50px 25px rgba(255, 107, 107, 0.5); }
    60% { transform: scale(1.1); box-shadow: 0 0 30px 15px rgba(255, 215, 0, 0.4); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

@keyframes pkShake {
    0%, 100% { transform: translateX(0) rotate(0deg) scale(1); }
    5% { transform: translateX(-12px) rotate(-5deg) scale(1.05); }
    10% { transform: translateX(12px) rotate(5deg) scale(0.95); }
    15% { transform: translateX(-10px) rotate(-4deg) scale(1.03); }
    20% { transform: translateX(10px) rotate(4deg) scale(0.97); }
    25% { transform: translateX(-8px) rotate(-3deg) scale(1.02); }
    30% { transform: translateX(8px) rotate(3deg) scale(0.98); }
    40% { transform: translateX(-6px) rotate(-2deg) scale(1.01); }
    50% { transform: translateX(6px) rotate(2deg) scale(0.99); }
    60% { transform: translateX(-4px) rotate(-1deg) scale(1); }
    70% { transform: translateX(4px) rotate(1deg) scale(1); }
    80% { transform: translateX(-2px) rotate(-0.5deg) scale(1); }
    90% { transform: translateX(2px) rotate(0.5deg) scale(1); }
}

@keyframes pkFlash {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes pkEnergyWave {
    0% { transform: scale(0.3) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.5) rotate(180deg); opacity: 0.8; }
    100% { transform: scale(3) rotate(360deg); opacity: 0; }
}

@keyframes pkChargeUp {
    0% { transform: scale(1); filter: brightness(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
    50% { transform: scale(1.1); filter: brightness(1.5); box-shadow: 0 0 30px 10px rgba(255, 215, 0, 0.5); }
    100% { transform: scale(1); filter: brightness(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

@keyframes pkDodge {
    0% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-20px) translateY(-10px) rotate(-10deg); }
    50% { transform: translateX(0) translateY(0) rotate(0deg); }
    75% { transform: translateX(20px) translateY(-10px) rotate(10deg); }
    100% { transform: translateX(0) translateY(0) rotate(0deg); }
}

@keyframes flashExpand {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(2); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

@keyframes lightning {
    0%, 100% { opacity: 0; }
    10%, 30%, 50% { opacity: 1; }
    20%, 40% { opacity: 0.3; }
}

@keyframes battleText {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.pk-impact-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.8) 0%, rgba(255,107,107,0.4) 50%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: pkEnergyWave 0.6s ease-out forwards;
    z-index: 100;
}

.pk-battle-arena {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5), 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

.pk-battle-arena::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.pk-fighter-enhanced {
    position: relative;
    transition: all 0.3s ease;
}

.pk-fighter-enhanced.attacking {
    animation: pkAttack 0.8s ease-in-out;
}

.pk-fighter-enhanced.hit {
    animation: pkShake 0.5s ease-in-out, pkImpact 0.4s ease-out;
}

.pk-vs-enhanced {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700 0%, #FF6B6B 50%, #4ECDC4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    animation: pulse 1s ease-in-out infinite;
    position: relative;
}

.pk-vs-enhanced::before,
.pk-vs-enhanced::after {
    content: '✦';
    position: absolute;
    font-size: 20px;
    color: #FFD700;
    -webkit-text-fill-color: #FFD700;
}

.pk-vs-enhanced::before {
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    animation: rotate 3s linear infinite;
}

.pk-vs-enhanced::after {
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    animation: rotate 3s linear infinite reverse;
}

@keyframes rotate {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

@keyframes boxShake {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes rewardPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes mysterySparkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(300px) rotate(720deg); opacity: 0; }
}

/* 宠物商店样式 */
.shop-description {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 12px;
}

.pet-shop-toolbar {
    margin-bottom: 15px;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--secondary-light) 100%);
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 5px;
    margin-top: 10px;
}

.pet-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FDFF 100%);
    border-radius: 10px;
    padding: 12px 10px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
    text-align: center;
    cursor: pointer;
}

.pet-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.pet-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    box-shadow: 0 0 0 3px rgba(126, 200, 227, 0.3);
}

.pet-image {
    font-size: 48px;
    margin-bottom: 8px;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

.pet-card:nth-child(2) .pet-image { animation-delay: 0.1s; }
.pet-card:nth-child(3) .pet-image { animation-delay: 0.2s; }
.pet-card:nth-child(4) .pet-image { animation-delay: 0.3s; }
.pet-card:nth-child(5) .pet-image { animation-delay: 0.4s; }
.pet-card:nth-child(6) .pet-image { animation-delay: 0.5s; }

.pet-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.pet-price {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.pet-card .adopt-btn {
    width: 100%;
    padding: 6px 8px;
    font-size: 11px;
}

/* 宠物卡片删除按钮 */
.pet-card {
    position: relative;
}

.pet-card .delete-pet-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
    border: none;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(255, 107, 107, 0.3);
    z-index: 10;
}

.pet-card:hover .delete-pet-btn {
    opacity: 1;
}

.pet-card .delete-pet-btn:hover {
    background: linear-gradient(135deg, #FF5252 0%, #FF6B6B 100%);
    transform: scale(1.1);
}

/* 宠物商店"仅查看"模式：隐藏"选择"按钮 */
.pet-grid.shop-view-only .adopt-btn {
    display: none !important;
}
.pet-grid.shop-view-only .pet-card {
    cursor: default;
}
.pet-grid.shop-view-only .pet-card:hover {
    transform: none;
}

/* 宠物管理（后台设置）样式 */
.pet-admin-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 16px;
}
.pet-admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.pet-admin-badge-sys { background: #dbeafe; color: #1e40af; }
.pet-admin-badge-custom { background: #fef3c7; color: #92400e; }
.pet-admin-badge-mod { background: #ede9fe; color: #5b21b6; }
.pet-admin-badge-hidden { background: #fee2e2; color: #991b1b; }
.pet-admin-restore-all { margin-left: auto; padding: 6px 12px; font-size: 12px; }

.pet-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.pet-admin-card {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 8px 8px;
    background: #fff;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s;
}
.pet-admin-card.is-hidden {
    opacity: 0.55;
    background: #f3f4f6;
    border-style: dashed;
}
.pet-admin-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pet-source-label {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}
.pet-source-sys { background: #dbeafe; color: #1e40af; }
.pet-source-custom { background: #fef3c7; color: #92400e; }
.pet-source-shared { background: #d1fae5; color: #065f46; }
.pet-shared-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 14px;
    z-index: 2;
}
.pet-tag-shared { background: #d1fae5; color: #065f46; }

.pet-admin-img-wrap {
    width: 60px;
    height: 60px;
    margin: 8px auto 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pet-admin-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}
.pet-admin-emoji {
    font-size: 40px;
    line-height: 1;
}
.pet-admin-name {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin: 4px 0;
    word-break: break-all;
    min-height: 18px;
}
.pet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    margin-bottom: 6px;
    min-height: 16px;
}
.pet-tag {
    padding: 1px 5px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.4;
}
.pet-tag-renamed { background: #ede9fe; color: #5b21b6; }
.pet-tag-replaced { background: #fef3c7; color: #92400e; }
.pet-tag-hidden { background: #fee2e2; color: #991b1b; }

.pet-admin-actions {
    display: flex;
    gap: 3px;
    justify-content: center;
    flex-wrap: wrap;
}
.pet-admin-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: #f3f4f6;
    cursor: pointer;
    font-size: 13px;
    line-height: 26px;
    text-align: center;
    transition: all 0.2s;
}
.pet-admin-btn:hover { background: #e5e7eb; transform: scale(1.05); }
.pet-admin-btn-rename:hover { background: #ede9fe; }
.pet-admin-btn-image:hover { background: #fef3c7; }
.pet-admin-btn-hide.is-active,
.pet-admin-btn-hide:hover { background: #fee2e2; }
.pet-admin-btn-restore:hover { background: #dcfce7; }
.pet-admin-btn-delete:hover { background: #fee2e2; }

/* 积分商城样式 */
.points-shop-toolbar {
    margin-bottom: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF4E1 100%);
    border-radius: 10px;
    border: 2px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.student-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.student-selector label {
    font-weight: 600;
    color: var(--text-primary);
}

/* 自定义下拉组件 */
.custom-dropdown {
    position: relative;
    width: 160px;
}

.dropdown-trigger {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: #FFFFFF;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.dropdown-trigger:hover {
    border-color: var(--primary-color);
}

.dropdown-trigger.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.dropdown-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.2s ease;
}

.dropdown-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: #FFFFFF;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    padding: 12px;
    min-width: 420px;
}

.dropdown-panel.show {
    display: block;
    animation: dropdownSlide 0.2s ease-out;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 6列网格 */
.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.dropdown-grid .student-option-btn {
    padding: 8px 6px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.dropdown-grid .student-option-btn:hover {
    border-color: var(--primary-color);
    background: #FFF0F5;
    transform: translateY(-1px);
}

.dropdown-grid .student-option-btn.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.student-points-display {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 10px;
    margin-top: 15px;
}

.shop-item {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FDFF 100%);
    border-radius: 12px;
    padding: 15px 12px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
    text-align: center;
}

.shop-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.shop-item-icon {
    font-size: 40px;
    margin-bottom: 8px;
    display: block;
}

.shop-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.shop-item-price {
    font-size: 13px;
    color: var(--success-color);
    font-weight: 600;
    margin-bottom: 5px;
}

.shop-item-stock {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 10px;
}

.shop-item-stock.stock-empty {
    color: var(--danger-color);
    font-weight: 700;
}

.shop-item.out-of-stock {
    opacity: 0.7;
    background: linear-gradient(135deg, #F5F5F5 0%, #EEEEEE 100%);
}

.shop-exchange-btn {
    width: 100%;
    padding: 8px 10px;
    font-size: 12px;
}

.shop-exchange-btn:disabled,
.btn-disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.exchange-history {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #F0F9FF 0%, #E8F5E9 100%);
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.exchange-history h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.exchange-history .no-history {
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.exchange-record {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #FFFFFF;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.exchange-record:last-child {
    margin-bottom: 0;
}

.record-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.record-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.record-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.record-points {
    font-weight: 700;
    color: var(--danger-color);
    font-size: 13px;
}

/* 积分商城设置弹窗 */
.shop-settings-content {
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.shop-settings-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.shop-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #FFFFFF;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    margin-bottom: 10px;
}

.shop-settings-item:hover {
    border-color: var(--primary-light);
}

.shop-item-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shop-item-display .item-icon {
    font-size: 28px;
}

.shop-item-display .item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.shop-item-display .item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.shop-item-display .item-points {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 500;
}

.item-points-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.points-input,
.stock-input {
    width: 60px;
    padding: 4px 8px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
}

.points-input:focus,
.stock-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.points-label,
.stock-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.stock-label.stock-empty {
    color: var(--danger-color);
    font-weight: 700;
}

.btn-save-points {
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-save-points:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(126, 200, 227, 0.4);
}

.shop-item-actions {
    display: flex;
    gap: 8px;
}

.btn-delete-item {
    padding: 6px 12px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF4757 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

.add-shop-item-form {
    background: linear-gradient(135deg, #F0F9FF 0%, #E8F5E9 100%);
    border-radius: 10px;
    padding: 15px;
    border: 2px solid var(--border-color);
}

.add-shop-item-form h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 120px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    background: #FFFFFF;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.shop-toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 学生宠物显示 */
.student-pet {
    font-size: 20px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s;
}

.student-pet.egg {
    animation: shake 1.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.student-pet:hover {
    transform: scale(1.2);
}

.student-pet.dead {
    background: linear-gradient(135deg, #ECEFF1 0%, #CFD8DC 100%);
    color: #78909C;
    filter: grayscale(100%);
    cursor: not-allowed;
}

.no-pet {
    color: var(--text-secondary);
    font-size: 12px;
}

/* 蛋卡片样式 */
.egg-card {
    background: linear-gradient(135deg, #FFFEF5 0%, #FFF5E6 100%);
    border-color: #F0E6D2;
}

.egg-card .pet-avatar {
    font-size: 36px;
    width: 85px;
    height: 85px;
}

.egg-progress-bar {
    width: 100%;
    height: 6px;
    background: #F0F0F0;
    border-radius: 3px;
    overflow: hidden;
    margin: 6px 0;
}

.egg-progress {
    height: 100%;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.hatch-info {
    font-size: 12px;
    color: #FF8C00;
    font-weight: 500;
}

.adopt-pet-btn {
    background: linear-gradient(135deg, var(--success-color) 0%, #88D8B0 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(168, 230, 207, 0.4) !important;
}

.adopt-pet-btn:hover {
    background: linear-gradient(135deg, #88D8B0 0%, var(--success-color) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 230, 207, 0.5) !important;
}

/* 导入的宠物列表 - 横向排列 */
.imported-pets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
    padding: 10px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF4E1 100%);
    border-radius: var(--radius-md);
    border: 2px dashed var(--accent-color);
    min-height: 40px;
}

.imported-pets-list:empty {
    display: none;
}

.imported-pets-list:not(:empty) {
    margin-bottom: 10px;
}

.imported-pet-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.imported-pet-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(126, 200, 227, 0.3);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.imported-pet-tag img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.imported-pet-tag .pet-emoji {
    font-size: 20px;
}

/* 积分管理头部 */
.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.points-header h3 {
    margin: 0;
}

.settings-btn {
    padding: 8px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 积分设置弹窗 */
#points-settings-modal .modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.points-settings-content {
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* 类别管理区域 */
.category-management {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF4E1 100%);
    border-radius: var(--radius-md);
    border: 2px solid var(--accent-color);
    padding: 20px;
    margin-bottom: 20px;
}

.category-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.category-management-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.category-tag:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.category-tag.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
    color: white;
}

.category-tag .category-icon {
    font-size: 18px;
}

.category-tag .category-name-input {
    width: 100px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: transparent;
}

.category-tag.active .category-name-input {
    color: white;
    border-color: rgba(255,255,255,0.5);
}

.category-tag .category-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.category-tag .delete-category-btn {
    padding: 2px 6px;
    font-size: 12px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.category-tag .delete-category-btn:hover {
    background: #ff4757;
}

/* 添加类别表单 */
.add-category-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

.add-category-form input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
}

.add-category-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.points-categories-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.points-category {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FDFF 100%);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    padding: 20px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon {
    font-size: 28px;
}

.category-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.add-item-btn {
    padding: 8px 16px;
    font-size: 14px;
}

.points-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.points-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.points-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-soft);
}

.points-item .item-name {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all 0.3s;
}

.points-item .item-name:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(126, 200, 227, 0.2);
}

.points-item .item-score {
    width: 80px;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
}

.points-item .item-score:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(126, 200, 227, 0.2);
}

.points-item .score-unit {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.points-item .custom-score-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.points-item .custom-score-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.points-item .custom-score-label:hover {
    color: var(--primary-color);
}

.points-item .delete-item-btn {
    padding: 8px 15px;
    font-size: 13px;
    background: linear-gradient(135deg, var(--danger-color) 0%, #FF8A80 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.points-item .delete-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 170, 165, 0.4);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.modal-footer button {
    padding: 12px 25px;
    font-size: 15px;
}

/* 积分管理页面布局 */
.points-management-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 180px);
}

.points-left-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.points-right-panel {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 280px;
}

.points-operation-area {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    font-size: 12px;
}

.points-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 3px;
    font-size: 11px;
}

/* 积分明细头部 */
.points-detail-header {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.detail-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.points-detail-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
}

.points-detail-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 积分明细分类 - 月份层级（固定标题 + 滚动内容） */
.points-detail-month-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.detail-month-header-fixed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-bottom: 2px solid var(--primary-color);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    border-radius: 8px 8px 0 0;
}

.detail-month-header-fixed:hover {
    background: linear-gradient(135deg, #6BC8E6 0%, #FF9E9E 100%);
}

.detail-month-scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
    background: linear-gradient(135deg, #FAFBFC 0%, #F5F7FA 100%);
    border-radius: 0 0 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 月份导航按钮 */
.month-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 8px;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.month-nav-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.month-nav-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.month-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.month-nav-info {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* 旧样式兼容 */
.points-detail-month {
    margin-bottom: 12px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FDFF 100%);
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.points-detail-month.collapsed {
    overflow: hidden;
}

.detail-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-bottom: 2px solid var(--primary-color);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.detail-month-header:hover {
    background: linear-gradient(135deg, #6BC8E6 0%, #FF9E9E 100%);
}

.detail-month-name {
    font-weight: 700;
    font-size: 14px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detail-month-count {
    font-size: 12px;
    color: white;
    background: rgba(255, 255, 255, 0.25);
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.current-month-badge {
    font-size: 10px;
    color: var(--primary-color);
    background: white;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    font-weight: 700;
}

.detail-dates-list {
    padding: 8px;
    background: linear-gradient(135deg, #FAFBFC 0%, #F5F7FA 100%);
}

/* 日期层级 */
.points-detail-date {
    margin-bottom: 0;
    margin-top: 0;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    flex-shrink: 0;
}

.points-detail-date:last-child {
    margin-bottom: 0;
}

.points-detail-date.collapsed {
    overflow: hidden;
}

.detail-date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.detail-date-header:hover {
    background: linear-gradient(135deg, #e0f7fa 0%, #e1f5fe 100%);
}

.detail-date-name {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
}

.detail-date-count {
    font-size: 10px;
    color: var(--text-secondary);
    background: white;
    padding: 2px 6px;
    border-radius: 8px;
}

/* 旧样式兼容 */
.points-detail-category {
    margin-bottom: 10px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FDFF 100%);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    position: relative;
}

.points-detail-category.collapsed {
    overflow: hidden;
}

.detail-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    position: sticky;
    top: -5px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.detail-category-header:hover {
    background: linear-gradient(135deg, #e0f7fa 0%, #e1f5fe 100%);
}

.category-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.expand-icon {
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.2s;
    width: 12px;
    text-align: center;
}

.points-detail-category.collapsed .expand-icon {
    transform: rotate(-90deg);
}

.detail-category-name {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
}

.detail-category-count {
    font-size: 10px;
    color: var(--text-secondary);
    background: white;
    padding: 2px 6px;
    border-radius: 8px;
}

.detail-items-list {
    padding: 0 4px 4px 4px;
    max-height: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 6px;
    margin-bottom: 0;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    flex-wrap: wrap;
    gap: 3px;
}

.detail-item:hover {
    border-color: var(--primary-light);
    background: rgba(126, 200, 227, 0.05);
}

.detail-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.detail-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.detail-item-name {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-item-project {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-item-time {
    font-size: 9px;
    color: #94a3b8;
}


.detail-item-score {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
    margin-left: 5px;
}

.score-positive {
    color: #2E7D32;
    background: rgba(168, 230, 207, 0.4);
}

.score-negative {
    color: #C62828;
    background: rgba(255, 170, 165, 0.4);
}

/* 积分操作区域 */
.points-student-select {
    margin: 12px 0;
}

.points-student-select label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
}

.student-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.student-tag {
    padding: 5px 10px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s;
}

.student-tag:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.no-students {
    color: var(--text-secondary);
    font-size: 11px;
    padding: 8px;
}

/* 积分操作区域 */
.points-action-area {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.selected-student-info {
    margin-bottom: 10px;
    padding: 8px 10px;
    background: linear-gradient(135deg, var(--accent-light) 0%, #FFF4E1 100%);
    border-radius: 8px;
    border: 1px solid var(--accent-color);
}

.selected-student-info .student-name {
    font-weight: 700;
    color: var(--primary-dark);
}

/* 积分分类标签 */
.points-categories-tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 10px;
    width: 100%;
}

.points-categories-tabs .points-category-tab {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.points-category-tab {
    padding: 5px 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.points-category-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary-color);
}

.points-category-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
    color: white;
}

/* 积分项目操作按钮 */
.points-items-display {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
}

.points-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 50px;
    max-width: 120px;
    min-height: 40px;
    flex: 1 1 auto;
}

.points-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.points-action-btn.positive {
    border-color: var(--success-color);
}

.points-action-btn.positive:hover {
    background: rgba(168, 230, 207, 0.2);
    border-color: var(--success-color);
}

.points-action-btn.negative {
    border-color: var(--danger-color);
}

.points-action-btn.negative:hover {
    background: rgba(255, 170, 165, 0.2);
    border-color: var(--danger-color);
}

.points-action-btn.custom-score-btn {
    border-color: var(--primary-color);
    border-style: dashed;
}

.points-action-btn.custom-score-btn:hover {
    background: rgba(126, 200, 227, 0.15);
    border-color: var(--primary-color);
}

.points-action-btn .custom-score-tag {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(126, 200, 227, 0.2);
    border-radius: 6px;
    white-space: nowrap;
}

.points-action-btn .action-name {
    font-size: clamp(10px, 2vw, 14px);
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    word-break: break-word;
    line-height: 1.2;
}

.points-action-btn .action-score {
    font-size: clamp(12px, 2.5vw, 18px);
    font-weight: 700;
    text-align: center;
}

.points-action-btn.positive .action-score {
    color: var(--success-color);
}

.points-action-btn.negative .action-score {
    color: var(--danger-color);
}

.floating-score-hint {
    position: fixed;
    font-size: 28px;
    font-weight: 700;
    pointer-events: none;
    z-index: 10000;
    animation: floatUpFade 2s ease-out forwards;
}

/* 晨读声音监听样式 - 紧凑横向布局 */
.morning-reading-monitor-compact {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #FFF8E7 0%, #FFF5E0 100%);
    border-radius: 10px;
    border: 2px solid #FFD699;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.monitor-compact-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 100px;
}

.monitor-compact-title {
    font-size: 13px;
    font-weight: 600;
    color: #E6A23C;
}

.monitor-compact-controls {
    display: flex;
    gap: 5px;
}

.monitor-compact-btn {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.monitor-compact-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.monitor-compact-center {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.monitor-compact-status {
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.monitor-compact-db {
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

.monitor-compact-time {
    font-weight: 600;
    color: #E6A23C;
    min-width: 50px;
}

.monitor-compact-state {
    font-size: 11px;
    color: #999;
}

.monitor-compact-state.monitoring {
    color: #67C23A;
    animation: pulse 1.5s infinite;
}

.monitor-compact-bar {
    position: relative;
    height: 12px;
    background: #E0E0E0;
    border-radius: 6px;
    overflow: hidden;
}

.monitor-compact-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #67C23A 0%, #E6A23C 50%, #F56C6C 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.monitor-compact-threshold {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 80%;
    width: 2px;
    background: #F56C6C;
    z-index: 1;
}

.monitor-compact-right {
    min-width: 80px;
}

.monitor-compact-excluded {
    font-size: 11px;
}

.monitor-compact-excluded .no-excluded {
    color: #999;
}

.monitor-compact-excluded .has-excluded {
    color: #F56C6C;
    font-weight: 600;
}

/* 阈值设置样式 */
.monitor-compact-threshold-setting {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    margin-bottom: 4px;
}

.monitor-compact-threshold-setting label {
    color: #666;
    font-size: 11px;
}

.monitor-compact-threshold-setting input {
    width: 45px;
    padding: 2px 4px;
    border: 1px solid #DDD;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    color: #333;
}

.monitor-compact-threshold-setting input:focus {
    outline: none;
    border-color: #E6A23C;
}

.monitor-compact-threshold-setting span {
    color: #999;
    font-size: 10px;
}

/* 时长设置样式 */
.monitor-compact-duration-setting {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    margin-bottom: 4px;
}

.monitor-compact-duration-setting label {
    color: #666;
    font-size: 11px;
}

.monitor-compact-duration-setting input {
    width: 40px;
    padding: 2px 4px;
    border: 1px solid #DDD;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    color: #333;
}

.monitor-compact-duration-setting input:focus {
    outline: none;
    border-color: #E6A23C;
}

.monitor-compact-duration-setting span {
    color: #999;
    font-size: 10px;
}

/* 晨读刮刮卡弹窗样式 - 喜庆红色主题 */
.scratch-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    justify-content: center;
    align-items: center;
}

.scratch-modal.show-modal {
    display: flex !important;
}

.scratch-modal .modal-content {
    max-width: 420px;
    width: 90%;
    margin: 0;
    position: relative;
    animation: scratchModalIn 0.3s ease;
}

@keyframes scratchModalIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.scratch-content {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A5A 50%, #D63031 100%);
    border: 4px solid #FFD700;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(214, 48, 49, 0.5), 0 0 60px rgba(255, 215, 0, 0.3);
}

.scratch-content .modal-header {
    background: linear-gradient(135deg, #C0392B 0%, #E74C3C 100%);
    border-radius: 16px 16px 0 0;
    border-bottom: 3px solid #FFD700;
    padding: 15px 20px;
}

.scratch-content .modal-header h3 {
    color: #FFD700;
    font-size: 22px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}

.scratch-content .close-btn {
    color: #FFD700;
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.scratch-content .close-btn:hover {
    color: #FFF;
}

.scratch-body {
    padding: 25px 20px;
    text-align: center;
}

.scratch-instruction {
    font-size: 16px;
    color: #FFD700;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.scratch-card-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.scratch-card {
    position: relative;
    width: 400px;
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4), inset 0 0 0 3px #FFD700;
    border: 3px solid #B8860B;
}

.scratch-card canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 2;
    border-radius: 12px;
}

.scratch-result {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    background: linear-gradient(135deg, #FFF8DC 0%, #FFEFD5 50%, #FFE4B5 100%);
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.scratch-result::before {
    content: '🎉';
    font-size: 36px;
    margin-bottom: 5px;
}

.scratch-result.reward-1 {
    color: #E74C3C;
    background: linear-gradient(135deg, #FFF0F0 0%, #FFE4E4 50%, #FFD6D6 100%);
}

.scratch-result.reward-1::before {
    content: '🏆';
}

.scratch-result.reward-3 {
    color: #D63031;
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE8CC 50%, #FFD9B3 100%);
}

.scratch-result.reward-3::before {
    content: '👑';
}

.scratch-result.reward-2 {
    color: #E74C3C;
    background: linear-gradient(135deg, #FFF0F5 0%, #FFE4EC 50%, #FFD6E0 100%);
}

.scratch-result.reward-2::before {
    content: '⭐';
}

.scratch-result.reward-5 {
    color: #C0392B;
    background: linear-gradient(135deg, #FFE4E1 0%, #FFCDD2 50%, #EF9A9A 100%);
}

.scratch-result.reward-5::before {
    content: '💎';
}

.scratch-result.reward-8 {
    color: #922B21;
    background: linear-gradient(135deg, #FFCCBC 0%, #FFAB91 50%, #FF8A65 100%);
}

.scratch-result.reward-8::before {
    content: '🌟';
}

.scratch-result.reward-10 {
    color: #7B241C;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
}

.scratch-result.reward-10::before {
    content: '🎊';
}

.scratch-result.reward-encourage {
    color: #E67E22;
    background: linear-gradient(135deg, #FFF8E6 0%, #FFEDD5 50%, #FFE0B3 100%);
}

.scratch-result.reward-encourage::before {
    content: '💪';
}

.scratch-result.reward-thanks {
    color: #7F8C8D;
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 50%, #DEE2E6 100%);
}

.scratch-result.reward-thanks::before {
    content: '🍀';
}

.scratch-progress {
    margin-top: 15px;
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 10px;
}

.progress-label {
    font-size: 13px;
    color: #FFD700;
    margin-bottom: 8px;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.3);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,215,0,0.5);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* 晨读声音监听样式 - 原始完整布局（保留备用） */
.morning-reading-monitor {
    padding: 15px;
    background: linear-gradient(135deg, #FFF8E7 0%, #FFF5E0 100%);
    border-radius: 12px;
    border: 2px solid #FFD699;
}

.morning-reading-monitor .monitor-header {
    text-align: center;
    margin-bottom: 15px;
}

.morning-reading-monitor .monitor-header h4 {
    color: #E6A23C;
    font-size: 18px;
    margin: 0 0 8px 0;
}

.morning-reading-monitor .monitor-desc {
    color: #666;
    font-size: 12px;
    margin: 0;
}

.morning-reading-monitor .monitor-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.morning-reading-monitor .monitor-btn {
    padding: 10px 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.morning-reading-monitor .monitor-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.morning-reading-monitor .monitor-status {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.morning-reading-monitor .status-item {
    text-align: center;
}

.morning-reading-monitor .status-label {
    display: block;
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

.morning-reading-monitor .status-value {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.morning-reading-monitor .status-value.monitoring {
    color: #67C23A;
    animation: pulse 1.5s infinite;
}

.morning-reading-monitor .volume-bar-container {
    position: relative;
    height: 30px;
    background: #E0E0E0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.morning-reading-monitor .volume-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #67C23A 0%, #E6A23C 50%, #F56C6C 100%);
    border-radius: 15px;
    transition: width 0.3s ease;
}

.morning-reading-monitor .volume-threshold {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #F56C6C;
    z-index: 1;
}

.morning-reading-monitor .threshold-label {
    position: absolute;
    top: -18px;
    right: 18%;
    font-size: 11px;
    color: #F56C6C;
    font-weight: 600;
}

.morning-reading-monitor .excluded-students {
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.morning-reading-monitor .excluded-students h5 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #666;
}

.morning-reading-monitor .excluded-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.morning-reading-monitor .excluded-tag {
    padding: 3px 8px;
    background: #FDE2E2;
    color: #F56C6C;
    border-radius: 10px;
    font-size: 11px;
}

.morning-reading-monitor .no-excluded {
    color: #999;
    font-size: 11px;
}

.morning-reading-monitor .monitor-log {
    max-height: 150px;
    overflow-y: auto;
    background: #F5F5F5;
    border-radius: 8px;
    padding: 10px;
}

.morning-reading-monitor .log-item {
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px dashed #DDD;
}

.morning-reading-monitor .log-item:last-child {
    border-bottom: none;
}

.morning-reading-monitor .log-time {
    color: #999;
    margin-right: 8px;
}

/* 监听通知 */
.monitor-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #67C23A 0%, #85CE61 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(103, 194, 58, 0.4);
    z-index: 10000;
    transition: transform 0.3s ease;
}

.monitor-notification.show {
    transform: translateX(-50%) translateY(0);
}

/* 监听通知样式 */
.monitor-notification {
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.floating-score-hint.positive {
    color: #28a745;
}

.floating-score-hint.negative {
    color: #dc3545;
}

@keyframes floatUpFade {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.8);
    }
}

.no-items {
    color: var(--text-secondary);
    font-size: 11px;
    padding: 15px;
    text-align: center;
}

/* Tab选项卡 - 小清新风格 */
.select-mode-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.tab-item {
    padding: 8px 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-item:hover {
    color: #0ea5e9;
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.tab-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    font-weight: 600;
}

.tab-item.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

/* 学生选择头部 */
.student-select-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.student-select-header label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: auto;
    font-size: 12px;
}

.select-all-btn, .clear-all-btn, .voice-input-btn, .gender-btn {
    padding: 4px 8px;
    font-size: 10px;
}

/* 语音输入按钮样式 */
.voice-input-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.voice-input-btn:hover {
    background: linear-gradient(135deg, #FF5252 0%, #FF7979 100%);
    transform: scale(1.05);
}

.voice-input-btn.recording {
    animation: pulse 1.5s infinite;
    background: linear-gradient(135deg, #FF1744 0%, #FF5252 100%);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 23, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 23, 68, 0); }
}

/* 语音识别弹窗 */
.voice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.voice-modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: voiceModalSlideIn 0.3s ease;
}

@keyframes voiceModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.voice-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.voice-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    border-radius: 50%;
    margin-bottom: 16px;
}

.voice-icon {
    color: white;
    z-index: 2;
}

.voice-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 4px;
    z-index: 1;
}

.voice-waves span {
    width: 4px;
    height: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    animation: voiceWave 1s ease-in-out infinite;
}

.voice-waves span:nth-child(1) { animation-delay: 0s; }
.voice-waves span:nth-child(2) { animation-delay: 0.2s; }
.voice-waves span:nth-child(3) { animation-delay: 0.4s; }

@keyframes voiceWave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1.5); }
}

.voice-modal-header h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin: 0;
}

.voice-modal-body {
    text-align: center;
    margin-bottom: 20px;
}

.voice-modal-body p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}

.voice-results {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
}

.voice-result-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.voice-result-tag.matched {
    background: linear-gradient(135deg, #A8E6CF 0%, #88D8B0 100%);
    color: white;
}

.voice-result-tag.unmatched {
    background: #f0f0f0;
    color: #999;
    text-decoration: line-through;
}

.voice-modal-footer {
    text-align: center;
}

.voice-modal-footer button {
    padding: 10px 24px;
    font-size: 14px;
}

/* 积分汇总弹窗样式 - 页面中央 */
.points-summary-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.points-summary-modal-content {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 50%, #FFB8B8 100%);
    border-radius: 20px;
    padding: 30px 40px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(255, 107, 107, 0.5), 0 0 100px rgba(255, 215, 0, 0.3);
    border: 4px solid #FFD700;
    animation: modalPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.points-summary-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.5);
}

.points-summary-modal-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.points-summary-modal-header .close-btn {
    background: rgba(255, 255, 255, 0.3);
    border: 3px solid white;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.points-summary-modal-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1) rotate(90deg);
}

.points-summary-modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.points-modal-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 17px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.points-modal-stat:hover {
    transform: translateX(5px);
}

.points-modal-stat.positive {
    border-left: 6px solid #4CAF50;
}

.points-modal-stat.negative {
    border-left: 6px solid #F44336;
}

.points-modal-stat.total {
    border-left: 6px solid #2196F3;
    font-weight: 700;
    background: linear-gradient(135deg, #FFF8E1 0%, #FFE082 100%);
    transform: scale(1.02);
}

.points-modal-stat .stat-label {
    color: #333;
    font-weight: 600;
}

.points-modal-stat .stat-value {
    font-size: 22px;
    font-weight: 800;
}

.points-modal-stat.positive .stat-value {
    color: #2E7D32;
}

.points-modal-stat.negative .stat-value {
    color: #C62828;
}

.points-modal-stat.total .stat-value {
    color: #1565C0;
}

/* 学生档案弹窗样式 */
.student-profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

.student-profile-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    border-radius: 20px;
    padding: 0;
    min-width: 450px;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    border: 3px solid #4ECDC4;
    animation: modalPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
}

/* 横向布局 */
.student-profile-modal-content.horizontal {
    max-width: 900px;
    min-width: 800px;
}

.student-profile-modal-body.horizontal {
    display: flex;
    flex-direction: row;
    gap: 25px;
    padding: 25px;
    overflow: hidden;
    max-height: calc(85vh - 80px);
}

/* 左侧面板 */
.profile-left-panel {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    padding-right: 10px;
}

/* 右侧面板 */
.profile-right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    padding-right: 10px;
}

/* 学生信息卡片 */
.profile-student-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    border: 2px solid #5a67d8;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-align: center;
}

.student-avatar {
    font-size: 56px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    margin-bottom: 15px;
    color: #667eea;
    font-weight: 800;
    overflow: hidden;
    border: 4px solid white;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.student-name {
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.student-class {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
}

.student-profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.student-profile-modal-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.student-profile-modal-header .close-btn {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    font-size: 22px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.student-profile-modal-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1) rotate(90deg);
}

.student-profile-modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

/* 宠物信息卡片 */
.profile-pet-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #FFF8E1 0%, #FFE082 100%);
    border-radius: 15px;
    border: 2px solid #FFD700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.profile-left-panel .profile-pet-card {
    flex-direction: column;
    text-align: center;
}

.profile-pet-avatar {
    font-size: 48px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-pet-info {
    flex: 1;
}

.profile-pet-name {
    font-size: 22px;
    font-weight: 800;
    color: #333;
    margin-bottom: 5px;
}

.profile-pet-level {
    font-size: 16px;
    color: #666;
    font-weight: 600;
}

/* 积分统计网格 */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* 左侧面板中的积分统计 */
.profile-left-panel .profile-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
}

.profile-left-panel .profile-stat-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 15px;
    text-align: left;
}

.profile-left-panel .profile-stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 0;
    margin-right: 12px;
}

.profile-left-panel .profile-stat-card .stat-info {
    display: flex;
    flex-direction: column;
}

.profile-left-panel .profile-stat-card .stat-info .stat-label {
    font-size: 11px;
    margin-bottom: 2px;
}

.profile-left-panel .profile-stat-card .stat-info .stat-value {
    font-size: 18px;
}

.profile-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.profile-stat-card:hover {
    transform: translateY(-3px);
}

.profile-stat-card.positive {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 2px solid #4CAF50;
}

.profile-stat-card.negative {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    border: 2px solid #F44336;
}

.profile-stat-card.total {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border: 2px solid #2196F3;
}

.profile-stat-card .stat-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.profile-stat-card .stat-info .stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.profile-stat-card .stat-info .stat-value {
    font-size: 20px;
    font-weight: 800;
}

.profile-stat-card.positive .stat-value {
    color: #2E7D32;
}

.profile-stat-card.negative .stat-value {
    color: #C62828;
}

.profile-stat-card.total .stat-value {
    color: #1565C0;
}

/* 现金红包统计卡片 */
.profile-stat-card.cash {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #8B4513;
    border: 2px solid #FFD700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.profile-stat-card.cash:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.profile-stat-card.cash .stat-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.profile-stat-card.cash .stat-info .stat-label {
    color: #8B4513;
    font-weight: 600;
}

.profile-stat-card.cash .stat-info .stat-value {
    color: #D35400;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* 荣誉墙部分 */
.profile-honors-section {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #FFD700;
    margin-bottom: 20px;
}

.profile-honors-section h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #333;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFD700;
}

.profile-honors-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 8px;
}

.no-honors {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    width: 100%;
}

/* 荣誉圆环样式 - 缩小版 */
.honor-ring {
    position: relative;
    width: 75px;
    height: 95px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.honor-ring:hover {
    transform: translateY(-5px) scale(1.05);
}

.honor-ring.claimed {
    opacity: 1;
}

.honor-ring.unclaimed {
    animation: ringPulse 2s infinite;
}

@keyframes ringPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* 外圆环 - 缩小 */
.ring-outer {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid;
}

/* 不同等级的圆环颜色 */
.honor-ring-level-1 .ring-outer { background: linear-gradient(145deg, #CD7F32 0%, #8B4513 100%); border-color: #D2691E; }
.honor-ring-level-2 .ring-outer { background: linear-gradient(145deg, #C0C0C0 0%, #808080 100%); border-color: #A9A9A9; }
.honor-ring-level-3 .ring-outer { background: linear-gradient(145deg, #FFD700 0%, #B8860B 100%); border-color: #DAA520; }
.honor-ring-level-4 .ring-outer { background: linear-gradient(145deg, #FF6B6B 0%, #EE5A6F 100%); border-color: #FF4757; }
.honor-ring-level-5 .ring-outer { background: linear-gradient(145deg, #9B59B6 0%, #8E44AD 100%); border-color: #A569BD; }
.honor-ring-level-6 .ring-outer { background: linear-gradient(145deg, #3498DB 0%, #2980B9 100%); border-color: #5DADE2; }
.honor-ring-level-7 .ring-outer { background: linear-gradient(145deg, #F39C12 0%, #D68910 100%); border-color: #F5B041; }

/* 内圆环 - 缩小 */
.ring-inner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.ring-icon {
    font-size: 22px;
    line-height: 1;
}

/* 圆环上的文字 - 缩小 */
.ring-text {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #333;
    padding: 3px 5px;
    background: linear-gradient(135deg, #FFF8E1 0%, #FFE082 100%);
    border-radius: 10px;
    border: 1px solid #FFD700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 领取徽章 - 缩小 */
.ring-claim-badge {
    position: absolute;
    top: 0;
    right: 2px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
    color: white;
    font-size: 9px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 5px rgba(255, 107, 107, 0.5);
    animation: badgePulse 1.5s infinite;
    border: 1px solid white;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* 领取动画效果 */
.honor-ring.claiming {
    animation: ringClaim 0.8s ease;
}

@keyframes ringClaim {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-10deg); }
    50% { transform: scale(1.15) rotate(10deg); }
    75% { transform: scale(1.1) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* 闪光效果 */
.medal-flash-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 215, 0, 0.9) 0%, transparent 70%);
    border-radius: 50%;
    animation: flashExpand 0.8s ease forwards;
    pointer-events: none;
}

@keyframes flashExpand {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}

/* 粒子效果 */
.medal-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFly 1s ease forwards;
    animation-delay: var(--delay);
}

@keyframes particleFly {
    0% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(80px);
        opacity: 0;
    }
}

/* 积分历史部分 */
.profile-history-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.profile-history-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid #4ECDC4;
}

.profile-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.no-history {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
}

/* 日期分组 */
.history-date-group {
    margin-bottom: 15px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.history-date-group:last-child {
    margin-bottom: 0;
}

.date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    border-bottom: 1px solid #e0e0e0;
}

.date-label {
    font-weight: 700;
    color: #333;
    font-size: 14px;
}

.date-summary {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
}

.day-positive {
    color: #4CAF50;
    font-weight: 700;
}

.day-negative {
    color: #F44336;
    font-weight: 700;
}

.day-total {
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f0f0f0;
}

.day-total.positive-total {
    background: #E8F5E9;
    color: #2E7D32;
}

.day-total.negative-total {
    background: #FFEBEE;
    color: #C62828;
}

/* 每日记录列表 */
.date-records {
    padding: 10px 15px;
}

.history-record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.history-record-item:last-child {
    border-bottom: none;
}

.record-time {
    color: #999;
    font-size: 12px;
    min-width: 45px;
}

.record-item {
    flex: 1;
    margin: 0 10px;
    color: #555;
}

.record-score {
    font-weight: 700;
    font-size: 14px;
    min-width: 40px;
    text-align: right;
}

.record-score.positive-score {
    color: #4CAF50;
}

.record-score.negative-score {
    color: #F44336;
}

/* 喜庆礼花粒子 */
.celebration-particle {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    animation: particleExplode 1.5s ease-out forwards;
}

@keyframes particleExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* 学生标签选中状态 */
.student-tag {
    position: relative;
}

.student-tag.selected {
    background: linear-gradient(135deg, var(--success-color) 0%, #88D8B0 100%);
    border-color: var(--success-color);
    color: white;
    box-shadow: 0 3px 8px rgba(168, 230, 207, 0.4);
}

.student-tag.selected::after {
    content: '✓';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: var(--success-color);
    border-radius: 50%;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid white;
}

/* 小组选择区域 */
.group-select-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.group-select-header label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: auto;
    font-size: 12px;
}

.group-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.group-tag {
    padding: 5px 10px;
    background: linear-gradient(135deg, #FFE4B5 0%, #FFDAB9 100%);
    border: 1px solid #FFA500;
    border-radius: 15px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #8B4513;
    transition: all 0.3s;
    position: relative;
}

.group-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(255, 165, 0, 0.3);
}

.group-tag.selected {
    background: linear-gradient(135deg, #FF8C00 0%, #FFA500 100%);
    border-color: #FF8C00;
    color: white;
    box-shadow: 0 3px 8px rgba(255, 140, 0, 0.4);
}

.group-tag.selected::after {
    content: '✓';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #FF8C00;
    border-radius: 50%;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1px solid white;
}

/* 已选学生显示 */
.selected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.selected-count {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.selected-students-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: 80px;
    overflow-y: auto;
    padding: 3px;
}

.selected-student-tag {
    padding: 5px 12px;
    background: linear-gradient(135deg, var(--success-color) 0%, #88D8B0 100%);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.selected-student-tag:hover {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.selected-student-tag:hover::after {
    content: '✕';
    margin-left: 5px;
    font-size: 12px;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* 宠物等级设置弹窗样式 */
.level-settings-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF4D9 100%);
    border-radius: var(--radius-sm);
    border-left: 3px solid #FFD93D;
}

.level-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.level-settings-grid .form-group {
    margin-bottom: 0;
}

.level-settings-grid .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    display: block;
}

.level-settings-grid .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.level-settings-grid .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(126, 200, 227, 0.2);
}

.level-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

/* ==================== 新样式宠物卡片 ==================== */
.pet-display-content .student-pet-card-new {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #F8F9FF 0%, #FFFFFF 100%);
    border-radius: 10px;
    border: 1px solid #E8E8F0;
    padding: 6px 4px 4px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    min-height: auto;
    width: 100%;
    font-size: 10px;
    overflow: hidden;
}

.pet-display-content .student-pet-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(100, 100, 255, 0.15);
    border-color: #C5C5F0;
}

/* 等级徽章 - 左上角 */
.pet-level-top {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #6B7CFF 0%, #8B5CF6 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(107, 124, 255, 0.3);
}

/* 宠物头像区域 */
.pet-avatar-new {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 0 2px;
    flex: 0 0 auto;
}

.pet-avatar-new .pet-avatar-wrapper {
    width: 90px;
    height: 90px;
    font-size: 50px;
    background: linear-gradient(135deg, #F0F4FF 0%, #E8EEFF 100%);
    border-radius: 50%;
    border: 2px solid #D4D8FF;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: avatar-float 3s ease-in-out infinite;
    overflow: hidden;
    position: relative;
}

.pet-avatar-new .pet-avatar-wrapper .pet-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.pet-avatar-new .pet-avatar-wrapper .pet-accessory {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 20px;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* 基础光圈旋转动画 */
@keyframes ring-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 神兽特殊样式 - 7级 */
.pet-avatar-new .pet-avatar-wrapper.divine-beast {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF6347 100%);
    border: 3px solid #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 165, 0, 0.4);
    animation: avatar-float 3s ease-in-out infinite, divine-glow 2s ease-in-out infinite alternate;
    position: relative;
}

.pet-avatar-new .pet-avatar-wrapper.divine-beast::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, #FFD700, #FFA500, #FF6347, #FFD700, transparent);
    transform: translate(-50%, -50%);
    animation: ring-rotate 3s linear infinite;
    z-index: -1;
    opacity: 0.8;
}

.pet-avatar-new .pet-avatar-wrapper.divine-beast::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF6347 100%);
    transform: translate(-50%, -50%);
    z-index: -1;
}

@keyframes divine-glow {
    from {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 165, 0, 0.4);
    }
    to {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 165, 0, 0.6), 0 0 80px rgba(255, 99, 71, 0.4);
    }
}

/* 蛋状态 - 0级 */
.pet-avatar-new .pet-avatar-wrapper.level-0-glow {
    background: linear-gradient(135deg, #F5F5F5 0%, #E0E0E0 100%);
    border: 2px solid #BDBDBD;
    animation: avatar-float 3s ease-in-out infinite;
}

/* 1级 - 淡绿旋转光圈 */
.pet-avatar-new .pet-avatar-wrapper.level-1-glow {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 2px solid #81C784;
    box-shadow: 0 0 10px rgba(129, 199, 132, 0.4);
    animation: avatar-float 3s ease-in-out infinite, level1-glow 2s ease-in-out infinite alternate;
    position: relative;
}

.pet-avatar-new .pet-avatar-wrapper.level-1-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px dashed rgba(129, 199, 132, 0.6);
    transform: translate(-50%, -50%);
    animation: ring-rotate 8s linear infinite;
    z-index: -1;
}

@keyframes level1-glow {
    from { box-shadow: 0 0 10px rgba(129, 199, 132, 0.4); }
    to { box-shadow: 0 0 15px rgba(129, 199, 132, 0.6); }
}

/* 2级 - 绿色旋转光圈 */
.pet-avatar-new .pet-avatar-wrapper.level-2-glow {
    background: linear-gradient(135deg, #C8E6C9 0%, #A5D6A7 100%);
    border: 2px solid #66BB6A;
    box-shadow: 0 0 12px rgba(102, 187, 106, 0.5);
    animation: avatar-float 3s ease-in-out infinite, level2-glow 2s ease-in-out infinite alternate;
    position: relative;
}

.pet-avatar-new .pet-avatar-wrapper.level-2-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 102px;
    height: 102px;
    border-radius: 50%;
    border: 3px dotted rgba(102, 187, 106, 0.7);
    transform: translate(-50%, -50%);
    animation: ring-rotate 6s linear infinite;
    z-index: -1;
}

@keyframes level2-glow {
    from { box-shadow: 0 0 12px rgba(102, 187, 106, 0.5); }
    to { box-shadow: 0 0 20px rgba(102, 187, 106, 0.7); }
}

/* 3级 - 蓝色旋转光圈 */
.pet-avatar-new .pet-avatar-wrapper.level-3-glow {
    background: linear-gradient(135deg, #BBDEFB 0%, #90CAF9 100%);
    border: 2px solid #42A5F5;
    box-shadow: 0 0 15px rgba(66, 165, 245, 0.5);
    animation: avatar-float 3s ease-in-out infinite, level3-glow 2s ease-in-out infinite alternate;
    position: relative;
}

.pet-avatar-new .pet-avatar-wrapper.level-3-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, #42A5F5, transparent, #42A5F5, transparent);
    transform: translate(-50%, -50%);
    animation: ring-rotate 4s linear infinite;
    z-index: -1;
    opacity: 0.6;
}

@keyframes level3-glow {
    from { box-shadow: 0 0 15px rgba(66, 165, 245, 0.5); }
    to { box-shadow: 0 0 25px rgba(66, 165, 245, 0.8); }
}

/* 4级 - 紫色旋转光圈 */
.pet-avatar-new .pet-avatar-wrapper.level-4-glow {
    background: linear-gradient(135deg, #E1BEE7 0%, #CE93D8 100%);
    border: 2px solid #AB47BC;
    box-shadow: 0 0 15px rgba(171, 71, 188, 0.5), 0 0 30px rgba(171, 71, 188, 0.3);
    animation: avatar-float 3s ease-in-out infinite, level4-glow 2s ease-in-out infinite alternate;
    position: relative;
}

.pet-avatar-new .pet-avatar-wrapper.level-4-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 106px;
    height: 106px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, #AB47BC, #E1BEE7, transparent, #AB47BC, #E1BEE7, transparent);
    transform: translate(-50%, -50%);
    animation: ring-rotate 3s linear infinite;
    z-index: -1;
    opacity: 0.7;
}

@keyframes level4-glow {
    from { box-shadow: 0 0 15px rgba(171, 71, 188, 0.5), 0 0 30px rgba(171, 71, 188, 0.3); }
    to { box-shadow: 0 0 25px rgba(171, 71, 188, 0.7), 0 0 50px rgba(171, 71, 188, 0.5); }
}

/* 5级 - 橙色旋转光圈 */
.pet-avatar-new .pet-avatar-wrapper.level-5-glow {
    background: linear-gradient(135deg, #FFE0B2 0%, #FFCC80 100%);
    border: 3px solid #FF9800;
    box-shadow: 0 0 18px rgba(255, 152, 0, 0.5), 0 0 35px rgba(255, 152, 0, 0.3);
    animation: avatar-float 3s ease-in-out infinite, level5-glow 2s ease-in-out infinite alternate;
    position: relative;
}

.pet-avatar-new .pet-avatar-wrapper.level-5-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #FF9800, #FFE0B2, #FF9800, #FFE0B2, #FF9800);
    transform: translate(-50%, -50%);
    animation: ring-rotate 2.5s linear infinite;
    z-index: -1;
    opacity: 0.8;
}

.pet-avatar-new .pet-avatar-wrapper.level-5-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 152, 0, 0.5);
    transform: translate(-50%, -50%);
    animation: ring-rotate 5s linear infinite reverse;
    z-index: -1;
}

@keyframes level5-glow {
    from { box-shadow: 0 0 18px rgba(255, 152, 0, 0.5), 0 0 35px rgba(255, 152, 0, 0.3); }
    to { box-shadow: 0 0 30px rgba(255, 152, 0, 0.8), 0 0 60px rgba(255, 152, 0, 0.5); }
}

/* 6级 - 红色旋转光圈 */
.pet-avatar-new .pet-avatar-wrapper.level-6-glow {
    background: linear-gradient(135deg, #FFCDD2 0%, #EF9A9A 100%);
    border: 3px solid #EF5350;
    box-shadow: 0 0 20px rgba(239, 83, 80, 0.5), 0 0 40px rgba(239, 83, 80, 0.3);
    animation: avatar-float 3s ease-in-out infinite, level6-glow 2s ease-in-out infinite alternate;
    position: relative;
}

.pet-avatar-new .pet-avatar-wrapper.level-6-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #EF5350, #FFCDD2, #EF5350, #FFCDD2, #EF5350);
    transform: translate(-50%, -50%);
    animation: ring-rotate 2s linear infinite;
    z-index: -1;
    opacity: 0.9;
}

.pet-avatar-new .pet-avatar-wrapper.level-6-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 102px;
    height: 102px;
    border-radius: 50%;
    border: 3px solid rgba(239, 83, 80, 0.6);
    transform: translate(-50%, -50%);
    animation: ring-rotate 4s linear infinite reverse;
    z-index: -1;
}

@keyframes level6-glow {
    from { box-shadow: 0 0 20px rgba(239, 83, 80, 0.5), 0 0 40px rgba(239, 83, 80, 0.3); }
    to { box-shadow: 0 0 35px rgba(239, 83, 80, 0.8), 0 0 70px rgba(239, 83, 80, 0.5); }
}

/* 宠物信息区域 */
.pet-info-new {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    justify-content: flex-start;
    padding-top: 14px;
}

/* 头部行 - 学生姓名和宠物类型 */
.pet-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2px;
    gap: 2px;
    min-width: 0;
    line-height: 1.2;
}

.student-name-new {
    font-size: 11px;
    font-weight: 700;
    color: #4A4A8A;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    max-width: 65%;
}

.pet-type-name {
    font-size: 9px;
    color: #8B8BA0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* 进度条区域 */
.progress-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 1px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 8px;
    color: #6B6B8A;
    white-space: nowrap;
    line-height: 1.2;
}

.points-needed {
    color: #6B7CFF;
    font-weight: 600;
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
}

.progress-bar-new {
    width: 100%;
    height: 5px;
    background: #F0F0F8;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-new {
    height: 100%;
    background: linear-gradient(90deg, #6B7CFF 0%, #8B5CF6 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 底部统计行 */
.pet-stats-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-top: 4px;
    border-top: 1px solid #F0F0F8;
    margin-top: 2px;
    gap: 1px;
    line-height: 1.2;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 9px;
    white-space: nowrap;
}

.stat-icon {
    font-size: 9px;
}

.stat-value {
    font-weight: 600;
    color: #4A4A8A;
    font-size: 9px;
}

.rank-stat {
    background: #F5F5FA;
    padding: 1px 3px;
    border-radius: 6px;
}

/* 排名徽章样式调整 */
.student-pet-card-new .rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    font-size: 12px;
}

/* 前三名特殊样式 */
.pet-display-content .student-pet-card-new.top-three-card {
    border-color: #FFD700;
    background: linear-gradient(180deg, #FFFBF0 0%, #FFFFFF 100%);
}

.pet-display-content .student-pet-card-new.rank-1 {
    border-color: #FFD700;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.pet-display-content .student-pet-card-new.rank-1:hover {
    background: linear-gradient(180deg, #FFE4B5 0%, #FFD700 100%);
    border-color: #FFA500;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.5);
}

.pet-display-content .student-pet-card-new.rank-2 {
    border-color: #C0C0C0;
    box-shadow: 0 4px 16px rgba(192, 192, 192, 0.3);
}

.pet-display-content .student-pet-card-new.rank-2:hover {
    background: linear-gradient(180deg, #D3D3D3 0%, #C0C0C0 100%);
    border-color: #A0A0A0;
    box-shadow: 0 8px 24px rgba(192, 192, 192, 0.5);
}

.pet-display-content .student-pet-card-new.rank-3 {
    border-color: #CD7F32;
    box-shadow: 0 4px 16px rgba(205, 127, 50, 0.3);
}

.pet-display-content .student-pet-card-new.rank-3:hover {
    background: linear-gradient(180deg, #DEB887 0%, #CD7F32 100%);
    border-color: #B87333;
    box-shadow: 0 8px 24px rgba(205, 127, 50, 0.5);
}

/* 新卡片前三名徽章样式 */
.pet-display-content .student-pet-card-new .top-rank-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 8px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #FFD700, #FF6B6B);
    padding: 2px 4px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.pet-display-content .student-pet-card-new.rank-1 .top-rank-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.pet-display-content .student-pet-card-new.rank-2 .top-rank-badge {
    background: linear-gradient(135deg, #C0C0C0, #E8E8E8);
}

.pet-display-content .student-pet-card-new.rank-3 .top-rank-badge {
    background: linear-gradient(135deg, #CD7F32, #F4A460);
}

/* 响应式调整 */
@media (max-width: 600px) {
    .pet-display-content .student-pet-card-new {
        padding: 10px;
    }
    
    .pet-display-content .pet-avatar-new .pet-avatar-wrapper {
        width: 70px;
        height: 70px;
        font-size: 36px;
    }
    
    .pet-display-content .student-name-new {
        font-size: 14px;
    }
    
    .pet-display-content .pet-type-name {
        font-size: 11px;
    }
}

/* ==================== 宠物升级动画（炫酷版） ==================== */

/* 升级覆盖层 */
.level-up-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.85) 0%, rgba(255, 140, 0, 0.85) 50%, rgba(255, 69, 0, 0.85) 100%);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 199;
    animation: levelUpExplode 0.5s ease-out;
    overflow: hidden;
}

/* 升级烟花Canvas */
.level-up-firework-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
}

@keyframes levelUpExplode {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* 升级内容 */
.level-up-content {
    text-align: center;
    z-index: 201;
    animation: levelUpPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

@keyframes levelUpPop {
    0% {
        transform: scale(0) translateY(50px);
        opacity: 0;
    }
    60% {
        transform: scale(1.3) translateY(-10px);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* 升级图标 */
.level-up-icon {
    font-size: 56px;
    margin-bottom: 6px;
    animation: iconCelebrate 0.6s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes iconCelebrate {
    0%, 100% {
        transform: rotate(-15deg) scale(1);
    }
    25% {
        transform: rotate(15deg) scale(1.2);
    }
    50% {
        transform: rotate(-10deg) scale(1.1);
    }
    75% {
        transform: rotate(10deg) scale(1.15);
    }
}

/* 升级文字 */
.level-up-text {
    font-size: 22px;
    font-weight: 900;
    color: #FFFFFF;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 30px rgba(255, 140, 0, 0.8),
        3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 6px;
    animation: textGlow 1s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 30px rgba(255, 140, 0, 0.8);
    }
    to {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 1),
            0 0 40px rgba(255, 215, 0, 1),
            0 0 60px rgba(255, 140, 0, 1),
            0 0 80px rgba(255, 69, 0, 0.8);
    }
}

/* 升级等级 */
.level-up-level {
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #6B7CFF 0%, #8B5CF6 100%);
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
    animation: levelBadgePulse 0.8s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(107, 124, 255, 0.5);
}

@keyframes levelBadgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(107, 124, 255, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(107, 124, 255, 0.8);
    }
}

/* 卡片闪烁效果 - 彩虹闪烁 */
.level-up-flash {
    animation: rainbowFlash 0.4s ease-in-out 5;
}

@keyframes rainbowFlash {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.8);
    }
    20% {
        box-shadow: 0 0 30px 15px rgba(255, 165, 0, 0.6);
    }
    40% {
        box-shadow: 0 0 30px 15px rgba(255, 255, 0, 0.6);
    }
    60% {
        box-shadow: 0 0 30px 15px rgba(0, 255, 0, 0.6);
    }
    80% {
        box-shadow: 0 0 30px 15px rgba(0, 0, 255, 0.6);
    }
}

/* 烟花容器 */
.fireworks-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: visible;
    border-radius: 10px;
    z-index: 101;
}

/* 烟花 - 炫酷粒子效果 */
.firework {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin-top: -4px;
    margin-left: -4px;
    animation: particleBurst 1.5s ease-out forwards;
    box-shadow: 0 0 10px 3px currentColor;
}

/* 12个粒子，圆形分布 - 预计算位置 */
.firework:nth-child(1) { background: #FF0000; animation-delay: 0s; --tx: 40px; --ty: 0px; }
.firework:nth-child(2) { background: #FF7F00; animation-delay: 0.05s; --tx: 35px; --ty: -20px; }
.firework:nth-child(3) { background: #FFFF00; animation-delay: 0.1s; --tx: 20px; --ty: -35px; }
.firework:nth-child(4) { background: #00FF00; animation-delay: 0.15s; --tx: 0px; --ty: -40px; }
.firework:nth-child(5) { background: #0000FF; animation-delay: 0.2s; --tx: -20px; --ty: -35px; }
.firework:nth-child(6) { background: #4B0082; animation-delay: 0.25s; --tx: -35px; --ty: -20px; }
.firework:nth-child(7) { background: #9400D3; animation-delay: 0.3s; --tx: -40px; --ty: 0px; }
.firework:nth-child(8) { background: #FF1493; animation-delay: 0.35s; --tx: -35px; --ty: 20px; }
.firework:nth-child(9) { background: #00CED1; animation-delay: 0.4s; --tx: -20px; --ty: 35px; }
.firework:nth-child(10) { background: #FFD700; animation-delay: 0.45s; --tx: 0px; --ty: 40px; }
.firework:nth-child(11) { background: #FF69B4; animation-delay: 0.5s; --tx: 20px; --ty: 35px; }
.firework:nth-child(12) { background: #32CD32; animation-delay: 0.55s; --tx: 35px; --ty: 20px; }

@keyframes particleBurst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
        box-shadow: 0 0 10px 4px currentColor;
    }
    30% {
        opacity: 1;
        box-shadow: 0 0 15px 6px currentColor;
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0.3);
        box-shadow: 0 0 0 0 transparent;
    }
}

/* ==================== 升级按钮样式 ==================== */
.level-up-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #FF6B35 0%, #FF8E53 100%);
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    animation: levelUpPulse 1.5s ease-in-out infinite;
    z-index: 10;
    border: 2px solid white;
    white-space: nowrap;
}

.level-up-button:hover {
    background: linear-gradient(135deg, #FF5722 0%, #FF7043 100%);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 87, 34, 0.5);
}

@keyframes levelUpPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* 宠物出场动画 - 全屏覆盖层 */
.pet-entrance-fullscreen {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.5) 0%, rgba(255, 140, 0, 0.5) 100%);
}

/* 宠物出场光效 */
.pet-entrance-fullscreen .pet-entrance-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 215, 0, 0.8) 30%, rgba(255, 165, 0, 0.4) 60%, transparent 80%);
    transform: scale(0);
    opacity: 0;
}

/* 宠物出场宠物 */
.pet-entrance-fullscreen .pet-entrance-pet {
    font-size: 80px !important;
    transform: scale(0);
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1)) drop-shadow(0 0 40px rgba(255, 165, 0, 0.8));
    z-index: 1;
    line-height: 1;
}

/* 激活动画状态 */
.pet-entrance-fullscreen.active .pet-entrance-glow {
    animation: petEntranceGlow 1.5s ease-out forwards !important;
}

.pet-entrance-fullscreen.active .pet-entrance-pet {
    animation: petEntranceGrow 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

/* 光效扩散动画 */
@keyframes petEntranceGlow {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    30% {
        transform: scale(1);
        opacity: 0.9;
    }
    60% {
        transform: scale(1.5);
        opacity: 0.6;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 宠物从小到大动画 */
@keyframes petEntranceGrow {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    15% {
        transform: scale(0.2) rotate(-120deg);
        opacity: 0.5;
    }
    30% {
        transform: scale(0.4) rotate(-60deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(0.6) rotate(0deg);
        opacity: 1;
    }
    70% {
        transform: scale(0.9) rotate(15deg);
        opacity: 1;
    }
    85% {
        transform: scale(1.1) rotate(-5deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 宠物头像区域添加相对定位，用于放置升级按钮 */
.pet-avatar-new {
    position: relative;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 600px) {
    .level-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* 积分管理响应式布局 */
@media (max-width: 1200px) {
    .points-management-container {
        flex-direction: column;
        height: auto;
    }

    .points-left-panel,
    .points-right-panel {
        flex: none;
        width: 100%;
    }

    .points-right-panel {
        min-width: unset;
        max-height: 400px;
    }
}

@media (max-width: 900px) {
    .ranking-table {
        font-size: 11px;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 6px 8px;
    }
}

/* 模态框响应式 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .shop-settings-content,
    .mystery-box-settings-content {
        width: 95%;
        padding: 10px;
    }
}

@media (max-width: 600px) {
    .modal-header h3 {
        font-size: 16px;
    }

    .shop-settings-item,
    .mystery-box-settings-item {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .shop-item-display,
    .mystery-box-item-info {
        width: 100%;
    }

    .shop-item-actions,
    .mystery-box-settings-item .btn-delete-item {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 宠物PK页面响应式 */
@media (max-width: 1100px) {
    .pk-selection-area {
        flex-direction: column;
    }

    .pk-available-section {
        width: 100%;
    }

    .pk-battle-area {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .pk-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .pk-battle-container {
        flex-direction: column;
        gap: 15px;
    }

    .pk-vs {
        font-size: 24px;
    }

    .pk-fighter {
        width: 100%;
        min-height: 120px;
    }
}

/* 小组管理响应式 */
@media (max-width: 900px) {
    .group-management-container {
        flex-direction: column;
    }

    .ungrouped-students {
        width: 100%;
    }

    .group-cards-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .group-cards-container {
        grid-template-columns: 1fr !important;
    }
}

/* 使用说明页面样式 */
.help-card {
    max-width: 900px;
    margin: 0 auto;
}

.help-card h3 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.help-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.help-section {
    background: linear-gradient(135deg, #FAFBFC 0%, #F5F7FA 100%);
    border-radius: 10px;
    padding: 15px 20px;
    border-left: 4px solid var(--primary-color);
}

.help-section h4 {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-section li {
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    border-bottom: 1px dashed var(--border-color);
}

.help-section li:last-child {
    border-bottom: none;
}

.help-section li strong {
    color: var(--primary-color);
    font-weight: 600;
}

.help-section:nth-child(1) { border-left-color: #FF6B6B; }
.help-section:nth-child(2) { border-left-color: #4ECDC4; }
.help-section:nth-child(3) { border-left-color: #45B7D1; }
.help-section:nth-child(4) { border-left-color: #96CEB4; }
.help-section:nth-child(5) { border-left-color: #FFEAA7; }
.help-section:nth-child(6) { border-left-color: #DDA0DD; }
.help-section:nth-child(7) { border-left-color: #98D8C8; }
.help-section:nth-child(8) { border-left-color: #F7DC6F; }
.help-section:nth-child(9) { border-left-color: #BB8FCE; }
.help-section:nth-child(10) { border-left-color: #F1948A; }
.help-section:nth-child(11) { border-left-color: #85C1E9; }
.help-section:nth-child(12) { border-left-color: #A9DFBF; }

/* 作者信息样式 */
.help-section.author-info {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-left-color: #3498DB !important;
}

.help-section.author-info h4 {
    color: #2C3E50;
    border-bottom: 2px solid #3498DB;
}

.author-details {
    padding: 10px 0;
}

.author-details p {
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.author-details p strong {
    color: #2C3E50;
    font-weight: 600;
    display: inline-block;
    width: 60px;
}

/* 响应式 - 使用说明 */
@media (max-width: 768px) {
    .help-card {
        padding: 15px;
    }
    
    .help-section {
        padding: 12px 15px;
    }
    
    .help-section h4 {
        font-size: 14px;
    }
    
    .help-section li {
        font-size: 12px;
    }
}

/* ==================== 红包雨抽奖样式 ==================== */
.red-packet-content {
    max-width: 1000px;
    width: 95%;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 50%, #FF6B6B 100%);
}

.red-packet-body {
    min-height: 550px;
    position: relative;
}

.red-packet-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.red-packet-cost,
.red-packet-daily {
    font-size: 16px;
    color: #FFF;
    font-weight: 600;
}

.red-packet-cost span,
.red-packet-daily span {
    color: #FFD700;
    font-size: 20px;
}

.red-packet-rules {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.red-packet-rules h4 {
    color: #E74C3C;
    margin-bottom: 10px;
    font-size: 16px;
}

.red-packet-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.red-packet-rules li {
    padding: 5px 0;
    color: #666;
    font-size: 13px;
    position: relative;
    padding-left: 20px;
}

.red-packet-rules li::before {
    content: '•';
    color: #E74C3C;
    font-weight: bold;
    position: absolute;
    left: 5px;
}

.red-packet-start-area {
    text-align: center;
    padding: 30px 0;
}

.btn-large {
    padding: 15px 50px;
    font-size: 20px;
    border-radius: 30px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    color: #8B0000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.btn-large:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

.red-packet-rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 10px;
    overflow: hidden;
    z-index: 10;
}

#red-packet-canvas {
    width: 100%;
    height: 100%;
}

.red-packet-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    z-index: 20;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: resultPopIn 0.5s ease;
}

@keyframes resultPopIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.result-icon {
    font-size: 60px;
    margin-bottom: 15px;
    animation: bounce 0.6s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.result-title {
    font-size: 22px;
    color: #E74C3C;
    font-weight: bold;
    margin-bottom: 15px;
}

.result-content {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.6;
}

.result-content .cash-amount {
    color: #E74C3C;
    font-size: 28px;
    font-weight: bold;
}

.result-content .points-amount {
    color: #FF6B6B;
    font-size: 24px;
    font-weight: bold;
}

/* 红包雨设置样式 */
.red-packet-settings-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.red-packet-settings-section h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.settings-hint {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

.input-hint {
    font-size: 11px;
    color: #999;
    margin-left: 8px;
}

.custom-amounts-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.custom-amount-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
}

.custom-amount-item span {
    font-size: 14px;
}

.custom-amount-item .btn-delete {
    padding: 2px 8px;
    font-size: 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* ============ 小组成员积分贡献弹窗 ============ */
.group-members-content {
    width: 720px;
    max-width: 92%;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
}
.group-members-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
}
.group-members-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.gm-summary-item {
    flex: 1;
    min-width: 100px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    text-align: center;
}
.gm-summary-label {
    font-size: .8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.gm-summary-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
}
.gm-summary-value.gm-pos { color: #16a34a; }
.gm-summary-value.gm-neg { color: #dc2626; }

.group-members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 56vh;
    overflow-y: auto;
}
.gm-member-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: background .2s, box-shadow .2s, transform .15s;
}
.gm-member-card:hover {
    background: var(--hover-bg);
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    transform: translateY(-1px);
}
.gm-member-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gm-member-card:nth-child(1) .gm-member-rank { background: linear-gradient(135deg, #f6d365, #fda085); }
.gm-member-card:nth-child(2) .gm-member-rank { background: linear-gradient(135deg, #a8c0ff, #3f6ed8); }
.gm-member-card:nth-child(3) .gm-member-rank { background: linear-gradient(135deg, #ff9a6b, #ff6a88); }

.gm-member-info {
    flex: 1;
    min-width: 0;
}
.gm-member-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.gm-member-meta {
    display: flex;
    gap: 12px;
    font-size: .78rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.gm-meta-add { color: #16a34a; font-weight: 600; }
.gm-meta-deduct { color: #dc2626; font-weight: 600; }
.gm-meta-records { color: var(--text-secondary); }

.gm-contribution-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}
.gm-bar {
    height: 100%;
    border-radius: 3px;
    transition: width .35s ease;
}
.gm-bar-pos { background: linear-gradient(90deg, #16a34a, #4ade80); }
.gm-bar-neg { background: linear-gradient(90deg, #dc2626, #f87171); }

.gm-member-stats {
    text-align: right;
    flex-shrink: 0;
    min-width: 80px;
}
.gm-current {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
}
.gm-current.gm-pos { color: #16a34a; }
.gm-current.gm-neg { color: #dc2626; }
.gm-contribution-text {
    font-size: .76rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.gm-member-action {
    flex-shrink: 0;
}
.gm-detail-btn {
    padding: 7px 14px;
    background: rgba(102, 126, 234, .12);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, .35);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.gm-detail-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

@media (max-width: 640px) {
    .group-members-content { width: 96%; max-width: 96%; }
    .gm-member-card { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
    .gm-member-info { flex: 1 1 100%; }
    .gm-member-stats { min-width: 60px; text-align: left; }
    .gm-summary-item { min-width: calc(50% - 6px); }
}

/* 红包雨动画 */
@keyframes redPacketFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(600px) rotate(360deg);
        opacity: 0.8;
    }
}

.red-packet-item {
    position: absolute;
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A5A 100%);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    animation: redPacketFall linear forwards;
}

.red-packet-item:hover {
    transform: scale(1.1);
}

.red-packet-item::before {
    content: '🧧';
    font-size: 30px;
}

.red-packet-item.opened {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    animation: none;
}

.red-packet-item.opened::before {
    content: '✨';
}

.red-packet-item.cash::before {
    content: '💰';
}

/* 红包雨设置弹窗样式 */
#red-packet-settings-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

#red-packet-settings-modal .modal-body {
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

/* 响应式 - 红包雨 */
@media (max-width: 600px) {
    .red-packet-content {
        width: 95%;
        padding: 10px;
    }
    
    .red-packet-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .btn-large {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .red-packet-result {
        width: 90%;
        padding: 25px;
    }
    
    .result-icon {
        font-size: 45px;
    }
    
    .result-title {
        font-size: 18px;
    }
    
    .result-content {
        font-size: 15px;
    }
}

/* ==================== 生日祝福功能样式 ==================== */

/* 生日弹窗 */
.birthday-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: birthdayFadeIn 0.5s ease;
}

@keyframes birthdayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.birthday-content {
    background: linear-gradient(135deg, #FFE5B4 0%, #FFDAB9 50%, #FFC0CB 100%);
    border-radius: 25px;
    padding: 50px 60px;
    text-align: center;
    max-width: 550px;
    min-width: 450px;
    box-shadow: 0 25px 80px rgba(255, 105, 180, 0.5);
    animation: birthdayBounce 0.8s ease;
    border: 4px solid #FF69B4;
}

@keyframes birthdayBounce {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.birthday-cake {
    font-size: 80px;
    animation: cakeBounce 1s ease infinite;
    margin-bottom: 20px;
}

@keyframes cakeBounce {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.birthday-text h2 {
    color: #E91E63;
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.birthday-text p {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.birthday-decorations {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.birthday-decorations span {
    font-size: 30px;
    animation: decorationFloat 2s ease-in-out infinite;
}

.birthday-decorations span:nth-child(1) { animation-delay: 0s; }
.birthday-decorations span:nth-child(2) { animation-delay: 0.2s; }
.birthday-decorations span:nth-child(3) { animation-delay: 0.4s; }
.birthday-decorations span:nth-child(4) { animation-delay: 0.6s; }
.birthday-decorations span:nth-child(5) { animation-delay: 0.8s; }

@keyframes decorationFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(10deg);
    }
}

/* 生日当天学生卡片样式 - 增强版 */
.student-pet-card-new.birthday-card {
    background: linear-gradient(135deg, #FFE5B4 0%, #FFDAB9 30%, #FFC0CB 60%, #FFB6C1 100%);
    border: 4px solid transparent;
    background-clip: padding-box;
    position: relative;
    box-shadow: 
        0 0 40px rgba(255, 105, 180, 0.6), 
        0 0 80px rgba(255, 182, 193, 0.4),
        0 10px 30px rgba(255, 20, 147, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
    animation: birthdayGlow 2s ease-in-out infinite, birthdayFloat 3s ease-in-out infinite;
    transform-style: preserve-3d;
}

/* 生日卡片边框动画 */
.student-pet-card-new.birthday-card::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #FF69B4, #FF1493, #FFD700, #FF69B4, #FF1493, #FFD700);
    background-size: 400% 400%;
    border-radius: 18px;
    z-index: -1;
    animation: borderGradient 3s linear infinite;
}

@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes birthdayFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

@keyframes birthdayGlow {
    0%, 100% {
        box-shadow: 
            0 0 40px rgba(255, 105, 180, 0.6), 
            0 0 80px rgba(255, 182, 193, 0.4),
            0 10px 30px rgba(255, 20, 147, 0.3),
            inset 0 0 30px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 0 60px rgba(255, 105, 180, 0.8), 
            0 0 120px rgba(255, 182, 193, 0.6),
            0 15px 40px rgba(255, 20, 147, 0.5),
            inset 0 0 50px rgba(255, 255, 255, 0.5);
    }
}

/* 生日蛋糕装饰 - 右上角 */
.student-pet-card-new.birthday-card .birthday-cake-icon {
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 40px;
    animation: cakeBounceIcon 1.5s ease-in-out infinite;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
    z-index: 10;
}

@keyframes cakeBounceIcon {
    0%, 100% {
        transform: translateY(0) rotate(-10deg) scale(1);
    }
    50% {
        transform: translateY(-8px) rotate(10deg) scale(1.1);
    }
}

/* 生日帽装饰 - 左上角 */
.student-pet-card-new.birthday-card .birthday-hat-icon {
    position: absolute;
    top: -12px;
    left: -12px;
    font-size: 35px;
    animation: hatWiggle 2s ease-in-out infinite;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
    z-index: 10;
}

@keyframes hatWiggle {
    0%, 100% {
        transform: rotate(-15deg);
    }
    50% {
        transform: rotate(15deg);
    }
}

/* 气球装饰 */
.student-pet-card-new.birthday-card .birthday-balloon-left,
.student-pet-card-new.birthday-card .birthday-balloon-right {
    position: absolute;
    font-size: 28px;
    animation: balloonFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    z-index: 10;
}

.student-pet-card-new.birthday-card .birthday-balloon-left {
    bottom: -8px;
    left: -8px;
    animation-delay: 0s;
}

.student-pet-card-new.birthday-card .birthday-balloon-right {
    bottom: -8px;
    right: -8px;
    animation-delay: 0.5s;
}

@keyframes balloonFloat {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* 星星闪烁装饰 */
.student-pet-card-new.birthday-card .birthday-stars {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.student-pet-card-new.birthday-card .birthday-star {
    position: absolute;
    font-size: 16px;
    animation: starTwinkle 1.5s ease-in-out infinite;
}

.student-pet-card-new.birthday-card .birthday-star:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.student-pet-card-new.birthday-card .birthday-star:nth-child(2) { top: 15%; right: 15%; animation-delay: 0.3s; }
.student-pet-card-new.birthday-card .birthday-star:nth-child(3) { bottom: 20%; left: 20%; animation-delay: 0.6s; }
.student-pet-card-new.birthday-card .birthday-star:nth-child(4) { bottom: 15%; right: 10%; animation-delay: 0.9s; }

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 生日卡片名字样式增强 */
.student-pet-card-new.birthday-card .student-name-new {
    color: #C71585;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.5);
    font-weight: bold;
    position: relative;
    z-index: 5;
}

.student-pet-card-new.birthday-card .student-name-new::after {
    content: ' 🎂🎉';
    font-size: 14px;
    animation: emojiBounce 1s ease-in-out infinite;
}

@keyframes emojiBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* 生日卡片积分样式增强 */
.student-pet-card-new.birthday-card .student-points-new {
    color: #FF1493;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255, 105, 180, 0.3);
}

/* 生日卡片宠物区域增强 */
.student-pet-card-new.birthday-card .pet-area-new {
    background: rgba(255, 255, 255, 0.4);
    border: 2px dashed #FF69B4;
    box-shadow: inset 0 0 10px rgba(255, 105, 180, 0.2);
}

/* 生日卡片闪光效果 */
.student-pet-card-new.birthday-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: cardShine 3s infinite;
    z-index: 2;
    pointer-events: none;
}

@keyframes cardShine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* 生日徽章 */
.birthday-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: linear-gradient(135deg, #FF69B4, #FF1493);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    animation: badgePulse 1.5s ease-in-out infinite;
    z-index: 5;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 生日档案弹窗样式 */
.student-profile-modal.birthday-modal-profile .student-profile-modal-content {
    background: linear-gradient(135deg, #FFF5EE 0%, #FFE4E1 100%);
    border: 3px solid #FF69B4;
}

.student-profile-modal.birthday-modal-profile .student-profile-modal-header {
    background: linear-gradient(135deg, #FF69B4, #FF1493);
}

.student-profile-modal.birthday-modal-profile .student-profile-modal-header h3 {
    color: white;
}

/* 生日祝福文字样式 */
.birthday-wish-text {
    background: linear-gradient(135deg, #FFE5B4, #FFC0CB);
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    text-align: center;
    border: 2px dashed #FF69B4;
}

.birthday-wish-text h4 {
    color: #E91E63;
    font-size: 18px;
    margin-bottom: 5px;
}

.birthday-wish-text p {
    color: #666;
    font-size: 14px;
}

/* 彩带容器 */
.birthday-confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* 彩带样式 */
.confetti {
    position: absolute;
    top: -10px;
    animation: confettiFall 5s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 闪烁星星 */
.birthday-sparkles {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.birthday-sparkles .sparkle {
    font-size: 24px;
    animation: sparkleTwinkle 0.8s ease-in-out infinite;
}

.birthday-sparkles .sparkle:nth-child(1) { animation-delay: 0s; }
.birthday-sparkles .sparkle:nth-child(2) { animation-delay: 0.15s; }
.birthday-sparkles .sparkle:nth-child(3) { animation-delay: 0.3s; }
.birthday-sparkles .sparkle:nth-child(4) { animation-delay: 0.45s; }
.birthday-sparkles .sparkle:nth-child(5) { animation-delay: 0.6s; }

@keyframes sparkleTwinkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
        opacity: 0.5;
    }
}

/* 生日标题动画 */
.birthday-title {
    animation: titlePulse 1s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 生日祝福语动画 */
.birthday-wish {
    animation: wishFade 2s ease-in-out infinite;
}

@keyframes wishFade {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 装饰物动画增强 */
.birthday-decorations .decoration {
    display: inline-block;
    animation: decorationBounce 0.6s ease-in-out infinite;
}

.birthday-decorations .decoration:nth-child(1) { animation-delay: 0s; }
.birthday-decorations .decoration:nth-child(2) { animation-delay: 0.1s; }
.birthday-decorations .decoration:nth-child(3) { animation-delay: 0.2s; }
.birthday-decorations .decoration:nth-child(4) { animation-delay: 0.3s; }
.birthday-decorations .decoration:nth-child(5) { animation-delay: 0.4s; }

@keyframes decorationBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.2);
    }
}

/* 烟花容器 */
.birthday-fireworks {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.birthday-fireworks .firework {
    font-size: 35px;
    animation: fireworkExplode 1s ease-in-out infinite;
}

.birthday-fireworks .firework:nth-child(1) { animation-delay: 0s; }
.birthday-fireworks .firework:nth-child(2) { animation-delay: 0.3s; }
.birthday-fireworks .firework:nth-child(3) { animation-delay: 0.6s; }

@keyframes fireworkExplode {
    0%, 100% {
        transform: scale(0.8) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
        opacity: 1;
    }
}

/* 烟花效果 */
.firework-effect {
    position: fixed;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 9998;
}

.firework-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: particleExplode 1s ease-out forwards;
}

@keyframes particleExplode {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100px) translateY(0);
        opacity: 0;
    }
}

/* 生日按钮样式 */
.birthday-btn {
    background: linear-gradient(135deg, #FF69B4, #FF1493) !important;
    border: none !important;
    color: white !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    border-radius: 25px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
}

.birthday-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.6);
}

/* 淡出动画 */
@keyframes birthdayFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 生日卡片增强效果 */
.student-pet-card-new.birthday-card {
    position: relative;
    overflow: visible;
}

.student-pet-card-new.birthday-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 60%);
    background-size: 200% 200%;
    animation: shimmer 2s infinite;
    pointer-events: none;
    border-radius: inherit;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 生日卡片悬浮效果 */
.student-pet-card-new.birthday-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 60px rgba(255, 105, 180, 0.8), 0 15px 40px rgba(255, 105, 180, 0.5);
}

/* ==================== 荣誉证书样式 ==================== */

/* 证书按钮样式 */
.btn-certificate {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.btn-generate-certificate {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-generate-certificate:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.btn-view-certificate {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.btn-view-certificate:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

/* 证书弹窗样式 */
.certificate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10003;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.certificate-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    overflow: auto;
}

.certificate-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f44336;
    color: white;
    border: 3px solid white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.certificate-close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: #d32f2f;
}

/* A4纸证书样式 - 小学生风格 */
.certificate-paper {
    width: 210mm;
    min-height: 297mm;
    background: linear-gradient(180deg, #FFF9E6 0%, #FFFEF5 30%, #FFF0F5 70%, #E8F4FF 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.certificate-decorations-top {
    position: absolute;
    top: 5mm;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    z-index: 1;
}

.certificate-decorations-bottom {
    position: absolute;
    bottom: 5mm;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
    z-index: 1;
}

.deco-star {
    font-size: 28px;
    animation: starTwinkle 1.5s ease-in-out infinite;
}

.deco-star:nth-child(1) { animation-delay: 0s; }
.deco-star:nth-child(2) { animation-delay: 0.2s; }
.deco-star:nth-child(3) { animation-delay: 0.4s; }
.deco-star:nth-child(4) { animation-delay: 0.6s; }
.deco-star:nth-child(5) { animation-delay: 0.8s; }

@keyframes starTwinkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.3) rotate(20deg); opacity: 0.7; }
}

.deco-rainbow, .deco-cloud, .deco-heart {
    font-size: 30px;
    animation: decoFloat 3s ease-in-out infinite;
}

.deco-rainbow { animation-delay: 0s; }
.deco-cloud { animation-delay: 0.5s; }
.deco-heart { animation-delay: 1s; }

@keyframes decoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.certificate-border {
    position: absolute;
    top: 20mm;
    left: 15mm;
    right: 15mm;
    bottom: 20mm;
    border: 6px solid transparent;
    border-image: linear-gradient(135deg, #FF6B6B, #FFD93D, #6BCF7F, #4D96FF, #FF6B6B) 1;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,250,245,0.95) 100%);
    border-radius: 15px;
}

.certificate-border::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px dashed #FFD700;
    border-radius: 18px;
    pointer-events: none;
}

.certificate-inner {
    position: absolute;
    top: 8mm;
    left: 8mm;
    right: 8mm;
    bottom: 8mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15mm 12mm;
}

.certificate-header {
    text-align: center;
    margin-bottom: 8mm;
}

.certificate-logo {
    font-size: 55px;
    margin-bottom: 3mm;
    animation: logoBounce 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes logoBounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

.certificate-title {
    font-size: 42px;
    font-weight: bold;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53, #FFD93D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin: 0;
    letter-spacing: 12px;
    filter: drop-shadow(2px 2px 4px rgba(255, 107, 107, 0.3));
}

.certificate-rank-badge {
    display: inline-block;
    padding: 5px 20px;
    border-radius: 20px;
    margin-top: 5mm;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.certificate-rank-badge span {
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.certificate-body {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.certificate-award-section {
    margin-bottom: 8mm;
}

.certificate-name-line {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.certificate-name {
    font-size: 32px;
    font-weight: bold;
    color: #FF6B6B;
    text-shadow: 2px 2px 0 #FFD93D;
}

.certificate-pronoun {
    font-size: 22px;
    color: #666;
    font-weight: normal;
}

.certificate-text {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 6mm;
}

.certificate-text p {
    margin: 4px 0;
}

.certificate-text .highlight {
    font-size: 22px;
    font-weight: bold;
    color: #4D96FF;
}

.rank-highlight {
    font-size: 32px !important;
    font-weight: bold;
    margin: 5mm 0 !important;
    padding: 8px 25px;
    border-radius: 30px;
    display: inline-block;
    animation: rankPulse 1.5s ease-in-out infinite;
}

.rank-highlight.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    text-shadow: 2px 2px 4px rgba(255, 140, 0, 0.5);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
}

.rank-highlight.rank-2 {
    background: linear-gradient(135deg, #E8E8E8, #A8A8A8);
    color: white;
    text-shadow: 2px 2px 4px rgba(128, 128, 128, 0.5);
    box-shadow: 0 5px 20px rgba(192, 192, 192, 0.5);
}

.rank-highlight.rank-3 {
    background: linear-gradient(135deg, #DEB887, #CD7F32);
    color: white;
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.5);
    box-shadow: 0 5px 20px rgba(205, 127, 50, 0.5);
}

@keyframes rankPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.certificate-points {
    font-size: 16px;
    color: #6BCF7F;
    font-weight: bold;
    margin-top: 3mm;
    padding: 5px 15px;
    background: rgba(107, 207, 127, 0.1);
    border-radius: 15px;
    display: inline-block;
}

.certificate-encouragement {
    font-size: 16px;
    color: #FF6B6B;
    margin-bottom: 6mm;
    padding: 8px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 217, 61, 0.1));
    border-radius: 10px;
    border-left: 4px solid #FF6B6B;
}

.certificate-encouragement p {
    margin: 3px 0;
}

.certificate-members {
    font-size: 13px;
    color: #666;
    margin-top: 4mm;
    padding: 6px 12px;
    background: rgba(77, 150, 255, 0.1);
    border-radius: 8px;
    display: inline-block;
}

.certificate-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-top: auto;
}

.certificate-date {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

.certificate-seal {
    width: 70px;
    height: 70px;
}

.seal-circle {
    width: 100%;
    height: 100%;
    border: 3px solid #FFD700;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFF9E6, #FFECB3);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    animation: sealRotate 4s linear infinite;
}

@keyframes sealRotate {
    0% { box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(255, 215, 0, 0.7); }
    100% { box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4); }
}

.seal-star {
    font-size: 16px;
    animation: starSpin 2s linear infinite;
}

@keyframes starSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.seal-text {
    font-size: 16px;
    font-weight: bold;
    color: #FF6B6B;
}

.certificate-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.certificate-actions button {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.certificate-actions .btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.certificate-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.certificate-actions .btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
}

.certificate-actions .btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* 学生档案中的证书展示区域 */
.profile-certificates-section {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #FFF0F5 0%, #E8F4FF 100%);
    border-radius: 12px;
    border: 2px dashed #FF6B6B;
}

.profile-certificates-section h4 {
    font-size: 16px;
    color: #FF6B6B;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-certificates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 证书缩略图样式 */
.certificate-thumbnail {
    width: 130px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFECB3 100%);
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.certificate-thumbnail::before {
    content: '⭐';
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 10px;
    animation: miniStar 1.5s ease-in-out infinite;
}

@keyframes miniStar {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.certificate-thumbnail:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    border-color: #FF6B6B;
}

.thumbnail-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #FFD700;
}

.thumbnail-emoji {
    font-size: 18px;
}

.thumbnail-title {
    font-size: 10px;
    font-weight: bold;
    color: #FF6B6B;
    line-height: 1.2;
}

.thumbnail-body {
    text-align: center;
    margin-bottom: 6px;
}

.thumbnail-rank {
    font-size: 14px;
    font-weight: bold;
    color: #FF6B6B;
}

.thumbnail-date {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.thumbnail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px dashed #FFD700;
}

.thumbnail-type {
    font-size: 9px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
}

.thumbnail-view {
    font-size: 10px;
    color: #4D96FF;
}

/* 打印证书样式 */
@media print {
    .certificate-modal {
        background: white;
    }
    
    .certificate-close-btn,
    .certificate-actions,
    .certificate-decorations-top,
    .certificate-decorations-bottom {
        display: none !important;
    }
    
    .certificate-paper {
        box-shadow: none;
        margin: 0;
        background: white;
    }
    
    .certificate-border {
        border: 6px double #FFD700 !important;
        border-image: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .certificate-border::before {
        display: none !important;
    }
    
    .certificate-title {
        color: #FF6B6B !important;
        -webkit-text-fill-color: #FF6B6B !important;
    }
    
    .certificate-name {
        color: #FF6B6B !important;
    }
    
    .rank-highlight {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .rank-highlight.rank-1 {
        background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    }
    
    .rank-highlight.rank-2 {
        background: linear-gradient(135deg, #E8E8E8, #A8A8A8) !important;
    }
    
    .rank-highlight.rank-3 {
        background: linear-gradient(135deg, #DEB887, #CD7F32) !important;
    }
}

/* 排行榜表格增加证书列 */
#individual-ranking-table th,
#group-ranking-table th {
    position: relative;
}

#individual-ranking-table th:last-child,
#group-ranking-table th:last-child {
    width: 100px;
    text-align: center;
}

#individual-ranking-table td:last-child,
#group-ranking-table td:last-child {
    text-align: center;
}



/* =============================================
   浣滀笟鏄庣粏 - 鐜颁唬鍗＄墖鍒嗙粍鏍峰紡锛堝鐢熷悜瀹＄編锛?   ============================================= */
.hw-page-wrap { padding: 0; max-width: 100%; }

/* --- 椤堕儴 Banner --- */
.hw-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 26px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 18px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(102,126,234,0.3);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.hw-banner::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
}
.hw-banner::after {
    content: '';
    position: absolute;
    bottom: -60px; left: 40%;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.hw-banner-emoji {
    font-size: 48px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
    position: relative; z-index: 1;
}
.hw-banner-text h3 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 4px 0;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.hw-banner-text p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}
.hw-banner-stats {
    margin-left: auto;
    display: flex;
    gap: 20px;
    position: relative; z-index: 1;
}
.hw-banner-stat {
    text-align: center;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.25);
}
.hw-banner-stat-num {
    display: block;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}
.hw-banner-stat-num.hw-stat-done { color: #bbf7d0; }
.hw-banner-stat-label {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
    display: block;
}

/* --- 绛涢€夊櫒 --- */
.hw-filter-bar {
    background: #fff;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.hw-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.hw-filter-row:last-child { margin-bottom: 0; }
.hw-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hw-filter-label {
    font-size: 14px;
}
.hw-filter-sel {
    padding: 7px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    background: #f9fafb;
    color: #374151;
    outline: none;
    cursor: not-allowed;
    max-width: 200px;
}
.hw-filter-sel:disabled {
    opacity: 0.8;
    background: #f3f4f6;
    cursor: not-allowed;
}
.hw-filter-date {
    padding: 7px 10px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    background: #f9fafb;
    color: #374151;
    outline: none;
}
.hw-filter-date:focus { border-color: #667eea; }
.hw-filter-sep { color: #9ca3af; font-size: 13px; }
.hw-filter-quick { gap: 6px; }
.hw-quick-btn {
    padding: 6px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}
.hw-quick-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #eef2ff;
}
.hw-quick-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102,126,234,0.35);
}
.hw-filter-search {
    flex: 1;
    min-width: 200px;
    padding: 9px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: #f9fafb;
    outline: none;
}
.hw-filter-search:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
.hw-refresh-btn {
    padding: 9px 18px;
    border: none;
    border-radius: 10px;
    background: #f3f4f6;
    font-size: 13px;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.hw-refresh-btn:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-1px);
}

/* --- 绌虹姸鎬?--- */
.hw-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.hw-empty-illus {
    font-size: 72px;
    margin-bottom: 12px;
    animation: hw-empty-float 3s ease-in-out infinite;
}
@keyframes hw-empty-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.hw-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}
.hw-empty-sub {
    font-size: 13px;
    color: #9ca3af;
}

/* --- 鏃ユ湡鍒嗙粍 --- */
.hw-days-groups {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.hw-day-group { }
.hw-day-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 4px;
}
.hw-date-label {
    font-size: 15px;
    font-weight: 800;
    color: #374151;
    letter-spacing: 0.5px;
}
.hw-date-hint {
    font-size: 12px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 10px;
    border-radius: 12px;
}
.hw-day-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

/* --- 浣滀笟鍗＄墖 --- */
.hw-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.25s;
    border: 1px solid #f3f4f6;
    position: relative;
}
.hw-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}
.hw-card-progress {
    height: 5px;
    background: #f3f4f6;
    overflow: hidden;
}
.hw-card-progress-fill {
    height: 100%;
    border-radius: 0 2px 2px 0;
    transition: width 0.5s ease;
}
.hw-card-body { padding: 16px 18px 12px; }
.hw-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.hw-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hw-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.hw-card-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}
.hw-card-btn:hover { transform: scale(1.1); }
.hw-btn-rename:hover {
    background: #dbeafe;
    color: #2563eb;
}
.hw-btn-delete:hover {
    background: #fee2e2;
    color: #dc2626;
}
.hw-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.hw-card-meta-item {
    font-size: 12px;
    color: #6b7280;
    background: #f9fafb;
    padding: 3px 8px;
    border-radius: 6px;
}
.hw-card-completion {
    font-size: 18px;
    font-weight: 800;
    margin-left: auto;
}
.hw-card-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.hw-stat-chip {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
    line-height: 1.4;
}
.hw-stat-chip:hover { opacity: .85; transform: translateY(-1px); }
.hw-stat-chip:active { transform: translateY(0); }
.hw-stat-chip.active {
    outline: 2px solid currentColor;
    outline-offset: 1px;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    transform: translateY(-1px);
}
.hw-stat-chip.hw-st-done { background: #dcfce7; color: #16a34a; }
.hw-stat-chip.hw-st-late { background: #fef3c7; color: #d97706; }
.hw-stat-chip.hw-st-miss { background: #fee2e2; color: #dc2626; }
.hw-stat-chip.hw-st-all { background: #e0e7ff; color: #4f46e5; }

/* --- 璇︽儏鍒楄〃 --- */
.hw-card-detail {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 2px 4px;
    border-top: 1px dashed #e5e7eb;
    margin-top: 6px;
}
.hw-stu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid transparent;
    margin-bottom: 3px;
}
.hw-stu-row:hover { filter: brightness(.97); }
.hw-stu-done { background: #f0fdf4; border-color: #bbf7d0; }
.hw-stu-late { background: #fffbeb; border-color: #fde68a; }
.hw-stu-miss { background: #fef2f2; border-color: #fecaca; }
.hw-stu-none { background: #f9fafb; border-color: #e5e7eb; }
.hw-stu-name { color: #374151; font-weight: 500; }
.hw-stu-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
}
.hw-stu-badge.hw-st-done { background: #dcfce7; color: #16a34a; }
.hw-stu-badge.hw-st-late { background: #fef3c7; color: #d97706; }
.hw-stu-badge.hw-st-miss { background: #fee2e2; color: #dc2626; }

.hw-card-toggle {
    text-align: center;
    font-size: 12px;
    color: #667eea;
    padding: 6px 0 0;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
}
.hw-card-toggle:hover { color: #764ba2; }

/* --- 鐘舵€佺被 (鍏煎鏃? --- */
.hw-st-done { }
.hw-st-miss { }
.hw-st-late { }
.hw-st-none { }

/* --- 鍝嶅簲寮?--- */
@media (max-width: 768px) {
    .hw-banner {
        flex-direction: column;
        text-align: center;
        padding: 18px;
        gap: 10px;
    }
    .hw-banner-stats { margin: 0; }
    .hw-day-cards {
        grid-template-columns: 1fr;
    }
}

