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

body {
    font-family: 'Arial Rounded MT Bold', Arial, sans-serif;
    background: linear-gradient(135deg, #fff5f7 0%, #f0f9ff 100%);
    padding: 20px;
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1 {
    text-align: center;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background-color: #4ecdc4;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background-color: #45b7af;
    transform: scale(1.05);
}

.students-grid {
    width: 100%;
    padding: 20px 0;
}

.student-card {
    width: 100%;
    aspect-ratio: 0.85;
    background-color: white;
    padding: clamp(8px, 1vw, 12px);
    border-radius: clamp(6px, 0.8vw, 10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.seat-tag {
    position: absolute;
    top: clamp(8px, 1vw, 10px);
    left: clamp(8px, 1vw, 10px);
    font-size: clamp(0.7em, 1vw, 0.8em);
    color: #666;
}

.student-first-char {
    width: clamp(35px, 4vw, 50px);
    height: clamp(35px, 4vw, 50px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: clamp(4px, 0.6vw, 8px) auto;
    font-size: clamp(1.2em, 2vw, 1.8em);
    font-weight: bold;
    background: linear-gradient(135deg, var(--student-color-light) 0%, var(--student-color) 100%);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.student-name {
    color: #333;
    font-size: clamp(0.85em, 1.2vw, 1em);
    margin: clamp(4px, 0.6vw, 8px) 0;
    font-weight: 500;
}

.points {
    font-size: clamp(0.9em, 1.4vw, 1.1em);
    color: #ff6b6b;
    margin: clamp(3px, 0.5vw, 5px) 0;
}

.coins {
    font-size: 1.2em;
    color: #ffd93d;
    margin: 10px 0;
}

.rewards-section {
    
    background: #ffffff;
    border: 2px solid #4ecdc4;
    padding: 25px;
    border-radius: 15px;
    
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.rewards-section h2 {
    text-align: center;
    color: white;
    margin-bottom: 25px;
    font-size: 1.8em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rewards-management {
    text-align: right;
    margin-bottom: 20px;
}

.rewards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 8px;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.reward-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.reward-item span {
    font-size: 0.95em;
    color: #2a9d8f;
    font-weight: 500;
    margin-right: 15px;
}

.reward-item .btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.reward-item .btn:hover {
    background-color: #ff5252;
    transform: scale(1.05);
}

.reward-item .btn.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.batch-operations {
    display: flex;
    gap: 10px;
    align-items: center;
}

#batchPoints {
    width: 60px;
    padding: 5px;
    border: 1px solid #4ecdc4;
    border-radius: 5px;
}

.batchPoints {
    width: 60px;
    padding: 5px;
    border: 1px solid #4ecdc4;
    border-radius: 5px;
}

.control-buttons {
    display: flex;
    gap: 10px;
}

.exchange-history {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.history-item:last-child {
    border-bottom: none;
}

.reward-manager-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.reward-manager-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.reward-manager-content h3 {
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5em;
    padding-right: 30px;
}

.manager-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #ff6b6b;
    cursor: pointer;
    padding: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.manager-close:hover {
    background-color: rgba(255, 107, 107, 0.1);
    transform: scale(1.1);
}

.add-reward-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.add-reward-form input {
    padding: 10px 15px;
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    font-size: 1em;
}

.rewards-list {
    margin: 25px 0;
}

.reward-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin: 10px 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.reward-list-item:hover {
    background-color: #f0f0f0;
}

.reward-list-item div {
    display: flex;
    gap: 10px;
}

.reward-list-item button {
    padding: 5px 10px;
    font-size: 0.9em;
}

.group {
    font-size: 1.1em;
    color: #666;
    margin: 5px 0;
}

/* 弹窗基础样式 */
.modal-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #4ecdc4 0%, #45b7af 100%);
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: white;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 25px;
    margin-bottom: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 25px;
    border-top: 2px solid #f0f0f0;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

/* 成功提示样式 */
.modal-content.success .modal-header {
    background-color: #4ecdc4;
}

.modal-content.success .btn {
    background-color: #4ecdc4;
}

.modal-content.success .btn:hover {
    background-color: #45b7af;
}

/* 错误提示样式 */
.modal-content.error .modal-header {
    background-color: #ff6b6b;
}

.modal-content.error .btn {
    background-color: #ff6b6b;
}

.modal-content.error .btn:hover {
    background-color: #ff5252;
}

/* 弹窗内容样式 */
.modal-body p {
    margin: 0;
    line-height: 1.6;
    white-space: pre-line;
}

.modal-body .text-center {
    text-align: center;
}

/* 积分排行榜样式 */
.scoreboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.scoreboard-tabs .tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #f0f0f0;
    color: #666;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scoreboard-tabs .tab-btn.active {
    background: #4ecdc4;
    color: white;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
}

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

.rank-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
    font-weight: bold;
    color: #666;
}

.rank-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rank-name {
    font-weight: 500;
    color: #333;
}

.rank-stats {
    font-size: 0.9em;
    color: #666;
}

.rank-score {
    font-size: 1.2em;
    font-weight: bold;
    color: #4ecdc4;
}

/* 前三名样式 */
.ranking-item.top-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
}

.ranking-item.top-2 {
    background: linear-gradient(135deg, #E0E0E0 0%, #BDBDBD 100%);
}

.ranking-item.top-3 {
    background: linear-gradient(135deg, #BF8970 0%, #8D6E63 100%);
}

.ranking-item.top-1,
.ranking-item.top-2,
.ranking-item.top-3 {
    color: white;
}

.ranking-item.top-1 .rank-name,
.ranking-item.top-2 .rank-name,
.ranking-item.top-3 .rank-name,
.ranking-item.top-1 .rank-stats,
.ranking-item.top-2 .rank-stats,
.ranking-item.top-3 .rank-stats,
.ranking-item.top-1 .rank-score,
.ranking-item.top-2 .rank-score,
.ranking-item.top-3 .rank-score {
    color: white;
}

.ranking-item.top-1 .rank-number,
.ranking-item.top-2 .rank-number,
.ranking-item.top-3 .rank-number {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* 历史记录样式 */
.history-list {
    list-style: none;
    padding: 0;
}

.history-record {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.95em;
}

.history-date {
    color: #666;
    font-size: 0.9em;
}

.student-controls {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.student-controls .btn {
    padding: 6px 12px;
    font-size: 0.9em;
    border-radius: 15px;
}

.reward-exchange-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 8px;
}

.student-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.student-info p {
    margin: 5px 0;
}

.btn.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.rewards-list {
    max-height: 300px;
    overflow-y: auto;
}

.batch-import {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.batch-import h4 {
    color: #4ecdc4;
    margin-bottom: 10px;
}

.batch-import .hint {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.batch-import textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9em;
    resize: vertical;
}

.batch-import button {
    width: 100%;
}

.progress-info {
    text-align: center;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar-fill {
    height: 100%;
    background-color: #4ecdc4;
    width: 0;
    transition: width 0.3s ease;
}

.import-status {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
    margin-top: 20px;
}

.import-status p {
    margin: 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 积分操作页面样式 */
.modal-content.points-operation {
    max-width: 600px;
}

.student-points-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
}

.student-big-char {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    background: linear-gradient(135deg, #4ecdc4 0%, #45b7af 100%) !important;
}

.student-detail {
    display: flex;
    align-items: center;
    gap: 25px;
}

.student-name {
    font-size: 1.2em;
    font-weight: 500;
    color: #333;
}

.student-score, .student-coins {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.1em;
    font-weight: 500;
    color: #ff6b6b;
}

.student-score::before {
    content: '⭐';
    font-size: 1.1em;
}

.student-coins::before {
    content: '💰';
    font-size: 1.1em;
}

/* 修改加分和扣分项的样式 */
.points-operation-section {
    margin: 30px 0;
}

.points-operation-section h4 {
    color: #666;
    margin: 15px 0 10px;
    font-size: 1.1em;
    font-weight: 500;
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.points-item {
    background: #f8f9fa;
    padding: 10px 8px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.points-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.points-item.add {
    background: #e8f5e9;
}

.points-item.subtract {
    background: #ffebee;
}

.points-icon {
    font-size: 1.5em;
    margin-bottom: 4px;
}

.points-name {
    color: #333;
    margin: 3px 0;
    font-size: 0.85em;
    font-weight: 500;
}

.points-value {
    font-weight: 500;
    margin-top: 3px;
    font-size: 0.85em;
}

.points-item.add .points-value {
    color: #4caf50;
}

.points-item.subtract .points-value {
    color: #f44336;
}

.points-operation-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.exchange-btn {
    background-color: #4ecdc4;
}

.history-btn {
    background-color: #ff6b6b;
}

/* 规则管理样式 */
.rules-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #f0f0f0;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #4ecdc4;
    color: white;
}

.add-rule-form {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.rule-input-group {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr auto;
    gap: 10px;
    align-items: center;
    max-width: 100%;
}

.rule-input-group input {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    width: 100%;
}

.rule-input-group input:focus {
    border-color: #4ecdc4;
    outline: none;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.1);
}

.add-rule-btn {
    background-color: #4ecdc4;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1em;
    white-space: nowrap;
}

.add-rule-btn:hover {
    background-color: #45b7af;
}

.rule-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
}

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

.rule-icon {
    font-size: 1.5em;
}

.rule-name {
    font-weight: 500;
}

.rule-points {
    color: #666;
}

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

/* Emoji选择器样式 */
.emoji-picker-dialog .modal-content {
    max-width: 600px;
    width: 90%;
}

.emoji-categories {
    display: flex;
    gap: 8px;
    padding: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.emoji-category {
    padding: 8px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.emoji-category:hover {
    background: #e0e0e0;
}

.emoji-category.active {
    background: #4ecdc4;
    color: white;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.emoji-item {
    font-size: 1.5em;
    padding: 10px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emoji-item:hover {
    background: #e9ecef;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.emoji-search {
    padding: 10px;
    margin-bottom: 15px;
}

.emoji-search input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.9em;
}

.emoji-search input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.1);
}

/* 修改输入框组的布局 */
.rule-input-group {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr auto;
    gap: 10px;
    align-items: center;
    max-width: 100%;
}

.emoji-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.emoji-input-group input {
    flex: 1;
    min-width: 0;
}

.emoji-picker-btn {
    white-space: nowrap;
    padding: 12px 15px;
    background: #f8f9fa;
    color: #666;
    flex-shrink: 0;
}

/* 同步选项样式 */
.sync-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sync-options .btn {
    padding: 15px;
    font-size: 1.1em;
}

/* 加载中弹窗样式 */
.loading-dialog .modal-content {
    max-width: 400px;
}

.loading-dialog .modal-header {
    background: #4ecdc4;
}

.loading-dialog .modal-body {
    text-align: center;
    padding: 30px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4ecdc4;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

.progress-info {
    margin-top: 20px;
}

.progress-text {
    margin-top: 10px;
    color: #666;
}

.sync-message {
    color: #333;
    margin: 15px 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 添加响应式媒体查询 */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .students-grid {
        overflow-x: auto;
        padding: 10px 0;
    }
    
    .group-columns {
        min-width: min-content;
        justify-content: flex-start;
        gap: 10px;
    }
    
    .group-column {
        flex: 0 0 120px;
        min-width: 120px;
    }
}

/* 添加学生表单样式 */
.add-student-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.group-seat-inputs {
    display: flex;
    gap: 10px;
}

.group-seat-inputs input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.group-seat-inputs input:focus {
    border-color: #4ecdc4;
    outline: none;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.1);
}

/* 学生列表样式 */
.students-list {
    margin-top: 20px;
}

.student-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 8px 0;
    transition: all 0.3s ease;
}

.student-list-item:hover {
    background: #f0f0f0;
}

/* 修改 student-info 样式，移除背景和边框 */
.student-list-item .student-info {
    font-size: 0.95em;
    color: #333;
}

.student-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
}

.student-actions .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 1em;
    background: #4ecdc4;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.student-actions .btn:hover {
    background: #45b7af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.2);
}

.history-btn {
    background: #4ecdc4 !important;
}

.history-btn:hover {
    background: #45b7af !important;
}

/* 修改学生管理界面的样式 */
.add-student-form input[type="text"],
.add-student-form input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: white;
}

.add-student-form input:focus {
    border-color: #4ecdc4;
    outline: none;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.1);
}

.add-student-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    background: #4ecdc4;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-student-form .btn:hover {
    background: #45b7af;
    transform: translateY(-2px);
}

/* 批量导入区域样式 */
.batch-import {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.batch-import h4 {
    margin-bottom: 10px;
    color: #333;
}

.batch-import .hint {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.batch-import textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 15px;
    background: white;
}

.batch-import textarea:focus {
    border-color: #4ecdc4;
    outline: none;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.1);
}

.batch-import .btn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
}

/* 添加学生操作按钮样式 */
.student-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0 25px;
}

.student-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.exchange-btn {
    background: #4ecdc4;
}

.history-btn {
    background: #a78bfa;
}

.student-actions .btn:hover {
    transform: translateY(-2px);
}

/* 修改网格布局为组列布局 */
.group-columns {
    display: flex;
    gap: clamp(8px, 1.2vw, 16px);
    justify-content: space-between;
    width: 100%;
}

.group-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.8vw, 12px);
}

.group-title {
    text-align: center;
    font-size: clamp(0.9em, 1.4vw, 1.1em);
    font-weight: bold;
    padding: clamp(6px, 0.8vw, 10px);
    background: linear-gradient(135deg, #4ecdc4 0%, #45b7af 100%);
    border-radius: clamp(8px, 1vw, 10px);
    color: white;
    margin-bottom: clamp(5px, 0.8vw, 8px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.group-title:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
    background: linear-gradient(135deg, #45b7af 0%, #3da59e 100%);
}

/* 小组详情样式 */
.group-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: #ffffff;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #4ecdc4;
}

.group-ranking {
    display: flex;
    justify-content: space-between; /* 左右对齐 */
    align-items: center; /* 垂直居中 */
    margin-bottom: 20px; /* 底部间距 */
}

.group-ranking h4 {
    margin: 0; /* 去掉默认的 margin */
    font-size: 1.5em; /* 可以根据需要调整字体大小 */
    color: #333; /* 字体颜色 */
}

.batch-group-points {
    display: flex; /* 使用 Flexbox 布局 */
    gap: 10px; /* 按钮和输入框之间的间距 */
    align-items: center; /* 垂直居中 */
}

/* 确保 group-members 在新的一行 */
.group-members {
    margin-top: 20px; /* 添加顶部间距以分隔 */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.member-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.member-rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
    font-weight: bold;
}

.member-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-name {
    font-weight: 500;
}

.member-seat {
    font-size: 0.9em;
    color: #666;
}

.member-points {
    font-size: 1.2em;
    font-weight: bold;
    color: #4ecdc4;
}

/* 前三名样式 */
.member-item.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
    color: white;
}

.member-item.rank-2 {
    background: linear-gradient(135deg, #E0E0E0 0%, #BDBDBD 100%);
    color: white;
}

.member-item.rank-3 {
    background: linear-gradient(135deg, #BF8970 0%, #8D6E63 100%);
    color: white;
}

.member-item.rank-1 .member-rank,
.member-item.rank-2 .member-rank,
.member-item.rank-3 .member-rank {
    background: rgba(255,255,255,0.2);
    color: white;
}

.member-item.rank-1 .member-seat,
.member-item.rank-2 .member-seat,
.member-item.rank-3 .member-seat {
    color: rgba(255,255,255,0.8);
}

.member-item.rank-1 .member-points,
.member-item.rank-2 .member-points,
.member-item.rank-3 .member-points {
    color: white;
}

/* 前三名hover效果 */
.member-item.rank-1:hover {
    background: linear-gradient(135deg, #FFD700 0%, #E5A100 100%);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.member-item.rank-2:hover {
    background: linear-gradient(135deg, #E0E0E0 0%, #A0A0A0 100%);
    box-shadow: 0 4px 15px rgba(224, 224, 224, 0.3);
}

.member-item.rank-3:hover {
    background: linear-gradient(135deg, #BF8970 0%, #8D5B47 100%);
    box-shadow: 0 4px 15px rgba(191, 137, 112, 0.3);
}

/* 可兑换学生列表样式 */
.eligible-students {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.student-exchange-item {
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.student-exchange-item:hover {
    transform: translateY(-2px);
    background: #4ecdc4;
    color: white;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

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

.student-name {
    font-weight: 500;
}

.student-coins {
    color: #ffd700;
    font-size: 1.1em;
    margin-top: 4px;
}

.student-exchange-item:hover .student-coins {
    color: rgba(255, 255, 255, 0.9);
}

.exchange-arrow {
    font-size: 1.2em;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.student-exchange-item:hover .exchange-arrow {
    opacity: 1;
    transform: translateX(0);
    color: white;
}

.reward-info {
    padding: 10px;
    background: #fff3e0;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    color: #ff9800;
}

/* 兑换确认弹窗样式 */
.exchange-confirm {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 10px 0;
}

.exchange-confirm strong {
    color: #4ecdc4;
    font-weight: 600;
}

.exchange-cost {
    color: #ff6b6b;
    font-size: 1.1em;
    margin: 15px 0;
}

.exchange-balance {
    color: #666;
    font-size: 0.9em;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px;
}

.cancel-btn {
    background: #f0f0f0;
    color: #666;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

.confirm-btn {
    background: #4ecdc4;
    color: white;
}

/* 积分确认弹窗样式 */
.points-reason {
    color: #666;
    margin: 10px 0;
    font-size: 0.95em;
}

.points-change {
    color: #4ecdc4;
    font-size: 1.1em;
    margin-top: 10px;
}

/* 修改积分操作页面中的积分和兑换币样式 */
.student-detail .student-score,
.student-detail .student-coins {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.1em;
    font-weight: 500;
    color: #ff6b6b;  /* 统一使用红色 */
}

/* 添加固定按钮组的样式 */
.fixed-buttons {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.fixed-buttons .btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    padding: 0;
    background: #4ecdc4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fixed-buttons .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 设置页面样式 */
.settings-dialog {
    max-width: 500px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 10px;
}

.settings-item {
    background: #f8f9fa;
    border: none;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.settings-item:hover {
    background: #4ecdc4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.2);
}

.settings-icon {
    font-size: 2em;
    margin-bottom: 10px;
    line-height: 1;
}

.settings-name {
    font-size: 1em;
    font-weight: 500;
    margin-top: auto;
}

/* 全班积分操作样式 */
.batch-points {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.batch-points-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.batch-points-input input {
    width: 80px;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
}

/* 登录界面样式 */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 214, 231, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 90% 30%, rgba(212, 245, 245, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 50% 80%, rgba(255, 239, 186, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 20% 60%, rgba(224, 247, 250, 0.3) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(255, 241, 249, 0.3) 0%, transparent 30%);
    z-index: 1000;
}

.login-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 90%;
    max-width: 400px;
    animation: fadeIn 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        #ff9a9e 0%,
        #fad0c4 25%,
        #ffecd2 50%,
        #fcb69f 75%,
        #ff9a9e 100%
    );
}

.login-box h2 {
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form input {
    padding: 12px 15px;
    border: 2px solid rgba(78, 205, 196, 0.2);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.login-form input:focus {
    border-color: #4ecdc4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.login-btn {
    background: #4ecdc4;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.login-btn:hover {
    background: #45b7af;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.register-btn {
    background: #f0f0f0;
    color: #666;
}

.register-btn:hover {
    background: #e0e0e0;
}

.user-info {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
}

.user-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.password-form input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 添加通用隐藏类 */
.hidden {
    display: none !important;
}

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

/* 添加漂浮的装饰元素 */
@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10px, -10px) rotate(5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.login-container::before {
    content: '🌈';
    position: absolute;
    top: 15%;
    left: 20%;
    font-size: 3em;
    animation: float 6s ease-in-out infinite;
}

.login-container::after {
    content: '⭐';
    position: absolute;
    bottom: 20%;
    right: 15%;
    font-size: 2.5em;
    animation: float 5s ease-in-out infinite reverse;
}

.history-record.class-record {
    background: rgba(78, 205, 196, 0.1);  /* 使用主题色的淡色背景 */
    border-left: 3px solid #4ecdc4;       /* 左边框使用主题色 */
}

.exchange-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exchange-record {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.exchange-info {
    display: flex;
    gap: 8px;
    align-items: center;
}

.student-name {
    font-weight: bold;
    color: #4ecdc4;
}

.exchange-date {
    font-size: 0.8em;
    color: #666;
    margin-top: 4px;
}

.exchange-cost {
    color: #ff6b6b;
    font-weight: bold;
}

/* 普通的 modal-dialog 样式 */
.modal-dialog .form-input {
    /* ... 基础样式 ... */
}

/* 编辑规则专用的样式,提高优先级 */
.modal-dialog.edit-rule-dialog .form-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    font-size: 14px;
}

.modal-dialog.edit-rule-dialog .icon-input {
    display: flex;
    gap: 10px;
}

.modal-dialog.edit-rule-dialog .icon-input .form-input {
    flex: 1;
}

/* 警告和危险按钮 */
.danger-btn {
    background-color: #ff6b6b;
    color: white;
}

.danger-btn:hover {
    background-color: #ff5252;
}

/* 警告文本 */
.warning-text {
    color: #ff6b6b;
    font-weight: bold;
    margin: 10px 0;
}

.danger-text {
    color: #ff0000;
    font-weight: bold;
    margin: 10px 0;
}

/* 学生管理输入框 */
.student-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
    font-family: monospace;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* 学生管理页面样式 */
.students-section {
    margin-bottom: 20px;
}

.students-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.student-item:last-child {
    border-bottom: none;
}

.empty-tip {
    color: #999;
    text-align: center;
    padding: 20px;
}

.divider {
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

.small-btn {
    padding: 4px 8px;
    font-size: 0.9em;
}

/* 撤销按钮样式 */
.revert-btn {
    background-color: #ff9800;
    color: white;
    padding: 3px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.revert-btn:hover {
    background-color: #f57c00;
}

/* 标签样式 */
.reverted-tag, .revert-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 5px;
}

.reverted-tag {
    background-color: #f44336;
    color: white;
}

.revert-tag {
    background-color: #ff9800;
    color: white;
}

/* 积分记录项样式 */
.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background-color: #f9f9f9;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.record-info {
    flex: 1;
}

.student-name {
    font-weight: bold;
    margin-right: 8px;
}

.points {
    font-weight: bold;
    margin-right: 8px;
}

.points.positive {
    color: #4caf50;
}

.points.negative {
    color: #f44336;
}

.description {
    color: #666;
    margin-right: 8px;
}

.time {
    font-size: 0.8em;
    color: #999;
}

/* 历史按钮样式 */
.history-btn {
    background-color: #2196f3;
    color: white;
    margin-left: 5px;
}

.history-btn:hover {
    background-color: #0d8bf2;
}

/* 积分历史容器 */
.points-history-container {
    max-height: 60vh;
    overflow-y: auto;
}

.loading, .error-message {
    text-align: center;
    padding: 20px;
    color: #666;
}

.error-message {
    color: #f44336;
} 

/* 简洁模式的卡片样式 */
.student-card.simple-mode {
    height: 40px;
    padding: 0 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.simple-mode .student-name {
    font-size: 16px;
    margin: 0;
    line-height: 40px;
}

.simple-mode .points {
    font-size: 14px;
    line-height: 40px;
}

/* 移除不需要的样式 */
.simple-mode-enabled .group-column {
    gap: 5px;
}

/* 简洁模式下隐藏奖励区域 */
.simple-mode-enabled .rewards-section {
    display: none;
}

/* 网格控制区样式优化 */
.grid-controls {
    display: flex;
    justify-content: space-between; /* 改为两端对齐 */
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 控制选项组 */
.control-options {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 每个控制选项的容器 */
.control-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.control-option:hover {
    background-color: rgba(78, 205, 196, 0.1);
}

/* 开关标签样式 */
.toggle-label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

/* 开关按钮容器 */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

/* 开关按钮样式 */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4ecdc4;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* 选中状态样式 */
.student-card.selected {
    border: 2px solid #4ecdc4;
    background-color: rgba(78, 205, 196, 0.1);
}

/* 多选模式下的底部操作栏样式优化 */
.multi-select-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.multi-select-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 自定义分数输入框容器 */
.points-input-container {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 0 8px;
}

/* 分数输入框 */
.points-input {
    width: 50px;
    padding: 4px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    color: #333;
    -moz-appearance: textfield;
}

.points-input::-webkit-outer-spin-button,
.points-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 分数单位标签 */
.points-label {
    font-size: 14px;
    color: #666;
    margin-left: 2px;
}

/* 加分减分按钮样式 */
.multi-select-actions .btn {
    min-width: 60px;
    padding: 8px 15px;
}

.multi-select-actions .add-btn {
    background-color: #4ecdc4;
}

.multi-select-actions .minus-btn {
    background-color: #ff6b6b;
}