/* ========== 全局变量与重置 ========== */
:root {
    --primary: #0071e3;
    --primary-hover: #0077ed;
    --primary-light: #e8f2ff;
    --accent: #5e5ce6;
    --accent2: #bf5af2;
    --accent3: #ff375f;
    --accent4: #ff9f0a;
    --accent5: #30d158;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --border: #d2d2d7;
    --border-light: #e8e8ed;
    --bg: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #fafafa;
    --card-bg: rgba(255,255,255,0.72);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --nav-h: 56px;
}
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
img { max-width: 100%; display: block; }

/* ========== 多彩背景装饰 ========== */
.bg-decor { position: fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:0; overflow:hidden; }
.bg-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; animation: blobFloat 20s ease-in-out infinite; }
.blob-1 { width: 400px; height: 400px; background: linear-gradient(135deg, #5e5ce6, #bf5af2); top: -100px; right: -50px; animation-delay: 0s; }
.blob-2 { width: 350px; height: 350px; background: linear-gradient(135deg, #ff375f, #ff9f0a); bottom: 10%; left: -80px; animation-delay: -7s; }
.blob-3 { width: 300px; height: 300px; background: linear-gradient(135deg, #30d158, #0071e3); top: 40%; right: 10%; animation-delay: -14s; }
@keyframes blobFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(30px,-40px) scale(1.1); }
    66% { transform: translate(-20px,30px) scale(0.95); }
}

/* ========== 滚动进入动画 ========== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ========== 导航栏 ========== */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    height: var(--nav-h);
}
.nav-container {
    max-width: 1400px; margin: 0 auto; padding: 0 24px;
    height: 100%; display: flex; align-items: center; gap: 16px;
}
/* 角色切换 - 移到logo左边 */
.role-switch {
    display: flex; background: var(--bg-secondary);
    border-radius: var(--radius-sm); padding: 3px;
    flex-shrink: 0;
}
.role-btn {
    padding: 5px 12px; border-radius: 6px; font-size: 13px;
    color: var(--text-secondary); transition: all 0.2s;
    display: flex; align-items: center; gap: 4px;
}
.role-btn.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); font-weight: 500; }
.role-icon { font-size: 14px; }

.logo { display: flex; align-items: center; gap: 8px; cursor: pointer; flex-shrink: 0; }
.logo-img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.logo-mark { font-size: 24px; }
.logo-text { font-size: 18px; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-menu { display: flex; align-items: center; gap: 4px; flex: 1; margin-left: 8px; }
.nav-item {
    padding: 8px 14px; border-radius: var(--radius-sm);
    font-size: 14px; color: var(--text-secondary);
    transition: all 0.2s; position: relative;
}
.nav-item:hover { background: var(--bg-secondary); color: var(--text); }
.nav-item.active { color: var(--text); font-weight: 500; }
.nav-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--accent3); color: #fff;
    font-size: 10px; font-weight: 600;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,55,95,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(255,55,95,0); }
}

.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.search-box { display: flex; align-items: center; background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 0 4px 0 12px; }
.search-box input { border: none; background: transparent; outline: none; padding: 7px 8px; width: 160px; font-size: 13px; }
.search-box button { padding: 5px 8px; font-size: 14px; border-radius: 6px; }
.search-box button:hover { background: var(--border-light); }

.user-area { display: flex; gap: 8px; }
.user-info { display: flex; align-items: center; gap: 8px; }
.user-avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; cursor: pointer; border: 2px solid var(--primary-light); }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
}
.user-name { font-size: 14px; font-weight: 500; }
.btn-logout { font-size: 12px; color: var(--text-tertiary); padding: 4px 8px; border-radius: 6px; }
.btn-logout:hover { background: var(--bg-secondary); color: var(--accent3); }

/* ========== 按钮 ========== */
.btn-primary {
    background: var(--primary); color: #fff;
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-primary.btn-block { width: 100%; padding: 12px; margin-top: 8px; }
.btn-ghost {
    background: var(--bg-secondary); color: var(--text);
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.btn-ghost:hover { background: var(--border-light); }
.btn-ghost.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-white { background: #fff; color: var(--text); padding: 12px 28px; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; transition: all 0.2s; }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline-white { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.5); padding: 12px 28px; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; transition: all 0.2s; }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* ========== 主内容 ========== */
.main-content { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 24px; }
.page { display: none; animation: pageFadeIn 0.3s ease; }
.page.active { display: block; }
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ========== 轮播Banner ========== */
.carousel { position: relative; border-radius: var(--radius-xl); overflow: hidden; margin-bottom: 40px; box-shadow: var(--shadow-lg); }
.carousel-track { display: flex; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.carousel-slide { min-width: 100%; height: 420px; display: flex; align-items: center; padding: 0 60px; position: relative; overflow: hidden; }
.slide-1 { background: linear-gradient(135deg, #5e5ce6 0%, #bf5af2 50%, #ff375f 100%); }
.slide-2 { background: linear-gradient(135deg, #0071e3 0%, #5e5ce6 50%, #bf5af2 100%); }
.slide-3 { background: linear-gradient(135deg, #30d158 0%, #0071e3 50%, #5e5ce6 100%); }
.slide-content { flex: 1; color: #fff; z-index: 2; }
.slide-tag { display: inline-block; background: rgba(255,255,255,0.2); padding: 5px 14px; border-radius: 20px; font-size: 13px; margin-bottom: 16px; backdrop-filter: blur(10px); }
.slide-content h1 { font-size: 42px; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.slide-content p { font-size: 16px; opacity: 0.9; margin-bottom: 28px; }
.slide-btns { display: flex; gap: 12px; }
.slide-visual { flex: 1; position: relative; height: 100%; z-index: 1; }
.float-card {
    position: absolute; background: rgba(255,255,255,0.95);
    border-radius: var(--radius-md); padding: 12px 18px;
    font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 8px;
    animation: floatCard 4s ease-in-out infinite;
}
.float-card span { color: var(--text); }
.card-a { top: 15%; right: 20%; font-size: 24px; animation-delay: 0s; }
.card-b { top: 30%; right: 5%; font-size: 24px; animation-delay: -1s; }
.card-c { bottom: 30%; right: 25%; font-size: 24px; animation-delay: -2s; }
.card-d { bottom: 15%; right: 8%; font-size: 24px; animation-delay: -3s; }
@keyframes floatCard { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.4; }
.blob .blob-1 { width: 200px; height: 200px; background: #ff9f0a; top: 10%; right: 30%; }
.blob .blob-2 { width: 150px; height: 150px; background: #30d158; bottom: 20%; right: 10%; }
.blob .blob-3 { width: 180px; height: 180px; background: #ff375f; top: 20%; right: 15%; }
.blob .blob-4 { width: 160px; height: 160px; background: #ff9f0a; bottom: 15%; right: 25%; }
.team-avatar {
    position: absolute; width: 56px; height: 56px; border-radius: 50%;
    background: rgba(255,255,255,0.95); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; box-shadow: var(--shadow-lg);
}
.t1 { top: 15%; right: 35%; } .t2 { top: 15%; right: 10%; }
.t3 { bottom: 25%; right: 35%; } .t4 { bottom: 25%; right: 10%; }
.team-center { position: absolute; top: 50%; right: 22%; transform: translateY(-50%); font-size: 48px; animation: floatCard 3s ease-in-out infinite; }
.shield-icon { position: absolute; top: 50%; right: 25%; transform: translateY(-50%); font-size: 80px; animation: floatCard 4s ease-in-out infinite; }
.feature-badge {
    position: absolute; background: rgba(255,255,255,0.95);
    border-radius: 20px; padding: 8px 16px; font-size: 14px; font-weight: 600;
    color: var(--accent5); box-shadow: var(--shadow-md);
}
.f1 { top: 20%; right: 10%; } .f2 { top: 45%; right: 5%; } .f3 { bottom: 20%; right: 12%; }
.carousel-prev, .carousel-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.3); color: #fff;
    font-size: 24px; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; backdrop-filter: blur(10px);
}
.carousel-prev { left: 16px; } .carousel-next { right: 16px; }
.carousel-prev:hover, .carousel-next:hover { background: rgba(255,255,255,0.5); }
.carousel-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.3s; }
.carousel-dot.active { width: 24px; border-radius: 4px; background: #fff; }

/* ========== 通用区块 ========== */
.section { margin-bottom: 48px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.section-title { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.section-subtitle { font-size: 14px; color: var(--text-tertiary); }
.subsection-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.more-link { font-size: 14px; color: var(--primary); font-weight: 500; }
.more-link:hover { text-decoration: underline; }

/* ========== 分类卡片 ========== */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.category-card {
    background: var(--card-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    padding: 20px; display: flex; align-items: center; gap: 14px;
    cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden;
}
.category-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(180deg, var(--primary), var(--accent2)); opacity: 0; transition: opacity 0.3s; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.category-card:hover::before { opacity: 1; }
.category-icon { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--bg-secondary); }
.category-icon-emoji { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.category-info { flex: 1; min-width: 0; }
.category-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.category-desc { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-arrow { color: var(--text-tertiary); font-size: 18px; flex-shrink: 0; }

/* ========== 子分类网格 ========== */
.subcategory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }
.subcategory-card {
    background: var(--card-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--border-light); border-radius: var(--radius-md);
    padding: 20px; text-align: center; cursor: pointer;
    transition: all 0.25s;
}
.subcategory-card:hover, .subcategory-card.active {
    transform: translateY(-3px); box-shadow: var(--shadow-md);
    border-color: var(--primary); background: var(--primary-light);
}
.subcategory-icon { font-size: 28px; margin-bottom: 8px; }
.subcategory-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.subcategory-count { font-size: 12px; color: var(--text-tertiary); }

/* ========== 服务卡片 ========== */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card {
    background: var(--card-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    overflow: hidden; cursor: pointer; transition: all 0.3s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-cover {
    width: 100%; height: 180px; object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), #f0e6ff);
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; position: relative;
}
.service-cover img { width: 100%; height: 100%; object-fit: cover; }
.service-tag-badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(10px);
    padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
    color: var(--primary);
}
.service-body { padding: 16px; }
.service-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.service-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.service-tag { background: var(--bg-secondary); padding: 3px 10px; border-radius: 12px; font-size: 11px; color: var(--text-secondary); }
.service-footer { display: flex; justify-content: space-between; align-items: center; }
.service-price { font-size: 20px; font-weight: 700; color: var(--accent3); }
.service-price small { font-size: 12px; font-weight: 400; color: var(--text-tertiary); }
.service-seller { display: flex; align-items: center; gap: 6px; }
.service-seller-avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.service-seller-name { font-size: 12px; color: var(--text-secondary); }

/* ========== 任务卡片（带封面） ========== */
.task-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.task-card {
    background: var(--card-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    overflow: hidden; transition: all 0.3s; display: flex; flex-direction: column;
}
.task-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.task-cover { width: 100%; height: 140px; object-fit: cover; background: linear-gradient(135deg, #e8f2ff, #f0e6ff); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.task-cover img { width: 100%; height: 100%; object-fit: cover; }
.task-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.task-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.task-title { font-size: 16px; font-weight: 600; line-height: 1.4; flex: 1; margin-right: 10px; }
.task-budget { font-size: 18px; font-weight: 700; color: var(--accent3); white-space: nowrap; }
.task-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.task-meta-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-secondary); background: var(--bg-secondary); padding: 3px 8px; border-radius: 12px; }
.task-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.task-footer { display: flex; justify-content: space-between; align-items: center; }
.task-publisher { font-size: 12px; color: var(--text-tertiary); }
.task-take-btn { background: var(--primary); color: #fff; padding: 7px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; transition: all 0.2s; }
.task-take-btn:hover { background: var(--primary-hover); }
.task-taken { background: var(--accent5); color: #fff; padding: 7px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; }

/* ========== 项目卡片 ========== */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card {
    background: var(--card-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    padding: 20px; cursor: pointer; transition: all 0.3s;
    border-left: 4px solid var(--accent5);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.project-name { font-size: 16px; font-weight: 600; }
.project-status { font-size: 11px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.project-status.recruiting { background: #e8f8ee; color: var(--accent5); }
.project-status.in-progress { background: #fff4e5; color: var(--accent4); }
.project-status.completed { background: var(--bg-secondary); color: var(--text-tertiary); }
.project-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-footer { display: flex; justify-content: space-between; align-items: center; }
.project-members { display: flex; }
.project-member-avatar { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.project-member-avatar:first-child { margin-left: 0; }
.project-budget { font-size: 14px; font-weight: 600; color: var(--accent3); }

/* ========== 页面头部 ========== */
.page-header-with-back { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.page-header-with-back h1 { font-size: 28px; font-weight: 700; }
.page-subtitle { font-size: 14px; color: var(--text-tertiary); margin-top: 2px; }
.back-btn { background: var(--bg-secondary); padding: 8px 14px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-secondary); transition: all 0.2s; flex-shrink: 0; }
.back-btn:hover { background: var(--border-light); color: var(--text); }

/* ========== 筛选栏 ========== */
.filter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 13px; color: var(--text-secondary); }
.filter-btn { padding: 6px 14px; border-radius: 20px; font-size: 13px; color: var(--text-secondary); background: var(--bg-secondary); transition: all 0.2s; }
.filter-btn:hover { background: var(--border-light); }
.filter-btn.active { background: var(--primary); color: #fff; }
.sort-select { padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 13px; background: #fff; outline: none; }

/* ========== 表单 ========== */
.form-card { background: var(--card-bg); backdrop-filter: blur(20px); border: 1px solid var(--border-light); border-radius: var(--radius-xl); padding: 32px; max-width: 800px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.required { color: var(--accent3); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 14px; outline: none;
    transition: all 0.2s; background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,113,227,0.1); }
.form-group textarea { resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; display: block; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }

/* ========== 文件上传区域 ========== */
.upload-area {
    border: 2px dashed var(--border); border-radius: var(--radius-md);
    padding: 24px; text-align: center; cursor: pointer;
    transition: all 0.2s; background: var(--bg-tertiary);
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.upload-icon { font-size: 36px; }
.upload-text { font-size: 13px; color: var(--text-secondary); }
.upload-preview.has-image { flex-direction: row; gap: 12px; }
.upload-preview.has-image img { max-width: 200px; max-height: 140px; border-radius: var(--radius-sm); object-fit: cover; }
.sample-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.sample-item { position: relative; width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; }
.sample-item img { width: 100%; height: 100%; object-fit: cover; }
.sample-item .sample-file-icon { font-size: 24px; }
.sample-item .sample-name { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); color: #fff; font-size: 9px; padding: 2px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sample-item .sample-remove { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.5); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ========== 头像上传 ========== */
.avatar-upload {
    width: 80px; height: 80px; border-radius: 50%;
    border: 2px dashed var(--border); margin: 0 auto 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: relative; overflow: hidden;
    background: var(--bg-secondary); transition: all 0.2s;
}
.avatar-upload:hover { border-color: var(--primary); }
.avatar-preview-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-placeholder { font-size: 32px; }
.avatar-upload-hint { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.5); color: #fff; font-size: 10px; padding: 2px 0; text-align: center; }

/* ========== 服务市场介绍 ========== */
.service-market-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; }
.intro-card { background: var(--card-bg); backdrop-filter: blur(20px); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 24px; text-align: center; }
.intro-icon { font-size: 40px; margin-bottom: 12px; }
.intro-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.intro-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }

/* ========== 消息页面（抖音风格） ========== */
.messages-container { display: flex; height: calc(100vh - var(--nav-h) - 80px); min-height: 500px; background: var(--card-bg); backdrop-filter: blur(20px); border: 1px solid var(--border-light); border-radius: var(--radius-xl); overflow: hidden; }
.msg-sidebar { width: 320px; border-right: 1px solid var(--border-light); display: flex; flex-direction: column; background: rgba(255,255,255,0.5); min-height: 0; }
.msg-sidebar-header { padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.msg-sidebar-header h3 { font-size: 18px; font-weight: 700; }
.msg-list { flex: 1; overflow-y: auto; min-height: 0; }
.msg-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; transition: all 0.15s; border-bottom: 1px solid var(--border-light); position: relative; }
.msg-item:hover { background: var(--bg-secondary); }
.msg-item.active { background: var(--primary-light); }
.msg-item-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; }
.msg-item-avatar.group { background: linear-gradient(135deg, var(--accent5), var(--primary)); font-size: 14px; }
.msg-item-info { flex: 1; min-width: 0; }
.msg-item-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; display: flex; justify-content: space-between; align-items: center; }
.msg-item-time { font-size: 11px; color: var(--text-tertiary); font-weight: 400; flex-shrink: 0; margin-left: 8px; }
.msg-item-preview { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item-badge { position: absolute; top: 12px; right: 16px; background: var(--accent3); color: #fff; font-size: 10px; font-weight: 600; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.msg-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-tertiary); padding: 40px; text-align: center; }
.msg-empty .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

.msg-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.msg-chat-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.msg-chat-window { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.msg-chat-header { padding: 14px 20px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; gap: 12px; }
.msg-chat-header-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.msg-chat-header-info { flex: 1; }
.msg-chat-header-name { font-size: 15px; font-weight: 600; }
.msg-chat-header-sub { font-size: 12px; color: var(--text-tertiary); }
.msg-chat-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.msg-bubble { max-width: 70%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-break: break-word; position: relative; }
.msg-bubble.self { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble.other { align-self: flex-start; background: var(--bg-secondary); color: var(--text); border-bottom-left-radius: 4px; }
.msg-bubble .msg-time { font-size: 10px; opacity: 0.6; margin-top: 4px; text-align: right; }
.msg-bubble.system { align-self: center; background: transparent; color: var(--text-tertiary); font-size: 12px; max-width: 100%; text-align: center; padding: 4px; }
.msg-bubble img { max-width: 200px; border-radius: 8px; margin-top: 4px; }
.msg-bubble .msg-file { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.2); padding: 8px 12px; border-radius: 8px; margin-top: 4px; }
.msg-bubble.other .msg-file { background: rgba(0,0,0,0.05); }
.msg-chat-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border-light); }
.msg-file-btn { font-size: 20px; cursor: pointer; padding: 6px; border-radius: 8px; transition: all 0.2s; }
.msg-file-btn:hover { background: var(--bg-secondary); }
.msg-chat-input input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 14px; outline: none; transition: all 0.2s; }
.msg-chat-input input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,113,227,0.1); }

/* ========== 订单 ========== */
.order-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--bg-secondary); padding: 4px; border-radius: var(--radius-sm); width: fit-content; }
.order-tab { padding: 8px 20px; border-radius: 6px; font-size: 14px; color: var(--text-secondary); transition: all 0.2s; }
.order-tab:hover { color: var(--text); }
.order-tab.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.order-list { display: flex; flex-direction: column; gap: 16px; }
.order-card { background: var(--card-bg); backdrop-filter: blur(20px); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 20px; display: flex; gap: 16px; transition: all 0.2s; }
.order-card:hover { box-shadow: var(--shadow-md); }
.order-cover { width: 100px; height: 100px; border-radius: var(--radius-md); object-fit: cover; background: linear-gradient(135deg, var(--primary-light), #f0e6ff); display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.order-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }
.order-info { flex: 1; min-width: 0; }
.order-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.order-title { font-size: 16px; font-weight: 600; }
.order-type-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; margin-left: 8px; }
.order-type-badge.service { background: var(--primary-light); color: var(--primary); }
.order-type-badge.task { background: #fff4e5; color: var(--accent4); }
.order-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.order-price { font-size: 18px; font-weight: 700; color: var(--accent3); }
.order-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; justify-content: center; }
.order-status { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 12px; }
.order-status.pending { background: #fff4e5; color: var(--accent4); }
.order-status.progress { background: var(--primary-light); color: var(--primary); }
.order-status.completed { background: #e8f8ee; color: var(--accent5); }
.order-status.cancelled { background: var(--bg-secondary); color: var(--text-tertiary); }
.order-action-btn { padding: 6px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; transition: all 0.2s; }
.order-action-btn.primary { background: var(--primary); color: #fff; }
.order-action-btn.primary:hover { background: var(--primary-hover); }
.order-action-btn.ghost { background: var(--bg-secondary); color: var(--text); }
.order-action-btn.ghost:hover { background: var(--border-light); }
.order-action-btn.danger { background: #ffe5e5; color: var(--accent3); }
.order-action-btn.danger:hover { background: #ffd0d0; }
.order-chat-btn { position: relative; }
.order-chat-btn .chat-badge { position: absolute; top: -4px; right: -4px; background: var(--accent3); color: #fff; font-size: 9px; min-width: 14px; height: 14px; border-radius: 7px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-tertiary); }
.empty-icon { font-size: 56px; display: block; margin-bottom: 16px; opacity: 0.5; }
.empty-state p { font-size: 15px; }

/* ========== 弹窗 ========== */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.active { display: flex; animation: modalFadeIn 0.2s ease; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content { background: #fff; border-radius: var(--radius-xl); max-height: 90vh; overflow-y: auto; animation: modalSlideUp 0.3s cubic-bezier(0.16,1,0.3,1); box-shadow: var(--shadow-lg); }
@keyframes modalSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-sm { width: 400px; }
.modal-md { width: 560px; }
.modal-lg { width: 720px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border-light); }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { font-size: 24px; color: var(--text-tertiary); cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.2s; }
.modal-close:hover { background: var(--bg-secondary); color: var(--text); }
.modal-body { padding: 24px; }
.modal-tip { text-align: center; font-size: 13px; color: var(--text-secondary); margin-top: 16px; }
.modal-tip a { color: var(--primary); cursor: pointer; }

/* 详情弹窗内容 */
.detail-cover { width: 100%; height: 240px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 16px; background: linear-gradient(135deg, var(--primary-light), #f0e6ff); display: flex; align-items: center; justify-content: center; font-size: 64px; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }
.detail-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.detail-price { font-size: 24px; font-weight: 700; color: var(--accent3); margin-bottom: 12px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.detail-meta-item { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.detail-section { margin-bottom: 16px; }
.detail-section h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.detail-section p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-samples { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-sample { width: 120px; height: 90px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; }
.detail-sample img { width: 100%; height: 100%; object-fit: cover; }
.detail-sample .sample-icon { font-size: 24px; }
.detail-actions { display: flex; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.detail-files { display: flex; flex-direction: column; gap: 8px; }
.detail-file-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-secondary); border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; }
.detail-file-item:hover { background: var(--border-light); }
.detail-file-icon { font-size: 20px; }
.detail-file-name { font-size: 13px; font-weight: 500; flex: 1; }
.detail-file-size { font-size: 12px; color: var(--text-tertiary); }

/* 项目详情成员 */
.project-members-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.project-member-card { display: flex; align-items: center; gap: 8px; background: var(--bg-secondary); padding: 6px 12px; border-radius: 20px; }
.project-member-card .avatar { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.project-member-card .name { font-size: 13px; }
.project-member-card .role { font-size: 11px; color: var(--text-tertiary); }

/* ========== Toast ========== */
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-20px); background: rgba(0,0,0,0.8); color: #fff; padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; z-index: 2000; opacity: 0; pointer-events: none; transition: all 0.3s; backdrop-filter: blur(10px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: rgba(48,209,88,0.9); }
.toast.error { background: rgba(255,55,95,0.9); }

/* ========== 页脚 ========== */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border-light); margin-top: 60px; position: relative; z-index: 1; }
.footer-container { max-width: 1400px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.footer-logo-img { width: 28px; height: 28px; border-radius: 6px; }
.footer-col p { font-size: 13px; color: var(--text-tertiary); margin-bottom: 6px; }
.footer-col h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; cursor: pointer; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding: 20px; border-top: 1px solid var(--border-light); font-size: 12px; color: var(--text-tertiary); }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .subcategory-grid { grid-template-columns: repeat(3, 1fr); }
    .service-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
    .task-grid { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr 1fr; }
    .search-box { display: none; }
}
@media (max-width: 640px) {
    .nav-container { padding: 0 12px; gap: 8px; }
    .role-btn { padding: 4px 8px; font-size: 12px; }
    .logo-text { display: none; }
    .nav-menu { gap: 0; }
    .nav-item { padding: 6px 8px; font-size: 12px; }
    .carousel-slide { height: 320px; padding: 0 24px; }
    .slide-content h1 { font-size: 28px; }
    .slide-visual { display: none; }
    .category-grid, .subcategory-grid { grid-template-columns: 1fr; }
    .service-grid, .project-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .service-market-intro { grid-template-columns: 1fr; }
    .messages-container { flex-direction: column; height: calc(100vh - var(--nav-h) - 80px); height: calc(100dvh - var(--nav-h) - 80px); }
    .msg-sidebar { width: 100%; max-height: 300px; }
    .footer-container { grid-template-columns: 1fr; }
    .modal-sm, .modal-md, .modal-lg { width: 100%; }
}
