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

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 15px;
    padding-bottom: 120px;
    position: relative;
    overflow-x: hidden;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

/* 主选项卡 */
.main-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.tab-buttons-wrapper {
    display: flex;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
}

.main-tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 18px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.main-tab-btn:hover {
    color: #4a90e2;
}

.main-tab-btn.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content.active .container-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.container-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

h1, h2 {
    color: #333;
    text-align: center;
    margin-bottom: 15px;
    font-size: 24px;
}

h1 {
    font-size: 22px;
    margin-bottom: 12px;
}

.display-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-start;
}

/* 算法选择器 */
.algorithm-selector {
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.algorithm-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.algorithm-name {
    font-weight: bold;
    color: #4a90e2;
    font-size: 15px;
}

.algorithm-btn {
    padding: 8px 16px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.algorithm-btn:hover {
    background: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

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

/* 算法选择模态框 */
.algorithm-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.algorithm-option {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.algorithm-option:hover {
    border-color: #4a90e2;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

.algorithm-option h3 {
    color: #4a90e2;
    font-size: 20px;
    margin-bottom: 10px;
}

.algorithm-option p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 14px;
}

.algorithm-code {
    background: #2d2d2d;
    border-radius: 6px;
    padding: 10px 15px;
    margin-top: 10px;
}

.algorithm-code code {
    color: #f8f8f2;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.name-display-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0;
    padding: 30px;
    background: linear-gradient(
        135deg,
        #667eea 0%,
        #764ba2 20%,
        #f093fb 40%,
        #4facfe 60%,
        #00f2fe 80%,
        #667eea 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.name-display-container:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.name-display-container.spinning {
    cursor: not-allowed;
    pointer-events: none;
}

.name-display {
    font-size: 36px;
    font-weight: bold;
    color: white;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.name-display.flashing {
    animation: flash 0.1s ease-in-out;
}

.name-display.final {
    animation: finalPulse 0.6s ease-out;
    font-size: 42px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 2px 2px 8px rgba(0, 0, 0, 0.5);
}

@keyframes flash {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

@keyframes finalPulse {
    0% {
        transform: scale(0.85);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}


.input-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.student-input {
    width: 100%;
    height: 280px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    resize: vertical;
    margin-bottom: 12px;
    transition: border-color 0.3s;
}

.student-input:focus {
    outline: none;
    border-color: #4a90e2;
}

.update-btn {
    width: 100%;
    padding: 15px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    margin-bottom: 15px;
}

.update-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
    background: #357abd;
}

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

.remove-btn {
    width: 100%;
    padding: 12px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.remove-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
    background: #ff3838;
}

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

.student-count {
    text-align: center;
    font-size: 16px;
    color: #666;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
}

.student-count span {
    font-weight: bold;
    color: #4a90e2;
    font-size: 20px;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 8px;
}

.user-info-text {
    flex: 1;
    font-size: 14px;
    color: #666;
}

.auth-toggle-btn, .logout-btn {
    padding: 8px 16px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-toggle-btn:hover, .logout-btn:hover {
    background: #357abd;
}

.logout-btn {
    background: #ff4757;
}

.logout-btn:hover {
    background: #ff3838;
}

/* 预设按钮 */
.preset-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.preset-btn {
    flex: 1;
    padding: 12px;
    background: #00b894;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.4);
    background: #00a085;
}

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

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fefefe;
    margin: 8% auto;
    padding: 40px 35px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    width: 90%;
    max-width: 480px;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
    background-color: #f0f0f0;
    transform: rotate(90deg);
}

/* 登录/注册表单 */
.auth-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.tab-btn:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    transform: translateY(-2px);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form h2 {
    margin-bottom: 5px;
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.auth-form input {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.auth-form input:focus {
    outline: none;
    border-color: #4a90e2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    transform: translateY(-1px);
}

/* 预设名称输入框 */
#presetName {
    padding: 18px 20px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    width: 100%;
    transition: all 0.3s ease;
    background: #fafafa;
    margin-bottom: 5px;
}

#presetName:focus {
    outline: none;
    border-color: #4a90e2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    transform: translateY(-1px);
}

.auth-btn {
    padding: 14px 20px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    margin-top: 5px;
}

.auth-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #357abd 0%, #2a5f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}

.auth-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

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

.message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    animation: slideIn 0.3s ease;
    margin-top: 5px;
}

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

.message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 预设列表 */
.preset-item {
    padding: 18px 20px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.preset-item:hover {
    background: #e9ecef;
    border-color: #4a90e2;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preset-item-name {
    font-weight: bold;
    font-size: 16px;
}

.preset-item-date {
    font-size: 12px;
    color: #666;
}

.preset-item-actions {
    display: flex;
    gap: 10px;
}

.preset-load-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.2);
}

.preset-load-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, #2a5f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

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

.preset-delete-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 71, 87, 0.2);
}

.preset-delete-btn:hover {
    background: linear-gradient(135deg, #ff3838 0%, #ee2e3d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

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

/* 底部信息 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 15px 20px;
    z-index: 100;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.developer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* 抽取记录 */
.history-section {
    width: 100%;
    max-width: 500px;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 280px;
}

.history-section h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
    flex-shrink: 0;
}

.history-list {
    height: calc(100% - 50px);
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

/* 自定义滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.history-empty {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 14px;
}

.history-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #4a90e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease;
}

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

.history-item-name {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.history-item-time {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

/* 网站简介 */
.about-section {
    padding: 60px 20px;
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #fafbfc 5%,
        #f5f7fa 15%,
        #eef1f5 30%,
        #e8ecf1 50%,
        #dde4eb 70%,
        #c3cfe2 100%
    );
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.95) 15%,
        rgba(250, 251, 252, 0.85) 30%,
        rgba(245, 247, 250, 0.7) 50%,
        rgba(238, 241, 245, 0.5) 70%,
        rgba(232, 236, 241, 0.3) 85%,
        rgba(221, 228, 235, 0.1) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.about-container {
    position: relative;
    z-index: 1;
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.about-container h2 {
    color: #333;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #4a90e2;
    padding-bottom: 15px;
}

.about-container h3 {
    color: #4a90e2;
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.about-content {
    line-height: 1.8;
    color: #555;
}

.about-intro {
    font-size: 18px;
    margin-bottom: 30px;
    text-align: justify;
}

.code-block {
    background: #2d2d2d;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    color: #f8f8f2;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-block code {
    color: #f8f8f2;
}

.code-block code .keyword {
    color: #ff79c6;
}

.code-block code .string {
    color: #f1fa8c;
}

.code-block code .function {
    color: #50fa7b;
}

.algorithm-explanation {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.algorithm-explanation li {
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4a90e2;
}

.algorithm-explanation li strong {
    color: #4a90e2;
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.about-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 30px;
    color: #856404;
}

.about-note strong {
    color: #856404;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .name-display {
        font-size: 36px;
    }
    
    .name-display.final {
        font-size: 42px;
    }
    
    .name-display-container {
        min-height: 250px;
        padding: 30px;
    }
    
    .logo {
        height: 40px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .developer-info {
        text-align: center;
    }
}

/* 左下角提示 */
.toast {
    position: fixed;
    bottom: 100px;
    left: 20px;
    background: #4a90e2;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.3s ease;
    pointer-events: none;
    max-width: 300px;
}

.toast.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: #00b894;
}

.toast-error {
    background: #ff4757;
}

.toast-warning {
    background: #f39c12;
}

.toast-info {
    background: #4a90e2;
}

/* 随机分组页面 */
.group-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    min-height: calc(100vh - 250px);
}

.group-settings {
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.group-settings h2 {
    color: #333;
    font-size: 22px;
    margin-bottom: 20px;
    text-align: left;
}

.setting-row {
    margin-bottom: 20px;
}

.setting-row label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.group-select,
.group-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: #fafafa;
}

.group-select:focus,
.group-input:focus {
    outline: none;
    border-color: #4a90e2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.group-generate-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
    margin-top: 10px;
}

.group-generate-btn:hover {
    background: linear-gradient(135deg, #00a085 0%, #008f75 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 184, 148, 0.4);
}

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

.group-student-list {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.group-student-list h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: left;
}

.group-student-input {
    width: 100%;
    height: 200px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    resize: vertical;
    margin-bottom: 12px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.group-student-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.group-student-count {
    text-align: center;
    font-size: 14px;
    color: #666;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 8px;
}

.group-student-count span {
    font-weight: bold;
    color: #4a90e2;
    font-size: 18px;
}

/* 预设模态 tabs */
.preset-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.preset-panel {
    display: none;
}

.preset-panel.active {
    display: block;
}

.group-results {
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    min-height: 400px;
}

.group-empty {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 16px;
}

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

.group-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    animation: slideInUp 0.4s ease;
}

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

.group-card-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-card-count {
    font-size: 14px;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
}

.group-members {
    list-style: none;
    padding: 0;
    margin: 0;
}

.group-member {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.group-member:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}

.group-member:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .group-container {
        grid-template-columns: 1fr;
    }
    
    .group-settings {
        position: static;
    }
    
    .groups-container {
        grid-template-columns: 1fr;
    }
}
