/* ==================== 基础变量 ==================== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #f56565;
    --info: #4299e1;
    --dark: #1a202c;
    --darker: #0d1117;
    --gray: #718096;
    --light-gray: #a0aec0;
    --bg: #f7fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==================== 认证页面 ==================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50%, -50%); }
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.auth-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    animation: slideUp 0.5s ease;
}

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

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 32px;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.logo-section h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.logo-section p {
    color: var(--gray);
    font-size: 14px;
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #edf2f7;
    padding: 5px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--gray);
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 表单 */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
}

.form-group label i {
    margin-right: 6px;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 表单聚焦动画增强 */
.form-group {
    transition: transform 0.2s ease;
}
.form-group.focused {
    transform: translateY(-1px);
}
.form-group.focused label {
    color: var(--primary);
}

/* 按钮加载状态 */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* 输入框错误状态 */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--danger);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* 任务卡片评分显示 */
.task-subject.score {
    background: #ebf8ff;
    color: #667eea;
    margin-left: 6px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 38px;
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 5px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--gray);
}

.checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.btn-secondary {
    background: #edf2f7;
    color: var(--dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-block {
    width: 100%;
    padding: 14px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-icon {
    padding: 10px;
    background: white;
    border: 1px solid var(--border);
    color: var(--gray);
}

/* 提示信息 */
.hint {
    margin-top: 20px;
    padding: 12px;
    background: #ebf8ff;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--dark);
}

.hint i {
    color: var(--primary);
}

.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: none;
}

.message.success {
    display: block;
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid var(--success);
}

.message.error {
    display: block;
    background: #fed7d7;
    color: #742a2a;
    border-left: 4px solid var(--danger);
}

.form-note {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: var(--gray);
}

/* ==================== 首页 ==================== */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-brand i {
    font-size: 32px;
    -webkit-text-fill-color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 50px 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--dark);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.floating-cards {
    position: relative;
    width: 400px;
    height: 400px;
}

.float-card {
    position: absolute;
    background: white;
    padding: 20px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--dark);
    animation: float 6s ease-in-out infinite;
}

.float-card i {
    font-size: 24px;
    color: var(--primary);
}

.card-1 { top: 20%; left: 10%; animation-delay: 0s; }
.card-2 { top: 50%; right: 10%; animation-delay: 1s; }
.card-3 { bottom: 20%; left: 20%; animation-delay: 2s; }
.card-4 { top: 30%; right: 30%; animation-delay: 3s; }

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

/* 功能区域 */
.features {
    padding: 100px 50px;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    padding: 40px 30px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: white;
}

.feature-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.feature-icon.purple { background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%); }
.feature-icon.green { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); }
.feature-icon.orange { background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%); }
.feature-icon.red { background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%); }
.feature-icon.cyan { background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%); }

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.6;
}

.footer {
    background: var(--dark);
    color: white;
    padding: 40px;
    text-align: center;
}

/* ==================== 仪表板布局 ==================== */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header i {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-header span {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--gray);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    color: var(--primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 0 4px 4px 0;
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.user-avatar.student {
    background: linear-gradient(135deg, var(--success) 0%, #38a169 100%);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
}

.user-role {
    font-size: 12px;
    color: var(--gray);
}

.logout-btn {
    color: var(--gray);
    text-decoration: none;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.logout-btn:hover {
    background: #fee;
    color: var(--danger);
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.content-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

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

.notif-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
}

/* 内容区域 */
.content-section {
    display: none;
    padding: 30px;
    flex: 1;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.green { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); }
.stat-icon.purple { background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%); }
.stat-icon.orange { background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
}

/* 仪表板网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.dashboard-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.card-header i {
    color: var(--primary);
}

/* 快速操作 */
.quick-actions {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 15px;
    color: var(--dark);
}

.action-btn:hover {
    background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
    border-color: var(--primary);
    transform: translateX(5px);
}

.action-btn i {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 活动列表 */
.activity-list {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

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

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ebf8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--gray);
}

/* 空状态 */
.empty-text {
    text-align: center;
    color: var(--gray);
    padding: 40px;
    font-size: 14px;
}

/* 会议列表 */
.section-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.meetings-list {
    display: grid;
    gap: 15px;
}

.meeting-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

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

.meeting-info h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--dark);
}

.meeting-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--gray);
}

.meeting-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.waiting {
    background: #feebc8;
    color: #744210;
}

.status-badge.ended {
    background: #e2e8f0;
    color: var(--gray);
}

/* 作业 */
.tasks-container {
    display: grid;
    gap: 15px;
}

.task-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.task-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.task-subject {
    display: inline-block;
    padding: 4px 12px;
    background: #ebf8ff;
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.task-description {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.task-due {
    font-size: 13px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-due.urgent {
    color: var(--danger);
}

/* 学生网格 */
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.student-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

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

.student-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success) 0%, #38a169 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 32px;
}

.student-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
}

.student-username {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.student-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.student-status.online {
    background: #c6f6d5;
    color: #22543d;
}

.student-status.offline {
    background: #e2e8f0;
    color: var(--gray);
}

/* 聊天布局 */
.chat-layout {
    display: flex;
    height: calc(100vh - 140px);
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-sidebar {
    width: 280px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.chat-search {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.chat-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.chat-search input:focus {
    border-color: var(--primary);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.chat-item:hover,
.chat-item.active {
    background: #f8fafc;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.chat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
}

.chat-preview {
    font-size: 13px;
    color: var(--gray);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-main.full {
    border-radius: var(--radius);
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-status {
    font-size: 13px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-status i {
    font-size: 8px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.chat-msg {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: messageSlide 0.3s ease;
}

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

.chat-msg.own {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg.other {
    align-self: flex-start;
    background: white;
    color: var(--dark);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-msg .sender {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.9;
}

.chat-msg.own .sender {
    color: rgba(255,255,255,0.8);
}

.chat-msg.other .sender {
    color: var(--primary);
}

.system-msg {
    align-self: center;
    background: #e2e8f0;
    color: var(--gray);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    margin: 10px 0;
}

.chat-input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.chat-input-area input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-input-area button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-area button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-btn:hover {
    background: #fee;
    color: var(--danger);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar-header span,
    .nav-item span,
    .user-details,
    .badge {
        display: none;
    }

    .main-content {
        margin-left: 70px;
    }

    .hero {
        flex-direction: column;
        padding: 100px 20px 50px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .floating-cards {
        display: none;
    }

    .landing-nav {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
    }

    .chat-sidebar {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 任务筛选 */
.tasks-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius);
    padding: 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.welcome-text h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.welcome-text p {
    opacity: 0.9;
}

.welcome-illustration {
    font-size: 64px;
    opacity: 0.3;
}

/* 任务预览列表 */
.task-preview-list {
    padding: 20px;
}

.task-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

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

.task-preview-title {
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 4px;
}

.task-preview-meta {
    font-size: 12px;
    color: var(--gray);
}

.task-preview-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.task-preview-status.pending {
    background: #feebc8;
    color: #744210;
}

.task-preview-status.completed {
    background: #c6f6d5;
    color: #22543d;
}

/* ==================== 批改弹窗样式 ==================== */
.modal-lg .modal-content {
    max-width: 700px;
}

.grading-info {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    flex-wrap: wrap;
}

.grading-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
}

.grading-info-item i {
    color: var(--primary);
}

.submission-content-box {
    padding: 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    line-height: 1.7;
    color: #333;
    font-size: 14px;
    min-height: 100px;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 批改列表样式 */
.grading-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.grading-card {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.grading-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.grading-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 12px;
}

.grading-student-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grading-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.grading-card-title {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.grading-card-meta {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.grading-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.grade-badge {
    font-size: 18px;
    font-weight: 700;
    color: #f59e0b;
}

.grade-badge.graded {
    color: #22c55e;
}

.status-tag {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.status-tag.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-tag.graded {
    background: #d1fae5;
    color: #065f46;
}

.grading-preview {
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary);
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grading-preview-more {
    font-size: 12px;
    color: var(--primary);
    cursor: pointer;
    text-align: right;
}

/* ==================== 打卡专区样式 ==================== */
.checkin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.checkin-title h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
}

.checkin-title p {
    margin: 0;
    color: #888;
    font-size: 13px;
}

.checkin-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkin-status-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.checkin-status-tag.checked {
    background: #d1fae5;
    color: #065f46;
}

.checkin-status-tag.unchecked {
    background: #fef3c7;
    color: #92400e;
}

.checkin-filter-bar {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.checkin-filter-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.checkin-filter-bar .filter-group:last-child {
    margin-bottom: 0;
}

.checkin-filter-bar .filter-group label {
    font-weight: 500;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    padding: 5px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    background: white;
    color: #555;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

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

.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

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

.checkin-card {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.checkin-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.checkin-card.today {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, #f0f4ff 0%, white 100%);
}

.checkin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.checkin-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkin-date {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkin-date i {
    color: var(--primary);
}

.today-tag {
    background: var(--primary);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.checkin-grade-semester {
    font-size: 12px;
    color: #888;
}

.checkin-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 10px;
    background: #d1fae5;
    color: #065f46;
}

.checkin-content {
    color: #444;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.checkin-author {
    font-size: 12px;
    color: #888;
    text-align: right;
}

.checkin-modal-info {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.info-tag {
    background: #ebf4ff;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* ==================== ȱʧʽ ==================== */

/* Сť */
.btn-sm {
    padding: 5px 12px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
}

/* Ϣʽ */
.chat-msg {
    margin-bottom: 12px;
    max-width: 75%;
    animation: fadeIn 0.2s ease;
}
.chat-msg.own {
    margin-left: auto;
    text-align: right;
}
.chat-msg.other {
    margin-right: auto;
}
.chat-msg .sender {
    font-size: 12px;
    color: #888;
    margin-bottom: 3px;
    font-weight: 500;
}
.chat-msg.own .sender {
    color: var(--primary);
}
.chat-msg .msg-content {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    max-width: 100%;
}
.chat-msg.own .msg-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 3px;
}
.chat-msg.other .msg-content {
    background: #f1f5f9;
    color: #333;
    border-bottom-left-radius: 3px;
}
.chat-msg .msg-time {
    font-size: 11px;
    color: #aaa;
    margin-top: 3px;
}

/* ҵʦ */
.task-feedback {
    padding: 8px 12px;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #78350f;
    margin-bottom: 10px;
}

/* ״̬ */
.status-badge {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}
.status-badge.waiting { background: #fef3c7; color: #92400e; }
.status-badge.active  { background: #d1fae5; color: #065f46; }
.status-badge.ended   { background: #f1f5f9; color: #64748b; }

/* ͳƿƬ */
.checkin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.checkin-stat-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.checkin-stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.checkin-stat-card .stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.checkin-stat-card .stat-icon.green  { background: #d1fae5; color: #059669; }
.checkin-stat-card .stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.checkin-stat-card .stat-info {
    display: flex;
    flex-direction: column;
}
.checkin-stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}
.checkin-stat-card .stat-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* ĵߴ */
.modal-lg .modal-content {
    max-width: 680px;
    width: 95%;
}

/*  */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
