/* ============================================================
   在线供需撮合平台 - 响应式样式表
   适配手机端 / 平板端 / 电脑端
   ============================================================ */

/* === CSS 重置 & 基础变量 === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --success: #0d904f;
    --success-light: #e6f4ea;
    --danger: #d93025;
    --danger-light: #fce8e6;
    --warning: #e37400;
    --warning-light: #fef7e0;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #80868b;
    --border: #dadce0;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #f1f3f4;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
    --max-width: 1200px;
    --nav-height: 60px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

.site-content {
    flex: 1;
    padding-top: var(--nav-height);
}

/* === 导航栏 === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-left: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.938rem;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-register {
    background: var(--primary);
    color: #fff !important;
}
.nav-register:hover {
    background: var(--primary-dark);
}

.nav-user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.938rem;
    font-weight: 500;
}

/* 移动端菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* === 按钮系统 === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.938rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; color: inherit; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-gray); }

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover { background: #0b7a3e; }

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: #b3261e; }

.btn-block { display: flex; width: 100%; }
.btn-small { padding: 6px 12px; font-size: 0.813rem; }

/* === 表单 === */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group .required { color: var(--danger); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.938rem;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

select { cursor: pointer; appearance: auto; }

.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.938rem;
    transition: var(--transition);
}

.radio-label:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.radio-label input[type="radio"] { accent-color: var(--primary); }

/* === 警告/提示 === */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid #b6d4fe;
}

/* === 认证页面 === */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height) - 100px);
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.938rem;
}

.auth-form .form-group { margin-bottom: 20px; }
.auth-form .btn { margin-top: 8px; padding: 12px; font-size: 1rem; }

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.938rem;
}

/* === 英雄搜索区 === */
.hero-section {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    padding: 60px 20px;
    text-align: center;
    color: #fff;
}

.hero-content { max-width: 700px; margin: 0 auto; }

.hero-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.search-box {
    display: flex;
    background: #fff;
    border-radius: var(--radius-full);
    padding: 4px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 14px 20px !important;
    font-size: 1.063rem !important;
    border-radius: var(--radius-full) !important;
    outline: none;
}
.search-input:focus { box-shadow: none !important; }

.search-btn {
    padding: 12px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.search-btn:hover { background: var(--primary-dark); }

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 100;
}

.search-suggestions li { border-bottom: 1px solid var(--border); }
.search-suggestions li:last-child { border-bottom: none; }

.search-suggestions a {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
}
.search-suggestions a:hover { background: var(--bg-gray); }

.sug-type {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 500;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.hero-stats span {
    font-size: 0.938rem;
    opacity: 0.85;
}

.hero-stats strong {
    font-size: 1.125rem;
}

/* === 主布局 === */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 24px;
    padding: 24px 20px;
}

/* === 筛选侧边栏 === */
.filter-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    align-self: flex-start;
    position: sticky;
    top: calc(var(--nav-height) + 24px);
}

.filter-sidebar h3 {
    font-size: 1.063rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-option {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.813rem;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--bg-white);
    transition: var(--transition);
    cursor: pointer;
}

.filter-option:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-option.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.filter-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.875rem;
}

.filter-apply { margin-top: 8px; }
.filter-apply + .btn { margin-top: 8px; }

/* === 内容区 === */
.content-area {
    flex: 1;
    min-width: 0;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.content-header h2 {
    font-size: 1.375rem;
    font-weight: 600;
}

.result-count {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 8px;
}

/* === 需求卡片 === */
.demand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.demand-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.demand-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.demand-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.demand-card-title {
    font-size: 1.063rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.demand-card-title:hover { color: var(--primary); }

.demand-card-content {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex: 1;
    line-height: 1.5;
}

.demand-card-footer {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.demand-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.813rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.card-budget {
    color: var(--danger);
    font-weight: 600;
}

.demand-card-info {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-category {
    background: var(--bg-gray);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

/* === 需求类型徽章 === */
.demand-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.type-demand { background: #e8f0fe; color: #1a73e8; }
.type-supply { background: #e6f4ea; color: #0d904f; }

/* === 状态标签 === */
.demand-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-open { background: #e8f0fe; color: #1a73e8; }
.status-progress { background: #fef7e0; color: #e37400; }
.status-resolved { background: #e6f4ea; color: #0d904f; }
.status-closed { background: #f1f3f4; color: #5f6368; }

.bid-status-pending { color: #e37400; }
.bid-status-accepted { color: #0d904f; }
.bid-status-rejected { color: #d93025; }

/* === 需求列表项 === */
.demand-list { display: flex; flex-direction: column; gap: 12px; }

.demand-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    transition: var(--transition);
}

.demand-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }

.demand-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.demand-item-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.demand-item-meta {
    display: flex;
    gap: 16px;
    font-size: 0.813rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.demand-item-meta .demand-category {
    background: var(--bg-gray);
    padding: 1px 8px;
    border-radius: var(--radius-full);
}

.demand-item-meta .demand-budget {
    color: var(--danger);
    font-weight: 600;
}

/* === 详情页 === */
.demand-detail-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.demand-detail-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

.demand-detail-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.demand-detail-header { margin-bottom: 24px; }

.demand-detail-type {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.demand-detail-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
}

.demand-detail-meta {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.meta-item.budget {
    color: var(--danger);
    font-weight: 600;
}

.demand-detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-gray);
    border-radius: var(--radius-full);
    font-size: 0.813rem;
    color: var(--text-secondary);
}

.demand-category-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-gray);
    border-radius: var(--radius-full);
    font-size: 0.813rem;
    color: var(--text-secondary);
}

.demand-detail-body {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.demand-detail-body h3 {
    font-size: 1.063rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.demand-content {
    font-size: 0.938rem;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.demand-detail-assignee {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.demand-detail-assignee h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* === 侧边栏卡 === */
.demand-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-card, .demand-actions-card, .bids-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.user-card { text-align: center; }

.user-card-avatar { margin-bottom: 12px; }

.user-card h4 {
    font-size: 1.063rem;
    margin-bottom: 8px;
}

.user-rating { font-size: 0.875rem; color: var(--warning); margin-bottom: 8px; }
.user-since { font-size: 0.813rem; color: var(--text-muted); margin-bottom: 8px; }
.user-bio { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }

.demand-actions-card h3 { font-size: 1rem; margin-bottom: 12px; }

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* === 应标卡 === */
.bids-card { margin-top: 0; }

.bid-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.bid-item:last-child { border-bottom: none; padding-bottom: 0; }

.bid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.bid-user { font-weight: 600; }
.bid-time { color: var(--text-muted); }

.bid-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.bid-accept-form { margin-top: 8px; }

.text-muted { color: var(--text-muted); font-size: 0.875rem; }

/* === 分页 === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-white);
    transition: var(--transition);
}

.page-link:hover { border-color: var(--primary); color: var(--primary); }

.page-link.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 0 12px;
}

/* === 用户中心 === */
.profile-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.profile-info h2 { font-size: 1.5rem; margin-bottom: 4px; }
.profile-email { color: var(--text-secondary); font-size: 0.938rem; }
.profile-date { color: var(--text-muted); font-size: 0.813rem; margin-top: 4px; }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    color: var(--text-primary);
}

.stat-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-primary);
}

.stat-item.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.813rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.profile-section h3 {
    font-size: 1.063rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.profile-form textarea { margin-bottom: 12px; }

/* === 发布页 === */
.publish-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 20px;
}

.publish-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.publish-card h1 {
    font-size: 1.5rem;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.publish-form .form-group { margin-bottom: 20px; }
.publish-form .required { color: var(--danger); }

.publish-form .btn {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* === 空状态 === */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.empty-state p { margin-bottom: 4px; font-size: 0.938rem; }
.empty-state .btn { margin-top: 16px; }

/* === 推荐区域 === */
.recommend-section {
    margin-bottom: 32px;
}

.recommend-section h3 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === 头像占位 === */
.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.avatar-placeholder.large {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.avatar-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

/* === 页脚 === */
.site-footer {
    background: var(--text-primary);
    color: #fff;
    padding: 40px 20px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-section p {
    font-size: 0.875rem;
    opacity: 0.7;
    line-height: 1.6;
}

.footer-section a {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    margin-bottom: 8px;
    transition: var(--transition);
}
.footer-section a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 0;
    text-align: center;
    font-size: 0.813rem;
    opacity: 0.6;
}

.avatar-placeholder.xlarge {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
}

/* === 用户头像图片 === */
.user-avatar-img {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    object-fit: cover;
    width: 64px;
    height: 64px;
}

.user-avatar-img.large {
    width: 80px;
    height: 80px;
}

.user-avatar-img.xlarge {
    width: 100px;
    height: 100px;
}

.user-avatar-img.small {
    width: 28px;
    height: 28px;
}

/* === 表单行（双列布局） === */
.form-row {
    display: flex;
    gap: 16px;
}

.form-group-half {
    flex: 1;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* === 文件上传 === */
.file-upload-area {
    margin-bottom: 12px;
}

.file-input {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.file-upload-label:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.upload-icon {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
}

/* === 图片预览 === */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.625rem;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === 已有图片（编辑模式） === */
.existing-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.existing-image-item {
    position: relative;
    width: 90px;
}

.thumb-preview {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.keep-image-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 4px;
    cursor: pointer;
}

/* === 详情页信息网格 === */
.demand-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 16px 0;
    margin-bottom: 16px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.info-value {
    font-size: 0.938rem;
    font-weight: 500;
    color: var(--text-primary);
}

.price-value {
    color: var(--danger);
    font-size: 1.125rem;
    font-weight: 700;
}

.info-remaining {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 400;
}

.text-expired {
    color: var(--danger) !important;
}

/* === 图片画廊 === */
.demand-images-section {
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.demand-images-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.demand-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
}

.gallery-link {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* === 过期徽章 === */
.demand-expired-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    background: var(--danger-light);
    color: var(--danger);
    font-weight: 600;
}

.card-expired-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: #fff;
    font-size: 0.625rem;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
    z-index: 1;
}

/* === 卡片区域/价格展示 === */
.card-region {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.card-price {
    color: var(--danger);
    font-weight: 700;
    font-size: 0.875rem;
    margin-left: auto;
}

.demand-card { position: relative; }

/* === 应标报价 === */
.bid-price {
    font-size: 0.875rem;
    color: var(--danger);
    font-weight: 600;
    margin-bottom: 4px;
}

/* === 头像上传区域 === */
.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.avatar-upload-form {
    text-align: center;
}

.avatar-upload-btn {
    cursor: pointer;
    font-size: 0.813rem;
}

/* === 警告提示 === */
.alert-warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    color: var(--warning);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.875rem;
}

/* === 价格行 === */
.price-row {
    transition: opacity 0.2s ease;
}

/* === 表单操作区 === */
.form-actions {
    margin-top: 24px;
}

/* ============================================================
   响应式设计 - 平板端 (768px - 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .demand-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .demand-detail-page {
        max-width: 700px;
    }

    .demand-detail-main {
        grid-template-columns: 1fr;
    }

    .demand-detail-sidebar { order: 1; }
    .demand-detail-card { order: 0; }

    .demand-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .demand-images-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   响应式设计 - 手机端 (< 768px)
   ============================================================ */
@media (max-width: 768px) {
    :root { --nav-height: 56px; }

    /* 导航 */
    .nav-toggle { display: flex; }

    .nav-menu {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px 20px;
        margin-left: 0;
        box-shadow: var(--shadow-md);
        gap: 8px;
    }

    .nav-menu.show { display: flex; }

    .nav-links, .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 4px;
    }

    .nav-link {
        padding: 10px 16px;
        width: 100%;
    }

    .nav-user-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 8px;
    }

    /* 主布局 */
    .main-container {
        flex-direction: column;
        padding: 16px 12px;
        gap: 16px;
    }

    .filter-sidebar {
        width: 100%;
        position: static;
    }

    .filter-options { gap: 4px; }

    .filter-option {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    /* 英雄区 */
    .hero-section { padding: 40px 16px; }

    .hero-content h1 { font-size: 1.625rem; }

    .hero-subtitle { font-size: 0.938rem; }

    .search-box { flex-direction: column; border-radius: var(--radius); padding: 0; background: transparent; box-shadow: none; }

    .search-input {
        border-radius: var(--radius) !important;
        border: 1px solid var(--border) !important;
        background: #fff !important;
        margin-bottom: 8px;
    }

    .search-btn {
        width: 100%;
        border-radius: var(--radius);
        padding: 14px;
    }

    .hero-stats {
        gap: 16px;
    }

    /* 需求卡片 */
    .demand-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* 内容标题 */
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-header h2 { font-size: 1.125rem; }

    /* 详情页 */
    .demand-detail-page {
        padding: 16px 12px;
    }

    .demand-detail-card { padding: 20px; }

    .demand-detail-card h1 { font-size: 1.25rem; }

    .demand-detail-meta { flex-direction: column; gap: 6px; }

    .demand-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .demand-images-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 认证 */
    .auth-card { padding: 24px 20px; }

    /* 用户中心 */
    .profile-page { padding: 16px 12px; }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .profile-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }

    .stat-item { padding: 16px 12px; }
    .stat-number { font-size: 1.375rem; }

    .profile-section { padding: 16px; }

    /* 发布 */
    .publish-page { padding: 16px 12px; }
    .publish-card { padding: 20px; }

    /* 分页 */
    .pagination { gap: 4px; }

    /* 页脚 */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-footer { padding: 32px 16px 0; }
}

/* ============================================================
   响应式设计 - 小屏手机 (< 480px)
   ============================================================ */
@media (max-width: 480px) {
    .demand-card-header { flex-wrap: wrap; }

    .hero-stats { flex-direction: column; gap: 8px; align-items: center; }

    .profile-stats { grid-template-columns: 1fr 1fr; }

    .action-buttons { flex-direction: column; }
    .action-buttons .btn, .action-buttons form { width: 100%; }
    .action-buttons .btn { justify-content: center; }

    .radio-group { flex-direction: column; }
}

/* ============================================================
   v3 新增 - 深色模式
   ============================================================ */
.dark-mode,
html.dark-mode {
    --primary: #5b9cf5;
    --primary-dark: #3b7dd8;
    --primary-light: #1e3a5f;
    --success: #34a853;
    --success-light: #0d2818;
    --danger: #f28b82;
    --danger-light: #3c1b1b;
    --warning: #f9ab00;
    --warning-light: #3d2c00;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #70757a;
    --border: #3c4043;
    --bg-white: #1e1e2e;
    --bg-light: #121212;
    --bg-gray: #2d2d3f;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.25);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.4), 0 4px 6px rgba(0,0,0,0.3);
}

.dark-mode .demand-card:hover {
    box-shadow: 0 0 0 1px var(--primary), 0 4px 12px rgba(91,156,245,0.15);
    border-color: var(--primary);
}

.dark-mode .search-btn { background: var(--primary); }
.dark-mode .search-btn:hover { background: var(--primary-dark); }

.dark-mode .filter-option:hover { border-color: var(--primary); color: var(--primary); }

.dark-mode .radio-label:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dark-mode input:focus, .dark-mode select:focus, .dark-mode textarea:focus {
    box-shadow: 0 0 0 3px rgba(91,156,245,0.2);
}

/* ============================================================
   v3 新增 - Toast 通知系统
   ============================================================ */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 16px);
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--text-primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    max-width: 360px;
    word-break: break-word;
}

.toast.toast-success { background: var(--success); }
.toast.toast-error { background: var(--danger); }
.toast.toast-info { background: var(--primary); }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ============================================================
   v3 新增 - 回到顶部按钮
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
    z-index: 900;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ============================================================
   v3 新增 - 骨架屏加载
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-gray) 25%, #e0e0e0 50%, var(--bg-gray) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius);
}

.dark-mode .skeleton {
    background: linear-gradient(90deg, var(--bg-gray) 25%, #3d3d50 50%, var(--bg-gray) 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 180px;
    border-radius: var(--radius);
}

.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }
.skeleton-title { height: 24px; width: 80%; margin-bottom: 12px; }

/* ============================================================
   v3 新增 - NEW 标签
   ============================================================ */
.card-new-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--success);
    color: #fff;
    font-size: 0.625rem;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 700;
    z-index: 1;
    letter-spacing: 0.5px;
}

.card-video-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    font-size: 0.625rem;
    margin-left: 2px;
}

.card-bid-count {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.75rem;
}

/* ============================================================
   v3 新增 - 视频嵌入
   ============================================================ */
.demand-video-section {
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.demand-video-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: #000;
}

.video-wrapper iframe,
.video-wrapper .native-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.native-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
}

.video-fallback {
    padding: 20px;
    text-align: center;
    background: var(--bg-gray);
    border-radius: var(--radius);
}

/* ============================================================
   v3 新增 - 用户中心子标签 + 昵称/用户名
   ============================================================ */
.profile-username {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.profile-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 20px;
}

.profile-tab {
    flex: 1;
    text-align: center;
    padding: 14px 16px;
    font-size: 0.938rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-right: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.profile-tab:last-child { border-right: none; }

.profile-tab:hover {
    background: var(--bg-gray);
    color: var(--primary);
    text-decoration: none;
}

.profile-tab.active {
    background: var(--primary);
    color: #fff;
}

/* ============================================================
   v3 新增 - 主题选择器
   ============================================================ */
.theme-options {
    display: flex;
    gap: 12px;
}

.theme-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.theme-option:hover {
    border-color: var(--primary);
}

.theme-option.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.theme-option input[type="radio"] { display: none; }

.theme-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.theme-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================================
   v3 新增 - 登录页忘记密码链接
   ============================================================ */
.form-extra {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
    margin-top: -8px;
}

.forgot-link {
    font-size: 0.813rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.forgot-link:hover { color: var(--primary); }

/* ============================================================
   v3 新增 - 章节描述文字
   ============================================================ */
.section-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.section-desc strong { color: var(--text-primary); }

/* ============================================================
   v3 新增 - 复制联系方式按钮
   ============================================================ */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-left: 6px;
}

.copy-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.copy-btn.copied {
    background: var(--success-light);
    color: var(--success);
    border-color: var(--success);
}

/* ============================================================
   v3 新增 - 最近浏览（Cookie 驱动）
   ============================================================ */
.recent-section {
    margin-bottom: 32px;
}

.recent-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.recent-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.recent-scroll::-webkit-scrollbar { height: 4px; }
.recent-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.recent-item {
    flex: 0 0 200px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    transition: var(--transition);
    white-space: normal;
}

.recent-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.recent-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.recent-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.recent-item-price {
    color: var(--danger);
    font-weight: 600;
    font-size: 0.813rem;
    margin-top: 4px;
}

/* ============================================================
   v3 新增 - 响应式的 profile-tabs
   ============================================================ */
@media (max-width: 480px) {
    .theme-options {
        flex-direction: column;
    }

    .profile-tabs {
        flex-wrap: wrap;
    }

    .profile-tab {
        flex: 1 1 auto;
        padding: 10px 12px;
        font-size: 0.813rem;
    }

    .recent-item {
        flex: 0 0 160px;
    }
}

/* ============================================================
   v3 新增 - 可选标签样式
   ============================================================ */
.form-group .optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75rem;
}

/* ============================================================
   v4 新增 - 意向操作卡片
   ============================================================ */
.interest-actions-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.interest-actions-card h3 {
    font-size: 1rem;
    margin-bottom: 14px;
    color: var(--text-secondary);
}

.interest-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.interest-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-white);
    cursor: pointer;
    font-size: 0.938rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    min-width: 120px;
    justify-content: center;
}

.interest-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.interest-btn:active { transform: translateY(0); }

.interest-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 有意向 - 激活态 */
.interest-btn.interest-interested.active {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
    font-weight: 600;
}

/* 无意向 - 激活态 */
.interest-btn.interest-not-interested.active {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
    font-weight: 600;
}

/* 收藏 - 激活态 */
.interest-btn.interest-bookmark.active {
    background: #fff8e1;
    border-color: #f9a825;
    color: #f57f17;
    font-weight: 600;
}

.dark-mode .interest-btn.interest-bookmark.active {
    background: #3d2c00;
    border-color: #f9a825;
    color: #fdd835;
}

.interest-icon {
    font-size: 1.125rem;
}

.interest-count {
    font-size: 0.75rem;
    background: var(--bg-gray);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: 2px;
    min-width: 18px;
    text-align: center;
}

/* ============================================================
   v4 新增 - 文档下载列表
   ============================================================ */
.demand-documents-section {
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.demand-documents-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-gray);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.doc-icon {
    font-size: 1.25rem;
}

.doc-link {
    flex: 1;
    min-width: 0;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-link:hover { text-decoration: underline; }

.doc-size {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.doc-download-btn {
    font-size: 0.75rem;
    padding: 4px 12px;
    white-space: nowrap;
}

/* ============================================================
   v4 新增 - 文件上传预览（文档/视频）
   ============================================================ */
.video-preview-container,
.document-preview-container {
    margin-top: 8px;
}

.preview-icon {
    font-size: 1.25rem;
}

.preview-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.existing-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-gray);
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.file-icon { font-size: 1.125rem; }
.file-name { color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 0.75rem; color: var(--text-muted); }

.keep-file-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.existing-documents { margin-bottom: 12px; }

/* ============================================================
   v4 新增 - 智能分类提示
   ============================================================ */
#smart-category-hint {
    font-size: 0.813rem;
    padding: 6px 12px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    display: inline-block;
    margin-top: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

#smart-category-hint:hover {
    background: var(--primary);
    color: #fff !important;
}

/* ============================================================
   v4 新增 - 意向标记标签（用户中心）
   ============================================================ */
.interest-tag-interested {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--success-light);
    color: var(--success);
    font-weight: 500;
}

.interest-tag-not_interested {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--bg-gray);
    color: var(--text-muted);
    font-weight: 500;
}

.interest-tag-bookmark {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: #fff8e1;
    color: #f57f17;
    font-weight: 500;
}

.dark-mode .interest-tag-bookmark {
    background: #3d2c00;
    color: #fdd835;
}

.interest-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================================
   v5 新增 - 密码查看切换按钮
   ============================================================ */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.password-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-gray);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

/* ============================================================
   v5 新增 - 消息提醒徽章
   ============================================================ */
.nav-msg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.688rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: var(--danger);
    border-radius: var(--radius-full);
    margin-left: 4px;
    vertical-align: middle;
}

.nav-msg-badge:empty {
    display: none;
}

/* ============================================================
   v5 新增 - 站内信/聊天页面
   ============================================================ */
.messages-page {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 20px;
}

.messages-container {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    min-height: 500px;
    overflow: hidden;
    border: 1px solid var(--border);
}

/* 对话列表侧栏 */
.conversations-sidebar {
    width: 320px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
    flex-shrink: 0;
}

.conversations-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background var(--transition);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.conversation-item:hover {
    background: var(--bg-white);
}

.conversation-item.active {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.conversation-item .conv-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
    font-size: 1rem;
    overflow: hidden;
}

.conversation-item .conv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-info .conv-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-info .conv-last-msg {
    font-size: 0.813rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.conversation-meta {
    text-align: right;
    flex-shrink: 0;
}

.conversation-meta .conv-time {
    font-size: 0.688rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.conversation-meta .conv-unread {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.688rem;
    font-weight: 600;
    line-height: 18px;
    color: #fff;
    background: var(--danger);
    border-radius: var(--radius-full);
    text-align: center;
    margin-top: 4px;
}

.conv-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* 聊天区域 */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.938rem;
}

.chat-header .back-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px;
    color: var(--text-secondary);
    line-height: 1;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-gray);
}

.chat-message {
    display: flex;
    max-width: 75%;
    animation: msgFadeIn 0.2s ease;
}

@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.msg-sent {
    align-self: flex-end;
}

.chat-message.msg-received {
    align-self: flex-start;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
}

.msg-sent .chat-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.msg-received .chat-bubble {
    background: var(--bg-white);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.chat-message .msg-time {
    font-size: 0.688rem;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 14px;
}

.msg-sent .msg-time {
    text-align: right;
}

.chat-input-area {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    background: var(--bg-white);
}

.chat-input-area textarea {
    flex: 1;
    resize: none;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.875rem;
    min-height: 40px;
    max-height: 120px;
    outline: none;
    transition: border-color var(--transition);
}

.chat-input-area textarea:focus {
    border-color: var(--primary);
}

.chat-input-area .btn-send {
    flex-shrink: 0;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.chat-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.938rem;
}

/* ============================================================
   v6 新增 - 用户关注功能
   ============================================================ */

/* 关注统计 */
.user-follow-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 12px 0 8px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.follow-stat-item {
    font-size: 0.813rem;
    color: var(--text-secondary);
}

.follow-stat-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 关注按钮 */
.user-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.follow-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
    background: var(--bg-white);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.follow-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26,115,232,0.25);
}

.follow-btn:active {
    transform: translateY(0);
}

.follow-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.follow-btn.following {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.follow-btn.following:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

.follow-icon {
    font-weight: 700;
    font-size: 1rem;
}

/* 社交标签页 */
.profile-social-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.social-tab {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.938rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    cursor: pointer;
}

.social-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.social-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 关注/粉丝用户列表 */
.follow-user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.follow-user-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.follow-user-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.follow-user-avatar {
    flex-shrink: 0;
}

.follow-user-avatar .user-avatar-img,
.follow-user-avatar .avatar-placeholder {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
}

.follow-user-info {
    flex: 1;
    min-width: 0;
}

.follow-user-name {
    font-weight: 600;
    font-size: 0.938rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.follow-user-name:hover {
    color: var(--primary);
    text-decoration: none;
}

.follow-user-bio {
    font-size: 0.813rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-user-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .follow-user-item {
        flex-wrap: wrap;
    }

    .follow-user-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
}

/* ============================================================
   v5 新增 - 管理后台
   ============================================================ */
.admin-page {
    max-width: var(--max-width);
    margin: 20px auto;
    padding: 0 20px;
}

.admin-header {
    margin-bottom: 24px;
}

.admin-header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-block;
}

.admin-tab:hover {
    color: var(--primary);
}

.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-gray);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 10px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--bg-light);
}

.admin-table .role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge-super_admin {
    background: #fce4ec;
    color: #c62828;
}

.dark-mode .role-badge-super_admin {
    background: #4a1525;
    color: #ef9a9a;
}

.role-badge-admin {
    background: #e3f2fd;
    color: #1565c0;
}

.dark-mode .role-badge-admin {
    background: #0d2137;
    color: #90caf9;
}

.role-badge-user {
    background: #e8f5e9;
    color: #2e7d32;
}

.dark-mode .role-badge-user {
    background: #1a3a1c;
    color: #a5d6a7;
}

.admin-btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-btn-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-white);
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-primary);
    text-decoration: none;
    display: inline-block;
}

.admin-btn-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.admin-btn-sm.btn-danger {
    color: var(--danger);
    border-color: var(--danger);
}

.admin-btn-sm.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.admin-btn-sm.btn-success {
    color: var(--success);
    border-color: var(--success);
}

.admin-btn-sm.btn-success:hover {
    background: var(--success);
    color: #fff;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: center;
}

.admin-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.admin-stat-card .stat-label {
    font-size: 0.813rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 操作确认弹窗 */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.admin-modal h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
}

.admin-modal p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.admin-modal .btn {
    margin-right: 8px;
}

/* 批量操作 */
.admin-batch-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .messages-container {
        flex-direction: column;
        min-height: calc(100vh - 140px);
    }

    .conversations-sidebar {
        width: 100%;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        display: none;
    }

    .conversations-sidebar.visible {
        display: flex;
    }

    .chat-area {
        display: none;
    }

    .chat-area.visible {
        display: flex;
    }

    .chat-header .back-btn {
        display: block;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .admin-table th,
    .admin-table td {
        white-space: nowrap;
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   v7 新增 - 公共用户信息页面
   ============================================================ */

.user-profile-page {
    max-width: var(--max-width);
    margin: 20px auto;
    padding: 0 20px;
}

/* 用户 header 卡片 */
.user-profile-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 30px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.user-profile-avatar .user-avatar-img,
.user-profile-avatar .avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    font-size: 2.25rem;
    flex-shrink: 0;
    border: 3px solid var(--primary-light);
}

.user-profile-info {
    flex: 1;
    min-width: 0;
}

.user-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.user-profile-username {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.user-profile-bio {
    font-size: 0.938rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
    max-width: 560px;
}

.user-profile-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.profile-detail-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.813rem;
    color: var(--text-secondary);
}

.profile-detail-item .detail-icon {
    flex-shrink: 0;
    color: var(--text-muted);
}

.profile-detail-item a {
    color: var(--primary);
    text-decoration: none;
}

.profile-detail-item a:hover {
    text-decoration: underline;
}

/* 操作按钮区 */
.user-profile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 130px;
}

.user-profile-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.user-profile-actions .follow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 20px;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.user-profile-actions .follow-btn:hover {
    background: var(--primary);
    color: #fff;
}

.user-profile-actions .follow-btn.following {
    background: var(--primary-light);
}

.user-profile-actions .follow-btn.following:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

.user-profile-actions .follow-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 统计卡片 */
.user-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.profile-stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 16px;
    text-align: center;
    transition: box-shadow var(--transition);
}

.profile-stat-card:hover {
    box-shadow: var(--shadow-sm);
}

.profile-stat-card .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.profile-stat-card .stat-label {
    font-size: 0.813rem;
    color: var(--text-muted);
}

/* 供需记录区域 + 标签页 */
.user-profile-records {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.records-tabs {
    display: flex;
    border-bottom: 2px solid var(--bg-gray);
}

.records-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 20px;
    font-size: 0.938rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}

.records-tab:hover {
    color: var(--primary);
    background: var(--bg-gray);
}

.records-tab.active {
    color: var(--primary);
    font-weight: 600;
    border-bottom-color: var(--primary);
}

.records-tab .tab-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.records-content {
    padding: 20px 24px;
}

/* 承接记录列表 */
.accepted-bids-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.accepted-bid-item {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: box-shadow var(--transition);
}

.accepted-bid-item:hover {
    box-shadow: var(--shadow-sm);
}

.accepted-bid-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 8px;
}

.accepted-bid-title-row .demand-item-title {
    font-size: 0.938rem;
    color: var(--text-primary);
}

.accepted-bid-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.813rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.accepted-bid-message {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--bg-gray);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.bid-message-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.813rem;
}

.accepted-bid-price {
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--primary-dark);
}

/* ============================================================
   v7 新增 - 用户名链接样式
   ============================================================ */

/* 全局用户名链接基础样式 */
a[class*="user-link"],
.meta-user-link,
.card-user-link,
.bid-user-link,
.admin-user-link,
.chat-user-link,
.conv-user-link,
.follow-user-name-link,
.user-card-name-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition);
    border-bottom: 1px solid transparent;
}

a[class*="user-link"]:hover,
.meta-user-link:hover,
.card-user-link:hover,
.bid-user-link:hover,
.admin-user-link:hover,
.chat-user-link:hover,
.conv-user-link:hover,
.follow-user-name-link:hover,
.user-card-name-link:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

/* 需求详情 meta 区的用户名链接 */
.demand-detail-meta .meta-user-link {
    font-weight: 600;
}

/* 需求卡片卡片中的用户名链接 */
.card-user-link {
    font-size: 0.813rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.card-user-link:hover {
    color: var(--primary);
}

/* 发布者卡片中的用户名链接 */
.user-card-name-link {
    font-size: inherit;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom-color: var(--primary-light);
}

.user-card-name-link:hover {
    color: var(--primary);
}

/* 应标列表用户名链接 */
.bid-user-link {
    font-weight: 600;
    font-size: 0.938rem;
}

/* 后台管理用户名链接 */
.admin-user-link {
    font-weight: 500;
}

/* 关注列表用户名链接 */
.follow-user-name-link {
    font-weight: 600;
    font-size: 0.938rem;
    color: var(--text-primary);
}

.follow-user-name-link:hover {
    color: var(--primary);
}

/* 私信页面用户名链接 */
.chat-user-link,
.conv-user-link {
    font-weight: 600;
}

/* user.php 头像 xlarge 尺寸 */
.avatar-placeholder.xlarge {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-img.xlarge {
    object-fit: cover;
}

/* user.php 响应式 */
@media (max-width: 640px) {
    .user-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .user-profile-details {
        justify-content: center;
    }

    .user-profile-actions {
        width: 100%;
        flex-direction: row;
    }

    .user-profile-actions .btn {
        flex: 1;
    }

    .user-profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .records-tab {
        font-size: 0.813rem;
        padding: 12px 12px;
    }

    .records-tab .tab-count {
        display: none;
    }

    .records-content {
        padding: 14px 16px;
    }

    .accepted-bid-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
