:root {
    --primary-color: #1a4e8c;
    --secondary-color: #c4161c;
    --background-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --highlight-color: #e6f7ff;
    --button-hover: #0e366d;
    --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo h1 {
    font-size: 24px;
    font-weight: bold;
}

.logo-img {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img img {
    width: 30px;
    height: 30px;
}

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

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 引导页样式 */
.landing-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    text-align: center;
}

.landing-title {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.landing-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.landing-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 300px;
}

.landing-button {
    padding: 0;
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 54px;
    line-height: 1;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.button-text {
    font-size: 18px;
    font-weight: bold;
    display: inline-block;
}

.enterprise-btn {
    background-color: var(--primary-color);
    color: white;
}

.enterprise-btn:hover {
    background-color: var(--button-hover);
}

.student-btn {
    background-color: var(--secondary-color);
    color: white;
}

.student-btn:hover {
    background-color: #a41216;
}

.government-emblem {
    margin-bottom: 30px;
}

.government-emblem img {
    width: 120px;
    height: 120px;
}

/* 企业端和学生端样式 */
.enterprise-portal, .student-portal {
    display: none;
}

.filter-bar {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 15px;
}

.filter-item {
    flex: 1;
}

.filter-item select, .filter-item input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.content-area {
    background-color: white;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 70px;
    min-height: calc(100vh - 260px);
    box-shadow: var(--card-shadow);
}

.tab-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    border-top: 1px solid var(--border-color);
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.tab-item.active {
    color: var(--primary-color);
    border-top: 2px solid var(--primary-color);
}

#student-portal .tab-item.active {
    color: var(--secondary-color);
    border-top: 2px solid var(--secondary-color);
}

.tab-icon {
    font-size: 20px;
}

/* 图标库样式 */
.tab-icon .iconfont {
    font-size: 22px;
    color: inherit;
}

.tab-item.active .iconfont {
    color: var(--primary-color);
}

#student-portal .tab-item.active .iconfont {
    color: var(--secondary-color);
}

.iconfont {
    vertical-align: middle;
}

/* 任务列表样式 */
.task-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.task-card {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.task-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.task-title {
    font-weight: bold;
    font-size: 16px;
    color: var(--primary-color);
}

.task-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: #e8f5e9;
    color: #2e7d32;
}

.task-content {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.task-tags {
    display: flex;
    gap: 5px;
}

.task-tag {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 2px;
}

/* 学生列表样式 */
.student-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.student-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.student-header {
    padding: 15px;
    background-color: var(--highlight-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e0e0e0;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-info {
    padding: 15px;
}

.student-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.student-details {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.student-detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
}

.student-actions {
    padding: 10px 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.student-btn {
    padding: 5px 10px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.view-btn {
    background-color: var(--primary-color);
    color: white;
}

.contact-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 发布任务表单样式 */
.publish-form {
    max-width: 800px;
    margin: 0 auto;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--button-hover);
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

/* 个人信息页样式 */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-role {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 500px;
}

.stat-item {
    flex: 1;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.profile-info {
    width: 100%;
    max-width: 500px;
}

.info-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-card-title {
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
}

.info-label {
    width: 100px;
    color: #666;
}

.info-value {
    flex: 1;
}

/* 选项卡内容样式 */
.tab-content {
    display: none;
}

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

/* 消息列表样式 */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-item:hover {
    background-color: var(--highlight-color);
}

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.message-sender {
    font-weight: bold;
}

.message-time {
    font-size: 12px;
    color: #999;
}

.message-preview {
    color: #666;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.unread {
    position: relative;
}

.unread::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(196, 22, 28, 0.5);
    opacity: 0.85;
    transition: all 0.3s ease;
}

/* 学生端样式 */
.student-task-card {
    border-left: 4px solid var(--primary-color);
}

.task-reward {
    font-weight: bold;
    color: #f57c00;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .task-list, .student-list {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .landing-title {
        font-size: 28px;
    }
    
    .landing-subtitle {
        font-size: 16px;
    }
    
    .landing-buttons {
        width: 80%;
    }
    
    /* 优化移动端标题显示 */
    .logo h1 {
        font-size: 18px;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .profile-name {
        font-size: 20px;
    }
    
    .task-title {
        font-size: 15px;
    }
    
    .info-card-title {
        font-size: 16px;
    }
    
    .user-info {
        font-size: 14px;
    }
    
    .tab-item {
        font-size: 12px;
        padding: 10px 0;
    }
    
    .tab-icon {
        font-size: 18px;
    }
    
    /* 优化移动端导航体验 */
    .tab-navigation {
        height: 60px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }
    
    /* 移动端内容区域调整 */
    .content-area {
        margin-bottom: 65px;
        padding: 15px;
    }
    
    /* 更友好的触摸区域 */
    .student-btn, .btn {
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 额外添加小屏幕设备的优化 */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 16px;
    }
    
    .user-info span {
        max-width: 80px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }
    
    .task-card, .student-card {
        padding: 12px;
    }
    
    .task-content {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .student-header {
        padding: 12px;
    }
    
    .student-avatar {
        width: 40px;
        height: 40px;
    }
    
    .message-avatar {
        width: 40px;
        height: 40px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-label {
        margin-bottom: 5px;
        font-size: 14px;
    }
    
    textarea.form-control {
        min-height: 100px;
    }
    
    .message-item {
        padding: 12px;
    }
    
    .message-preview {
        -webkit-line-clamp: 3;
        font-size: 13px;
    }
    
    .profile-section {
        padding: 20px 15px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 12px;
    }
    
    .info-label {
        width: 100%;
        margin-bottom: 3px;
        font-weight: bold;
    }
}

/* 修复移动端引导页按钮 */
@media (max-width: 480px) {
    .button-text {
        font-size: 16px;
    }
    
    .landing-button {
        height: 48px;
    }
}

/* 特别处理WeChat浏览器 */
.wx-browser .landing-button {
    height: 54px !important;
    line-height: 54px !important;
} 