/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Microsoft Yahei", sans-serif;
}

body {
    background-color: #f5f7fa;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 整体布局容器 */
.container {
    display: flex;
    width: 100vw;
    height: 100vh;
    gap: 12px;
    padding: 12px;
}

/* 侧边栏样式 */
.sidebar {
    width: 200px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    padding: 16px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4096ff, #007bff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.user-info-mini {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.user-status {
    font-size: 12px;
    color: #999;
}

.logout-btn {
    font-size: 12px;
    color: #999;
    cursor: pointer;
}

.logout-btn:hover {
    color: #007bff;
}

.sidebar .top-btn {
    background: linear-gradient(135deg, #4096ff, #007bff);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.sidebar .top-btn:hover {
    background: linear-gradient(135deg, #3388ee, #0069d9);
    box-shadow: 0 4px 8px rgba(64, 150, 255, 0.2);
}

.sidebar .menu-list {
    list-style: none;
}

.sidebar .menu-list li {
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar .menu-list li::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #ccc;
}

.sidebar .menu-list li.active {
    background: linear-gradient(135deg, #e8f0fe, #f0f7ff);
    color: #007bff;
    font-weight: 500;
}

.sidebar .menu-list li.active::before {
    background-color: #007bff;
    width: 6px;
    height: 6px;
}

.sidebar .menu-list li:hover:not(.active) {
    background-color: #f8f9fa;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 顶部搜索栏 */
.search-bar {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.search-wrapper {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 40px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #4096ff, #007bff);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3388ee, #0069d9);
    box-shadow: 0 4px 8px rgba(64, 150, 255, 0.2);
}

.btn-secondary {
    background: #fff;
    color: #007bff;
    border: 1px solid #007bff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #f0f7ff;
}

.btn-default {
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-default:hover {
    border-color: #007bff;
    color: #007bff;
}

.btn-success {
    background: #52c41a;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background: #389e0d;
}

.btn-danger {
    background: #ff4d4f;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #cf1322;
}

.publish-btn {
    background: linear-gradient(135deg, #4096ff, #007bff);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.publish-btn:hover {
    background: linear-gradient(135deg, #3388ee, #0069d9);
    box-shadow: 0 4px 8px rgba(64, 150, 255, 0.2);
}

/* 筛选标签栏 */
.filter-tabs {
    display: flex;
    margin-bottom: 24px;
    gap: 4px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.filter-tabs span,
.filter-tabs a {
    padding: 8px 20px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filter-tabs span.active,
.filter-tabs a.active {
    background-color: #007bff;
    color: white;
    font-weight: 500;
}

.filter-tabs span:not(.active):hover,
.filter-tabs a:not(.active):hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* 用户卡片列表 */
.user-card-list {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-content: flex-start;
    overflow-y: auto;
}

/* 用户卡片样式 */
.user-card {
    width: 240px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #e8f0fe;
}

/* 卡片内头像占位 */
.avatar-placeholder {
    width: 100%;
    height: 120px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    position: relative;
    margin-bottom: 16px;
    background-color: #f8f9fa;
    overflow: hidden;
}

.avatar-placeholder::before,
.avatar-placeholder::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.avatar-placeholder::before {
    border-right: 1px solid #e0e0e0;
    transform: rotate(45deg);
}

.avatar-placeholder::after {
    border-left: 1px solid #e0e0e0;
    transform: rotate(-45deg);
}

/* 卡片内信息文本 */
.user-info {
    font-size: 13px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 16px;
}

.user-info strong {
    color: #333;
    font-weight: 500;
}

/* 卡片内操作按钮 */
.card-btn {
    width: 100%;
    background: linear-gradient(135deg, #4096ff, #007bff);
    color: white;
    border: none;
    padding: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.card-btn:hover {
    background: linear-gradient(135deg, #3388ee, #0069d9);
    box-shadow: 0 4px 8px rgba(64, 150, 255, 0.2);
}

/* 登录/注册页面样式 */
.auth-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f0fe 100%);
}

.auth-box {
    width: 400px;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 32px;
    text-align: center;
}

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

.form-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.form-input-wrapper {
    position: relative;
}

.form-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
}

.captcha-group {
    display: flex;
    gap: 12px;
}

.captcha-group .form-input {
    flex: 1;
}

.captcha-btn {
    white-space: nowrap;
    font-size: 13px;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 14px;
}

.auth-links a {
    color: #007bff;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* 空状态样式 */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-state-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
}

.empty-state-actions {
    display: flex;
    gap: 12px;
}

/* 详情页样式 */
.detail-container {
    display: flex;
    gap: 32px;
    height: 100%;
}

.detail-left {
    width: 300px;
    flex-shrink: 0;
}

.detail-avatar {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    background: #f5f5f5;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.detail-info-list {
    font-size: 14px;
    line-height: 2;
    color: #666;
}

.detail-info-list strong {
    color: #333;
    font-weight: 500;
    display: inline-block;
    width: 80px;
}

.detail-right {
    flex: 1;
}

.detail-header {
    background: #f5f5f5;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-header-title {
    font-size: 16px;
    color: #333;
}

.detail-header-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.detail-section-content {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

/* 聊天界面样式 */
.chat-container {
    display: flex;
    gap: 24px;
    height: 100%;
}

.chat-sidebar {
    width: 280px;
    border-right: 1px solid #f0f0f0;
    padding-right: 24px;
}

.chat-user-avatar {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    background: #f5f5f5;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.chat-user-info h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #333;
}

.chat-user-stats {
    font-size: 13px;
    line-height: 2;
    color: #666;
    margin-bottom: 20px;
}

.chat-user-stats strong {
    color: #333;
    display: inline-block;
    width: 80px;
}

.chat-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 16px;
}

.message {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4096ff, #007bff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.message-content {
    max-width: 60%;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.message-bubble.task {
    background: #95de64;
    color: #333;
}

.message-bubble.text {
    background: #fff;
    border: 1px solid #e5e6eb;
    color: #333;
}

.message-bubble.image {
    background: #95de64;
    padding: 8px;
}

.message-bubble.image img {
    max-width: 200px;
    border-radius: 8px;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.message-time {
    font-size: 9px;
    color: #aaa;
    margin-left: 10px;
    align-self: flex-end;
}

.chat-input-area {
    display: flex;
    gap: 12px;
}

.chat-input {
    flex: 1;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
}

.chat-input:focus {
    border-color: #007bff;
}

/* 申请人列表 */
.applicant-list {
    width: 280px;
    border-right: 1px solid #f0f0f0;
    padding-right: 24px;
    overflow-y: auto;
}

.applicant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.applicant-item:hover,
.applicant-item.active {
    background: #f5f7fa;
}

.applicant-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e5e6eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.applicant-info {
    flex: 1;
}

.applicant-name {
    font-size: 14px;
    color: #007bff;
    margin-bottom: 4px;
}

.applicant-age {
    font-size: 13px;
    color: #666;
}

.applicant-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.applicant-status.ended {
    background: #f5f5f5;
    color: #999;
}

.applicant-status.rejected {
    background: #fff2f0;
    color: #ff4d4f;
}

.applicant-detail-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007bff;
    font-size: 14px;
}

/* 个人中心样式 */
.profile-form {
    max-width: 600px;
}

.profile-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.profile-label {
    width: 100px;
    font-size: 14px;
    color: #666;
}

.profile-value {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.profile-edit-link {
    color: #007bff;
    font-size: 14px;
    cursor: pointer;
}

.profile-edit-link:hover {
    text-decoration: underline;
}

/* 发布页面样式 */
.publish-form {
    max-width: 600px;
}

.form-item {
    margin-bottom: 24px;
}

.form-item:first-child {
    margin-bottom: 20px;
}

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

.publish-form h2 {
    margin-bottom: 16px;
    color: #333;
    font-size: 18px;
}

.form-value {
    width: 100%;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e5e6eb;
    border-radius: 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-group label:hover {
    border-color: #007bff;
    background-color: #f0f7ff;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.upload-area {
    width: 100%;
    height: 200px;
    border: 2px dashed #e5e6eb;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}

.upload-area:hover {
    border-color: #007bff;
    background-color: #f0f7ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 12px;
    color: #999;
}

.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    resize: vertical;
    transition: all 0.2s ease;
}

.form-textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

.publish-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.publish-form-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }
    .sidebar {
        width: 100%;
        margin-bottom: 12px;
    }
    .user-card {
        width: 100%;
    }
    .detail-container,
    .chat-container {
        flex-direction: column;
    }
    .detail-left,
    .chat-sidebar {
        width: 100%;
    }
}
